/* Mahaul website
 *
 * Colours are the app's night theme, "Ink & Ember" (docs/design/INK_AND_EMBER.md,
 * apps/mobile/lib/src/theme/tokens.dart): warm ink surfaces and one ember accent.
 * Manrope for text; Unbounded for the wordmark and the home page's headline.
 */
:root {
  --bg: #0c0b0a;            /* bg: warm, never pure black */
  --surface: #171513;       /* surface */
  --surface-2: #221f1c;     /* surfaceHigh */
  --line: rgba(244, 239, 232, 0.1);
  --line-2: rgba(244, 239, 232, 0.18);
  --line-3: rgba(244, 239, 232, 0.4);   /* input edges */
  --ink: #f4efe8;           /* textPrimary */
  --ink-2: #aba399;         /* textSecondary */
  --ink-3: #8e867d;         /* textDisabled, captions */
  --accent: #ff6b4a;        /* ember: text, icons, focus */
  --accent-strong: #ff6b4a; /* ember fill: the primary button */
  --accent-hover: #ff8163;
  --on-accent: #1a0b06;     /* onEmber: 6.8:1 on ember */
  --danger: #ff4d5e;
  --bezel: #060505;         /* phone frame; a neutral, not a brand colour */

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wordmark: "Unbounded", "Manrope", system-ui, sans-serif;
  --deva: "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", "Mangal", sans-serif;

  --max: 1100px;
  --gutter: 20px;
  --radius: 14px;          /* AppRadii.md */
  --radius-lg: 24px;
  color-scheme: dark;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
@media (min-width: 768px) {
  body { font-size: 1.0625rem; }
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-strong); color: var(--on-accent); }

