/* ATHEMA — LINEWORK
   A warm flagship product page whose whole illustration language is
   animated drafted line diagrams. Bone paper, warm graphite ink,
   one clay accent — clay marks the human's moments. */

:root {
  --paper: #f4efe4;
  --paper-band: #efe8da;
  --paper-card: #fbf7ee;
  --hair: #ddd4c1;
  --hair-soft: #e6dfcf;
  --ink: #2e2822;
  --ink-2: #5c5346;
  --ink-3: #8d8271;
  --clay: #b0512e;
  --clay-deep: #8f3f22;
  --clay-tint: rgba(176, 81, 46, 0.08);
  --ink-tint: rgba(46, 40, 34, 0.045);
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Sans Mono", "SF Mono", Menlo, monospace;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(176, 81, 46, 0.18); }

a { color: inherit; }
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 44px; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 2px; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(244, 239, 228, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.nav-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 44px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 34px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 560;
  font-size: 17.5px;
  letter-spacing: 0.01em;
  margin-right: auto;
}
.brand svg { width: 19px; height: 22px; }
.nav-link {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 480;
  color: var(--ink-2);
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 560;
  font-size: 15px;
  border-radius: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.btn-fill {
  background: var(--clay);
  color: #fbf6ec;
  box-shadow: 0 10px 24px -14px rgba(143, 63, 34, 0.55);
}
.btn-fill:hover { background: var(--clay-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--hair); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-sm { padding: 8px 15px; font-size: 13.5px; border-radius: 8px; }
.no-motion .btn, .no-motion .btn:hover { transition: none; transform: none; }

/* ------------------------------------------------------------------ type */
.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 460;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--ink-3);
  flex: none;
}
.kicker .k-clay { color: var(--clay); }

h1 {
  font-size: clamp(44px, 4.9vw, 70px);
  font-weight: 470;
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin: 22px 0 20px;
  white-space: nowrap;
}
@media (max-width: 760px) { h1 { white-space: normal; } }
h1 .h-quiet { color: var(--ink-3); }

h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 470;
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 18px 0 12px;
}

.sub {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 420;
  color: var(--ink-2);
  max-width: 560px;
}

.micro {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ sections */
section { position: relative; scroll-margin-top: 72px; }
.sec { padding: 108px 0; }
.sec-band { background: var(--paper-band); border-top: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft); }
.sec-head { max-width: 620px; margin-bottom: 52px; }
.sec-head p { margin-top: 10px; color: var(--ink-2); font-size: 17px; line-height: 1.6; }

/* ------------------------------------------------------------------ hero */
.hero { padding: 58px 0 90px; }
.hero-grid { display: grid; grid-template-columns: auto minmax(280px, 1fr); gap: 56px; align-items: end; }
.hero-grid h1 { margin-bottom: 0; }
.hero-side { padding-bottom: 6px; }
.hero-ctas { display: flex; align-items: center; gap: 14px; margin: 24px 0 14px; }
.hero-note { margin-top: 4px; }
.hero-fig { margin-top: 46px; }

