/* ==========================================================================
   SKYLET — custom styles (complements Tailwind CDN)
   Rule: solid colors only. No gradients anywhere.
   ========================================================================== */

:root {
    --paper: #F4F2EC;
    --bone: #EBE8E0;
    --ink: #0E0E0C;
    --graphite: #1A1A18;
    --stone: #6E6B63;
    --mist: #A8A49A;
    --line: #D8D4C9;
    --bronze: #8A6A3E;
    --ease: cubic-bezier(.2, .7, .1, 1);
    --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; font-feature-settings: "ss01", "cv11"; }
section[id] { scroll-margin-top: 72px; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ---------- Motion pre-states (only when JS + motion allowed) ---------- */
.motion [data-reveal] { opacity: 0; transform: translateY(28px); }
.motion .hero-title .line > span { transform: translateY(110%); }
.motion [data-rule] { transform: scaleX(0); }
.motion [data-phone] { opacity: 0; }

/* ---------- Header ---------- */
.site-header { mix-blend-mode: difference; }
.wordmark { font-feature-settings: "ss01"; }

.nav-link { position: relative; padding: 4px 0; }
.nav-link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: right;
    transition: transform .5s var(--ease);
}
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
    border: 1px solid currentColor; padding: 10px 16px;
    transition: background-color .35s var(--ease), color .35s var(--ease);
}
.nav-cta:hover { background: var(--paper); color: var(--ink); }

.menu-toggle { position: relative; width: 36px; height: 36px; display: inline-flex; flex-direction: column; justify-content: center; gap: 7px; align-items: flex-end; }
.menu-bar { display: block; height: 1px; width: 26px; background: var(--paper); transition: transform .4s var(--ease), width .4s var(--ease); }
.menu-bar:last-child { width: 16px; }
.menu-toggle[aria-expanded="true"] .menu-bar:first-child { transform: translateY(4px) rotate(45deg); width: 24px; }
.menu-toggle[aria-expanded="true"] .menu-bar:last-child  { transform: translateY(-4px) rotate(-45deg); width: 24px; }

.mobile-menu { opacity: 0; transition: opacity .4s var(--ease); }
.mobile-menu.is-open { opacity: 1; }

/* ---------- Hero ---------- */
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .line > span { display: inline-block; will-change: transform; }

/* Phones: fixed composition, scaled responsively */
.phones {
    --s: 1;
    position: relative; left: 50%;
    width: 540px; height: 610px;
    transform: translateX(-50%) scale(var(--s));
    transform-origin: top center;
    margin-bottom: calc(610px * (var(--s) - 1));
}
@media (max-width: 1279px) and (min-width: 1024px) { .phones { --s: .74; } }
@media (max-width: 639px) { .phones { --s: .66; } }
@media (max-width: 400px) { .phones { --s: .58; } }

.phone {
    position: absolute; width: 230px; height: 498px;
    border-radius: 42px; padding: 7px;
    background: var(--ink);
    box-shadow: 0 0 0 1px rgba(14,14,12,.9), 0 50px 80px -45px rgba(14,14,12,.55);
    will-change: transform;
}
.phone--a { left: 0;    top: 70px;  z-index: 1; }
.phone--b { left: 155px; top: 0;    z-index: 3; }
.phone--c { left: 310px; top: 100px; z-index: 2; }

.phone-screen { position: relative; height: 100%; border-radius: 35px; overflow: hidden; }
.phone-status {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 22px 0; font-size: 10px; font-weight: 600; letter-spacing: .02em;
}
.phone-status span:last-child { font-size: 6px; letter-spacing: 1px; }
.phone-island { width: 68px; height: 20px; border-radius: 999px; background: #000; }

.bar { flex: 1; background: var(--paper); opacity: .85; }
.dot { aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(14,14,12,.3); }
.dot.is-on { background: var(--ink); border-color: var(--ink); }

.phones-caption { position: absolute; left: 0; bottom: -4px; }

/* Marquee */
.marquee { overflow: hidden; }
.marquee-track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 48s linear infinite; }
.marquee-track span { white-space: nowrap; }
.marquee-sep { color: var(--bronze); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Buttons & links ---------- */
.btn-primary, .btn-outline, .btn-light {
    position: relative; display: inline-flex; align-items: center; gap: 1.25rem;
    padding: 19px 28px; overflow: hidden; isolation: isolate;
    font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
    transition: color .45s var(--ease), border-color .45s var(--ease);
}
.btn-primary::before, .btn-outline::before, .btn-light::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    transform: scaleY(0); transform-origin: bottom;
    transition: transform .5s var(--ease);
}
.btn-primary:hover::before, .btn-outline:hover::before, .btn-light:hover::before,
.btn-primary:focus-visible::before, .btn-outline:focus-visible::before, .btn-light:focus-visible::before { transform: scaleY(1); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary::before { background: var(--graphite); }

.btn-outline { border: 1px solid var(--ink); color: var(--ink); }
.btn-outline::before { background: var(--ink); }
.btn-outline:hover, .btn-outline:focus-visible { color: var(--paper); }

.btn-light { background: var(--paper); color: var(--ink); }
.btn-light::before { background: var(--bone); }
.btn-light:disabled { opacity: .6; cursor: progress; }

.btn-arrow { display: inline-block; transition: transform .45s var(--ease); }
a:hover .btn-arrow, button:hover .btn-arrow { transform: translateX(5px); }

.link-underline { position: relative; }
.link-underline::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
    background: currentColor; transform-origin: left; transition: transform .5s var(--ease);
}
.link-underline:hover::after { transform: scaleX(.35); }

