/* The coming-soon page (app.html) and the legal pages (legal/). The landing page has its own home.css. */

@font-face { font-family: "Rubik"; font-weight: 400; font-display: swap; src: url("/fonts/rubik-400.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap; src: url("/fonts/rubik-700.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-weight: 800; font-display: swap; src: url("/fonts/rubik-800.woff2") format("woff2"); }

:root {
  --bg: #FAF6F2; --surface: #FFFFFF; --muted-fill: #F3EBE5; --text: #1C1B1A; --muted: #67625C;
  --primary: #A3322A; --primary-soft: #F8E3E0; --success: #25603F; --success-soft: #E5F4EA;
  --warning: #835C13; --warning-soft: #FBF2DE; --info: #1F6F6B; --info-soft: #E3F1EF;
  --highlight: #6842A6; --highlight-soft: #F0EAFE; --star: #E8A23A; --dark: #1C1B1A;
  --shadow: 0 30px 60px -30px rgba(58, 31, 28, 0.45), 0 12px 24px -12px rgba(58, 31, 28, 0.2);
  --gutter: max(16px, env(safe-area-inset-left));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Rubik", system-ui, sans-serif; line-height: 1.5; overflow-x: clip; }
img { display: block; max-width: 100%; }
/* 3D tilts and glows may stick out past the screen edge; clip them here so a phone never pans sideways
   (overflow-x on body alone does not stop mobile browsers). clip, unlike hidden, keeps sticky working. */
main { overflow-x: clip; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: clamp(40px, 7vw, 84px); }
h2 { font-size: clamp(32px, 5vw, 60px); }
h3 { font-size: 22px; }
p { margin: 0; }
.eyebrow { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary); }
.eyebrow.gold { color: var(--star); }
.lead { margin-top: 18px; font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 34em; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none;
  box-shadow: 0 14px 30px -14px rgba(163, 50, 42, 0.8); transition: transform 0.15s ease; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; box-shadow: none; }
.btn-ghost { background: var(--muted-fill); color: var(--text); box-shadow: none; }
.btn-ghost-light { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: none; }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }
a:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter);
  padding-top: max(12px, env(safe-area-inset-top)); background: rgba(250, 246, 242, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 22px; text-decoration: none; margin-inline-end: auto; }
