/* Mia website. Tokens follow the iOS app (Mia-ios/docs/design/REDESIGN_20261023.md). */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/mia/assets/fonts/newsreader-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: "Newsreader";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/mia/assets/fonts/newsreader-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: "Newsreader";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("/mia/assets/fonts/newsreader-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;
}

:root {
  --paper: #FAF3EA;
  --vellum: #FFFBF5;
  --ink: #29232D;
  --mist: #746875;
  --plum: #78548E;
  --plum-deep: #5E3F72;
  --dusk: #E7D9F0;
  --wall: #CDB9DC;
  --plaster: #F3DCCD;
  --butter: #F7E6BF;
  --gilt: #D2AE62;
  --gilt-deep: #A98336;
  --night: #2A1F33;
  --night-2: #3A2C47;
  --on-night: #F6EEF8;
  --on-night-mist: #BFAFC9;

  --serif: "Newsreader", "New York", "Iowan Old Style", "Songti SC", "Hiragino Mincho ProN", "Noto Serif CJK SC", "Noto Serif JP", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans", "Segoe UI", Roboto, "Noto Sans CJK SC", "Noto Sans JP", sans-serif;

  --gutter: clamp(16px, 4.2vw, 48px);
  --max: 1200px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html { overflow-x: clip; }
.hero { overflow-x: clip; }
/* Paper grain, very faint, so the cream reads as a surface rather than a fill. */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .4 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .nav { position: relative; z-index: 1; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

:focus-visible { outline: 2.5px solid var(--plum); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--vellum); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* Type scale: 17 body, 21 h3, 34–56 h2, 52–100 display */
.display {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 380;
  font-size: clamp(52px, 7.2vw, 100px);
  line-height: .98;
  letter-spacing: -.025em;
}
.display .line { display: block; }
.display .line + .line { padding-left: .9em; }
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -.018em;
  text-wrap: balance;
}
h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.25; letter-spacing: -.005em; }
.lead { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; color: var(--ink); max-width: 33em; text-wrap: pretty; }
.fine { font-size: 14px; line-height: 1.5; color: var(--mist); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 0;
  background: var(--plum); color: var(--vellum);
  font: 600 16px/1 var(--sans);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 24px -12px rgba(94,63,114,.7);
  transition: background .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--plum-deep); }
.btn:active { transform: scale(.97); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--plum-deep); box-shadow: inset 0 0 0 1.5px rgba(120,84,142,.45); }
.btn-ghost:hover { background: rgba(120,84,142,.08); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250,243,234,.78);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: 0 1px 0 rgba(41,35,45,.08); }
.nav-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 10px; box-shadow: 0 2px 6px rgba(42,31,51,.18); }
.brand-name { font-family: var(--serif); font-size: 26px; font-weight: 450; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--mist); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 12px; }
.lang select {
  appearance: none; -webkit-appearance: none;
  font: 500 14px/1 var(--sans); color: var(--ink);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23746875' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid rgba(116,104,117,.3);
  border-radius: 999px;
  height: 40px; padding: 0 30px 0 14px;
  cursor: pointer;
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
}
@media (max-width: 420px) {
  .nav-end .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(64px, 9vw, 120px); }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  right: -10%; top: -20%; width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(205,185,220,.55), rgba(205,185,220,0));
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-copy .display { margin-top: 8px; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 20px 0 16px;
  border-radius: 14px;
  background: var(--ink); color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 26px -14px rgba(42,31,51,.8);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.badge-logo { width: 26px; height: 26px; flex: none; }
.badge-text { display: flex; flex-direction: column; line-height: 1.1; }
.badge-text small { font-size: 11.5px; opacity: .82; letter-spacing: .01em; }
.badge-text strong { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
a.badge[href]:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(42,31,51,.85); }
.badge[aria-disabled="true"] { cursor: default; }
.badge[aria-disabled="true"] .badge-text strong { opacity: .92; }
.status { font-size: 14px; color: var(--mist); margin-top: -14px; }

.qr-chip {
  display: flex; align-items: center; gap: 16px;
  margin-top: 4px; padding: 12px 18px 12px 12px;
  width: fit-content; max-width: 100%;
  background: var(--vellum);
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(120,84,142,.12);
}
.qr-chip p { font-size: 14px; line-height: 1.45; color: var(--mist); max-width: 15em; }
.qr-frame { position: relative; background: var(--vellum); }
.qr-frame-small { width: 96px; height: 96px; padding: 0; }
.qr-img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-mark {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 24%;
  box-shadow: 0 0 0 3px var(--vellum);
}
@media (hover: none) and (pointer: coarse), (max-width: 860px) {
  .qr-chip { display: none; }
}

/* The arch: the plaster doorway from Mia's scene, used as the page's frame. */
.arch-wrap { position: relative; margin: 0; }
.arch {
  position: relative;
  aspect-ratio: 5 / 6;
  border-radius: 50% 50% 30px 30px / 40% 40% 30px 30px;
  overflow: hidden;
  background: var(--wall);
  box-shadow:
    0 0 0 12px var(--plaster),
    0 0 0 13px rgba(169,131,54,.25),
    0 50px 90px -40px rgba(94,63,114,.55);
  transform: translateZ(0);
}
.arch::after {
  /* soft inner light along the arch edge, like the moulding in the scene */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), inset 0 30px 60px -30px rgba(255,240,220,.6);
}
.arch-media { width: 100%; height: 100%; object-fit: cover; object-position: 92% 50%; }
.ornament { position: absolute; z-index: 2; pointer-events: none; }
.ornament-moon { width: clamp(56px, 7vw, 92px); left: -6%; top: 8%; filter: drop-shadow(0 6px 12px rgba(169,131,54,.35)); rotate: -12deg; }
.ornament-star { width: 22px; }
.ornament-star.s1 { left: 6%; top: 30%; width: 18px; }
.ornament-star.s2 { right: -3%; top: 18%; width: 26px; }