.footer-link { color: var(--paper); opacity: .85; transition: opacity .3s; }
.footer-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

/* ---------- How it works ---------- */
.step-rule { transform-origin: left; }
.step:hover .step-num { transform: translateX(6px); }
.step-num { transition: transform .6s var(--ease); }
@media (min-width: 1024px) {
    .step { padding-right: 1.5rem; }
}

/* ---------- Pricing ---------- */
.plan { transition: transform .6s var(--ease), border-color .4s; }
.plan:not(.plan--featured):hover { border-color: var(--ink); }
.plan:hover { transform: translateY(-4px); }

/* ---------- FAQ ---------- */
.faq summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; width: 14px; height: 14px; }
.faq-icon::before, .faq-icon::after {
    content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1px; background: var(--ink);
    transition: transform .45s var(--ease);
}
.faq-icon::after { transform: rotate(90deg); }
.faq[open] .faq-icon::after { transform: rotate(0deg); }
.faq summary:hover .faq-icon::before { transform: rotate(180deg); }
.faq-body { overflow: hidden; }

/* ---------- Waitlist ---------- */
.waitlist-orbit { position: absolute; right: -18vw; top: 50%; width: 70vw; max-width: 1000px; aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; }
.waitlist-orbit span {
    position: absolute; inset: 0; margin: auto; border-radius: 50%;
    border: 1px solid rgba(244,242,236,.07);
    animation: orbit 60s linear infinite;
}
.waitlist-orbit span::after {
    content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px;
    border-radius: 50%; background: rgba(244,242,236,.35);
}
.waitlist-orbit span:nth-child(1) { width: 100%; height: 100%; }
.waitlist-orbit span:nth-child(2) { width: 72%; height: 72%; animation-duration: 45s; animation-direction: reverse; }
.waitlist-orbit span:nth-child(3) { width: 44%; height: 44%; animation-duration: 30s; }
@keyframes orbit { to { transform: rotate(360deg); } }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.field { margin-top: 28px; }
.field:first-of-type { margin-top: 0; }
.field-label {
    display: block; font-family: var(--f-mono); font-size: 11px;
    letter-spacing: .18em; text-transform: uppercase; color: var(--paper);
}
.field-input {
    width: 100%; background: transparent; color: var(--paper);
    border: 0; border-bottom: 1px solid rgba(244,242,236,.25); border-radius: 0;
    padding: 14px 0; font-size: 20px; font-weight: 300; letter-spacing: -.01em;
    transition: border-color .35s var(--ease);
}
.field-input::placeholder { color: rgba(244,242,236,.3); }
.field-input:hover { border-bottom-color: rgba(244,242,236,.5); }
.field-input:focus { outline: none; border-bottom-color: var(--paper); box-shadow: 0 1px 0 0 var(--paper); }
.field-input[aria-invalid="true"] { border-bottom-color: #C9A27A; }
.field-select { appearance: none; -webkit-appearance: none; padding-right: 24px; cursor: pointer; }
.field-select option { background: var(--ink); color: var(--paper); }

.consent-box {
    appearance: none; -webkit-appearance: none; flex-shrink: 0;
    position: relative; width: 18px; height: 18px; border: 1px solid rgba(244,242,236,.5);
    cursor: pointer; transition: background-color .25s, border-color .25s;
}
.consent-box:checked { background: var(--paper); border-color: var(--paper); }
.consent-box:checked::after {
    content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px;
    border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.consent-box:focus-visible { outline: 1px solid var(--paper); outline-offset: 3px; }

.form-status.is-error { color: #D9B892; }
.form-status.is-success { color: var(--paper); }

/* ---------- Footer ---------- */
.footer-mark { font-size: clamp(88px, 23vw, 360px); letter-spacing: -.05em; line-height: .78; }

/* ---------- Legal pages ---------- */
.legal { counter-reset: legal; }
.legal h2 {
    counter-increment: legal;
    margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
    font-size: 1.5rem; font-weight: 400; letter-spacing: -.02em;
}
.legal h2::before {
    content: counter(legal, decimal-leading-zero);
    display: block; margin-bottom: .75rem;
    font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; color: var(--stone);
}
.legal h3 { margin-top: 1.75rem; font-size: 1.05rem; font-weight: 500; }
.legal p, .legal li { margin-top: 1rem; font-size: 15.5px; line-height: 1.75; color: #3A3934; }
.legal ul { list-style: none; padding: 0; }
.legal ul li { position: relative; padding-left: 1.5rem; margin-top: .6rem; }
.legal ul li::before { content: ""; position: absolute; left: 0; top: .85em; width: .75rem; height: 1px; background: var(--ink); }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--mist); }
.legal a:hover { text-decoration-color: var(--ink); }
.legal strong { font-weight: 500; color: var(--ink); }

.toc a { display: flex; gap: .75rem; padding: .45rem 0; color: var(--stone); transition: color .3s; }
.toc a:hover, .toc a.is-active { color: var(--ink); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .marquee-track, .waitlist-orbit span { animation: none; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
