/* ---------- Tokens ---------- */
:root {
  --paper: #F5EFE4;
  --card: #FBF7EF;
  --ink: #1E1A15;
  --ink-2: #4B433A;
  --muted: #7B7064;
  --line: rgba(30, 26, 21, .14);
  --accent: #C0502F;        /* terracotta */
  --accent-2: #E2A23A;      /* marigold */
  --on-ink-accent: #EDB458; /* accent used on the inverted "hello" card */
  --shadow: 0 18px 40px -24px rgba(70, 45, 20, .45);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-opacity: .3;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15120E;
    --card: #1D1914;
    --ink: #F2EBDF;
    --ink-2: #CFC4B4;
    --muted: #998D7E;
    --line: rgba(242, 235, 223, .14);
    --accent: #E7744F;
    --accent-2: #EDB458;
    --on-ink-accent: #B4452A;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
    --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    --grain-opacity: .07;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
}

a { color: inherit; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.hand { font-family: var(--hand); font-weight: 500; }

/* ---------- Header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 100;
}
.brand i { font-style: italic; font-weight: 400; color: var(--accent); }

.mark { display: block; width: 30px; height: 30px; color: var(--accent); flex: none; }
.mark .arcs { stroke: var(--paper); }
.mark .dot { fill: var(--paper); }

nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); font-size: 15px; }
nav a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
nav a:hover { color: var(--ink); }

.pill {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink) !important;
  transition: border-color .2s;
}
.pill:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding-block: clamp(40px, 7vw, 88px) clamp(64px, 9vw, 120px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 27px;
  line-height: 1;
  color: var(--accent);
  rotate: -2deg;
}
.eyebrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  animation: spin 30s linear infinite;
}

h1 {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(52px, 8.2vw, 116px);
  line-height: .94;
  letter-spacing: -.04em;
  font-variation-settings: "SOFT" 100;
}
h1 .line { display: block; }
h1 em {
  position: relative;
  z-index: 0;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  white-space: nowrap;
}

.underline {
  position: absolute;
  z-index: -1;
  left: -1%;
  bottom: -.14em;
  width: 96%;
  height: .24em;
  overflow: visible;
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 4.5;
  stroke-linecap: round;
}
.underline path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1s cubic-bezier(.6, .1, .2, 1) 1s forwards;
}

.lede {
  max-width: 33em;
  margin: 0 0 34px;
  font-size: clamp(18px, 1.5vw, 20.5px);
  color: var(--ink-2);
}
.lede strong { font-weight: 600; color: var(--ink); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background .2s, gap .25s var(--ease), transform .2s;
}
.cta-btn:hover { gap: 14px; background: var(--accent); }
.cta-btn:active { transform: scale(.97); }
.cta-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cta-alt { font-size: 15px; color: var(--muted); }
.cta-alt a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line); }
.cta-alt a:hover { text-decoration-color: var(--accent); }

.fine { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* Fingerprint */
.hero-art { position: relative; justify-self: center; width: 100%; max-width: 430px; }
#print { display: block; width: 100%; height: auto; overflow: visible; }
#print .ridges,
#print .net { transition: transform .9s var(--ease); }
#print .ridges { transform: translate(calc(var(--mx, 0) * -6px), calc(var(--my, 0) * -6px)); }
#print .net { transform: translate(calc(var(--mx, 0) * 10px), calc(var(--my, 0) * 10px)); }

#print .ridges path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: .85;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.5s cubic-bezier(.55, .1, .25, 1) var(--d, 0s) forwards;
}
#print .links path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  opacity: .75;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw .9s ease-out var(--d, 0s) forwards;
}
#print .node { opacity: 0; animation: fade-in .5s ease-out var(--d, 0s) forwards; }
#print .node .core { fill: var(--accent); }
#print .node .halo {
  fill: var(--accent);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 3.4s ease-in-out var(--d, 0s) infinite;
}

.note {
  position: absolute;
  left: -14%;
  bottom: 2%;
  margin: 0;
  font-size: 23px;
  line-height: 1.05;
  color: var(--ink-2);
  rotate: -7deg;
}
.note svg {
  position: absolute;
  top: -40px;
  right: -64px;
  width: 64px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Marquee strip ---------- */
.strip { overflow: hidden; padding-block: 20px; border-block: 1px solid var(--line); }
.strip-track { display: flex; width: max-content; animation: marquee 55s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip ul { display: flex; margin: 0; padding: 0; list-style: none; }
.strip li {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 52px);
  padding-right: clamp(28px, 4vw, 52px);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: -.02em;
  white-space: nowrap;
  font-variation-settings: "SOFT" 100;
}
.strip li svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 150px); }
.section-tight { padding-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1;
  letter-spacing: -.035em;
  font-variation-settings: "SOFT" 100;
}
h2 em { font-style: italic; color: var(--accent); }

