/* Miseo — usemiseo.com. Tokens mirror iOS/Miseo/Support/DesignSystem/MiseoPalette.swift (dark scheme)
   and docs/DESIGN.md. Colour carries information: purple is the subject line and one spotlight, never a wash. */

@font-face {
  font-family: "Anton";
  src: url("fonts/Anton-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/HankenGrotesk-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --canvas: #1E1B26;
  --surface: #272330;
  --sunken: #302B3D;
  --ink: #F2EDE2;
  --ink-muted: #B5AE9E;
  --hairline: #3A362E;
  --tint: #D0BCFF;
  --tint-deep: #4F378A;
  --provenance: #D9B84A;
  --margin: 20px;
  --radius: 12px;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --text: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
}
@media (min-width: 900px) { :root { --margin: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--tint); }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 4px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--margin); top: -100px;
  background: var(--ink); color: var(--canvas); padding: 12px 20px; border-radius: 9999px; font-weight: 800;
}
.skip:focus { top: 16px; z-index: 10; }

/* Type */
.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
  margin: 0;
}
.display .tint { color: var(--tint); }
.shelf {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted);
  margin: 0 0 24px;
}
.lede { font-size: 20px; line-height: 1.5; color: var(--ink-muted); max-width: 560px; margin: 0; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--ink); color: var(--canvas);
  border-radius: 9999px; padding: 16px 12px 16px 24px;
  font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em;
  border: 0; cursor: pointer;
}
.pill:hover { color: var(--canvas); background: var(--tint); }
.pill .tag {
  border: 1px solid currentColor; border-radius: 9999px; padding: 6px 12px; font-size: 12px; letter-spacing: 0.02em; white-space: nowrap;
}
.pill.small { padding: 10px 8px 10px 16px; font-size: 13px; gap: 12px; }
.pill.small .tag { padding: 4px 8px; font-size: 11px; }
.chip {
  border: 1px solid var(--hairline); border-radius: 9999px; padding: 10px 18px;
  font-size: 14px; font-weight: 700; text-transform: uppercase; white-space: nowrap;
}

/* Phone frame — hairline, no shadow (DESIGN.md: depth is tonal) */
.phone {
  border: 1px solid var(--hairline); border-radius: 40px; overflow: hidden; background: var(--surface);
  aspect-ratio: 1290 / 2796;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px var(--margin);
}
.wordmark { font-size: 28px; }
.wordmark .tint { color: var(--tint); }

/* Sections */
section { padding: 96px var(--margin); border-top: 1px solid var(--hairline); }
@media (min-width: 900px) { section { padding: 120px var(--margin); } }
.two { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; } }
.stack { display: flex; flex-direction: column; gap: 32px; }

/* Hero */
.hero { position: relative; border-top: 0; padding-top: 24px; overflow: hidden; }
/* The app's own three-line lockup, sized so THEIR SHOP. — the longest line, about 4.2em in Anton —
   ends where the phones begin: the column left of them is 54vw less the two margins. */
.hero h1 { font-size: clamp(72px, calc((54vw - 150px) / 4.2), 200px); line-height: 0.86; white-space: nowrap; margin-left: -0.03em; }
/* Below the desktop layout nothing hides an overrun, so the size is what fits THEIR SHOP. inside the margins at 375px */
@media (max-width: 899px) { .hero h1 { font-size: clamp(64px, 20.5vw, 200px); } }
.hero h1 span { display: block; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; max-width: 560px; margin-top: 48px; }
.hero-copy p { font-size: 22px; line-height: 1.4; margin: 0; }
/* align-items: flex-start — stretch would size the first phone to the second one's offset height and cover-crop its screenshot */
.hero-phones { position: relative; display: flex; align-items: flex-start; gap: 0; justify-content: center; margin-top: 48px; }
.hero-phones .phone { width: 56%; max-width: 330px; }
.hero-phones .phone:first-child { transform: rotate(-6deg); margin-right: -12%; z-index: 1; }
.hero-phones .phone:last-child { transform: rotate(5deg); margin-top: 14%; }
/* A radial gradient, not filter: blur() — Safari paints a blurred layer as a hard square once its
   opacity changes (the entrance bloom), and a gradient is cheaper to composite anyway */
