/* apps.altimix.net — one stylesheet for every page.
 *
 * Styled after RevealHaven.com (same company): a dark night-blue ground, a warm gold ramp, Cinzel
 * for display, Cormorant Garamond for the story copy, the system UI face for fine print (legal,
 * support) and chrome. Dark only, like RevealHaven. The fonts are self-hosted (OFL, copied from
 * RevealHaven's packages/shared/src/theme/fonts): no request ever leaves apps.altimix.net.
 *
 *   header.site-header    brand · app nav (sticky, hairline below)
 *   main
 *     .hero               eyebrow · icon · h1 · subtitle · store CTA · perks
 *     .hero-shot / .band  framed 16:9 screenshots
 *     .section            .prose | .cards | .perks-grid
 *     .closing            icon · name · CTA
 *     article.doc         privacy / terms: 760px reading column
 *     .support            eyebrow · h1 · lede · .panel (.panel--form: the support form) · .faq
 *   footer.site-footer    links · ©
 */

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/Cinzel-VariableFont_wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/CormorantGaramond-VariableFont_wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/CormorantGaramond-Italic-VariableFont_wght.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #0a0e16;
  --bg-top: #141925;
  --gold: #d8b97e;
  --gold-bright: #f1d2a0;
  --gold-mid: #c9a064;
  --gold-soft: rgba(241, 210, 160, 0.78);
  --parch: #ece0c8;
  --muted: #b3a88f;
  --text: rgba(255, 255, 255, 0.92);
  --text-soft: rgba(255, 255, 255, 0.74);
  --line: rgba(216, 185, 126, 0.2);
  --line-soft: rgba(255, 255, 255, 0.07);
  --surface: rgba(255, 255, 255, 0.035);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.4);
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-story: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, Helvetica, Arial, sans-serif;
  --wide: 1120px;
  --read: 42rem;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(120% 60rem at 50% 0%, var(--bg-top) 0%, var(--bg) 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 17px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:hover { color: var(--gold-bright); }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--gold-bright); color: #1a1408; padding: 8px 14px; border-radius: 6px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(10, 14, 22, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.bar {
  max-width: var(--wide); margin: 0 auto;
  padding: 14px max(var(--gutter), env(safe-area-inset-left)) 14px max(var(--gutter), env(safe-area-inset-right));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-bright); text-decoration: none;
}
.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.site-nav a {
  color: var(--gold-soft); text-decoration: none; font-size: 0.9rem; letter-spacing: 0.02em; white-space: nowrap;
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--gold-bright); }
.site-nav a[aria-current='page'] { color: var(--gold-bright); border-bottom-color: var(--gold-mid); }

main { flex: 1 0 auto; width: 100%; padding: 0 var(--gutter) 64px; }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 0 0 22px; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--gold);
}
.eyebrow::before, .eyebrow::after { content: ''; width: 32px; height: 1px; background: var(--gold-mid); opacity: 0.7; }

.hero { max-width: var(--wide); margin: 0 auto; padding: clamp(40px, 8vw, 88px) 0 8px; text-align: center; }
.hero--index { padding-bottom: 32px; }
.app-icon {
  width: clamp(200px, 34vw, 300px); margin: 0 auto 28px; border-radius: 14px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(241, 210, 160, 0.14);
}
.app-icon--small { width: 140px; border-radius: 9px; margin-bottom: 18px; }
h1, h2, h3 { text-wrap: balance; }
.hero h1, .support h1 {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4.6rem); line-height: 1.08; letter-spacing: 0.02em;
  color: var(--gold-bright); text-shadow: 0 2px 28px rgba(0, 0, 0, 0.85);
}
.subtitle {
  margin: 14px auto 0; max-width: 32rem; font-family: var(--font-story); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 3.4vw, 1.95rem); line-height: 1.3; color: var(--gold-soft);
}
.hero-about { max-width: var(--read); margin: 20px auto 0; color: var(--text-soft); }
.store-cta { margin: 30px 0 0; }
.pill {
  display: inline-block; padding: 0.62rem 1.4rem; border-radius: 999px; border: 1px solid var(--gold-mid);
  color: var(--gold-bright); font-size: 0.95rem; letter-spacing: 0.03em; text-decoration: none; white-space: nowrap;
  background: rgba(241, 210, 160, 0.05);
}
.pill--link:hover { background: rgba(241, 210, 160, 0.12); color: var(--gold-bright); }
.pill--solid {
  border: none; color: #1a1408; font-weight: 600; white-space: normal; overflow-wrap: anywhere;
  background: linear-gradient(180deg, #f6e2bd 0%, #e3c48f 100%);
  box-shadow: 0 10px 30px rgba(216, 185, 126, 0.22);
}
.pill--solid:hover { color: #1a1408; filter: brightness(1.05); }
/* Apple's badge carries its own padding and clear space: never restyle it, ≥ 40 px tall. */
.badge { display: inline-block; line-height: 0; }
.badge img { height: 54px; width: auto; }
.perks { margin: 18px 0 0; font-size: 0.88rem; letter-spacing: 0.04em; color: var(--muted); }

/* ── Screenshots ────────────────────────────────────────────────────────────── */
.hero-shot, .band { max-width: var(--wide); margin: clamp(40px, 7vw, 72px) auto 0; }
.hero-shot img, .band img, .card img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #10141d;
}
.hero-shot img, .band img {
  border-radius: clamp(10px, 1.6vw, 18px); box-shadow: var(--shadow), 0 0 0 1px var(--line);
}

/* ── Sections ───────────────────────────────────────────────────────────────── */
.section { max-width: var(--read); margin: clamp(56px, 10vw, 104px) auto 0; }
.section--wide { max-width: var(--wide); }
.section-title, .lede {
  margin: 0 0 22px; text-align: center; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.55rem, 3.8vw, 2.25rem); line-height: 1.2; letter-spacing: 0.02em; color: var(--gold-bright);
}
.section-title::after {
  content: ''; display: block; width: 44px; height: 1px; margin: 18px auto 0; background: var(--gold-mid);
}
.prose p {
  margin: 0; font-family: var(--font-story); font-size: clamp(1.22rem, 2.4vw, 1.42rem); line-height: 1.6;
  font-weight: 500; color: var(--parch); text-align: center; text-wrap: pretty;
}

