/* SALT — bringing the flavour.
   Salt paper by day, night sea by dark; brine ink, sea-glass, and one warm
   accent — the zing — used sparingly, like salt. */

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/fraunces-latin-full-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Fraunces Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/fraunces-latin-full-italic.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
}

:root {
  color-scheme: light;
  --bg: #f4f1e9;
  --bg-2: #ebe6da;
  --card: #fbf9f4;
  --ink: #0f252c;
  --ink-2: #4a6168;
  --ink-3: #7b8f94;
  --line: rgba(15, 37, 44, 0.13);
  --sea: #1b6670;
  --zing: #d9661f;
  --zing-ink: #b4501a;
  --zing-soft: rgba(217, 102, 31, 0.12);
  --zing-btn: #b4501a;   /* the accent deep enough to carry white text (5:1) */
  --on-zing: #ffffff;
  --crystal: #0f252c;
  --panel: #0a1d23;
  --back: #0f2a31;
  --panel-ink: #e8f2f0;
  --panel-ink-2: #9db6b6;
  --shadow: 0 1px 2px rgba(15, 37, 44, 0.06), 0 10px 30px rgba(15, 37, 44, 0.09);
  --radius: 20px;
  --display: "Fraunces Variable", "Iowan Old Style", Georgia, serif;
  --text: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #071419;
    --bg-2: #0b1d23;
    --card: #0e232a;
    --ink: #e8f1ef;
    --ink-2: #a2b8b8;
    --ink-3: #6f898c;
    --line: rgba(232, 241, 239, 0.12);
    --sea: #5fc3c8;
    --zing: #ff9d47;
    --zing-ink: #ffb26e;
    --zing-soft: rgba(255, 157, 71, 0.13);
    --zing-btn: #ff9d47;
    --on-zing: #071419;
    --crystal: #dff0ee;
    --panel: #040d11;
    --back: #15363f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 34px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071419;
  --bg-2: #0b1d23;
  --card: #0e232a;
  --ink: #e8f1ef;
  --ink-2: #a2b8b8;
  --ink-3: #6f898c;
  --line: rgba(232, 241, 239, 0.12);
  --sea: #5fc3c8;
  --zing: #ff9d47;
  --zing-ink: #ffb26e;
  --zing-soft: rgba(255, 157, 71, 0.13);
  --zing-btn: #ff9d47;
  --on-zing: #071419;
  --crystal: #dff0ee;
  --panel: #040d11;
  --back: #15363f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 34px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg, canvas { display: block; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: var(--zing-soft); }
:focus-visible { outline: 2px solid var(--zing); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

main > section { max-width: var(--max); margin: 0 auto; padding: clamp(4.5rem, 10vw, 7.5rem) var(--gutter); }

.eyebrow {
  font: 600 0.74rem/1 var(--text);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--zing-ink);
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(2rem, 5.6vw, 3.4rem);
  line-height: 1.04;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.4rem;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 0.98rem/1 var(--text); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.btn.primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.btn.primary:hover { transform: translateY(-1px); background: var(--zing-btn); color: var(--on-zing); }
.btn.quiet { color: var(--ink); border-color: var(--line); background: transparent; }
.btn.quiet:hover { border-color: var(--ink-3); }

/* ── header ── */
.top {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font: 650 1.02rem/1 var(--text); letter-spacing: 0.24em; }
.brand .mark { width: 30px; height: 30px; color: var(--crystal); stroke-width: 1.6; }
.top nav { display: flex; gap: 1.3rem; font-size: 0.95rem; }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }

/* ── hero ── */
.hero { display: grid; justify-items: center; text-align: center; padding-top: clamp(1rem, 4vw, 3rem) !important; padding-bottom: clamp(3rem, 8vw, 6rem) !important; }
.hero-art { width: min(80vw, 380px); }
.crystal { width: 100%; height: auto; overflow: visible; }
.crystal .edge { fill: none; stroke: var(--crystal); stroke-width: 1.7; stroke-linejoin: round; }
.crystal .step { fill: none; stroke: var(--crystal); stroke-width: 1.1; stroke-linejoin: round; opacity: 0.32; animation: shimmer 6s ease-in-out infinite; }
.crystal .n2 { animation-delay: 1.2s; }
.crystal .n3 { stroke: var(--zing); stroke-width: 1.4; opacity: 0.55; animation-delay: 2.4s; }
.crystal .glint { fill: var(--zing); transform-box: fill-box; transform-origin: center; animation: glint 7s ease-in-out infinite; }
.crystal .tide { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 6; opacity: 0.7; }
.crystal .xtal { animation: float 10s ease-in-out infinite; }
.crystal .mirror { animation: sink 10s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { opacity: 0.22; } 45% { opacity: 0.85; } }
@keyframes glint { 0%, 72%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 80% { opacity: 1; transform: scale(1) rotate(45deg); } 88% { opacity: 0; transform: scale(0.4) rotate(90deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes sink { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.hero-copy { margin-top: calc(min(80vw, 380px) * -0.30); position: relative; display: grid; justify-items: center; }
h1 { display: grid; justify-items: center; gap: 0.2rem; font-weight: 400; }
h1 .salt {
  font-size: clamp(4.2rem, 19vw, 8.6rem);
  line-height: 0.86;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-right: -0.06em; /* the tracking's trailing space, given back so it centres */
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 144;
}
h1 .tag {
  font-style: italic;
  font-size: clamp(1.45rem, 5vw, 2.3rem);
  line-height: 1.1;
  color: var(--zing-ink);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.cycle {
  margin-top: 0.9rem; height: 1.4em;
  font: 500 0.82rem/1.4 var(--text); letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-2);
}
#word { display: inline-block; transition: opacity 0.45s ease, filter 0.45s ease, transform 0.45s ease; }
#word.out { opacity: 0; filter: blur(4px); transform: translateY(4px); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.8rem; }

.pulse { display: inline-flex; align-items: center; gap: 0.55rem; margin-top: 1.6rem; font-size: 0.86rem; color: var(--ink-2); min-height: 1.4em; }
.pulse .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.pulse.live .dot { background: var(--zing); box-shadow: 0 0 0 0 var(--zing-soft); animation: beat 2.2s ease-out infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(217, 102, 31, 0.45); } 100% { box-shadow: 0 0 0 12px rgba(217, 102, 31, 0); } }

/* ── not in the words ── */
.words { text-align: center; display: grid; justify-items: center; gap: 1.4rem; }
.words blockquote { margin: 0; }
.words blockquote p {
  font-family: var(--display); font-style: italic; font-weight: 380;
  font-size: clamp(2rem, 6.4vw, 3.9rem); line-height: 1.08; letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.words .sub { max-width: 30rem; color: var(--ink-2); font-size: 1.06rem; }
.pinch { width: 60px; height: 16px; color: var(--ink-3); margin-top: 0.6rem; stroke-width: 1.2; }

/* ── the deck ── */
.deal { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.deal-copy .btn { margin-top: 1.8rem; min-width: 9rem; }
.deck { position: relative; width: min(100%, 320px); aspect-ratio: 5 / 6.6; justify-self: center; perspective: 1400px; }
.deck .under, .card { position: absolute; inset: 0; border-radius: var(--radius); }
.deck .under { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.deck .under.one { transform: rotate(-5deg) translate(-8px, 6px); opacity: 0.7; }
.deck .under.two { transform: rotate(3.5deg) translate(8px, 3px); opacity: 0.85; }
.card { transform-style: preserve-3d; transition: transform 0.75s cubic-bezier(0.2, 0.75, 0.2, 1); cursor: pointer; }
.card.up { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: var(--radius); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow); overflow: hidden; }
.face.back {
  display: grid; place-content: center; justify-items: center; gap: 0.7rem;
  background-color: var(--back); color: var(--panel-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34.64' height='60' viewBox='0 0 34.64 60'%3E%3Cpath d='M17.32 0L34.64 10L34.64 30L17.32 40L0 30L0 10ZM17.32 20L0 10M17.32 20L34.64 10M17.32 20L17.32 40' fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 26px 45px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.face.back .ico { width: 56px; height: 56px; color: var(--panel-ink); stroke-width: 1.3; }
.face.back span { font: 650 0.9rem/1 var(--text); letter-spacing: 0.4em; margin-right: -0.4em; }
.face.front {
  transform: rotateY(180deg); text-align: left;
  background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.9rem; padding: 1.6rem 1.5rem;
}
.face.front .meta { display: flex; align-items: center; gap: 0.7rem; color: var(--ink-2); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; }
.face.front .meta .ico { width: 44px; height: 44px; color: var(--crystal); stroke-width: 1.4; }
.face.front .meta b { font-family: var(--display); font-size: 1.35rem; letter-spacing: 0; text-transform: none; color: var(--zing-ink); font-weight: 600; }
.face.front .text { font-family: var(--display); font-size: clamp(1.3rem, 4.6vw, 1.55rem); line-height: 1.22; font-variation-settings: "SOFT" 100; flex: 1; }
.face.front .go { align-self: flex-start; }

/* links that act: an underline that warms on hover */
.go {
  display: inline-block;
  background: none; border: 0; padding: 0.25rem 0; cursor: pointer;
  font: 600 0.95rem/1.3 var(--text); color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--zing); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.go::after { content: "→"; display: inline-block; margin-left: 0.4rem; transition: transform 0.2s ease; } /* inline-block in an inline link: the arrow takes no underline, and can move */
button.go::after { content: "⧉"; font-size: 0.85em; }
.go:hover { color: var(--zing-ink); }
.go:hover::after { transform: translateX(3px); }
.go.small { font-weight: 500; font-size: 0.88rem; color: var(--ink-2); text-decoration-color: var(--line); }

/* ── the ecology: one, one and a half, two, few, many ── */
.head { margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.scales { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4rem; position: relative; }
.scales::before {
  content: ""; position: absolute; top: 47px; left: 10%; right: 10%; height: 2px;
  background: linear-gradient(90deg, var(--sea), var(--zing));
  opacity: 0.45; border-radius: 2px;
}
.scale { display: grid; justify-items: center; text-align: center; gap: 1rem; position: relative; }
.badge {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--crystal);
}
.badge .ico { width: 64px; height: 64px; stroke-width: 1.35; }
.scale .body { display: grid; justify-items: center; gap: 0.4rem; }
.scale .n { font: 600 1.15rem/1 var(--display); color: var(--zing-ink); font-variation-settings: "SOFT" 100, "WONK" 1; }
.scale h3 { font-size: 1.4rem; line-height: 1.1; font-variation-settings: "SOFT" 100; }
.scale p { color: var(--ink-2); font-size: 0.95rem; line-height: 1.4; min-height: 2.8em; }
.grow { margin-top: clamp(2.4rem, 6vw, 3.6rem); text-align: center; color: var(--ink-2); font-family: var(--display); font-style: italic; font-size: 1.2rem; font-variation-settings: "SOFT" 100; }

/* ── old knots ── */
.knot-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.knot-grid li { background: var(--bg); padding: clamp(1.4rem, 3.4vw, 2.2rem); display: grid; gap: 0.55rem; align-content: start; transition: background-color 0.25s ease; }
.knot-grid li:hover { background: var(--card); }
.knot-grid .ico { width: 40px; height: 40px; color: var(--crystal); margin-bottom: 0.5rem; transition: color 0.25s ease, transform 0.25s ease; }
.knot-grid li:hover .ico { color: var(--zing); transform: rotate(-6deg); }
.knot-grid h3 { font-size: 1.35rem; line-height: 1.15; font-variation-settings: "SOFT" 100; }
.knot-grid p { color: var(--ink-2); font-size: 0.95rem; }

/* ── the beach, today: a dark water panel where the traces glow ── */
.field {
  display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: clamp(1.5rem, 5vw, 4rem);
  background: var(--panel); color: var(--panel-ink);
  border: 1px solid rgba(232, 242, 240, 0.07);
  border-radius: calc(var(--radius) + 8px);
  padding-top: clamp(3rem, 7vw, 5rem) !important; padding-bottom: clamp(3rem, 7vw, 5rem) !important;
  margin-left: var(--gutter) !important; margin-right: var(--gutter) !important;
  max-width: calc(var(--max) - 2 * var(--gutter)) !important;
}
@media (min-width: 1160px) { .field { margin-left: auto !important; margin-right: auto !important; } }
.field .eyebrow { color: #ffb26e; }
.field-copy { display: grid; gap: 1rem; }
.field-copy p { color: var(--panel-ink-2); max-width: 26rem; }
.field-copy .quiet { font-family: var(--display); font-style: italic; color: var(--panel-ink); font-size: 1.12rem; font-variation-settings: "SOFT" 100; }
.field .pulse { color: var(--panel-ink-2); margin-top: 0.4rem; }
.field .pulse .dot { background: #4d6a6e; }
.field .pulse.live .dot { background: #ff9d47; }
.field-art { margin: 0; position: relative; width: min(100%, 520px); justify-self: center; }
#grains { width: 100%; aspect-ratio: 1; }
.legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.2rem; margin-top: 0.8rem; font-size: 0.8rem; color: var(--panel-ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend .g { display: inline-block; transform: rotate(45deg); }
.legend .fresh { width: 9px; height: 9px; background: #ff9d47; box-shadow: 0 0 10px rgba(255, 157, 71, 0.8); }
.legend .today { width: 7px; height: 7px; background: #e8f2f0; }
.legend .week { width: 5px; height: 5px; background: rgba(232, 242, 240, 0.4); }
.tip {
  position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 12px));
  background: #e8f2f0; color: #0a1d23; font-size: 0.78rem; font-weight: 600;
  padding: 0.35rem 0.6rem; border-radius: 8px; white-space: nowrap;
}

/* ── when it becomes real ── */
.money { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.money li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.5rem; display: grid; gap: 0.5rem; align-content: start; }
.money .ico { width: 38px; height: 38px; color: var(--zing); margin-bottom: 0.4rem; }
.money h3 { font-size: 1.4rem; font-variation-settings: "SOFT" 100; }
.money p { color: var(--ink-2); font-size: 0.95rem; }
.links { margin-top: 1.8rem; color: var(--ink-2); font-size: 0.95rem; }
.links a { color: var(--ink); text-decoration-color: var(--zing); text-underline-offset: 4px; }

/* ── footer ── */
.foot { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 5rem) var(--gutter) 3rem; display: grid; justify-items: center; text-align: center; gap: 0.8rem; border-top: 1px solid var(--line); }
.foot .tag { font-family: var(--display); font-style: italic; color: var(--zing-ink); font-size: 1.15rem; font-variation-settings: "SOFT" 100, "WONK" 1; }
.foot .sutta { margin-top: 1rem; font-family: var(--display); font-size: 1.05rem; color: var(--ink-2); display: grid; gap: 0.3rem; }
.foot .sutta span { font: 500 0.72rem/1 var(--text); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; margin-top: 1.2rem; font-size: 0.92rem; }
.foot nav a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot .fine { margin-top: 1rem; font-size: 0.8rem; color: var(--ink-2); }

/* ── the toast ── */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 0.7rem 1.1rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 50; max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── arrival: each part rises into view once ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.scales .reveal:nth-child(2), .knot-grid .reveal:nth-child(2), .money .reveal:nth-child(2) { transition-delay: 0.08s; }
.scales .reveal:nth-child(3), .knot-grid .reveal:nth-child(3), .money .reveal:nth-child(3) { transition-delay: 0.16s; }
.scales .reveal:nth-child(4), .knot-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.scales .reveal:nth-child(5), .knot-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.knot-grid .reveal:nth-child(6) { transition-delay: 0.4s; }

/* ── narrower screens ── */
@media (max-width: 860px) {
  .deal { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .scales { grid-template-columns: 1fr; gap: 1.6rem; }
  .scales::before { top: 0; bottom: 0; left: 39px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--sea), var(--zing)); }
  .scale { grid-template-columns: 80px 1fr; justify-items: start; text-align: left; gap: 1.1rem; align-items: start; }
  .badge { width: 80px; height: 80px; }
  .badge .ico { width: 54px; height: 54px; }
  .scale .body { justify-items: start; padding-top: 0.6rem; }
  .scale p { min-height: 0; }
  .knot-grid { grid-template-columns: 1fr 1fr; }
  .money { grid-template-columns: 1fr; }
  .field { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .top nav { gap: 1rem; }
  .knot-grid { grid-template-columns: 1fr; }
  .knot-grid li { grid-template-columns: 40px 1fr; column-gap: 1rem; }
  .knot-grid .ico { grid-row: span 2; margin: 0; }
}

/* ── stillness, for anyone who asks for it ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