.spot {
  position: absolute; border-radius: 9999px; pointer-events: none; opacity: 0.55;
  background: radial-gradient(closest-side, var(--tint-deep), transparent);
}
.hero .spot { width: 90vw; height: 90vw; max-width: 960px; max-height: 960px; right: -25vw; top: 5%; }
@media (min-width: 900px) {
  .hero { min-height: 980px; }
  .hero-phones { position: absolute; right: var(--margin); top: 120px; width: min(660px, 46vw); margin: 0; z-index: 1; }
  .hero-copy { margin-top: 56px; max-width: calc(100% - min(660px, 46vw) - 48px); }
}

/* Motion: hero lines rise in */
@keyframes rise { from { clip-path: inset(0 0 100% 0); transform: translateY(0.2em); } to { clip-path: inset(-0.2em 0 -0.2em 0); transform: none; } }
.hero h1 span { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero h1 span:nth-child(2) { animation-delay: 0.18s; }
.hero h1 span:nth-child(3) { animation-delay: 0.36s; }
.hero-copy, .hero-phones { animation: fade 0.8s ease-out 0.45s both; }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Scroll reveal: main.js adds .in when a [data-reveal] enters the viewport */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* Feature sections: a viewport-high stage with a phone that plays its clip on a loop while the
   section is on screen; main.js cycles the captions on the clip's clock and sets --enter as the
   section arrives. Without JS the poster shows; under prefers-reduced-motion the clip never plays. */
.feature { padding: 0 var(--margin); position: relative; }
.stage {
  min-height: 100vh; display: grid; align-items: center; gap: 32px;
  grid-template-rows: minmax(0, 52vh) auto; padding: 24px 0 32px;
}
.phone-wrap { position: relative; display: flex; justify-content: center; align-items: center; min-height: 0; height: 100%; }
/* Entrance, bound to scroll (main.js sets --enter 0→1 as the section arrives): the phone rises,
   un-tilts and fades in, the captions drift in a beat behind, the spotlight blooms. Transform and
   opacity only, so it composites; without JS --enter is unset and everything sits at rest. */
.phone-wrap .phone {
  height: 100%; width: auto; max-width: 100%;
  opacity: var(--enter, 1);
  transform: translateY(calc((1 - var(--enter, 1)) * 14vh)) scale(calc(0.86 + 0.14 * var(--enter, 1))) rotate(calc((1 - var(--enter, 1)) * -7deg));
  will-change: transform, opacity;
}
.feature.flip .phone-wrap .phone { transform: translateY(calc((1 - var(--enter, 1)) * 14vh)) scale(calc(0.86 + 0.14 * var(--enter, 1))) rotate(calc((1 - var(--enter, 1)) * 7deg)); }
.captions { transform: translateY(calc((1 - var(--enter, 1)) * 6vh)); }
.phone-wrap .spot { width: 640px; height: 640px; max-width: 120vw; left: 50%; top: 50%; translate: -50% -50%; opacity: calc(0.6 * var(--enter, 1)); }
.phone video { display: block; width: 100%; height: 100%; object-fit: cover; }
.captions { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.captions .eyebrow { margin: 0; }
.captions .display { font-size: clamp(48px, 11vw, 96px); }
.caps { position: relative; min-height: 120px; }
.cap {
  position: absolute; inset: 0 auto auto 0; width: 100%; display: flex; flex-direction: column; gap: 16px;
  opacity: 0; transform: translateY(16px); transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  pointer-events: none;
}
/* The one leaving is gone in 0.2s; the one arriving waits for it, so two shelf words never overlap */
.cap.on { opacity: 1; transform: none; pointer-events: auto; transition: opacity 0.45s ease-out 0.2s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s; }
.cap .lede { font-size: 18px; }
.cap .say, .cap .word { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cap .head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }
.cap .say { font-size: 24px; color: var(--ink-muted); }
.cap .word { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.92; font-size: clamp(36px, 8vw, 72px); overflow-wrap: anywhere; }
.cap .word.tint { color: var(--tint); }
.chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }
.honesty {
  border: 1px solid var(--hairline); border-radius: var(--radius); padding: 28px 32px;
  display: flex; flex-direction: column; gap: 12px; max-width: 520px;
}
.honesty .shelf { font-size: 28px; margin: 0; }
.honesty p { margin: 0; color: var(--ink-muted); }
@media (min-width: 900px) {
  .stage { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; padding: 0; }
  .phone-wrap { height: min(84vh, 780px); }
  .feature.flip .phone-wrap { order: 2; }
  .captions { gap: 24px; }
  .captions .display { font-size: clamp(64px, 7vw, 120px); }
  .caps { min-height: 220px; }
  .cap .lede { font-size: 20px; }
  .cap .say { font-size: 28px; }
  .cap .word { font-size: clamp(40px, 4.6vw, 72px); }
}
/* The share section's phone: Miseo's share sheet, drawn in HTML. Sized off the phone itself
   (container units), so it scales with the frame at every width. One post shows at a time, on the
   same clock and with the same hand-over as the captions. */
/* Light, like the extension on most phones: the app's light tokens (MiseoPalette.swift), scoped
   to the sheet so the page around it stays dark */
.phone.sheet {
  --canvas: #FDF7FF; --surface: #FFFFFF; --sunken: #F1E9FB; --ink: #16150F; --ink-muted: #5A564C;
  --hairline: #D8D2C4; --tint: #4F378A;
  container-type: size; background: var(--canvas); color: var(--ink);
}
/* The units resolve against the nearest container *above* an element, hence the inner box */
.sheet-in { height: 100%; display: flex; flex-direction: column; padding: 14cqw 6cqw 7cqw; gap: 4cqw; font-size: 4.2cqw; }
.sheet-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font-weight: 700; }
.sheet-bar span:first-child { color: var(--tint); font-weight: 500; }
.posts { position: relative; flex: 1; min-height: 0; }
.post {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 1.6cqw;
  opacity: 0; transform: translateY(3cqw); transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.post.on { opacity: 1; transform: none; transition: opacity 0.45s ease-out 0.2s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s; }
.post p { margin: 0; }
/* The post's cover, as the extension shows it: a hero photo (free-licence stock, web/README) */
.cover { position: relative; flex: 1; min-height: 0; border-radius: 5cqw; margin-bottom: 3cqw; overflow: hidden; background: var(--sunken); }
.cover img { position: absolute; inset: 0; }
.post .kicker { font-size: 3.4cqw; color: var(--ink-muted); }
.post .handle { font-weight: 700; font-size: 4.8cqw; }
.post .caption { line-height: 1.35; }
.post .body { margin-top: 2cqw; color: var(--ink-muted); font-size: 3.8cqw; line-height: 1.4; }
.sheet-import {
  display: block; text-align: center; background: var(--tint); color: #FFFFFF;
  border-radius: 9999px; padding: 4cqw; font-weight: 800; font-size: 4.4cqw;
}

/* No JS and reduced motion: the poster stays, every caption is listed, nothing moves */
.no-js .feature, .still .feature { padding: 96px var(--margin); }
.no-js .stage, .still .stage { min-height: 0; }
.no-js .phone-wrap, .still .phone-wrap { height: auto; }
.still .phone-wrap .phone, .still .captions { transform: none; opacity: 1; }
.no-js .phone-wrap .phone, .still .phone-wrap .phone { width: 80%; max-width: 340px; height: auto; }
.no-js .caps, .still .caps { min-height: 0; display: flex; flex-direction: column; gap: 32px; }
.no-js .cap, .still .cap { position: static; opacity: 1; transform: none; pointer-events: auto; }
/* The drawn share sheet cannot list its posts like captions; it keeps the first */
.no-js .post:first-child, .still .post:first-child { opacity: 1; transform: none; }
.no-js .phone.sheet, .still .phone.sheet { aspect-ratio: 1290 / 2796; }

/* Get */
.get { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.get .display { font-size: clamp(88px, 14vw, 200px); }
.stores { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 420px; }
@media (min-width: 600px) { .stores { flex-direction: row; width: auto; max-width: none; } }
.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--ink); color: var(--canvas); border-radius: 9999px; padding: 16px 28px;
  font-size: 16px; font-weight: 800; text-transform: uppercase;
}
.store:hover { background: var(--tint); color: var(--canvas); }
.store .tag { font-size: 11px; color: var(--provenance); background: var(--sunken); border-radius: 9999px; padding: 4px 8px; letter-spacing: 0.02em; }
.store:not([href]) { cursor: default; }
.store:not([href]):hover { background: var(--ink); }
.get .note { color: var(--ink-muted); font-size: 14px; margin: 0; }
.get-row { display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; }
/* The QR code is for a computer's screen: a phone can't scan itself, so it stays hidden there. */
.scan { display: none; }
@media (min-width: 900px) and (pointer: fine) {
  .scan { display: grid; grid-template-columns: 104px auto; gap: 16px; align-items: center; text-align: left; background: var(--surface); border-radius: 16px; padding: 12px 20px 12px 12px; }
}
.scan img { display: block; border-radius: 8px; }
.scan p { margin: 0; display: grid; gap: 4px; max-width: 26ch; }
.scan b { font-size: 15px; color: var(--ink); }
.scan span { font-size: 13px; color: var(--ink-muted); }

