/* Kith — landing page.
   Tokens follow the Kith design system v1.0: sage mark on light, terracotta
   mark on dark, Inter throughout, wide-tracked uppercase labels. */

/* Inter, served from this site. Loading fonts from a third party would tell
   it about every visitor, on a page whose promise is that nothing about you
   leaves. Variable font: one file per script covers weights 300–600.
   Licence: fonts/OFL.txt (SIL Open Font License 1.1). */
@font-face {
  font-family: Inter; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg:       #F7F4EE;
  --panel:    #FBF9F5;
  --sunk:     #EFEBE3;
  --line:     #E4DED3;
  --ink:      #3A3834;
  --strong:   #121110;
  --muted:    #8C867E;
  --mark:     #A7B39A;   /* sage */
  --mark-ink: #5F6B53;   /* sage, dark enough to read as text */
  --on-mark:  #121110;
  --error:    #A9472E;
  --shadow:   0 1px 1px rgba(18, 17, 16, .04), 0 22px 48px -22px rgba(18, 17, 16, .22);
  color-scheme: light;
}

/* Dark follows the device unless the visitor chose light; a visitor who chose
   dark gets it regardless of the device. Tokens only — components never
   branch on the theme themselves. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:       #121110;
    --panel:    #1A1917;
    --sunk:     #1E1C1A;
    --line:     #2B2926;
    --ink:      #D9D3C8;
    --strong:   #F7F4EE;
    --muted:    #968F85;
    --mark:     #C97F63;   /* terracotta */
    --mark-ink: #DE9C82;
    --on-mark:  #121110;
    --error:    #E38B6E;
    --shadow:   0 1px 1px rgba(0, 0, 0, .3), 0 26px 56px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:       #121110;
  --panel:    #1A1917;
  --sunk:     #1E1C1A;
  --line:     #2B2926;
  --ink:      #D9D3C8;
  --strong:   #F7F4EE;
  --muted:    #968F85;
  --mark:     #C97F63;   /* terracotta */
  --mark-ink: #DE9C82;
  --on-mark:  #121110;
  --error:    #E38B6E;
  --shadow:   0 1px 1px rgba(0, 0, 0, .3), 0 26px 56px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---- type ---- */
h1, h2, h3 { margin: 0; color: var(--strong); text-wrap: balance; }
h1 { font-size: clamp(50px, 7.4vw, 92px); line-height: 1.02; font-weight: 300; letter-spacing: -.04em; }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.14; font-weight: 300; letter-spacing: -.025em; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 500; letter-spacing: -.01em; }
p  { margin: 0; }

.label {
  margin: 0 0 20px;
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--muted);
}

/* ---- brand ---- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--strong); text-decoration: none; }
.mark { display: block; width: 26px; height: 27px; fill: var(--mark); transition: transform .3s ease; }
.brand:hover .mark { transform: translateY(-1px); }
.wordmark { font-size: 25px; font-weight: 400; letter-spacing: -.02em; line-height: 1; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 30px 0; }
.top-cta {
  font-size: 11.5px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  padding-bottom: 4px; border-bottom: 1px solid var(--line);
  transition: border-color .2s ease;
}
.top-cta:hover { border-color: var(--ink); }

.top-actions { display: flex; align-items: center; gap: 20px; }
.theme-toggle {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  color: var(--ink); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 50%;
  transition: border-color .2s ease;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }
.theme-toggle svg { width: 16px; height: 16px; }
/* One icon per state: a stone half in shadow for "follow the device",
   an open stone for light, a solid one for dark. */
.theme-toggle g { display: none; }
.theme-toggle[data-mode="system"] .i-system,
.theme-toggle[data-mode="light"] .i-light,
.theme-toggle[data-mode="dark"] .i-dark { display: inline; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; border-radius: 4px; }

/* ---- hero ---- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 64px; align-items: center;
  padding: 64px 0 120px;
}
.lede { margin-top: 30px; max-width: 32em; font-size: 19px; line-height: 1.62; }

/* ---- join form ---- */
.join {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px;
  max-width: 480px; margin-top: 40px;
}
.join input[type="email"] {
  min-width: 0; padding: 15px 20px;
  font: inherit; font-size: 16px; color: var(--strong);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .2s ease;
}
.join input[type="email"]::placeholder { color: var(--muted); }
.join input[type="email"]:hover { border-color: var(--muted); }
.join input[type="email"]:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; border-color: transparent; }
.join.is-error input[type="email"] { border-color: var(--error); }

