/* ==========================================================================
   Kin — marketing site
   Design tokens mirror the Kin app design system.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted, latin + latin-ext subsets)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-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;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-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;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-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: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-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;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-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;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  --primary: #9d6b78;
  --primary-dark: #7d5260;
  --primary-light: #edd8de;
  --secondary: #8b87bf;
  --secondary-light: #e2e0f5;
  --surface: #fbf8f5;
  --background: #f2ebe4;
  --ink: #2b2220;
  --text-primary: #2b2220;
  --text-secondary: #7a706d;
  --border: #e2dbd7;
  --empty-state: #c8c0bb;

  --on-ink: #fbf8f5;
  --on-ink-muted: rgba(251, 248, 245, 0.8);
  --on-ink-dim: rgba(251, 248, 245, 0.55);
  --on-ink-line: rgba(251, 248, 245, 0.12);

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 16px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-pill: 100px;

  --gutter: clamp(18px, 4vw, 32px);
  --section-y: clamp(56px, 9vw, 128px);
  --shadow-soft: 0 8px 28px rgba(43, 34, 32, 0.06);
  --shadow-lift: 0 14px 34px rgba(43, 34, 32, 0.1);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 180ms;
  --dur-mid: 320ms;
  --dur-slow: 700ms;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--primary-dark);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  transition: top var(--dur-mid) var(--ease-out);
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  letter-spacing: -0.5px;
  line-height: 1.15;
  text-wrap: pretty;
  color: var(--text-primary);
}

.display--hero {
  font-size: clamp(34px, 3.6vw + 18px, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1px;
}

.display--page {
  font-size: clamp(32px, 3.4vw + 17px, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  text-wrap: balance;
}

.display--xl {
  font-size: clamp(30px, 3.2vw + 16px, 60px);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}

.display--lg {
  font-size: clamp(28px, 2.9vw + 15px, 56px);
  font-weight: 600;
  text-wrap: balance;
}

.display--md {
  font-size: clamp(26px, 2.7vw + 14px, 52px);
  font-weight: 600;
  text-wrap: balance;
}

.display--sm {
  font-size: clamp(26px, 2.4vw + 14px, 48px);
  font-weight: 600;
}

.display--xs {
  font-size: clamp(24px, 2.1vw + 14px, 44px);
  font-weight: 600;
}

.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(19px, 1.2vw + 14px, 28px);
  line-height: 1.4;
  color: var(--text-secondary);
}

.serif-body {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 1vw + 14px, 26px);
  line-height: 1.5;
  text-wrap: pretty;
}

.belief {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 1.9vw + 14px, 40px);
  line-height: 1.3;
  letter-spacing: -0.3px;
  color: var(--on-ink);
  text-wrap: balance;
}

.lead {
  font-size: clamp(17px, 0.35vw + 16px, 19px);
  line-height: 1.6;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.body-lg {
  font-size: clamp(16px, 0.3vw + 15px, 18px);
  line-height: 1.7;
}

.body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.micro {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.nano {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.step-number {
  font-family: var(--font-display);
  font-size: clamp(64px, 6.5vw + 24px, 140px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -4px;
  color: var(--primary-light);
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */

.section {
  padding: var(--section-y) var(--gutter);
  background: var(--background);
}

.section--surface { background: var(--surface); }
.section--dark { background: var(--ink); color: var(--on-ink); }
.section--tall { padding-block: clamp(80px, 12vw, 160px); }
.section--hero { padding-block: clamp(56px, 7vw, 96px) clamp(72px, 10vw, 128px); }
.section--intro { padding-block: clamp(56px, 8vw, 112px) clamp(48px, 7vw, 96px); }
.section--flush-top { padding-top: 0; }

.center { text-align: center; }