.cards {
  list-style: none; margin: 34px 0 0; padding: 0;
  display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: 1fr;
}
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  overflow: hidden; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}
.card-text { padding: 18px 22px 22px; }
.card h3 {
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.03em;
  color: var(--gold-bright);
}
.card p { margin: 6px 0 0; font-family: var(--font-story); font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--parch); }

.perks-grid {
  list-style: none; margin: 34px 0 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
@media (min-width: 720px) { .perks-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.perks-grid li {
  position: relative; padding: 20px 22px 20px 50px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: var(--surface);
  font-family: var(--font-story); font-weight: 500; font-size: 1.22rem; line-height: 1.5; color: var(--parch);
}
.perks-grid li::before {
  content: ''; position: absolute; left: 22px; top: 30px; width: 9px; height: 9px;
  background: var(--gold-mid); transform: rotate(45deg);
}

.closing {
  max-width: var(--read); margin: clamp(64px, 11vw, 112px) auto 0; padding: 40px 20px 8px; text-align: center;
  border-top: 1px solid var(--line);
}
.closing-name {
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: 0.02em; color: var(--gold-bright);
}
.closing .muted { margin: 8px 0 0; font-size: 0.95rem; }
.closing .store-cta { margin-top: 22px; }

/* ── Index ──────────────────────────────────────────────────────────────────── */
.app-list { list-style: none; max-width: var(--read); margin: 0 auto; padding: 0; display: grid; gap: 16px; }
.app-card {
  display: flex; align-items: center; gap: 20px; padding: 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text);
}
.app-card:hover { background: rgba(241, 210, 160, 0.06); color: var(--text); }
.app-card img { width: 120px; flex: none; border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.app-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-card strong { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--gold-bright); }
.app-card-text > span:nth-child(2) { font-family: var(--font-story); font-style: italic; font-size: 1.2rem; color: var(--parch); }
.app-card .muted { font-size: 0.85rem; }
@media (max-width: 420px) { .app-card { flex-direction: column; align-items: flex-start; } .app-card img { width: 100%; } }

/* ── Documents (privacy, terms) ─────────────────────────────────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding-top: clamp(40px, 7vw, 72px); }
.doc h1 {
  margin: 0 0 10px; font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 5vw, 2.7rem);
  line-height: 1.15; letter-spacing: 0.015em; color: var(--gold-bright); text-shadow: 0 2px 28px rgba(0, 0, 0, 0.85);
}
.doc-meta { margin: 0 0 36px; font-size: 0.92rem; letter-spacing: 0.02em; color: var(--muted); }
.doc h2 {
  margin: 34px 0 10px; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  letter-spacing: 0.02em; color: var(--gold);
}
.doc p, .doc li, .doc dd { font-size: 1rem; line-height: 1.7; color: var(--text-soft); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 1.3rem; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--gold-mid); }
.doc strong { color: var(--parch); font-weight: 600; }
.doc a, .support a:not(.pill) {
  color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(216, 185, 126, 0.4);
}
.doc a:hover, .support a:not(.pill):hover { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }
.doc dt { margin-top: 18px; font-weight: 600; color: var(--parch); }
.doc dd { margin: 4px 0 0; }

/* ── Support ────────────────────────────────────────────────────────────────── */
.support { max-width: 760px; margin: 0 auto; padding-top: clamp(40px, 8vw, 88px); text-align: center; }
.support h1 { font-size: clamp(2.2rem, 6.4vw, 3.6rem); }
.support-lede {
  margin: 20px auto 0; max-width: 36rem; font-family: var(--font-story); font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  line-height: 1.5; color: var(--parch); text-wrap: pretty;
}
.panel {
  margin: 36px auto 0; padding: clamp(24px, 5vw, 40px) 20px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(216, 185, 126, 0.07), rgba(216, 185, 126, 0.02));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.panel p { margin: 0; }
.panel-label {
  margin-bottom: 16px !important; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--gold);
}
.faq { padding-top: 24px; text-align: left; }

