/* MOTSI — pre-launch site. Tokens from the Motsi Design System. */
:root {
  --ink: #272727;
  --ink-90: #3A3A3A;
  --ink-70: #5A5A5A;
  --ink-50: #8A8A8A;
  --ink-15: #DEDDD8;
  --bone: #F2F1EB;
  --bone-soft: #E8E6DE;
  --bone-deep: #DCD9CE;
  --rust: #B05B1D;
  --sand: #A68064;
  --sand-soft: #D7C4B2;
  --sans: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Playfair Display', Didot, Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 4.4vw, 72px);
  --max: 1440px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--bone); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bone); padding: 12px 18px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

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

.wordmark {
  display: block;
  aspect-ratio: 720 / 285;
  background-color: currentColor;
  -webkit-mask: url('motsi-wordmark.svg') center / contain no-repeat;
          mask: url('motsi-wordmark.svg') center / contain no-repeat;
}

.label { font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--bone);
  transition: background-color 520ms var(--ease), color 520ms var(--ease);
}
.site-header .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.site-header .mark { width: 74px; opacity: 0; transition: opacity 520ms var(--ease); }
.site-header.is-scrolled { background: rgba(242, 241, 235, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink); }
.site-header.is-scrolled .mark { opacity: 1; }
.site-header nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.site-header nav a, .text-link { text-decoration: none; position: relative; padding: 6px 0; }
.site-header nav a::after, .text-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: currentColor; transition: right 240ms var(--ease);
}
.site-header nav a:hover::after, .text-link:hover::after, .site-header nav a:focus-visible::after { right: 0; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  background: var(--ink); color: var(--bone);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: calc(clamp(28px, 5vh, 56px) + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; filter: grayscale(0.15) sepia(0.06) contrast(1.02); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: rgba(39, 39, 39, 0.34); }
.hero .wrap { position: relative; width: 100%; }
.hero-mark { overflow: hidden; padding-top: 2px; margin: 0; }
.hero-mark .wordmark { width: clamp(180px, 26vw, 440px); transform: translateY(0); }
.horizon { height: 1px; background: var(--bone); opacity: 0.5; transform-origin: left center; margin-top: clamp(14px, 2vw, 26px); }
.hero-foot { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; margin-top: clamp(18px, 3vh, 34px); }
.hero-line { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(26px, 3.2vw, 46px); line-height: 1.15; margin: 0; }
.hero-note { justify-self: end; text-align: right; max-width: 34ch; margin: 0; color: rgba(242, 241, 235, 0.78); }
.hero-note .label { display: block; color: var(--bone); margin-bottom: 10px; }

.js .hero-mark .wordmark { transform: translateY(104%); }
.js .horizon { transform: scaleX(0); }
.js .hero-foot { opacity: 0; transform: translateY(14px); }
.js.is-loaded .horizon { transform: scaleX(1); transition: transform 1100ms var(--ease); }
.js.is-loaded .hero-mark .wordmark { transform: translateY(0); transition: transform 1700ms var(--ease) 650ms; }
.js.is-loaded .hero-foot { opacity: 1; transform: none; transition: opacity 900ms var(--ease) 1700ms, transform 900ms var(--ease) 1700ms; }

/* Sections */
.section { padding: clamp(88px, 13vw, 184px) 0; }
.section-ink { background: var(--ink); color: var(--bone); }
.section-deep { background: var(--bone-deep); }

.manifesto { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; }
.manifesto .label { grid-column: 1 / span 3; color: var(--ink-70); padding-top: 14px; }
.manifesto h2 { grid-column: 4 / span 9; margin: 0; font-weight: 600; text-transform: uppercase; font-size: clamp(40px, 6.4vw, 104px); line-height: 0.98; letter-spacing: 0.005em; }
.manifesto .body { grid-column: 7 / span 5; margin-top: clamp(40px, 6vw, 80px); }
.manifesto .body p { font-size: 17px; line-height: 1.7; margin: 0 0 1.1em; max-width: 52ch; }
.manifesto .body p.lede { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.1vw, 28px); line-height: 1.4; margin-bottom: 1em; }

.frame { display: none; }
.frame.has-image { display: block; }
.frame figure { margin: 0; overflow: hidden; background: var(--bone-deep); }
.frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2) sepia(0.08) contrast(1.02); }
.frame-wide figure { aspect-ratio: 21 / 9; }
.frame img { object-position: 50% 30%; }
.frame-trio { padding-bottom: clamp(88px, 13vw, 184px); }
.frame-trio .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 24px); align-items: start; }
.frame-trio figure { aspect-ratio: 2 / 3; }
.frame-trio figure:nth-child(2) { margin-top: clamp(48px, 9vw, 140px); }
@media (max-width: 640px) {
  .frame-trio .wrap { grid-template-columns: 1fr 1fr; }
  .frame-trio figure:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 5; }
  .frame-trio figure:nth-child(2) { margin-top: 0; }
  .frame-trio figure:nth-child(3) { margin-top: 48px; }
}
.frame-pair .wrap { display: grid; grid-template-columns: 5fr 1fr 4fr; align-items: end; }
.frame-pair figure:first-child { aspect-ratio: 4 / 5; }
.frame-pair figure:last-child { grid-column: 3; aspect-ratio: 3 / 4; margin-bottom: 18%; }