/* One orchestrated entrance: the arch opens, then the words settle. */
@media (prefers-reduced-motion: no-preference) {
  .arch-media { animation: arch-open 1.4s var(--ease) both, settle 2.4s var(--ease) both; }
  .ornament { animation: rise 1.2s .5s var(--ease) both; }
  .ornament-star { animation: rise 1.2s .7s var(--ease) both, twinkle 5s 2s ease-in-out infinite; }
  .ornament-star.s2 { animation-delay: .8s, 3.5s; }
  .hero-copy > * { animation: rise 1s var(--ease) both; }
  .hero-copy > :nth-child(1) { animation-delay: .15s; }
  .hero-copy > :nth-child(2) { animation-delay: .3s; }
  .hero-copy > :nth-child(3) { animation-delay: .42s; }
  .hero-copy > :nth-child(4) { animation-delay: .5s; }
  .hero-copy > :nth-child(5) { animation-delay: .6s; }
}
@keyframes arch-open { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .arch-wrap { order: -1; max-width: 520px; width: 100%; justify-self: center; }
  .arch { aspect-ratio: 1 / 1; border-radius: 50% 50% 26px 26px / 46% 46% 26px 26px; }
  .arch-media { object-position: 88% 50%; }
  .hero-copy { gap: 22px; }
  .display .line + .line { padding-left: .6em; }
  .ornament-moon, .ornament-star.s1 { display: none; }
}
@media (max-width: 420px) {
  .badges { gap: 10px; }
  .badge { height: 52px; padding: 0 14px 0 12px; gap: 8px; border-radius: 12px; }
  .badge-logo { width: 22px; height: 22px; }
  .badge-text small { font-size: 10.5px; }
  .badge-text strong { font-size: 16.5px; }
}

/* ---------- Section copy ---------- */
.section-copy { display: flex; flex-direction: column; gap: 18px; max-width: 30em; }
.section-copy p:not(.fine) { font-size: 18px; color: var(--ink); text-wrap: pretty; }
.section-copy-wide { max-width: 40em; }