.wrap { max-width: 1100px; margin-inline: auto; }
.wrap--md { max-width: 1000px; }
.wrap--sm { max-width: 900px; }
.wrap--xs { max-width: 820px; }
.wrap--xxs { max-width: 780px; }
.wrap--tight { max-width: 700px; }
.wrap--narrow { max-width: 680px; }

.measure { max-width: 480px; }
.measure--mid { max-width: 560px; }
.measure--wide { max-width: 640px; }

.center .measure,
.center .measure--mid,
.center .measure--wide,
.mx-auto { margin-inline: auto; }

.tint-primary { color: var(--primary); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.split--founder {
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 64px);
}

.stack {
  display: flex;
  flex-direction: column;
}

.stack--20 { gap: 20px; }
.stack--28 { gap: 28px; }
.stack--32 { gap: 32px; }
.stack--72 { gap: clamp(40px, 6vw, 72px); }

.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }
.mt-36 { margin-top: 36px; }
.mt-40 { margin-top: 40px; }
.mt-44 { margin-top: 44px; }
.mt-56 { margin-top: clamp(36px, 5vw, 56px); }
.mt-64 { margin-top: clamp(40px, 5.5vw, 64px); }

.actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   6. Media
   -------------------------------------------------------------------------- */

.media {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}

.media--portrait { aspect-ratio: 3 / 4; max-width: 520px; }
.media--portrait-sm { aspect-ratio: 3 / 4; max-width: 440px; }
.media--portrait-xs { aspect-ratio: 3 / 4; max-width: 420px; }
.media--square { aspect-ratio: 1 / 1; max-width: 400px; }
.media--end { justify-self: end; }
.media--centered { margin-inline: auto; }
.media--soft { border-radius: var(--radius-md); }

.media--framed {
  background: var(--surface);
  border: 1px solid var(--border);
}

.media:hover img { transform: scale(1.035); }

.hero-figure {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 520px;
}

.hero-figure img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.hero-orbit {
  position: absolute;
  inset: -6%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-orbit__ring {
  position: relative;
  width: 88%;
  height: 88%;
  border: 1.5px solid var(--primary-light);
  border-radius: 50%;
  animation: kin-rotate 40s linear infinite;
}

.hero-orbit__dot {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-light);
  transform: translateX(-50%);
  animation: kin-pulse 6s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   7. Buttons and links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--dur-mid) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.btn--primary:active { transform: translateY(0); }

.btn--outline {
  height: 48px;
  padding: 0 24px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn--nav {
  height: clamp(38px, 1vw + 34px, 44px);
  padding: 0 clamp(14px, 1.4vw + 8px, 22px);
  font-size: clamp(12px, 0.3vw + 11px, 14px);
}

.btn--wide {
  height: 56px;
  width: 100%;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
}

.link-arrow--lg { font-size: 16px; }
.link-arrow--on-dark { color: var(--primary-light); }
.link-arrow--on-dark:hover { color: #fff; }

.link-arrow__icon {
  font-size: 18px;
  line-height: 1;
  transition: transform var(--dur-mid) var(--ease-out);
}

.link-arrow:hover .link-arrow__icon { transform: translateX(4px); }

.text-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   8. Nav
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: clamp(14px, 1vw + 10px, 18px) var(--gutter);
  transition: box-shadow var(--dur-mid) var(--ease-out),
    background-color var(--dur-mid) var(--ease-out);
}

.nav.is-scrolled {
  background: rgba(251, 248, 245, 0.92);
  box-shadow: 0 6px 24px rgba(43, 34, 32, 0.07);
  backdrop-filter: saturate(140%) blur(10px);
}

.nav__inner {
  max-width: 1100px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text-primary);
}

.brand:hover { color: var(--text-primary); }

.brand__mark {
  flex-shrink: 0;
  transition: transform var(--dur-slow) var(--ease-out);
}

.brand:hover .brand__mark { transform: rotate(-8deg); }

.brand__word {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand__word--on-dark { color: var(--on-ink); }

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}

.nav__link {
  position: relative;
  padding-block: 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-mid) var(--ease-out);
}

