/* ============================================================================
   teprof.com — shared styles.

   The "Paper" design (owner 2026-11-01; prototype/teprof-site-20261101-140355.html):
   warm paper ground, ink text, Fraunces display type, Plus Jakarta Sans body.
   Pactroll's blue appears only where the page talks about Pactroll.

   Light only, like the products. Fonts are self-hosted: no third-party
   requests, no cookies, no analytics on this site.
   ============================================================================ */

/* ── Reset ────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ── Typefaces (OFL, see assets/fonts/*-OFL.txt) ── */
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/Fraunces_72pt-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/assets/fonts/PlusJakartaSans_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/assets/fonts/PlusJakartaSans_600SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/assets/fonts/PlusJakartaSans_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

/* ── Tokens ── */
:root {
  --paper:  #F1ECE3;  /* the teprof avatar ground */
  --paper2: #E9E2D6;  /* inset block */
  --ink:    #1E1C1A;  /* the teprof wordmark ink */
  --ink2:   #5E5852;  /* secondary text (AA on paper) */
  --faint:  #B9B0A4;  /* decoration only — never text that must be read */
  --line:   rgba(30, 28, 26, .12);
  --blue:   #3F72A8;  /* Pactroll's brand blue: only in Pactroll sections */
  --ease:   cubic-bezier(.23, 1, .32, 1);
  --gutter: clamp(16px, 7vw, 120px);
  --serif:  'Fraunces', Georgia, serif;
}

body { background: var(--paper); color: var(--ink); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
[id] { scroll-margin-top: 80px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ── Header (layout.js) ── */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 5vw, 56px);
  background: rgba(241, 236, 227, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color 200ms ease-out; }
.bar.scrolled { border-bottom-color: var(--line); }
.bar .logo { display: block; }
.bar .logo img { height: 24px; width: auto; }
.bar nav { display: flex; gap: clamp(12px, 3vw, 32px); font-size: 14px; font-weight: 600; }
.bar nav a { text-decoration: none; color: var(--ink2); position: relative; transition: color 150ms ease-out; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }
.bar nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease); }
.bar nav a:hover::after, .bar nav a[aria-current]::after { transform: scaleX(1); }