.aside { max-width: 16em; margin: 0; font-size: 25px; line-height: 1.1; color: var(--muted); rotate: -2deg; }
.section-lede { max-width: 34em; margin: 20px 0 0; font-size: 19px; color: var(--ink-2); }

/* Beliefs */
.beliefs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.belief { padding-top: 22px; border-top: 1.5px solid var(--ink); }
.belief .num { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }
.belief h3 {
  margin: 14px 0 12px;
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(26px, 2.4vw, 31px);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 100;
}
.belief p { margin: 0; color: var(--ink-2); }

/* What's cooking */
.jars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.jar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 270px;
  padding: 28px 26px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  rotate: var(--r, 0deg);
}
.jar:hover { rotate: 0deg; translate: 0 -6px; }
.jar .no { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.jar p { margin: 0; color: var(--ink-2); }

.redacted { display: grid; gap: 9px; margin: 0; }
.redacted span {
  position: relative;
  display: block;
  width: var(--w);
  height: 24px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ink);
}
.redacted span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--paper) 35%, transparent) 50%, transparent 70%);
  translate: -100% 0;
}
.jar:hover .redacted span::after { animation: shimmer 1.1s ease; }

.stage { display: grid; gap: 10px; margin-top: auto; }
.stage-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.stage-label b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.stage-label b::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.meter { height: 6px; overflow: hidden; border-radius: 99px; background: var(--line); }
.meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 1.4s var(--ease) .35s; }
.in .meter i,
html:not(.js) .meter i { width: calc(var(--p) * 100%); }

.sticky {
  position: absolute;
  top: -16px;
  right: 18px;
  padding: 4px 14px 6px;
  border-radius: 3px;
  background: var(--accent-2);
  color: #2A2118;
  font-size: 22px;
  line-height: 1;
  rotate: 5deg;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45);
}

.after-jars { margin: 44px 0 0; color: var(--ink-2); }
.after-jars a { color: var(--accent); text-underline-offset: 3px; }

/* Say hello */
.hello {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(36px, 5vw, 72px);
  overflow: hidden;
  padding: clamp(32px, 6vw, 76px);
  border-radius: clamp(24px, 3vw, 36px);
  background: var(--ink);
  color: var(--paper);
}
.hello::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-radial-gradient(circle at 104% -12%, transparent 0 20px, color-mix(in srgb, var(--paper) 9%, transparent) 20px 21.5px);
  -webkit-mask-image: radial-gradient(circle at 104% -12%, #000 0 28%, transparent 62%);
  mask-image: radial-gradient(circle at 104% -12%, #000 0 28%, transparent 62%);
}
.hello > * { position: relative; }
.hello .hand { display: inline-block; margin: 0 0 10px; font-size: 25px; color: var(--on-ink-accent); rotate: -2deg; }
.hello h2 { color: var(--paper); }
.hello p { max-width: 30em; font-size: 18px; color: color-mix(in srgb, var(--paper) 74%, transparent); }

.mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-bottom: 4px;
  border-bottom: 2px solid color-mix(in srgb, var(--paper) 30%, transparent);
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3.6vw, 46px);
  letter-spacing: -.02em;
  text-decoration: none;
  transition: border-color .2s, gap .25s var(--ease);
}
.mail:hover { gap: 20px; border-color: var(--on-ink-accent); }
.mail svg { width: .7em; height: .7em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.blr { align-self: end; padding-top: 22px; border-top: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.hello .blr p { margin: 0; }
.blr .label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.hello .clock {
  margin-top: 10px;
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}
.hello .mood { margin-top: 8px; font-family: var(--hand); font-size: 26px; line-height: 1.1; color: var(--on-ink-accent); }
.hello .coords { margin-top: 18px; font-size: 13px; }

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 8px 56px;
  font-size: 14px;
  color: var(--muted);
}
.foot p { margin: 0; }
.foot .brand { font-size: 19px; color: var(--ink); }
.foot .mark { width: 24px; height: 24px; }

/* ---------- Motion ---------- */
.rise { animation: rise .9s var(--ease) var(--d, 0s) both; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .9s var(--ease) var(--d, 0s),
    transform .9s var(--ease) var(--d, 0s),
    rotate .4s var(--ease),
    translate .4s var(--ease);
}
.js [data-reveal].in { opacity: 1; transform: none; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pulse {
  0%, 100% { transform: scale(.5); opacity: .35; }
  60% { transform: scale(1.7); opacity: 0; }
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes shimmer { to { translate: 100% 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .strip-track { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 340px; margin-top: 8px; }
  .note { left: -10%; }
  .beliefs,
  .jars,
  .hello { grid-template-columns: 1fr; }
  .jar { min-height: 0; }
}

@media (max-width: 640px) {
  nav a:not(.pill) { display: none; }
  .hero-art { max-width: 280px; }
  .note { left: -6%; bottom: -4%; font-size: 21px; }
  .note svg { display: none; }
}

@media (max-width: 440px) {
  .cta-btn { justify-content: center; width: 100%; }
}