/* Footer */
footer {
  display: flex; flex-direction: column; gap: 16px; padding: 32px var(--margin);
  border-top: 1px solid var(--hairline); font-size: 14px; color: var(--ink-muted);
}
footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
@media (min-width: 600px) { footer { flex-direction: row; justify-content: space-between; align-items: center; } }
footer .wordmark { font-size: 24px; color: var(--ink); }

/* Legal pages */
.prose { max-width: 720px; padding: 64px var(--margin) 96px; }
.prose h1 { font-size: clamp(64px, 10vw, 128px); margin-bottom: 48px; }
.prose h2 { font-size: 20px; margin: 48px 0 12px; }
.prose p, .prose li { color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* The feedback form (feedback.html) */
.form { display: grid; gap: 8px; margin: 32px 0; }
.form label { font-weight: 700; margin-top: 16px; }
.form .muted { color: var(--ink-muted); font-weight: 400; }
.form textarea, .form input {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--radius); padding: 14px 16px; width: 100%;
}
.form textarea:focus-visible, .form input:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }
.form .pill { justify-self: start; margin-top: 24px; padding: 16px 28px; }
.form .pill:disabled { opacity: 0.5; cursor: progress; }
.form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The beta invite (beta.html): a note, then three steps for the visitor's phone */
.beta [hidden] { display: none !important; }
.beta .note { display: grid; gap: 16px; margin-bottom: 48px; }
.beta .scan { width: fit-content; margin-bottom: 48px; }
.beta .note p { margin: 0; font-size: 18px; }
.beta .sig { font-family: var(--display); font-size: 28px; text-transform: uppercase; color: var(--ink) !important; }
.beta .seg { display: flex; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--sunken); max-width: 360px; margin-bottom: 32px; }
.beta .seg button {
  flex: 1; font: inherit; font-weight: 800; color: var(--ink-muted); background: none; border: 0;
  border-radius: 9999px; padding: 10px 0; cursor: pointer;
}
.beta .seg button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); }
.beta .paths { display: grid; gap: 24px; }
@media (min-width: 900px) { .beta .paths:has(.path + .path:not([hidden])) { grid-template-columns: 1fr 1fr; } }
.beta .path { padding: 24px; border: 0; border-radius: var(--radius); background: var(--surface); }
.beta .path h2 { margin-top: 0; }
.beta .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: step; }
.beta .steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 6px; counter-increment: step; }
.beta .steps li::before { content: counter(step); grid-row: span 3; font-family: var(--display); font-size: 44px; line-height: 1; color: var(--tint); }
.beta .steps strong { color: var(--ink); }
.beta .steps .pill { justify-self: start; margin-top: 6px; padding-inline: 16px; }
.beta .pill.off { background: var(--sunken); color: var(--ink-muted); cursor: default; }
.beta ul { padding-left: 20px; display: grid; gap: 12px; }