/* ── Shared pieces ── */
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.display { font-family: var(--serif); font-weight: 600; letter-spacing: -.03em; }
.display .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.display .ln > span { display: inline-block; transform: translateY(105%); animation: lineUp 900ms var(--ease) forwards; }
.display .ln:nth-child(2) > span { animation-delay: 110ms; }
@keyframes lineUp { to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px; border-radius: 999px; background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 700; font-size: 15px; border: 0; cursor: pointer; will-change: transform; }
.btn .ar { transition: transform 200ms var(--ease); }
.btn:active { transform: scale(.97); }
.sec-head { display: flex; gap: 24px; align-items: baseline; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.sec-head .n { color: var(--ink); }
.sec-head .r { margin-left: auto; }
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* Pixel avatar (inline SVG, 16×16) */
.av svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; overflow: visible; }
.av .eyes { transform-box: view-box; transform-origin: 8px 7px; animation: blink 5.2s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
.av rect { transition: transform 420ms var(--ease); transform-box: fill-box; }
/* Reveal: hover — or tap — and the pixels fly off to show an innocent 🥺 */
.reveal { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.reveal .px { position: relative; z-index: 2; }
.reveal .px rect { transform-origin: center; transition: transform 560ms var(--ease), opacity 380ms ease-out; transition-delay: var(--d, 0ms); }
.reveal.open .px rect { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.35) rotate(var(--fr)); }
.reveal .under { position: absolute; inset: 22px; z-index: 1; display: grid; place-items: center; opacity: 0; transform: scale(.88); transition: opacity 360ms ease-out 80ms, transform 600ms var(--ease) 80ms; }
.reveal.open .under { opacity: 1; transform: none; }
.reveal .under img { width: 88%; height: auto; }

/* ── Home: hero ── */
.hero { position: relative; min-height: calc(100vh - 64px); display: flex; flex-direction: column; justify-content: center; padding: 64px var(--gutter) 96px; }
.hero h1 { margin-top: 22px; font-size: clamp(48px, 9.2vw, 136px); line-height: .98; position: relative; z-index: 2; }
.mark { position: relative; white-space: nowrap; }
.mark svg { position: absolute; left: -2%; bottom: -.08em; width: 104%; height: .32em; overflow: visible; }
.mark path { fill: none; stroke: var(--blue); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 900ms var(--ease) 700ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero .sub { margin-top: 30px; max-width: 34ch; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.55; color: var(--ink2); position: relative; z-index: 2; opacity: 0; animation: fadeUp 700ms var(--ease) 450ms forwards; }
.hero .btn { margin-top: 40px; align-self: flex-start; position: relative; z-index: 2; opacity: 0; animation: fadeIn 700ms ease-out 600ms forwards; }
.hero .btn:hover .ar { transform: translateY(2px); }

/* Notifications that step aside from the pointer and go quiet as you scroll */
.pills { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.pill { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 2px rgba(30, 28, 26, .05), 0 10px 30px rgba(30, 28, 26, .08); font-size: 13px; color: var(--ink2); white-space: nowrap;
  transform: translate(var(--rx, 0px), var(--ry, 0px)); transition: transform 500ms var(--ease), opacity 200ms linear, filter 200ms linear; }
.pill > span { display: flex; gap: 10px; align-items: center; animation: bob 6s ease-in-out infinite alternate; }
.pill i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 15px; background: var(--paper2); }
.pill b { color: var(--ink); font-weight: 600; }
@keyframes bob { from { transform: translateY(-4px); } to { transform: translateY(5px); } }

/* ── Home: manifesto (words light up as you scroll) ── */
.manifesto { padding: clamp(96px, 16vh, 180px) var(--gutter); border-top: 1px solid var(--line); }
.words { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4.4vw, 60px); line-height: 1.16; letter-spacing: -.02em; max-width: 22ch; }
.js .words span { color: var(--faint); transition: color 260ms ease-out; }
.js .words span.on { color: var(--ink); }

/* ── Home: work (Pactroll) ── */
.work { padding: 40px var(--gutter) clamp(80px, 12vh, 140px); }
.work-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 96px); align-items: center; margin-top: 56px; }
.work-copy .pw { height: 38px; width: auto; }
.work-copy h2 { margin-top: 22px; font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -.02em; }
.steps { list-style: none; margin-top: 36px; border-top: 1px solid var(--line); }
.steps button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 18px 0; cursor: pointer; display: grid; grid-template-columns: 34px 1fr; gap: 4px 8px; position: relative; }
.steps .k { font-size: 13px; font-weight: 700; color: var(--faint); padding-top: 3px; transition: color 200ms ease-out; }
.steps .t { font-size: 19px; font-weight: 700; color: var(--ink2); transition: color 200ms ease-out; }
.steps .d { grid-column: 2; font-size: 15px; line-height: 1.55; color: var(--ink2); display: grid; grid-template-rows: 0fr; transition: grid-template-rows 320ms var(--ease); }
.steps .d > span { overflow: hidden; }
.steps button[aria-selected="true"] .k { color: var(--blue); }
.steps button[aria-selected="true"] .t, .steps button:hover .t { color: var(--ink); }
.steps button[aria-selected="true"] .d { grid-template-rows: 1fr; }
.steps .bar-run { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.steps button[aria-selected="true"] .bar-run.run { animation: barRun 4800ms linear forwards; }
@keyframes barRun { to { transform: scaleX(1); } }
.work-cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.link { font-weight: 700; font-size: 15px; text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; transition: color 150ms ease-out, border-color 150ms ease-out; }
.link:hover { color: var(--blue); border-color: var(--blue); }
.work-cta img { height: 44px; width: auto; }
.shot-wrap { perspective: 1200px; display: flex; justify-content: center; }
.shot { position: relative; width: min(100%, 340px); aspect-ratio: 1290 / 2796; border-radius: 28px; overflow: hidden; background: #0f141d;
  box-shadow: 0 2px 4px rgba(30, 28, 26, .06), 0 30px 80px rgba(30, 28, 26, .18); transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform 500ms var(--ease); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity 420ms ease-out, transform 600ms var(--ease); }
.shot img.on { opacity: 1; transform: none; }
.shot::after { content: ''; position: absolute; inset: 0; background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .16), transparent 45%); pointer-events: none; }

/* ── Home: principles ── */
.principles { padding: 40px var(--gutter) clamp(80px, 12vh, 140px); }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); }
.p { padding: 36px 28px 40px 0; border-bottom: 1px solid var(--line); }
.p + .p { padding-left: 28px; border-left: 1px solid var(--line); }
.p .n { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--faint); display: inline-block; transition: color 200ms ease-out, transform 300ms var(--ease); }
.p:hover .n { color: var(--ink); transform: translateY(-4px); }
.p h3 { margin-top: 26px; font-size: 19px; font-weight: 700; }
.p p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink2); }