.name-intro { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; margin-bottom: clamp(56px, 8vw, 112px); }
.name-intro .label { grid-column: 1 / span 3; color: var(--sand-soft); padding-top: 6px; }
.name-intro p { grid-column: 4 / span 6; margin: 0; font-size: 17px; line-height: 1.7; color: rgba(242, 241, 235, 0.82); max-width: 54ch; }
.meanings { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(242, 241, 235, 0.22); }
.meaning { padding: clamp(28px, 3vw, 44px) clamp(0px, 2vw, 32px) 0 0; }
.meaning + .meaning { padding-left: clamp(20px, 2.4vw, 40px); border-left: 1px solid rgba(242, 241, 235, 0.22); }
.meaning h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(36px, 4.6vw, 72px); line-height: 1.02; margin: 0 0 22px; }
.meaning p { margin: 0; max-width: 30ch; color: rgba(242, 241, 235, 0.72); }

.section-standard { padding: clamp(64px, 8vw, 112px) 0; }
.standard-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; margin-bottom: clamp(36px, 4.5vw, 64px); }
.standard-head h2 { grid-column: 1 / span 7; margin: 0; font-weight: 600; text-transform: uppercase; font-size: clamp(32px, 4.2vw, 64px); line-height: 1.02; }
.standard-head p { grid-column: 9 / span 4; align-self: end; margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.45; color: var(--ink-70); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 clamp(20px, 2.4vw, 40px); }
.pillar { border-top: 1px solid var(--ink); padding-top: 22px; }
.pillar h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.pillar p { margin: 0; color: var(--ink-70); max-width: 34ch; }

.join { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; align-items: start; }
.join-copy { grid-column: 1 / span 5; }
.join-copy h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(36px, 4.4vw, 68px); line-height: 1.06; margin: 0 0 28px; }
.join-copy p { margin: 0; max-width: 40ch; font-size: 17px; line-height: 1.7; color: var(--ink-90); }
.join-form { grid-column: 7 / span 6; padding-top: 10px; }
.field { position: relative; margin-bottom: 30px; }
.field label { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-70); margin-bottom: 6px; }
.field label .opt { letter-spacing: 0.04em; text-transform: none; font-weight: 400; color: var(--ink-50); }
.field input {
  width: 100%; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink);
  font: 300 clamp(20px, 1.8vw, 24px)/1.4 var(--sans); padding: 8px 0 12px;
  -webkit-appearance: none; appearance: none;
}
.field input:focus { outline: none; border-bottom-color: var(--rust); box-shadow: 0 1px 0 0 var(--rust); }
.field input[aria-invalid="true"] { border-bottom-color: #8C2E1A; }
.consent { display: grid; grid-template-columns: 18px 1fr; gap: 14px; align-items: start; margin: 6px 0 34px; font-size: 13px; line-height: 1.6; color: var(--ink-70); }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; border: 1px solid var(--ink); border-radius: 0; -webkit-appearance: none; appearance: none; background: transparent; display: grid; place-content: center; cursor: pointer; }
.consent input::after { content: ""; width: 10px; height: 10px; background: var(--ink); transform: scale(0); transition: transform 160ms var(--ease); }
.consent input:checked::after { transform: scale(1); }
.consent a { text-underline-offset: 3px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 40px;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--bone);
  font: 500 12px/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase;
  cursor: pointer; transition: background-color 240ms var(--ease), color 240ms var(--ease), transform 100ms;
}
.btn:hover { background: var(--ink-90); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(39, 39, 39, 0.06); }
.form-status { min-height: 24px; margin-top: 18px; font-size: 13px; color: var(--ink-70); }
.form-status.is-error { color: #8C2E1A; }
.join-done { display: none; }
.join-form.is-done form { display: none; }
.join-form.is-done .join-done { display: block; }
.join-done h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(30px, 3vw, 44px); line-height: 1.1; margin: 0 0 16px; }
.join-done p { margin: 0; color: var(--ink-70); max-width: 44ch; }

/* Footer */
.site-footer { background: var(--ink); color: var(--bone); padding: clamp(72px, 9vw, 128px) 0 calc(36px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px 24px; margin-bottom: clamp(56px, 8vw, 120px); }
.footer-grid > div { grid-column: span 3; font-size: 13px; line-height: 1.8; color: rgba(242, 241, 235, 0.74); }
.footer-grid > div:first-child { grid-column: 1 / span 3; }
.footer-grid .label { display: block; color: var(--sand-soft); margin-bottom: 14px; }
.footer-grid address { font-style: normal; }
.footer-social { margin-top: 14px; color: var(--bone); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--bone); }
.footer-grid button.text-link { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.footer-mark { width: 100%; color: var(--bone); }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; font-size: 11px; letter-spacing: 0.08em; color: rgba(242, 241, 235, 0.55); }

