/* Sleep Psycho landing page styles. Layered over Tailwind Play CDN. */

:root {
    --ink: #0a0a0b;
    --ink-soft: #18181c;
    --paper: #f4f1ec;
    --paper-warm: #ece6dc;
    --mute: #8d8a85;
    --line: #2a2a30;
    --accent: #d4a373;
    --accent-deep: #7a5530;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
    background: var(--ink);
    color: var(--paper);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-feature-settings: "ss01", "cv11";
    line-height: 1.65;
    letter-spacing: -0.005em;
}

.font-display {
    font-family: 'Fraunces', Georgia, serif;
    font-feature-settings: "ss01", "ss02";
    letter-spacing: -0.025em;
    line-height: 1.05;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--paper);
    color: var(--ink);
    padding: 12px 18px;
    z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 15%, rgba(212, 163, 115, 0.14), transparent 55%),
        radial-gradient(ellipse at 75% 85%, rgba(122, 85, 48, 0.22), transparent 50%),
        linear-gradient(180deg, #0a0a0b 0%, #131318 100%);
    z-index: -2;
}

/* Type */
h1.display {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    letter-spacing: -0.035em;
    line-height: 0.98;
}
.eyebrow {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
}
.eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.6;
}
.lede {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: rgba(244, 241, 236, 0.78);
    max-width: 36rem;
    line-height: 1.5;
}
.body-text {
    color: rgba(244, 241, 236, 0.82);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.95em 1.6em;
    background: var(--paper);
    color: var(--ink);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.96rem;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Tally form holder */
.tally-shell {
    background: rgba(244, 241, 236, 0.06);
    border: 1px solid rgba(212, 163, 115, 0.35);
    border-radius: 14px;
    padding: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 12px 40px -16px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,163,115,0.08);
}
.tally-shell iframe {
    width: 100%;
    border: 0;
    display: block;
    background: transparent;
    min-height: 360px;
}

/* Section spacing. Three rhythm tiers */
section { padding: clamp(4rem, 8vw, 7rem) 0; }
section.hero { padding: clamp(6rem, 10vw, 9rem) 0; }
section.proof, section.bg-ink.relative.overflow-hidden { padding: clamp(5rem, 9vw, 8rem) 0; }

/* Cards (pillars + faq) */
.pillar {
    border: 1px solid rgba(244, 241, 236, 0.08);
    border-radius: 14px;
    padding: 2rem 1.75rem;
    background: rgba(244, 241, 236, 0.02);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.pillar:hover { border-color: rgba(212, 163, 115, 0.35); transform: translateY(-2px); }
.pillar .num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--accent);
    font-weight: 400;
    opacity: 0.55;
}

/* Build proof */
.proof {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212, 163, 115, 0.06), transparent 70%),
        linear-gradient(180deg, #0a0a0b 0%, #131316 100%);
}
.proof-img {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(244, 241, 236, 0.1);
}
.proof-img img { display: block; width: 100%; height: auto; }

/* FAQ */
details.faq {
    border-top: 1px solid rgba(244, 241, 236, 0.1);
    padding: 1.5rem 0;
}
details.faq:last-of-type { border-bottom: 1px solid rgba(244, 241, 236, 0.1); }
details.faq summary {
    list-style: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.08rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
    content: "+";
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 300;
    font-size: 1.6rem;
    color: var(--accent);
    transition: transform 0.2s ease;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq summary:hover { color: var(--accent); }
details.faq[open] summary { color: var(--paper); padding-bottom: 0.5rem; }
details.faq[open] { background: rgba(244, 241, 236, 0.015); margin: 0 -1rem; padding: 1.5rem 1rem; border-radius: 8px; }
details.faq summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}
details.faq p {
    margin-top: 0.9rem;
    color: rgba(244, 241, 236, 0.78);
    line-height: 1.7;
    max-width: 50rem;
}

/* Footer */
footer.site-footer {
    border-top: 1px solid rgba(244, 241, 236, 0.1);
    padding: 3rem 0;
    color: rgba(244, 241, 236, 0.55);
    font-size: 0.86rem;
}
footer a { color: rgba(244, 241, 236, 0.8); text-decoration: none; border-bottom: 1px solid rgba(212, 163, 115, 0.5); }
footer a:hover { border-bottom-color: var(--accent); }

/* Honest disclosure block. Narrow border so the prose carries it */
.honest {
    border-left: 1px solid rgba(212, 163, 115, 0.5);
    padding: 0.2rem 0 0.2rem 1.2rem;
    color: rgba(244, 241, 236, 0.7);
    font-size: 0.95rem;
    max-width: 38rem;
    margin-top: 2rem;
}

/* Focus rings. Consistent accent across all interactive surfaces */
.skip-link:focus,
.skip-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
footer.site-footer a:focus-visible,
.hero a:focus-visible,
section a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Reduce motion. Keep transition events firing for any future state listeners */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile tuning */
@media (max-width: 640px) {
    section { padding: 4rem 0; }
    h1.display { font-size: clamp(2.25rem, 12vw, 3.5rem); }
}