/* ------------------------------------------------------------------ svg linework */
.lw { display: block; width: 100%; height: auto; overflow: visible; }
.lw * { vector-effect: non-scaling-stroke; }
.lw .s { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lw .s2 { fill: none; stroke: var(--ink-2); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.lw .s3 { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.lw .sc { fill: none; stroke: var(--clay); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lw .hairline { fill: none; stroke: var(--hair); stroke-width: 1; }
.lw .dash { stroke-dasharray: 5 5 !important; }
.lw .leader { fill: none; stroke: var(--ink-3); stroke-width: 0.9; stroke-dasharray: none; }

.lw text { font-family: var(--mono); fill: var(--ink-2); font-weight: 440; }
.lw .lbl { font-size: 12.5px; fill: var(--ink); font-weight: 470; }
.lw .lbl-2 { font-size: 11.5px; fill: var(--ink-2); }
.lw .ann { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--ink-3); }
.lw .ann-clay { fill: var(--clay); }
.lw .big { font-family: var(--sans); font-size: 14px; font-weight: 520; fill: var(--ink); letter-spacing: 0; text-transform: none; }
.lw .face { stroke: none; }
.lw .face-clay { fill: var(--clay-tint); }
.lw .face-ink { fill: var(--ink-tint); }
.lw .face-solid { fill: var(--ink); }
.lw .face-ink-solid { fill: var(--ink-2); }
.lw .face-clay-solid { fill: var(--clay); }
.lw .face-paper { fill: var(--paper-card); }

/* draw-on machinery: JS sets dasharray/offset per element */
.draw-scope .drawable {
  transition: stroke-dashoffset var(--dur, 1s) cubic-bezier(0.35, 0, 0.2, 1);
  transition-delay: var(--dd, 0ms);
}
.no-motion .draw-scope .drawable { transition: none !important; }

.draw-scope .ann,
.draw-scope text,
.draw-scope .face,
.draw-scope .fade {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.draw-scope.drawn text { opacity: 1; transition-delay: var(--ad, 1s); }
.draw-scope.drawn .face { opacity: 1; transition-delay: var(--ad, 0.85s); }
.draw-scope.drawn .fade { opacity: 1; transition-delay: var(--ad, 1.2s); }
.no-motion .draw-scope text,
.no-motion .draw-scope .face,
.no-motion .draw-scope .fade { opacity: 1 !important; transition: none !important; }

/* travelling pulses along wires — decoration, motion only */
.lw .pulse {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 3 345;
  stroke-dashoffset: 3;
  opacity: 0;
}
.lw .pulse-clay { stroke: var(--clay); }
.draw-scope.drawn .pulse { opacity: 0.6; animation: pulseflow 6.5s linear infinite; animation-delay: var(--pd, 0s); }
@keyframes pulseflow { from { stroke-dashoffset: 3; } to { stroke-dashoffset: -345; } }
.no-motion .pulse { display: none; }

/* soft breathing for "current / waiting on you" markers */
.breathe { animation: breathe 2.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
/* inside a draw scope, breathing waits for the reveal (base state stays hidden) */
.draw-scope .breathe { animation: none; }
.draw-scope.drawn .breathe { animation: breathe 2.6s ease-in-out infinite; animation-delay: var(--ad, 0.9s); }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.no-motion .breathe { animation: none !important; }

/* ------------------------------------------------------------------ reveals */
[data-rv] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.25, 0.1, 0.2, 1);
  transition-delay: var(--rd, 0ms);
}
[data-rv].rv-in { opacity: 1; transform: none; }
.no-motion [data-rv] { opacity: 1; transform: none; transition: none; }

/* ------------------------------------------------------------------ three moves */
.moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.move { display: flex; gap: 18px; align-items: flex-start; }
.move svg { width: 54px; height: 54px; flex: none; margin-top: 2px; }
.move h3 { font-size: 17.5px; font-weight: 560; letter-spacing: -0.01em; margin-bottom: 4px; }
.move h3 .mv-i { font-family: var(--mono); font-weight: 440; font-size: 11px; color: var(--ink-3); letter-spacing: 0.14em; margin-right: 8px; position: relative; top: -2px; }
.move p { font-size: 15px; color: var(--ink-2); line-height: 1.5; }

/* ------------------------------------------------------------------ figures: panel + margin notes */
.fig { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 44px; align-items: start; }
.fig-notes { display: flex; flex-direction: column; gap: 26px; padding-top: 26px; position: sticky; top: 96px; }
.note { position: relative; padding-left: 40px; font-family: var(--mono); font-size: 11.5px; line-height: 1.65; letter-spacing: 0.05em; color: var(--ink-3); }
.note::before { content: ""; position: absolute; left: 0; top: 9px; width: 26px; height: 1px; background: var(--ink-3); }
.note::after { content: ""; position: absolute; left: 26px; top: 6.5px; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ink-3); background: var(--paper); }
.note b { color: var(--ink); font-weight: 500; }
.note-clay { color: var(--clay); }
.note-clay::before { background: var(--clay); }
.note-clay::after { border-color: var(--clay); }
.note-clay b { color: var(--clay-deep); }

/* ------------------------------------------------------------------ product panels */
.panel {
  background: var(--paper-card);
  border: 1px solid var(--hair);
  border-radius: 14px;
  box-shadow: 0 24px 50px -34px rgba(46, 40, 34, 0.35), 0 2px 6px -3px rgba(46, 40, 34, 0.12);
  overflow: hidden;
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--hair-soft);
}
.panel-bar .pb-mark { width: 12px; height: 14px; flex: none; }
.panel-bar .pb-title { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--ink-2); text-transform: uppercase; }
.demo-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 3px 10px;
}
.panel-body { padding: 8px 0 6px; }

/* chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  border-radius: 20px;
  padding: 4px 11px;
  border: 1px solid var(--hair);
  color: var(--ink-2);
  white-space: nowrap;
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); flex: none; }
.chip-you { border-color: rgba(176, 81, 46, 0.4); background: var(--clay-tint); color: var(--clay-deep); }
.chip-you .dot { background: var(--clay); }
.chip-idea { border-style: dashed; }

/* signal inbox */
.tabs { display: flex; gap: 8px; padding: 14px 20px 10px; flex-wrap: wrap; }
.tab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 4px 12px;
  color: var(--ink-3);
}
.tab-on { border-color: var(--hair); background: var(--paper); color: var(--ink); }
.sig-list { list-style: none; }
.sig {
  display: grid;
  grid-template-columns: 72px 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 20px;
  border-top: 1px solid var(--hair-soft);
  transition: background 0.15s ease;
}
.sig:hover { background: rgba(46, 40, 34, 0.03); }
.no-motion .sig { transition: none; }
.sig-time { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.sig-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.sig-what { font-size: 15px; font-weight: 480; letter-spacing: -0.005em; min-width: 0; }
.sig-what small { display: block; font-size: 12.5px; font-weight: 420; color: var(--ink-3); margin-top: 2px; }
.sig-you { background: linear-gradient(90deg, rgba(176, 81, 46, 0.05), transparent 70%); }

/* run board */
.stage-rail { display: flex; align-items: center; padding: 22px 24px 4px; }
.stg { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; }
.stg-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.4px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-card);
}
.stg-dot svg { width: 11px; height: 9px; }
.stg-name { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.stg-link { height: 1.4px; background: var(--ink); flex: 1 1 auto; margin: 0 6px 26px; min-width: 14px; }
.stg-link.todo { background: transparent; border-top: 1.4px dashed var(--hair); }
.stg-now .stg-dot { border-color: var(--clay); }
.stg-now .stg-name { color: var(--clay); }
.stg-now .stg-core { width: 9px; height: 9px; border-radius: 50%; background: var(--clay); }
.events { list-style: none; padding: 16px 24px 12px; }
.events li { display: flex; gap: 16px; padding: 8px 0; font-size: 14.5px; color: var(--ink-2); border-top: 1px dashed var(--hair-soft); }
.events li:first-child { border-top: 0; }
.events time { font-family: var(--mono); font-size: 11px; color: var(--ink-3); flex: none; width: 42px; padding-top: 2px; }
.events .ev-you { color: var(--clay-deep); font-weight: 490; }
.panel-foot {
  display: flex; align-items: center; gap: 18px;
  padding: 13px 24px; border-top: 1px solid var(--hair-soft);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3);
  flex-wrap: wrap;
}
.panel-foot b { color: var(--ink); font-weight: 520; }

/* pr review */
.pr-head { padding: 18px 24px 14px; display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pr-head h4 { font-size: 17px; font-weight: 560; letter-spacing: -0.01em; }
.pr-head .micro { margin-top: 3px; }
.pr-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; border-top: 1px solid var(--hair-soft); }
.pr-cell { padding: 18px 24px; }
.pr-cell + .pr-cell { border-left: 1px solid var(--hair-soft); }
.pr-cell h5 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 460; margin-bottom: 12px; }
.plain { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plain li { display: flex; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.plain .n { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); padding-top: 3px; }
.totals { border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; font-size: 13.5px; }
.totals .t-row { display: flex; justify-content: space-between; padding: 8px 14px; border-top: 1px dashed var(--hair-soft); }
.totals .t-row:first-child { border-top: 0; }
.totals .t-head { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); }
.totals .t-new { color: var(--clay-deep); font-weight: 500; }
.totals .t-total { font-weight: 560; }
.totals .amt { font-family: var(--mono); font-size: 12.5px; }
.pr-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 24px 16px; }
.pr-act { display: flex; align-items: center; gap: 14px; padding: 16px 24px 20px; border-top: 1px solid var(--hair-soft); flex-wrap: wrap; }
.pr-act .micro { flex-basis: 100%; }