/* ---------- Spread ---------- */
.spread { padding: clamp(56px, 8vw, 110px) 0; }
.spread-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.table {
  position: relative;
  padding: clamp(22px, 3vw, 36px);
  border-radius: 26px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%),
    var(--dusk);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.6), inset 0 -30px 60px -40px rgba(94,63,114,.35);
}
.table-voice { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.avatar {
  flex: none; width: 60px; height: 60px; border-radius: 50%; overflow: hidden;
  background: #EFDDD1;
  box-shadow: 0 0 0 2px var(--vellum), 0 6px 14px -6px rgba(42,31,51,.4);
}
.avatar video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); transform-origin: 50% 30%; }
.mia-line { font-family: var(--serif); font-size: clamp(20px, 2vw, 25px); line-height: 1.25; letter-spacing: -.01em; transition: opacity .25s; }
.mia-line.swap { opacity: 0; }

.slots { list-style: none; margin: clamp(22px, 3vw, 34px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 2.2vw, 28px); }
.slot { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.slot-name { font-size: 14px; font-weight: 600; color: var(--plum-deep); }
.slot-card { font-family: var(--serif); font-size: 16px; line-height: 1.3; min-height: 2.6em; color: var(--ink); opacity: 0; transform: translateY(4px); transition: opacity .5s .35s, transform .5s .35s var(--ease); }
.slot-card.on { opacity: 1; transform: none; }
.slot-card em { display: block; font-family: var(--sans); font-style: normal; font-size: 12.5px; color: var(--mist); }

.tcard {
  width: 100%; max-width: 190px;
  aspect-ratio: 78 / 134;
  padding: 0; border: 0; background: none;
  perspective: 1200px;
  cursor: pointer;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.tcard-inner {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .9s var(--ease);
}
.tcard:not(.flipped):hover .tcard-inner { transform: translateY(-6px) rotate(-1deg); }
.tcard.flipped { cursor: default; }
.tcard.flipped .tcard-inner { transform: rotateY(180deg); }
.tcard-face {
  position: absolute; inset: 0;
  border-radius: 10px; overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 18px 30px -16px rgba(42,31,51,.55), 0 2px 4px rgba(42,31,51,.12);
  background: var(--vellum);
}
.tcard-face img { width: 100%; height: 100%; object-fit: cover; }
.tcard-front { transform: rotateY(180deg); }
.tcard-front.reversed img { transform: rotate(180deg); }
.tcard-front::after {
  /* a passing glint when the card lands face up */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,250,235,.75) 50%, transparent 65%);
  transform: translateX(-120%);
}
.tcard.flipped .tcard-front::after { transition: transform 1s .55s ease-out; transform: translateX(120%); }

.table-foot { display: flex; justify-content: center; min-height: 48px; margin-top: 18px; }
.table-foot [hidden] { display: none; }

@media (max-width: 860px) {
  .spread-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .slot-card { font-size: 14px; }
  .slot-name { font-size: 13px; }
  .avatar { width: 52px; height: 52px; }
}

/* ---------- Inside the app ---------- */
.app { padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 6vw, 80px); }
.phones {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(48px, 6vw, 80px);
  align-items: start;
}
.phone-item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.phone-item-raised { transform: translateY(-36px); }
.phone-item figcaption { max-width: 300px; display: flex; flex-direction: column; gap: 8px; }
.phone-item figcaption p { color: var(--mist); font-size: 16px; }