.deva { font-family: var(--deva); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- type ---------- */

.h1 { font-size: clamp(2.25rem, 1.55rem + 2.4vw, 3.5rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; }
.h2 { font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.25rem); line-height: 1.15; letter-spacing: -0.02em; }
.h3 { font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; line-height: 1.5; color: var(--ink-3); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--accent-strong); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-quiet { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-quiet:hover { border-color: var(--ink-2); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }

.text-link { font-weight: 700; text-decoration-color: var(--ink-3); }

/* ---------- header ---------- */

.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  color: var(--ink); text-decoration: none;
  font-family: var(--wordmark); font-weight: 600; font-size: 1.25rem; letter-spacing: 0; line-height: 1;
}
.brand img { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { list-style: none; display: flex; gap: 24px; }
.nav a { display: inline-block; padding: 8px 0; color: var(--ink-2); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .short { display: none; }
.nav .btn { display: inline-flex; padding: 0 16px; color: var(--ink); font-size: 0.9375rem; }
@media (max-width: 719px) {
  .nav .btn { display: none; }
  .nav ul { gap: 16px; }
  .nav a { font-size: 0.875rem; }
  .nav .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .nav .short { display: inline; }
  .brand { font-size: 1.125rem; }
  .brand img { width: 26px; height: 26px; }
}

/* ---------- phone frames ---------- */

.phone {
  position: relative;
  padding: 2.4%;
  background: var(--bezel);
  border: 1px solid var(--line-2);
  border-radius: 12.5% / 5.7%;
  box-shadow: 0 28px 56px -24px rgba(0, 0, 0, 0.75);
}
.phone img { width: 100%; aspect-ratio: 824 / 1830; border-radius: 10.4% / 4.7%; background: var(--bg); }

/* ---------- home: hero ---------- */

.hero { padding: 24px 0 40px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 { max-width: 12em; }
.hero .lead { margin-top: 20px; max-width: 30em; }

.stores { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.stores li {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 52px; padding: 7px 16px; border: 1px solid var(--line-2); border-radius: 12px;
  line-height: 1.25;
}
.stores b { font-size: 1rem; font-weight: 700; }
.stores span { font-size: 0.8125rem; color: var(--ink-3); }

.waitlist { margin-top: 28px; max-width: 30rem; }
.waitlist label { display: block; font-weight: 700; margin-bottom: 10px; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row input {
  flex: 1 1 13rem; min-width: 0; min-height: 50px; padding: 0 18px;
  font: 500 1rem/1.2 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-3); border-radius: 999px;
}
.field-row input::placeholder { color: var(--ink-3); opacity: 1; }
.field-row input:hover { border-color: var(--ink-2); }
.field-row input[aria-invalid="true"] { border-color: var(--danger); }
.field-row .btn { min-height: 50px; flex: 0 0 auto; }
.form-error { margin: 8px 0 0; color: var(--danger); font-size: 0.9375rem; font-weight: 600; }
.form-error:empty { margin: 0; }
.form-note { margin: 12px 0 0; }
.thanks { padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.thanks h2 { font-size: 1.125rem; margin-bottom: 4px; }
.thanks:focus { outline: none; }

.hero-phones { position: relative; width: 100%; max-width: 560px; margin: 0 auto; }
.hero-phones .phone { width: 50%; margin: 0 auto; z-index: 2; }
.hero-phones .back { position: absolute; top: 9%; width: 42%; margin: 0; z-index: 1; }
.hero-phones .back::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; background: rgba(12, 11, 10, 0.3); pointer-events: none;
}
.hero-phones .back-l { left: 0; }
.hero-phones .back-r { right: 0; }

@media (min-width: 960px) {
  .hero { padding: 40px 0 64px; }
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; }
  .hero-phones { max-width: none; }
}

/* ---------- home: feature rows ---------- */

.features { padding: 0 0 24px; }
.row { display: grid; gap: 32px; align-items: center; padding: 48px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row-text { max-width: 28rem; }
.row-text p { margin-top: 16px; color: var(--ink-2); }
.row-text .small { margin-top: 20px; color: var(--ink-3); }
.row-visual { display: flex; justify-content: center; }
.row-visual .phone { width: min(68%, 270px); }
.row.wide .row-visual { padding: 32px 16px; background: var(--surface); border-radius: var(--radius-lg); }

.flow { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 660px; }
.flow li { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.flow .phone { width: 100%; max-width: 200px; }
.flow p { font-size: 0.875rem; line-height: 1.4; color: var(--ink-2); text-align: center; }

@media (min-width: 900px) {
  .features { padding: 40px 0 56px; }
  .row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; padding: 64px 0; }
  .row.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .row.flip .row-text { order: 2; }
  .row.wide { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .row.wide .row-text { max-width: 36rem; }
  .row.wide .row-visual { padding: 56px 48px; }
  .flow { gap: 32px; }
  .flow p { font-size: 0.9375rem; }
}

/* ---------- home: screen switcher ---------- */

.tour { padding: 72px 0; border-top: 1px solid var(--line); }
.tour-head { max-width: 36rem; }
.tour-head p { margin-top: 16px; color: var(--ink-2); }
.tour-panels { list-style: none; display: grid; gap: 40px; margin-top: 40px; }
.tour-panel { display: flex; flex-direction: column; align-items: center; gap: 20px; margin: 0; }
.tour-panel .phone { width: min(70%, 290px); }
.tour-panel h3 { text-align: center; }
.tour-panel p { max-width: 24rem; text-align: center; color: var(--ink-2); }
.tour-panel .h3 + p { margin-top: -12px; }

@media (min-width: 760px) {
  .tour-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .tour-panel .phone { width: 100%; }
}

/* JS turns the three screens into a switcher */
.tour.is-tabbed .tour-panels { display: block; }
.tabs {
  display: inline-flex; gap: 4px; margin-top: 28px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  max-width: 100%;
}
.tabs button {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); font: 700 0.9375rem/1 var(--font); cursor: pointer;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tour.is-tabbed .tour-panel { display: grid; justify-items: center; }
.tour.is-tabbed .tour-panel .phone { width: min(70%, 300px); }
@media (min-width: 900px) {
  .tour-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
  .tour.is-tabbed .tour-panels { margin-top: 0; }
  .tour.is-tabbed .tour-panel { grid-template-columns: minmax(0, 1fr); padding: 56px 40px; background: var(--surface); border-radius: var(--radius-lg); }
}
@media (max-width: 899px) {
  .tour-grid .tour-panels { margin-top: 32px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tour.is-tabbed .tour-panel:not([hidden]) { animation: show 180ms ease-out; }
  @keyframes show { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- home: free list, privacy, organizers, FAQ ---------- */

.band { padding: 72px 0; border-top: 1px solid var(--line); }
.band-grid { display: grid; gap: 32px; }
.band-grid > div > p { margin-top: 16px; color: var(--ink-2); max-width: 30rem; }
.band-grid > div > .lead { margin-top: 0; max-width: 34rem; }
@media (min-width: 900px) {
  .band { padding: 96px 0; }
  .band-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
}

.checks { list-style: none; display: grid; gap: 0 32px; }
.checks li { position: relative; padding: 13px 0 13px 32px; border-bottom: 1px solid var(--line); }
.checks li::before {
  content: ""; position: absolute; left: 4px; top: 19px; width: 12px; height: 7px;
  border-left: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(-45deg);
}
@media (min-width: 640px) {
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.facts { list-style: none; border-top: 1px solid var(--line); }
.facts li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts b { display: block; font-weight: 700; }
.facts span { color: var(--ink-2); }
.band .links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }

.story { max-width: 36rem; }
.band-grid .story p { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.6; color: var(--ink); }
.band-grid .story .signoff { margin-top: 24px; color: var(--ink-2); font-size: 1rem; font-weight: 600; }
.band-grid .story .story-more { margin-top: 20px; font-size: 1rem; color: var(--ink-2); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 18px 40px 18px 0; font-weight: 700; font-size: 1.0625rem; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 24px; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg);
}
.faq details[open] summary::after { top: 28px; transform: rotate(225deg); }
.faq summary:hover { color: var(--ink-2); }
.faq .answer { padding: 0 0 20px; color: var(--ink-2); max-width: 40rem; }
.faq .answer strong { color: var(--ink); }

/* ---------- inner pages ---------- */

.page-head { padding: 40px 0 8px; }
.page-head .lead { margin-top: 16px; max-width: 36rem; }
.page-head .small { margin-top: 12px; }
.page-body { padding: 32px 0 96px; }
.prose { max-width: 42rem; }
.prose h2 { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); margin: 56px 0 14px; scroll-margin-top: 24px; }
.prose > h2:first-child, .prose > section:first-child > h2 { margin-top: 0; }
.prose h3 { font-size: 1.0625rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong, .prose b { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--ink-3); }
.prose section { scroll-margin-top: 24px; }
.prose .list-plain { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.prose .list-plain li { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.prose .list-plain b { display: block; }
.note { padding: 14px 18px; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink); max-width: 42rem; }
.note p { color: var(--ink-2); margin: 4px 0 0; }
.todo { color: var(--ink); background: var(--surface-2); padding: 0 4px; border-radius: 4px; }
.helplines { list-style: none; padding: 0 !important; }
.helplines li { display: flex; gap: 16px; align-items: baseline; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.helplines a { flex: none; width: 3.5rem; font-weight: 800; font-size: 1.125rem; text-decoration: none; }

.contents { margin: 32px 0 0; padding: 18px 20px; background: var(--surface); border-radius: var(--radius); max-width: 42rem; }
.contents h2 { font-size: 0.9375rem; margin: 0 0 8px; }
.contents ul { list-style: none; padding: 0; margin: 0; columns: 2 14rem; column-gap: 24px; }
.contents li { margin: 0; padding: 3px 0; break-inside: avoid; }
.contents a { color: var(--ink-2); font-size: 0.9375rem; text-decoration: none; }
.contents a:hover { color: var(--ink); text-decoration: underline; }
.contents + .legal { margin-top: 56px; }

.table-scroll { overflow-x: auto; margin: 8px 0 20px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 700; }
.prose td { color: var(--ink-2); }
.prose td:first-child { color: var(--ink); font-weight: 600; width: 32%; }

.contact-list { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.contact-list li { margin: 0 !important; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list b { display: block; color: var(--ink); }

/* ---------- home: one screen ---------- */

.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.home .h1 { font-family: var(--wordmark); font-weight: 600; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; max-width: none; }
.home .h1 .dim { display: block; color: var(--ink-2); }
.home .site-footer { padding: 18px 0 24px; }
.footer-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 22px; }
.footer-links a { display: inline-block; padding: 6px 0; color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.home .footer-base { display: block; margin-top: 10px; padding-top: 14px; }
.home .footer-base p { margin: 0 0 6px; max-width: 62rem; }
@media (min-width: 960px) {
  /* The hero fills the first screen; the phones shrink on short windows so nothing is cut off. */
  .home .hero { display: flex; align-items: center; min-height: calc(100svh - 72px); padding: 16px 0 32px; }
  .home .hero-phones { max-width: min(600px, calc((100svh - 150px) / 1.17)); margin: 0 auto; }
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 0.9375rem; }
.footer-top { display: grid; gap: 32px; }
.footer-brand p { margin-top: 12px; color: var(--ink-2); max-width: 20rem; }
.footer-brand .brand { font-size: 1.125rem; }
.footer-brand .brand img { width: 26px; height: 26px; }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.footer-cols h2 { font-size: 0.875rem; color: var(--ink-3); font-weight: 600; letter-spacing: 0; margin-bottom: 8px; }
.footer-cols ul { list-style: none; }
.footer-cols a { display: inline-block; padding: 4px 0; color: var(--ink-2); text-decoration: none; }
.footer-cols a:hover { color: var(--ink); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.875rem; }
.footer-base a { color: var(--ink-3); }
.heart { color: var(--danger); }
@media (min-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 404 ---------- */

.lost { padding: 72px 0 120px; }
.lost p { margin-top: 16px; color: var(--ink-2); max-width: 30rem; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- motion, print ---------- */

@media (prefers-reduced-motion: no-preference) {
  a, .btn, .tabs button, .field-row input { transition: color 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out, text-decoration-color 150ms ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header .nav, .waitlist, .skip, .tabs { display: none; }
  body { background: #fff; color: #000; }
}
