/* Mira's website. Colours are the app's Theme: near-black and deep reds, no blue and no white. */

:root {
    --background: #050202;
    --surface: #0a0404;
    --raised: #140706;
    --border: #2b1412;
    --border-raised: #3e1b18;
    --selected: #240b09;
    --text: #f5dcd6;
    --body: #d8aba2;
    --muted: #b5897f;
    --accent: #ff3b2b;
    --accent-soft: #ff6b5c;
    --on-accent: #160403;
    --veil: 0;

    --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --wrap: 1120px;
    --radius: 22px;

    color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--background);
    color: var(--body);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* The night scene, fixed behind every page, and the veil that dims it under the content. */
#sky {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100lvh;
    height: 100vh;
    z-index: -2;
    display: block;
    opacity: 0;
    transition: opacity 1.6s ease;
}
@supports (height: 100lvh) { #sky { height: 100lvh; } }
.sky-ready #sky { opacity: 1; }
.no-webgl body {
    background:
        radial-gradient(ellipse 120% 60% at 50% 100%, #1d0705 0%, transparent 60%),
        radial-gradient(circle at 74% 20%, rgba(255, 59, 43, 0.18) 0, transparent 7%),
        var(--background);
    background-attachment: fixed;
}
/* The easter egg's caption: Mira's name, beside the star, when Cetus's figure shows (sky.js). */
.cetus-label {
    position: fixed;
    z-index: -1;
    display: grid;
    gap: 2px;
    transform: translate(calc(-100% - 22px), 14px);
    text-align: right;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
}
.cetus-label.right { transform: translate(22px, 14px); text-align: left; }
.cetus-label.above { transform: translate(calc(-100% - 22px), calc(-100% - 14px)); }
.cetus-label.right.above { transform: translate(22px, calc(-100% - 14px)); }
.cetus-label.none { display: none; }
.cetus-label .name { font-family: var(--serif); font-size: 1.15rem; color: var(--text); letter-spacing: 0; }

.veil {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--background);
    opacity: var(--veil);
    pointer-events: none;
}
/* Support and Privacy: the scene stays dimmed behind their text. */
.veil.still { opacity: 0.55; }

a { color: var(--accent-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { color: var(--text); font-weight: 400; line-height: 1.15; margin: 0; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-family: var(--sans); font-size: 1.12rem; font-weight: 600; }
p { margin: 0; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

.eyebrow {
    color: var(--accent-soft);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.skip {
    position: absolute;
    left: 16px;
    top: -60px;
    padding: 10px 16px;
    background: var(--raised);
    color: var(--text);
    border-radius: 12px;
    z-index: 10;
}
.skip:focus { top: 12px; }

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    background: rgba(5, 2, 2, 0.55);
    border-bottom: 1px solid rgba(43, 20, 18, 0.6);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-family: var(--serif);
    font-size: 1.5rem;
    text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
.nav ul a {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--body);
    font-size: 0.95rem;
    text-decoration: none;
}
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--text); background: rgba(36, 11, 9, 0.7); }
@media (max-width: 720px) {
    .nav ul .optional { display: none; }
}
@media (max-width: 420px) {
    .nav ul { flex-wrap: nowrap; gap: 0; }
    .nav ul a { padding: 8px 9px; font-size: 0.9rem; }
}
/* 320 px phones, and 320 px windows with a classic scrollbar (305 px of layout): the brand and three links fit on
   one row inside the page margin. */
@media (max-width: 360px) {
    .nav .wrap { gap: 6px; }
    .brand { gap: 8px; font-size: 1.25rem; }
    .brand img { width: 26px; height: 26px; }
    .nav ul a { padding: 9px 5px; font-size: 0.85rem; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }
.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-raised);
    color: var(--text);
    background: rgba(20, 7, 6, 0.7);
}
.button:hover { color: var(--text); border-color: var(--accent); }
.button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 0 34px rgba(255, 59, 43, 0.35);
}
.button.primary:hover { background: var(--accent-soft); color: var(--on-accent); }
.soon { color: var(--muted); font-size: 0.92rem; }