/* ── Home: maker card ── */
.maker { margin: 0 var(--gutter); padding: clamp(40px, 7vw, 80px); border-radius: 36px; background: var(--ink); color: var(--paper); display: grid; grid-template-columns: 180px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.maker .av { width: 180px; cursor: pointer; }
.maker .reveal .under { inset: 0; }
.maker .kicker { color: #A79F94; }
.maker h2 { margin-top: 12px; font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 4vw, 52px); line-height: 1.04; letter-spacing: -.02em; }
.maker p { margin-top: 14px; max-width: 46ch; font-size: 17px; line-height: 1.6; color: #CFC7BB; }
.maker .btn { margin-top: 28px; background: var(--paper); color: var(--ink); }
.maker .btn:hover .ar { transform: translateX(3px); }

/* ── Footer (layout.js) ── */
.foot { padding: clamp(96px, 14vh, 160px) var(--gutter) 40px; }
.mailbig { margin-top: 18px; display: inline-flex; align-items: baseline; gap: 16px; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 6vw, 84px); letter-spacing: -.03em; line-height: 1.05; }
.mailbig .u { background: linear-gradient(currentColor, currentColor) left 100% / 0 3px no-repeat; transition: background-size 400ms var(--ease); padding-bottom: 4px; }
.mailbig:hover .u { background-size: 100% 3px; }
.mailbig .hint { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--ink2); white-space: nowrap; }
.foot-row { margin-top: clamp(64px, 10vh, 120px); padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: 13px; color: var(--ink2); }
.foot-row a { text-decoration: none; }
.foot-row a:hover { color: var(--ink); }

/* ── Founder page ── */
.me { padding: clamp(56px, 10vh, 110px) var(--gutter) 0; }
.back { display: inline-flex; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink2); text-decoration: none; }
.back:hover { color: var(--ink); }
.me-hero { margin-top: 40px; display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(32px, 6vw, 88px); align-items: end; padding-bottom: clamp(56px, 8vh, 96px); border-bottom: 1px solid var(--line); }
.me-hero .av { cursor: pointer; padding: 22px; border-radius: 32px; background: var(--paper2); }
.me-hero .kicker { margin-bottom: 18px; }
.me-hero h1 { font-size: clamp(52px, 8vw, 120px); line-height: .96; letter-spacing: -.035em; }
.me-hero .lead { margin-top: 24px; max-width: 40ch; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.55; color: var(--ink2); }
.row { display: grid; grid-template-columns: 280px 1fr; gap: clamp(24px, 5vw, 80px); padding: 48px 0; border-bottom: 1px solid var(--line); }
.row h2 { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); padding-top: 6px; }
.row .body p { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.6; max-width: 38em; }
.row .body p + p { margin-top: 18px; }
.now { list-style: none; }
.now li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.55; }
.now li:first-child { border-top: 0; padding-top: 4px; }
.now time { font-size: 14px; font-weight: 700; color: var(--ink2); padding-top: 2px; }
.links { list-style: none; display: grid; gap: 4px; }
.links a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 19px; font-weight: 600; }
.links a .s { font-size: 14px; font-weight: 600; color: var(--ink2); margin-left: auto; }
.links a .ar { transition: transform 220ms var(--ease); color: var(--ink2); }
.links a:hover .ar { transform: translate(3px, -3px); color: var(--ink); }

/* ── Small screens ── */
@media (max-width: 1100px) {
  .pills { position: relative; inset: auto; display: flex; gap: 10px; margin-bottom: 32px; padding: 6px 0 14px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); }
  .pill { position: static; flex: none; }
  .pill:nth-child(n+4) { display: none; }
}
@media (max-width: 860px) {
  .work-grid, .maker, .me-hero, .row { grid-template-columns: 1fr; }
  .shot-wrap { order: -1; }
  .shot { width: min(72%, 300px); }
  .pgrid { grid-template-columns: 1fr 1fr; }
  .p:nth-child(3) { padding-left: 0; border-left: 0; }
  .maker .av { width: 132px; }
  .me-hero .av { max-width: 220px; }
}
@media (max-width: 520px) {
  .bar nav a.opt { display: none; }
  .pgrid { grid-template-columns: 1fr; }
  .p + .p { padding-left: 0; border-left: 0; }
  .now li { grid-template-columns: 1fr; gap: 2px; }
  .mailbig { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