.nav__link:hover::after,
.nav__link[aria-current='page']::after { transform: scaleX(1); }

.nav__link[aria-current='page'] {
  color: var(--primary);
  font-weight: 600;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Menu button — only ever shown once .nav__menu drops out below 900px. */
.nav__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.nav__toggle-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform var(--dur-mid) var(--ease-out);
}

.nav.is-open .nav__toggle-bar:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav.is-open .nav__toggle-bar:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Panel holding the links the breakpoint takes away. The 0fr → 1fr grid row
   animates to the content's natural height without hard-coding one. */
.nav__panel {
  display: none;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-mid) var(--ease-out);
}

.nav.is-open .nav__panel { grid-template-rows: 1fr; }

/* visibility, not just overflow, so the links leave the tab order when closed. */
.nav__panel-inner {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear var(--dur-mid);
}

.nav.is-open .nav__panel-inner {
  visibility: visible;
  transition-delay: 0s;
}

.nav__panel-links {
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin-inline: auto;
  padding-top: 10px;
}

.nav__panel-link {
  padding: 14px 2px;
  border-top: 1px solid var(--border);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.nav__panel-link[aria-current='page'] {
  color: var(--primary);
  font-weight: 600;
}

/* The bar's CTA moves into the panel on mobile — see the 900px block. */
.nav__panel-cta {
  display: none;
  margin-top: 18px;
}

/* --------------------------------------------------------------------------
   9. Language toggle
   -------------------------------------------------------------------------- */

.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--background);
  border: 1px solid var(--border);
}

.lang__btn {
  padding: 6px clamp(9px, 1vw + 5px, 12px);
  border-radius: var(--radius-pill);
  font-size: clamp(11px, 0.2vw + 10px, 12px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  transition: background-color var(--dur-mid) var(--ease-out),
    color var(--dur-mid) var(--ease-out);
}

.lang__btn[aria-pressed='true'] {
  background: var(--primary);
  color: #fff;
}

.lang--on-dark {
  background: rgba(251, 248, 245, 0.08);
  border-color: transparent;
}

.lang--on-dark .lang__btn { color: rgba(251, 248, 245, 0.75); }

.lang--on-dark .lang__btn[aria-pressed='true'] {
  background: var(--primary-light);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   10. Cards
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: transform var(--dur-mid) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-soft);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
}

.card__icon--secondary { background: var(--secondary-light); }

.card__title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

/* Permissions preview */
.permissions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  aspect-ratio: 1 / 1;
  max-width: 440px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
}

.permission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.permission__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.permission__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.toggle {
  flex-shrink: 0;
  width: 50px;
  height: 28px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--empty-state);
  transition: background-color var(--dur-slow) var(--ease-out);
}

.toggle--on { background: var(--primary); }

.toggle__knob {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform var(--dur-slow) var(--ease-out);
}

.toggle--on .toggle__knob { transform: translateX(22px); }

.permissions__caption {
  margin-top: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  text-align: center;
  color: var(--empty-state);
}

/* --------------------------------------------------------------------------
   11. Dark sections
   -------------------------------------------------------------------------- */

.section--dark .display { color: var(--on-ink); }
.section--dark .eyebrow { color: rgba(251, 248, 245, 0.6); }

.on-ink-muted { color: var(--on-ink-muted); }
.on-ink-dim { color: var(--on-ink-dim); }
.step-number--on-dark { color: rgba(237, 216, 222, 0.15); }

/* --------------------------------------------------------------------------
   12. Get started page
   -------------------------------------------------------------------------- */

.start {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: clamp(56px, 7vw, 96px) 20px clamp(72px, 8vw, 96px);
  background: var(--background);
}

.start__inner {
  width: 100%;
  max-width: 480px;
}

.start__mark { margin-inline: auto; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: var(--on-ink);
  padding: clamp(48px, 6vw, 80px) var(--gutter) 40px;
}