.phone {
  width: 100%; max-width: 300px;
  aspect-ratio: 390 / 844;
  padding: 10px;
  container-type: inline-size;
  border-radius: 50px;
  background: linear-gradient(145deg, #3a3140, #1f1a23);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.12),
    0 40px 70px -36px rgba(42,31,51,.6),
    0 12px 24px -12px rgba(42,31,51,.35);
}
.screen {
  position: relative; height: 100%;
  border-radius: 40px; overflow: hidden;
  background: var(--paper);
  display: flex; flex-direction: column;
  font-family: var(--sans);
  color: var(--ink);
}
.island { position: absolute; top: 3.2cqw; left: 50%; transform: translateX(-50%); width: 29cqw; height: 8.4cqw; background: #000; border-radius: 99px; z-index: 3; }

/* Home screen */
.ph-home-hero {
  position: relative; height: 47%;
  background: url("/mia/assets/motion/idle-scene.webp") 78% 30% / auto 118% no-repeat;
}
.ph-home-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(rgba(250,243,234,0), var(--paper)); }
.ph-wordmark { position: absolute; left: 6cqw; top: 15cqw; font-family: var(--serif); font-size: 7.4cqw; font-weight: 500; z-index: 1; }
.ph-bubble {
  position: absolute; left: 5cqw; top: 33cqw; z-index: 1;
  background: var(--vellum); padding: 2.6cqw 4cqw; border-radius: 99px;
  font-size: 4cqw; font-weight: 500; box-shadow: 0 2cqw 5cqw -2cqw rgba(42,31,51,.3);
}
.ph-body { padding: 0 5.5cqw; display: flex; flex-direction: column; gap: 4cqw; margin-top: -4cqw; position: relative; z-index: 1; }
.ph-title { font-family: var(--serif); font-size: 7cqw; line-height: 1.12; font-weight: 450; letter-spacing: -.01em; }
.ph-input { background: var(--vellum); border-radius: 5cqw; padding: 4cqw; min-height: 17cqw; font-size: 3.8cqw; color: #a59aa5; box-shadow: 0 0 0 1px rgba(116,104,117,.15); }
.ph-chips { display: flex; gap: 2cqw; flex-wrap: wrap; }
.ph-chips span { background: var(--vellum); border-radius: 99px; padding: 1.8cqw 3.4cqw; font-size: 3.4cqw; box-shadow: 0 0 0 1px rgba(116,104,117,.15); }
.ph-btn { background: var(--plum); color: var(--vellum); border-radius: 99px; text-align: center; padding: 3.9cqw; font-size: 4.2cqw; font-weight: 600; box-shadow: 0 3cqw 6cqw -3cqw rgba(94,63,114,.8); }
.ph-btn-tight { margin: 0 5.5cqw; }
.ph-tabs {
  margin: auto 4cqw 4cqw; display: flex; justify-content: space-between;
  background: rgba(255,251,245,.94); border-radius: 99px; padding: 1.6cqw;
  box-shadow: 0 2cqw 6cqw -2cqw rgba(42,31,51,.25), 0 0 0 1px rgba(116,104,117,.08);
}
.ph-tabs span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .8cqw; padding: 1.6cqw 0; border-radius: 99px; color: var(--mist); }
.ph-tabs span.on { background: var(--dusk); color: var(--plum-deep); }
.ph-tabs b { font-size: 2.7cqw; font-weight: 500; white-space: nowrap; }
.ti { width: 5cqw; height: 5cqw; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ti-draw { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='5' y='7' width='14' height='14' rx='2'/%3E%3Cpath d='M7 4h10'/%3E%3C/svg%3E"); }
.ti-journey { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='5' cy='19' r='2'/%3E%3Ccircle cx='19' cy='5' r='2'/%3E%3Cpath d='M7 18c6 0 3-6 9-11'/%3E%3C/svg%3E"); }
.ti-birth { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2 8 8 2-8 2-2 8-2-8-8-2 8-2z'/%3E%3C/svg%3E"); }
.ti-me { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3Cpath d='M6.5 18.5c3-3 8-3 11 0'/%3E%3C/svg%3E"); }

/* Ritual screen */
.ph-steps { display: flex; justify-content: center; gap: 1.6cqw; margin-top: 16cqw; }
.ph-steps i { width: 2cqw; height: 2cqw; border-radius: 99px; background: rgba(120,84,142,.25); }
.ph-steps i.done { background: var(--plum); }
.ph-steps i.cur { width: 6cqw; background: var(--plum); }
.ph-voice { display: flex; gap: 3cqw; padding: 5cqw 5.5cqw 0; align-items: flex-start; }
.ph-voice img { width: 10.5cqw; height: 10.5cqw; border-radius: 50%; flex: none; }
.ph-line { font-family: var(--serif); font-size: 5.2cqw; line-height: 1.2; font-weight: 500; }
.ph-q { font-size: 3.4cqw; color: var(--mist); margin-top: 1cqw; }
.ph-slots { display: flex; justify-content: center; gap: 5cqw; margin-top: 6cqw; }
.ph-slots span { display: flex; flex-direction: column; align-items: center; gap: 1.6cqw; }
.ph-slots i { width: 13cqw; aspect-ratio: 78/134; border-radius: 1.6cqw; border: 1.5px dashed rgba(120,84,142,.35); background: rgba(231,217,240,.35); overflow: hidden; }
.ph-slots i.filled { border: 0; box-shadow: 0 2cqw 3cqw -1cqw rgba(42,31,51,.4); }
.ph-slots i img { width: 100%; height: 100%; object-fit: cover; }
.ph-slots b { font-size: 2.9cqw; font-weight: 500; color: var(--mist); }
.ph-fan { position: relative; height: 54cqw; margin-top: 6cqw; }
.ph-fan span {
  position: absolute; left: 50%; bottom: 16cqw;
  width: 16cqw; aspect-ratio: 78/134;
  margin-left: -8cqw;
  border-radius: 1.4cqw;
  background: url("/mia/assets/card-back.webp") center / cover;
  box-shadow: 0 1cqw 2cqw rgba(42,31,51,.25);
  transform-origin: 50% 280%;
  transform: rotate(calc(var(--i) * 6deg));
}
.ph-fan span.lift { transform: translateY(-7cqw) scale(1.1); z-index: 2; box-shadow: 0 0 0 .6cqw var(--gilt), 0 4cqw 6cqw -2cqw rgba(42,31,51,.5); }
.ph-hint { text-align: center; font-size: 3.2cqw; color: var(--mist); padding: 3cqw 8cqw; line-height: 1.4; }

/* Reading screen */
.screen-reading { padding: 16cqw 5.5cqw 5cqw; gap: 3.6cqw; }
.ph-rq { font-family: var(--serif); font-size: 6.6cqw; font-weight: 450; line-height: 1.15; }
.ph-three { display: flex; gap: 3cqw; }
.ph-three span { flex: 1; display: flex; flex-direction: column; gap: 1.4cqw; align-items: center; }
.ph-three img { width: 100%; aspect-ratio: 78/134; object-fit: cover; border-radius: 1.6cqw; box-shadow: 0 2cqw 3cqw -1.5cqw rgba(42,31,51,.45); }
.ph-three b { font-size: 2.8cqw; font-weight: 500; color: var(--mist); text-align: center; line-height: 1.25; }
.ph-answer { font-family: var(--serif); font-size: 5.6cqw; line-height: 1.2; font-weight: 500; }
.ph-text { font-size: 3.5cqw; line-height: 1.5; color: #4a414c; }
.ph-first { background: var(--butter); border-radius: 4.5cqw; padding: 3.6cqw 4cqw; display: flex; flex-direction: column; gap: 1cqw; font-size: 3.4cqw; line-height: 1.4; }
.ph-first b { font-weight: 600; font-size: 3.2cqw; color: #7a5a1e; }
.ph-ask { margin-top: auto; align-self: center; display: flex; align-items: center; gap: 2cqw; background: var(--ink); color: var(--vellum); border-radius: 99px; padding: 2.4cqw 5cqw 2.4cqw 2.4cqw; font-size: 3.8cqw; font-weight: 600; }
.ph-ask img { width: 6.4cqw; height: 6.4cqw; border-radius: 50%; }

@media (max-width: 900px) {
  .phones {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1);
    padding: 12px var(--gutter) 24px; gap: 20px;
    scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phone-item { flex: 0 0 min(76vw, 300px); scroll-snap-align: center; }
  .phone-item-raised { transform: none; }
}

/* ---------- Features ---------- */
.features { padding: clamp(56px, 8vw, 110px) 0 clamp(80px, 10vw, 140px); }
.features-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.features-head { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 28px; }
.honest {
  font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.45; color: var(--plum-deep);
  padding-left: 18px; border-left: 2px solid var(--gilt); max-width: 24em;
}
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 4vw, 56px); }
.feature-list li { display: flex; flex-direction: column; gap: 12px; padding: 28px 0; border-top: 1px solid rgba(120,84,142,.18); }
.feature-list svg { width: 32px; height: 32px; fill: none; stroke: var(--gilt-deep); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.feature-list p { color: var(--mist); font-size: 16px; margin-top: 6px; }
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr; }
  .features-head { position: static; }
}
@media (max-width: 560px) {
  .feature-list { grid-template-columns: 1fr; }
  .feature-list li { flex-direction: row; gap: 18px; padding: 22px 0; }
  .feature-list svg { flex: none; width: 28px; height: 28px; margin-top: 2px; }
}

/* ---------- Night / download ---------- */
.night {
  position: relative;
  background: var(--night);
  color: var(--on-night);
  padding-top: clamp(80px, 10vw, 140px);
  overflow: hidden;
  isolation: isolate;
}
.night::before {
  /* moonlit sky: a lavender glow and a scatter of small stars */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(120,84,142,.55), rgba(120,84,142,0)),
    radial-gradient(1.5px 1.5px at 12% 18%, #F3DFA8 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 42%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 30%, #F3DFA8 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 22%, #F3DFA8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 64%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 78%, #F3DFA8 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 70%, #fff 50%, transparent 51%);
  opacity: .9;
}
.quote { margin: 0 auto; max-width: 1000px; text-align: center; }
.quote p {
  font-family: var(--serif); font-style: italic; font-weight: 350;
  font-size: clamp(40px, 6.4vw, 88px); line-height: 1.02; letter-spacing: -.02em;
  text-wrap: balance;
}
.quote cite { display: block; margin-top: 22px; font-style: normal; font-size: 15px; color: var(--on-night-mist); }
.quote cite::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--gilt); vertical-align: middle; margin-right: 12px; }

.dl-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(40px, 6vw, 96px); align-items: center;
  margin-top: clamp(80px, 10vw, 140px);
  padding-bottom: clamp(72px, 9vw, 120px);
}
.dl-copy { display: flex; flex-direction: column; gap: 22px; max-width: 34em; }
.dl-copy h2 { font-size: clamp(44px, 5.4vw, 72px); }
.dl-copy p { color: var(--on-night-mist); font-size: 18px; }
.badges-night .badge { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.print-link { font-size: 14px; color: var(--on-night-mist); text-underline-offset: 3px; text-decoration-color: rgba(191,175,201,.45); width: fit-content; }
.print-link:hover { color: var(--on-night); }

.qr-card {
  position: relative;
  width: 300px;
  padding: 64px 32px 26px;
  background: var(--vellum);
  color: var(--ink);
  border-radius: 150px 150px 28px 28px;
  box-shadow: 0 0 0 10px rgba(243,220,205,.12), 0 40px 80px -30px rgba(0,0,0,.6);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  margin-top: 44px;
}
.qr-portrait {
  position: absolute; top: -44px; left: 50%; transform: translateX(-50%);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--vellum), 0 10px 20px -8px rgba(0,0,0,.4);
}
.qr-card .qr-frame { width: 220px; height: 220px; }
.qr-url { font-size: 14px; color: var(--mist); letter-spacing: .01em; }

@media (max-width: 760px) {
  .dl-grid { grid-template-columns: 1fr; justify-items: start; }
  .qr-card { justify-self: center; }
}
@media (hover: none) and (pointer: coarse) and (max-width: 760px) {
  .qr-card { display: none; }
}

.foot { border-top: 1px solid rgba(246,238,248,.1); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand img { border-radius: 10px; }
.foot-brand p { font-size: 15px; }
.foot .fine { color: var(--on-night-mist); font-size: 13px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; font-size: 14px; }
.foot-mail { overflow-wrap: anywhere; }
.foot-links a { color: var(--on-night-mist); text-underline-offset: 3px; }
.foot-links a:hover { color: var(--on-night); }
@media (max-width: 560px) { .foot-links { margin-left: 0; } }
.lang-night select { color: var(--on-night); border-color: rgba(246,238,248,.25); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23BFAFC9' stroke-width='1.5'/%3E%3C/svg%3E"); }
.lang-night option { color: var(--ink); }

/* Chinese and Japanese: CJK serif faces run larger, so loosen the display set. */
:lang(zh) .display, :lang(ja) .display { font-size: clamp(46px, 6.2vw, 88px); line-height: 1.12; letter-spacing: 0; font-weight: 500; }
:lang(zh) h2, :lang(ja) h2 { letter-spacing: 0; line-height: 1.2; font-weight: 500; }
:lang(zh) .quote p, :lang(ja) .quote p { font-style: normal; letter-spacing: .02em; line-height: 1.2; }
:lang(zh) .honest, :lang(ja) .honest { font-style: normal; }
:lang(ja) .display { font-size: clamp(40px, 5.4vw, 76px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