.nav-links { display: none; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 700; text-decoration: none; }
@media (min-width: 760px) { .nav-links { display: flex; } }
/* ---------- phone mockup (sizes in em; the phone sets the base size) ---------- */
.phone { --w: clamp(250px, 27vw, 340px); width: var(--w); height: calc(var(--w) * 2.04); font-size: calc(var(--w) / 24);
  padding: 0.9em; border-radius: 4.2em; background: var(--dark); box-shadow: var(--shadow), inset 0 0 0 2px #3a3633; }
.screen { position: relative; height: 100%; border-radius: 3.4em; background: var(--bg); overflow: hidden; }
.notch { position: absolute; top: 0.8em; left: 50%; width: 7.5em; height: 2.1em; margin-left: -3.75em; border-radius: 2em; background: var(--dark); }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px var(--gutter); padding-bottom: max(24px, env(safe-area-inset-bottom));
  border-top: 1px solid #E4D9CF; color: var(--muted); font-size: 14px; }
.footer a { color: var(--muted); }

/* ---------- coming soon (app.html) ---------- */
.soon { position: relative; isolation: isolate; display: grid; gap: 40px; grid-template-areas: "head" "visual" "paths"; align-items: center;
  max-width: 1180px; min-height: calc(100svh - 68px); margin: 0 auto; padding: 32px var(--gutter) 72px; }
/* spans the whole window width so the glow never shows the column's edge */
.soon-glow { position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; pointer-events: none;
  background: radial-gradient(circle 380px at 68% 42%, rgba(207, 81, 41, 0.16), transparent), radial-gradient(circle 320px at 22% 74%, rgba(232, 162, 58, 0.14), transparent); }
.soon-head { grid-area: head; text-align: center; }
.soon-head .lead { margin-inline: auto; }
.soon-head h1 em { font-style: normal; color: var(--primary); }
.soon-pill { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 10px 24px -14px rgba(58, 31, 28, 0.5); color: var(--primary); font-size: 14px; font-weight: 700; }
.soon-pill i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.soon-pill i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--primary); opacity: 0; }
.soon-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.soon-langs span { padding: 6px 14px; border-radius: 999px; background: var(--muted-fill); color: var(--muted); font-size: 15px; font-weight: 700; }
/* The waitlist box: one white pill holding the email and the button, under the coming-soon lines. */
.soon-notify { max-width: 520px; margin: 30px auto 0; padding: 22px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); text-align: start; }
.soon-notify-label { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.soon-notify-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); }
.soon-notify-icon svg { width: 22px; height: 22px; }
.soon-notify-row { display: flex; gap: 6px; margin-top: 16px; padding: 6px; border-radius: 999px; background: var(--muted-fill); }
.soon-notify-row:focus-within { box-shadow: 0 0 0 3px var(--primary-soft), inset 0 0 0 2px var(--primary); }
.soon-notify-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.soon-notify-row input::placeholder { color: var(--muted); }
.soon-notify-row .btn { flex: none; min-height: 48px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.soon-notify-note { margin-top: 12px; padding-inline-start: 6px; color: var(--muted); font-size: 14px; }
.soon-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* After the form: the answer, shown by /app#joined or /app#notify-error (no script on this page). */
.soon-done { display: none; max-width: 520px; margin: 30px auto 0; padding: 18px 22px; border-radius: 22px; background: var(--success-soft); color: var(--success); font-size: 17px; font-weight: 700; }
.soon-done:target { display: block; }
.soon-error { margin-top: 12px; background: var(--primary-soft); color: var(--primary); }
.soon-notify:has(~ #joined:target) { display: none; }
@media (max-width: 420px) { .soon-notify-row { flex-direction: column; border-radius: 22px; } .soon-notify-row .btn { width: 100%; } }

.soon-visual { grid-area: visual; position: relative; justify-self: center; padding: 28px 64px 56px; }
.soon-ring { position: absolute; top: 50%; left: 50%; width: 125%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; border: 2px dashed rgba(163, 50, 42, 0.22); z-index: -1; }
.soon-ring::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(207, 81, 41, 0.22), rgba(207, 81, 41, 0) 70%); }
.soon-phone { transform: rotate(-4deg); }
.soon-phone .phone { --w: clamp(190px, 50vw, 260px); }
.soon-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5em; background: linear-gradient(180deg, #FFF9F4, var(--bg)); }
.soon-screen img { width: 7em; height: 7em; }
.soon-screen b { font-size: 2.3em; font-weight: 800; letter-spacing: -0.02em; }
.soon-screen small { font-size: 0.95em; color: var(--muted); }
.soon-bar { width: 10em; height: 0.55em; margin-top: 1.6em; border-radius: 1em; background: var(--muted-fill); overflow: hidden; }
.soon-bar i { display: block; width: 86%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #CF5129, var(--star), #CF5129, var(--primary)); background-size: 200% 100%; }
.bubble { position: absolute; width: clamp(62px, 16vw, 92px); aspect-ratio: 1; padding: 5px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.bubble img { width: 100%; height: 100%; object-fit: cover; border-radius: 21px; }
.b1 { top: 8%; left: 0; rotate: -8deg; }
.b2 { top: 34%; right: -4%; rotate: 7deg; }
.b3 { bottom: 22%; left: -4%; rotate: 5deg; }
.b4 { top: 0; right: 6%; width: clamp(50px, 12vw, 70px); border-radius: 20px; rotate: 10deg; }
.b4 img { border-radius: 15px; }
.b5 { bottom: 4%; right: 2%; width: clamp(54px, 13vw, 78px); border-radius: 22px; rotate: -6deg; }
.b5 img { border-radius: 17px; }
.soon-badge { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px;
  border-radius: 16px; background: var(--dark); color: #fff; box-shadow: var(--shadow); white-space: nowrap; }
.soon-badge svg { width: 26px; height: 26px; }
.soon-badge span { display: flex; flex-direction: column; line-height: 1.15; }
.soon-badge small { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.soon-badge b { font-size: 18px; }

.soon-paths { grid-area: paths; display: grid; gap: 16px; }
.soon-card { padding: 26px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.soon-card h2 { font-size: 24px; }
.soon-card p { margin-top: 8px; color: var(--muted); }
.soon-card .btn { margin-top: 20px; }
.soon-card.dark { background: var(--dark); color: #fff; }
.soon-card.dark p { color: rgba(255, 255, 255, 0.72); }
.soon-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); }
.soon-card.dark .soon-icon { background: rgba(255, 255, 255, 0.1); color: var(--star); }
.soon-icon svg { width: 26px; height: 26px; }
@media (min-width: 700px) { .soon-paths { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) {
  .soon { grid-template-columns: 1.1fr 0.9fr; grid-template-areas: "head visual" "paths visual"; column-gap: 56px; row-gap: 36px; padding-top: 48px; }
  .soon-head { align-self: end; text-align: left; }
  .soon-head .lead { margin-inline: 0; }
  .soon-langs { justify-content: flex-start; }
  .soon-notify, .soon-done { margin-inline: 0; }
  .soon-paths { align-self: start; }
}

/* ---------- motion ---------- */
@keyframes bob { 50% { translate: 0 -10px; } }
@keyframes soon-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes soon-pulse { from { opacity: 0.6; } to { transform: scale(2.8); opacity: 0; } }
@keyframes soon-spin { to { rotate: 360deg; } }
@keyframes soon-load { from { width: 12%; } }
@keyframes soon-shimmer { to { background-position: -200% 0; } }
@keyframes soon-float { 50% { transform: rotate(-2deg) translateY(-12px); } }
@media (prefers-reduced-motion: no-preference) {
  .soon-head, .soon-visual, .soon-paths { animation: soon-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .soon-visual { animation-delay: 0.12s; } .soon-paths { animation-delay: 0.24s; }
  .soon-pill i::after { animation: soon-pulse 1.8s ease-out infinite; }
  .soon-ring { animation: soon-spin 80s linear infinite; }
  .soon-phone { animation: soon-float 7s ease-in-out infinite; }
  .soon-bar i { animation: soon-load 2.4s 0.4s cubic-bezier(0.22, 1, 0.36, 1) both, soon-shimmer 2.4s linear infinite; }
  .bubble, .soon-badge { animation: bob 6s ease-in-out infinite; }
  .b2 { animation-delay: -1.2s; } .b3 { animation-delay: -2.4s; } .b4 { animation-delay: -3.6s; } .b5 { animation-delay: -4.8s; }
  .soon-badge { animation-duration: 5s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Legal pages (public/legal/, written by scripts/legal-pages.mjs) */
.legal { max-width: 760px; margin: 0 auto; padding: 32px var(--gutter) 64px; color: var(--text); line-height: 1.6; }
.legal h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0 0 8px; }
.legal h2 { font-size: 20px; margin: 32px 0 8px; }
.legal p { margin: 0 0 8px; }
.legal .legal-date { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: flex-end; }