.footer__grid {
  max-width: 1100px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(32px, 4vw, 48px);
  align-items: start;
}

.footer__tagline {
  margin-top: 16px;
  max-width: 340px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: rgba(251, 248, 245, 0.85);
}

.footer__tagline--alt {
  margin-top: 4px;
  font-size: 18px;
  color: var(--on-ink-dim);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* The padding keeps the rhythm of a 12px gap while giving each link a
   comfortable tap target. */
.footer__link {
  padding-block: 5px;
  font-size: 14px;
  color: rgba(251, 248, 245, 0.75);
}

.footer__link:hover { color: var(--on-ink); }

.footer__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(251, 248, 245, 0.25);
  border-radius: 50%;
  color: rgba(251, 248, 245, 0.75);
  transition: transform var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) var(--ease-out),
    color var(--dur-mid) var(--ease-out);
}

.social:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.footer__bottom {
  max-width: 1100px;
  margin: clamp(36px, 5vw, 56px) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--on-ink-line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 12px;
  color: rgba(251, 248, 245, 0.5);
}

.footer__bottom a { color: rgba(251, 248, 245, 0.5); }
.footer__bottom a:hover { color: var(--on-ink); }

/* --------------------------------------------------------------------------
   14. Motion
   -------------------------------------------------------------------------- */

@keyframes kin-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes kin-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(1.45); opacity: 0.7; }
}

@keyframes kin-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll reveal — app.js adds .is-visible as an element enters the viewport.
   Everything below is scoped to .js, which the inline head script sets, so a
   reader without JavaScript gets the finished page rather than a blank one. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal--soft { transform: translateY(10px); }
.js .reveal--scale { transform: translateY(16px) scale(0.985); }

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Children reveal in sequence. */
.js .reveal-group > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.js .reveal-group.is-visible > * {
  opacity: 1;
  transform: none;
}

.js .reveal-group > *:nth-child(1) { transition-delay: 0ms; }
.js .reveal-group > *:nth-child(2) { transition-delay: 110ms; }
.js .reveal-group > *:nth-child(3) { transition-delay: 220ms; }
.js .reveal-group > *:nth-child(4) { transition-delay: 330ms; }

/* The permission toggles settle into place as the card appears. */
.js .permissions .toggle { background: var(--empty-state); }
.js .permissions .toggle__knob { transform: translateX(0); }
.js .permissions.is-visible .toggle--on { background: var(--primary); }
.js .permissions.is-visible .toggle--on .toggle__knob { transform: translateX(22px); }
.js .permissions.is-visible .permission:nth-child(2) .toggle__knob {
  transition-delay: 140ms;
}

.page-enter { animation: kin-fade-in 500ms var(--ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal,
  .js .reveal-group > * {
    opacity: 1;
    transform: none;
  }

  .js .permissions .toggle--on { background: var(--primary); }
  .js .permissions .toggle--on .toggle__knob { transform: translateX(22px); }
}

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .split,
  .split--founder {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cards { grid-template-columns: 1fr; gap: 20px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }

  /* The nav links and the CTA move from the bar into the menu panel, leaving
     the bar with the brand, the language toggle and the menu button. Keeping
     the CTA in the bar fits at 375px but overflows by 320px. */
  .nav__menu { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav__panel { display: grid; }
  .nav__panel-cta { display: flex; }
  .nav__actions { gap: 10px; }

  .media--portrait,
  .media--portrait-sm,
  .media--portrait-xs,
  .hero-figure {
    max-width: 100%;
    justify-self: stretch;
  }

  .media--square {
    max-width: 320px;
    justify-self: center;
    margin-inline: auto;
  }

  .media--end { justify-self: stretch; }

  .permissions {
    max-width: 100%;
    aspect-ratio: auto;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .display--hero { letter-spacing: -0.5px; }
  .step-number { margin-bottom: -8px; }
}