/* ------------------------------------------------------------------ diagrams */
.diagram-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.diagram-wrap .lw { min-width: 660px; }
.scroll-hint { display: none; }
.dg-caption { margin-top: 26px; font-size: 16.5px; color: var(--ink-2); max-width: 560px; }
.dg-caption b { color: var(--ink); font-weight: 540; }

/* hero diagram responsive swap */
.hero-lw-desktop { display: block; }
.hero-lw-mobile { display: none; }

/* ------------------------------------------------------------------ pricing */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price {
  background: var(--paper-card);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-hot { border-color: rgba(176, 81, 46, 0.45); box-shadow: 0 26px 54px -34px rgba(143, 63, 34, 0.45); }
.price-badge {
  position: absolute; top: -12px; left: 26px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--clay); color: #fbf6ec; border-radius: 20px; padding: 4px 12px;
}
.price h3 { font-size: 21px; font-weight: 560; letter-spacing: -0.01em; }
.price .p-who { font-size: 13.5px; color: var(--ink-3); margin: 3px 0 20px; }
.price .p-amt { display: flex; align-items: baseline; gap: 6px; }
.price .p-amt b { font-size: 38px; font-weight: 500; letter-spacing: -0.02em; font-family: var(--mono); }
.price .p-amt span { font-size: 13.5px; color: var(--ink-3); }
.price .p-unit { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3); margin: 6px 0 20px; }
.price ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 26px; }
.price li { font-size: 14px; color: var(--ink-2); display: flex; gap: 10px; align-items: baseline; }
.price li::before { content: ""; width: 12px; height: 1.2px; background: var(--ink-3); flex: none; position: relative; top: -4px; }
.price .btn { margin-top: auto; }
.price-note { margin-top: 20px; }

/* ------------------------------------------------------------------ cta band */
.cta-band { padding: 130px 0 140px; text-align: center; position: relative; overflow: hidden; }
.cta-seal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.cta-seal svg { width: min(430px, 80vw); height: auto; opacity: 0.9; }
.cta-band h2 { font-size: clamp(38px, 5vw, 60px); margin-bottom: 14px; }
.cta-band .micro { margin: 18px 0 30px; }
.cta-band .wrap { position: relative; }

/* ------------------------------------------------------------------ footer */
footer { border-top: 1px solid var(--hair); padding: 30px 0 44px; }
.foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot .micro { margin-right: auto; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .fig { grid-template-columns: minmax(0, 1fr); }
  .fig-notes { position: static; flex-direction: row; flex-wrap: wrap; gap: 18px 34px; padding-top: 30px; }
  .note { flex: 1 1 240px; }
  .moves { grid-template-columns: 1fr; gap: 30px; max-width: 520px; }
}

@media (max-width: 760px) {
  .wrap, .nav-in { padding-left: 24px; padding-right: 24px; }
  .sec { padding: 78px 0; }
  .hero { padding: 44px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .nav-link { display: none; }
  .hero-lw-desktop { display: none; }
  .hero-lw-mobile { display: block; max-width: 420px; margin: 0 auto; }
  .hero-fig { margin-top: 40px; }
  .hero-ctas { flex-wrap: wrap; }
  .sub { font-size: 16.5px; }
  .kicker { font-size: 10.5px; letter-spacing: 0.16em; }
  .sig { display: block; padding: 16px 20px; }
  .sig-time { display: inline; }
  .sig-tag { display: inline; margin-left: 10px; }
  .sig-what { display: block; margin: 6px 0 10px; }
  .sig .chip { display: inline-flex; }
  .pr-grid { grid-template-columns: 1fr; }
  .pr-cell + .pr-cell { border-left: 0; border-top: 1px solid var(--hair-soft); }
  .stage-rail { overflow-x: auto; padding-right: 24px; padding-bottom: 8px; }
  .prices { grid-template-columns: 1fr; }
  .price-hot { order: -1; }
  .events li { flex-direction: column; gap: 2px; }
  .events time { width: auto; }
  .scroll-hint {
    display: block;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 12px;
  }
}