/* ── Support form (build.mjs supportForm + support-form.js; after revealhaven.com/support) ──── */
.panel--form { text-align: left; padding: clamp(22px, 5vw, 40px) clamp(18px, 5vw, 40px); }
.fields { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label:not(.upload), .field > .label {
  font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.optional { opacity: 0.6; letter-spacing: 0.12em; }
.support-form input[type='text'], .support-form input[type='email'], .support-form select, .support-form textarea {
  width: 100%; margin: 0; padding: 0.72rem 0.95rem; border-radius: 11px; border: 1px solid rgba(216, 185, 126, 0.28);
  background: rgba(10, 12, 18, 0.55); color: var(--text); font: 1rem/1.5 var(--font-ui); /* ≥ 16 px: no iOS zoom */
}
.support-form textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
.support-form select {
  appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d8b97e' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.support-form select option { background: #141925; color: var(--text); }
.support-form ::placeholder { color: rgba(179, 168, 143, 0.62); }
.support-form input:focus, .support-form select:focus, .support-form textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 185, 126, 0.16);
}
.support-form [aria-invalid='true'] { border-color: #e2907f; }
.field-error { margin: 0; font-size: 0.86rem; color: #f2a796; }
.field-hint { margin: 0; font-size: 0.8rem; color: var(--muted); text-align: right; }

.upload {
  display: block; padding: 1.4rem 1.2rem; border-radius: 11px; border: 1.5px dashed rgba(216, 185, 126, 0.4);
  background: rgba(10, 12, 18, 0.4); color: var(--muted); text-align: center; font-size: 0.95rem; cursor: pointer;
}
.upload:hover, .upload:focus-within, .upload.is-drag { border-color: var(--gold); background: rgba(216, 185, 126, 0.06); color: var(--parch); }
.upload:focus-within { box-shadow: 0 0 0 3px rgba(216, 185, 126, 0.16); }
.upload-hint { display: block; margin-top: 0.35rem; font-size: 0.82rem; color: rgba(188, 174, 144, 0.6); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.preview { position: relative; align-self: flex-start; }
.preview img { max-height: 240px; width: auto; border-radius: 10px; border: 1px solid rgba(216, 185, 126, 0.26); }
.preview-remove {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1; cursor: pointer;
  color: var(--gold-bright); background: rgba(10, 12, 18, 0.85); border: 1px solid rgba(216, 185, 126, 0.4);
}
.preview-remove:hover { background: rgba(10, 12, 18, 0.97); }
/* The honeypot: off-screen and out of the accessibility tree; people never fill it, bots do. */
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

.form-error { margin: 22px 0 0 !important; text-align: center; color: #f2a796; font-size: 0.95rem; }
.form-actions { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.submit {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.82rem 1.9rem; border: none; border-radius: 999px;
  font: 600 1rem/1.2 var(--font-ui); letter-spacing: 0.03em; color: #1a1408; cursor: pointer;
  background: linear-gradient(180deg, #f6e2bd 0%, #e3c48f 100%); box-shadow: 0 10px 30px rgba(216, 185, 126, 0.22);
}
.submit:hover { filter: brightness(1.05); }
.submit:disabled { opacity: 0.65; cursor: progress; filter: none; }
.form-note { font-size: 0.84rem; color: var(--muted); }
.form-done { text-align: center; padding: 8px 0; outline: none; }
.form-done .check { margin: 0 auto 16px; color: #4cc77f; }
.form-done h2 {
  margin: 0 0 10px; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 4vw, 2rem); color: var(--gold-bright);
}
.form-done p { font-family: var(--font-story); font-size: 1.25rem; line-height: 1.5; color: var(--parch); overflow-wrap: anywhere; }
.form-fallback { text-align: center; font-family: var(--font-story); font-size: 1.25rem; color: var(--parch); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { padding: 28px var(--gutter) max(32px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); }
.footer-links {
  margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 26px;
  font-size: 0.84rem; color: var(--muted);
}
.footer-links a { color: var(--gold-soft); text-decoration: none; }
.footer-links a:hover { color: var(--gold-bright); }

@media (prefers-reduced-motion: no-preference) {
  .app-card, .pill, .site-nav a, .footer-links a, .upload, .submit,
  .support-form input, .support-form select, .support-form textarea {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  }
}

/* Phones: story copy reads better ragged-right than centered; the nav tightens to fit 320–420 px. */
@media (max-width: 600px) {
  .prose p { text-align: left; }
}
@media (max-width: 420px) {
  .brand { font-size: 0.95rem; letter-spacing: 0.1em; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 0.84rem; }
}