/* Cookie banner */
.cookie {
  position: fixed; z-index: 60; left: var(--gutter); bottom: calc(var(--gutter) * 0.5 + env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100vw - 2 * var(--gutter)));
  background: var(--bone); color: var(--ink);
  border: 1px solid var(--ink);
  padding: 22px 22px 20px;
  box-shadow: 0 30px 60px -30px rgba(39, 39, 39, 0.45);
  transform: translateY(12px); opacity: 0; visibility: hidden;
  transition: opacity 420ms var(--ease), transform 420ms var(--ease), visibility 0s linear 420ms;
}
.cookie.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.cookie h2 { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
.cookie p { margin: 0 0 18px; font-size: 13px; line-height: 1.6; color: var(--ink-70); }
.cookie p a { text-underline-offset: 3px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie .btn { min-height: 42px; padding: 0 12px; font-size: 10px; letter-spacing: 0.16em; flex: 1 1 auto; width: auto; }
.cookie-prefs { display: none; border-top: 1px solid var(--ink-15); margin: 0 0 18px; }
.cookie.is-managing .cookie-prefs { display: block; }
.pref { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--ink-15); }
.pref strong { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.pref span { grid-column: 1; font-size: 12px; color: var(--ink-70); line-height: 1.5; }
.pref input { grid-row: 1 / span 2; grid-column: 2; }
.switch { -webkit-appearance: none; appearance: none; width: 40px; height: 22px; border: 1px solid var(--ink); border-radius: 999px; position: relative; cursor: pointer; background: transparent; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform 200ms var(--ease); }
.switch:checked { background: var(--ink); }
.switch:checked::after { background: var(--bone); transform: translateX(18px); }
.switch:disabled { opacity: 0.45; cursor: not-allowed; }

/* Legal pages */
.legal-page .site-header { color: var(--ink); background: rgba(242, 241, 235, 0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.legal-page .site-header .mark { opacity: 1; }
.legal { padding: calc(72px + clamp(64px, 9vw, 120px)) 0 clamp(88px, 10vw, 140px); }
.legal .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; }
.legal header { grid-column: 1 / span 12; margin-bottom: clamp(48px, 6vw, 88px); }
.legal header h1 { margin: 0 0 18px; font-weight: 600; text-transform: uppercase; font-size: clamp(36px, 5vw, 72px); line-height: 1; }
.legal header p { margin: 0; color: var(--ink-70); }
.legal-toc { grid-column: 1 / span 3; font-size: 12px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; position: sticky; top: 104px; }
.legal-toc li { margin-bottom: 10px; }
.legal-toc a { text-decoration: none; color: var(--ink-70); }
.legal-toc a:hover { color: var(--ink); }
.legal-body { grid-column: 5 / span 7; max-width: 68ch; }
.legal-body h2 { margin: 56px 0 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; scroll-margin-top: 104px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { margin: 28px 0 10px; font-size: 15px; font-weight: 600; }
.legal-body p, .legal-body li { font-size: 15px; line-height: 1.75; color: var(--ink-90); }
.legal-body ul { padding-left: 1.1em; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { text-underline-offset: 3px; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0 8px; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--ink-15); }
.legal-body th { font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }

/* Responsive */
@media (max-width: 900px) {
  .manifesto .label, .manifesto h2, .manifesto .body,
  .name-intro .label, .name-intro p,
  .standard-head h2, .standard-head p,
  .join-copy, .join-form { grid-column: 1 / -1; }
  .manifesto .label, .name-intro .label { margin-bottom: 24px; padding-top: 0; }
  .standard-head p { margin-top: 24px; }
  .join-form { margin-top: 48px; }
  .pillars { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .footer-grid > div, .footer-grid > div:first-child { grid-column: span 6; }
  .legal-toc { display: none; }
  .legal-body { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .hero-foot { grid-template-columns: 1fr; gap: 18px; }
  .hero-note { justify-self: start; text-align: left; }
  .meanings { grid-template-columns: 1fr; border-top: 0; }
  .meaning, .meaning + .meaning { padding: 28px 0 32px; border-left: 0; border-top: 1px solid rgba(242, 241, 235, 0.22); }
  .pillars { grid-template-columns: 1fr; }
  .footer-grid > div, .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-legal { flex-direction: column; }
  .frame-pair .wrap { grid-template-columns: 1fr; gap: 20px; }
  .frame-pair figure:last-child { grid-column: 1; margin: 0 0 0 30%; }
  .site-header nav .hide-sm { display: none; }
  .btn { width: 100%; }
}

/* Mobile hero */
@media (max-width: 640px) {
  .hero-mark .wordmark { width: 52vw; }
  .hero-media img { object-position: 50% 8%; }
  .hero-line { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .js .horizon, .js .hero-foot { transform: none; opacity: 1; }
  .js .hero-mark .wordmark { transition: none !important; }
}