/* Hero */
.hero { min-height: calc(100svh - 64px); display: flex; align-items: center; padding: 48px 0 80px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { margin-top: 18px; }
.hero h1 span { color: var(--accent-soft); font-style: italic; }
.lead { margin-top: 22px; font-size: 1.2rem; color: var(--body); max-width: 34em; }
.hero-phones { position: relative; height: min(640px, 74vh); }
.hero-phones .phone { position: absolute; width: min(270px, 44%); }
.hero-phones .phone.back { right: 4%; top: 0; transform: rotate(4deg); }
.hero-phones .phone.front { left: 6%; bottom: 0; transform: rotate(-3deg); }
@media (prefers-reduced-motion: no-preference) {
    .hero-phones .phone.front { animation: drift 9s ease-in-out infinite; }
    .hero-phones .phone.back { animation: drift-back 11s ease-in-out infinite; }
}
@keyframes drift { 50% { transform: rotate(-3deg) translateY(-10px); } }
@keyframes drift-back { 50% { transform: rotate(4deg) translateY(8px); } }

@media (max-width: 900px) {
    .hero { min-height: auto; padding-top: 40px; }
    .hero .wrap { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .lead { margin-inline: auto; }
    .actions { justify-content: center; }
    .hero-phones { height: 520px; max-width: 460px; width: 100%; margin-inline: auto; }
}
/* Upright phones: the top third of the window is open sky, for Mira's star and Cetus (sky.js keeps the figure
   above 35% of the height). */
@media (max-width: 900px) and (max-aspect-ratio: 9/10) {
    .hero { padding-top: calc(35svh - 40px); }
}

/* Phones: the app's screens in a plain frame */
.phone {
    margin: 0;
    padding: 7px;
    border-radius: 46px;
    background: linear-gradient(160deg, #1c0a08, #0a0404 40%);
    border: 1px solid var(--border-raised);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.65), 0 0 70px rgba(255, 59, 43, 0.07);
}
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 1206 / 2622; border-radius: 39px; }

/* Sections */
section { padding: 110px 0; position: relative; }
.section-head { max-width: 40em; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 14px; }
.section-head p:not(.eyebrow) { margin-top: 18px; font-size: 1.1rem; }

.card {
    background: rgba(10, 4, 4, 0.72);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
.step { padding: 26px 26px 0; overflow: hidden; display: flex; flex-direction: column; }
.step .num {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    color: var(--accent-soft);
    font-weight: 600;
    font-size: 0.95rem;
}
.step h3 { margin-top: 16px; }
.step p { margin-top: 8px; color: var(--body); }
.step .phone { margin: 28px auto -120px; width: 78%; }
@media (max-width: 900px) {
    .steps { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}

/* Why red */
.why .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.spectrum { margin-top: 36px; }
.spectrum .bar {
    height: 16px;
    border-radius: 999px;
    /* Theme.spectrum's six equal bands, as About and the Welcome draw them */
    background: linear-gradient(90deg,
        rgba(91, 47, 168, 0.45) 0 16.67%, rgba(47, 91, 216, 0.45) 0 33.33%, rgba(47, 168, 91, 0.45) 0 50%,
        rgba(216, 192, 47, 0.6) 0 66.67%, rgba(240, 122, 31, 0.8) 0 83.33%, #ff2a1a 0 100%);
}
.spectrum .scale { position: relative; height: 44px; font-size: 0.82rem; color: var(--muted); }
.spectrum .scale span { position: absolute; top: 8px; }
.spectrum .scale .start { left: 0; }
.spectrum .scale .end { right: 0; }
.spectrum .scale .mark { left: 76.6%; transform: translateX(-50%); top: -4px; color: var(--text); font-weight: 600; text-align: center; }
.spectrum .scale .mark::before { content: ""; display: block; width: 2px; height: 14px; background: var(--text); margin: 0 auto 4px; }
.why-points { display: grid; gap: 18px; }
.why-points .card { padding: 26px; }
.why-points p { margin-top: 8px; }
.comfort { margin-top: 22px; font-size: 0.92rem; color: var(--muted); }
.comfort.center { text-align: center; }
@media (max-width: 900px) { .why .wrap { grid-template-columns: 1fr; } }

/* Sounds */
.sounds-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 48px; }
.sound { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.sound svg { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--selected); stroke: var(--accent-soft); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound strong { display: block; color: var(--text); font-weight: 600; }
.sound span { font-size: 0.9rem; color: var(--muted); }
.sounds-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.sounds-more .card { padding: 22px 24px; }
.sounds-more p { margin-top: 6px; font-size: 0.96rem; }
@media (max-width: 960px) { .sounds-grid { grid-template-columns: repeat(2, 1fr); } .sounds-more { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .sounds-grid { grid-template-columns: 1fr; } }

/* Feature rows with a phone */
.feature .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: center; }
.feature.flip .wrap { grid-template-columns: 1.2fr 0.8fr; }
.feature.flip .wrap > .phone-col { order: 2; }
.phone-col { display: flex; justify-content: center; gap: 20px; }
.phone-col .phone { width: min(300px, 100%); }
.phone-col.pair .phone { width: min(250px, 48%); }
.phone-col.pair .phone:last-child { margin-top: 60px; }
.list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.list li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; }
.list li::before {
    content: "";
    width: 10px;
    height: 10px;
    margin: 9px 0 0 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(255, 59, 43, 0.7);
}
.list strong { color: var(--text); font-weight: 600; }
@media (max-width: 900px) {
    .feature .wrap, .feature.flip .wrap { grid-template-columns: 1fr; gap: 48px; }
    .feature.flip .wrap > .phone-col { order: 0; }
}

/* iPhone Duo */
.duo figure { margin: 48px 0 0; }
.duo-frame {
    padding: 9px;
    border-radius: 34px;
    background: linear-gradient(160deg, #1c0a08, #0a0404 40%);
    border: 1px solid var(--border-raised);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.duo-frame img { display: block; width: 100%; height: auto; aspect-ratio: 2853 / 2007; border-radius: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; padding: 0; list-style: none; }
.chips li { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: rgba(10, 4, 4, 0.7); font-size: 0.95rem; }

/* Privacy */
.private-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.private-grid .card { padding: 26px 22px; text-align: center; }
.private-grid .big { font-family: var(--serif); font-size: 2rem; color: var(--text); line-height: 1.1; }
.private-grid p { margin-top: 10px; font-size: 0.95rem; }
@media (max-width: 900px) { .private-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .private-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { max-width: 780px; margin: 48px auto 0; display: grid; gap: 12px; }
details { padding: 0 24px; }
summary {
    cursor: pointer;
    list-style: none;
    padding: 20px 28px 20px 0;
    color: var(--text);
    font-weight: 600;
    position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--accent-soft);
    border-bottom: 2px solid var(--accent-soft);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.25s ease;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details > div { padding-bottom: 22px; }
details > div p + p { margin-top: 10px; }

/* Closing */
.closing { text-align: center; padding: 130px 0 120px; }
.closing img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 60px rgba(255, 59, 43, 0.25); }
.closing h2 { margin-top: 26px; }
.closing p { margin-top: 14px; font-size: 1.1rem; }
.closing .actions { justify-content: center; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 40px 0 56px; background: rgba(5, 2, 2, 0.75); font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--body); text-decoration: none; }
footer a:hover { color: var(--text); }
footer .fine { color: var(--muted); max-width: 34em; }

/* Support and privacy pages */
.doc { padding: 72px 0 110px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-top: 14px; }
.doc .updated { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }
.doc h2 { font-size: 1.7rem; margin-top: 52px; }
.doc h3 { margin-top: 28px; }
.doc p, .doc ul, .doc ol { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 8px; }
.doc strong { color: var(--text); font-weight: 600; }
.callout { margin-top: 32px; padding: 24px 26px; }
.contact { margin-top: 32px; padding: 28px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.contact .note { max-width: 22em; }
.contact .address { font-size: clamp(1rem, 4.6vw, 1.25rem); color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.doc .faq-list { margin-top: 24px; max-width: none; }