.join button {
  padding: 15px 26px; white-space: nowrap; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500;
  color: var(--on-mark); background: var(--mark);
  border: 0; border-radius: 999px;
  transition: filter .15s ease, transform .15s ease;
}
.join button:hover { filter: brightness(.95); }
.join button:active { transform: translateY(1px); }
.join button[disabled] { opacity: .6; cursor: progress; }

.form-note { grid-column: 1 / -1; min-height: 1.6em; padding-left: 20px; font-size: 13.5px; color: var(--muted); }
.join.is-done  .form-note { color: var(--mark-ink); }
.join.is-error .form-note { color: var(--error); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.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; }

/* ---- the brief ---- */
.brief {
  justify-self: end; width: 100%; max-width: 440px; margin: 0;
  padding: 28px 28px 22px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow);
}
.brief-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.brief-top .label { margin: 0; }
.brief-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.brief-person { display: flex; align-items: center; gap: 16px; margin: 26px 0 22px; }
.avatar { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--sunk); }
.avatar svg { width: 22px; height: 22px; fill: var(--mark); }
.brief-name { font-size: 26px; line-height: 1.1; letter-spacing: -.02em; color: var(--strong); }
.brief-aka { margin-top: 5px; font-size: 13.5px; color: var(--muted); }
.brief-lines { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.brief-lines li {
  display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.5;
}
.brief-lines .kind {
  padding-top: 4px;
  font-size: 10.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--mark-ink);
}
.brief-foot { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* ---- sections ---- */
.section { padding: 112px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 660px; margin-bottom: 64px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.step { padding: 0 36px; border-left: 1px solid var(--line); }
.step:first-child { padding-left: 0; border-left: 0; }
.step:last-child { padding-right: 0; }
.step-no { display: block; margin-bottom: 28px; font-size: 13px; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.step h3 { margin-bottom: 10px; }
.step p { font-size: 16px; }

.said {
  margin: 26px 0 0; padding: 18px 20px;
  font-size: 15px; line-height: 1.55; color: var(--strong);
  background: var(--sunk); border-radius: 22px 22px 22px 6px;
}
.extract { display: grid; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.extract li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 18px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 999px;
}
.extract b { font-weight: 500; color: var(--strong); }
.extract span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ask {
  display: inline-block; margin-top: 26px; padding: 13px 20px;
  font-size: 15px; color: var(--on-mark);
  background: var(--mark); border-radius: 22px 22px 6px 22px;
}

/* kith & kin */
.keeps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: start; }
.keeps-intro > p:last-child { margin-top: 26px; max-width: 32em; }
.elements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px 40px; margin: 0; padding: 0; list-style: none; }
.el-slot { display: flex; align-items: flex-end; height: 46px; margin-bottom: 22px; }
.el { display: block; fill: var(--mark); }
.el-people { width: 40px; height: 40px; }
.el-moment { width: 64px; height: 34px; }
.el-rel    { width: 112px; height: 36px; }
.el-you    { width: 44px; height: 46px; }
.elements h3 { margin-bottom: 8px; font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; }
.elements p { font-size: 15.5px; }

/* the map teaser: v2's graph, shown only as a promise */
.section-lede { margin-top: 22px; max-width: 34em; }
.map-frame {
  position: relative; margin: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px;
}
.map {
  display: block; width: 100%; height: auto;
  /* Everything past the people closest to you dissolves into the page. */
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 42%, transparent 100%);
          mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 42%, transparent 100%);
}
.map .edges line { stroke: var(--line); stroke-width: 1.2; }
.map .edges.close line { stroke: var(--muted); stroke-width: 1.4; opacity: .6; }
.map .edges.far { filter: blur(1.5px); }
.map .ring.inner circle { fill: var(--mark); }
.map .ring.mid circle, .map .moment { fill: var(--mark); opacity: .7; }
.map .ring.far circle { fill: var(--muted); opacity: .55; }
.map .ring.mid { filter: blur(1.2px); }
.map .ring.far { filter: blur(3.5px); }
.map text { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 15px; fill: var(--ink); text-anchor: middle; }
/* Names beyond your closest people are there, just not readable yet. */
.map .ring.mid text { filter: blur(3px); opacity: .8; }
.map .you { fill: var(--mark); }
.map-badge {
  position: absolute; top: 20px; right: 20px; z-index: 1;
  padding: 6px 14px; font-size: 10.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
.map-note { position: absolute; left: 24px; bottom: 18px; font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  /* A slow drift in the outer rings: the map is alive, and not finished. */
  .map .ring.mid, .map .edges.mid { animation: drift 14s ease-in-out infinite alternate; }
  .map .ring.far, .map .edges.far { animation: drift 19s ease-in-out infinite alternate-reverse; }
  @keyframes drift { from { transform: translate(0, 0); } to { transform: translate(6px, -4px); } }
}
@media (max-width: 640px) {
  .map-frame { border-radius: 22px; margin: 0 -8px; }
  .map text { font-size: 22px; }
  .map-badge { top: 14px; right: 14px; }
  .map-note { left: 16px; bottom: 12px; }
}

/* quiet rules */
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.rules > div { padding: 34px 44px 38px 0; border-bottom: 1px solid var(--line); }
.rules > div:nth-child(even) { padding: 34px 0 38px 44px; border-left: 1px solid var(--line); }
.rules dt { margin-bottom: 10px; font-size: 22px; font-weight: 400; letter-spacing: -.015em; color: var(--strong); }
.rules dd { margin: 0; max-width: 30em; }
.rules a.inline { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line); }
.rules a.inline:hover { text-decoration-color: var(--ink); }

/* closing call */
.cta { padding: 128px 0 120px; border-top: 1px solid var(--line); text-align: center; }
.cta > p { max-width: 33em; margin: 22px auto 0; }
.cta > .back { margin-top: 36px; }
/* A page that is only this block (404, thanks, errors) has nothing above to divide from. */
.cta.solo { border-top: 0; padding-top: 18vh; }
.cta .join { margin: 40px auto 0; text-align: left; }
.cairn { display: block; width: 72px; height: 74px; margin: 0 auto 36px; fill: var(--mark); overflow: visible; }

@media (prefers-reduced-motion: no-preference) {
  /* The stones settle onto each other once the section is in view. They start
     only slightly apart, so the resting frame is never an empty one. */
  .cairn .s1, .cairn .s2 { transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
  .cairn.lift .s1 { transform: translateY(-9px); }
  .cairn.lift .s2 { transform: translateY(-4px); }
  .cairn .s2 { transition-delay: .08s; }
}

/* footer */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px;
  padding: 40px 0 56px; border-top: 1px solid var(--line);
}
.foot .mark { width: 22px; height: 23px; }
.foot .wordmark { font-size: 21px; }
.foot .tag { font-size: 11px; letter-spacing: .38em; text-transform: uppercase; color: var(--muted); }
.foot .small { font-size: 13px; color: var(--muted); }
.foot-links { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.foot-links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.foot-links a:hover { border-color: var(--ink); }

/* privacy page */
.doc { max-width: 680px; padding: 48px 0 96px; }
.doc h1 { font-size: clamp(40px, 5.6vw, 64px); }
.doc .lede { margin-top: 22px; }
.doc section { padding: 34px 0; border-top: 1px solid var(--line); }
.doc section:first-of-type { margin-top: 48px; }
.doc h2 { font-size: 22px; font-weight: 400; letter-spacing: -.015em; margin-bottom: 10px; }
.doc p + p { margin-top: 12px; }
.doc a { color: var(--strong); }
.doc .join { margin-top: 22px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 64px; padding: 36px 0 88px; }
  .brief { justify-self: start; }
  .section { padding: 88px 0; }
  .steps { grid-template-columns: 1fr; gap: 64px; }
  .step, .step:first-child, .step:last-child { padding: 0; border-left: 0; }
  .keeps { grid-template-columns: 1fr; gap: 64px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 22px; }
  .top { padding: 22px 0; }
  .lede { font-size: 17.5px; }
  .join { grid-template-columns: 1fr; }
  .join button { width: 100%; }
  .brief { padding: 22px 20px 18px; border-radius: 24px; }
  .brief-lines li { grid-template-columns: 1fr; gap: 4px; }
  .elements { grid-template-columns: 1fr; gap: 44px; }
  .rules { grid-template-columns: 1fr; }
  .rules > div, .rules > div:nth-child(even) { padding: 28px 0 30px; border-left: 0; }
  .foot { flex-direction: column; align-items: flex-start; }
}
