/* www.kink.town — Nightcap (brass on ink), shared by index.html and faq.html */

:root {
    --ink: #0D0F14;
    --smoke: #181B23;
    --smoke-2: #1E222C;
    --well: #08090C;
    --ivory: 244, 238, 227;
    --brass: #CDA766;
    --champagne: #DCC28E;
    --on-brass: #15120C;
    --sage: #8CB89A;
    --rose: #E5918C;
    --hairline: rgba(205, 167, 102, 0.22);
    --rule: rgba(244, 238, 227, 0.08);
    --text: rgba(var(--ivory), 0.87);
    --text-2: rgba(var(--ivory), 0.64);
    --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
    --measure: 46rem;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
}

::selection { background: rgba(205, 167, 102, 0.35); color: rgb(var(--ivory)); }

a { color: var(--champagne); text-decoration-color: rgba(220, 194, 142, 0.4); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }

strong { font-weight: 500; color: rgb(var(--ivory)); }
code, kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875em;
    padding: 0.1em 0.4em;
    border-radius: 6px;
    background: var(--well);
    color: var(--champagne);
    overflow-wrap: anywhere;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: rgb(var(--ivory)); }
h1 { font-style: italic; }

.skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 10;
    background: var(--brass); color: var(--on-brass);
    padding: 0.5rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, 64rem); margin-inline: auto; }

/* ---------- Top bar ---------- */

.bar { position: sticky; top: 0; z-index: 5; background: rgba(13, 15, 20, 0.85); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--rule); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.mark { display: flex; align-items: center; gap: 0.6rem; color: rgb(var(--ivory)); text-decoration: none; font-family: var(--serif); font-size: 1.4rem; font-style: italic; font-weight: 500; }
.mark img { width: 2rem; height: 2rem; }
.bar nav { display: flex; align-items: center; gap: 0.25rem 1.25rem; flex-wrap: wrap; }
.bar nav a { color: var(--text-2); text-decoration: none; font-size: 0.9375rem; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: rgb(var(--ivory)); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 3rem; padding: 0 1.5rem; border-radius: 999px;
    font: 500 1rem/1 var(--sans); text-decoration: none; white-space: nowrap;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--brass); color: var(--on-brass); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.btn-primary:hover { background: var(--champagne); }
.btn-ghost { color: rgb(var(--ivory)); box-shadow: inset 0 0 0 1px var(--hairline); }
.btn-ghost:hover { background: rgba(205, 167, 102, 0.1); box-shadow: inset 0 0 0 1px rgba(205, 167, 102, 0.5); }
.btn-small { min-height: 2.5rem; padding: 0 1.1rem; font-size: 0.9375rem; }

/* ---------- Home: hero ---------- */

.hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding: 7rem 0 5rem;
    background:
        linear-gradient(to bottom, transparent 55%, var(--ink) 100%),
        radial-gradient(ellipse 60% 70% at 85% 95%, rgba(205, 167, 102, 0.18), transparent 70%),
        radial-gradient(ellipse 50% 60% at 5% -10%, rgba(151, 169, 222, 0.08), transparent 70%),
        repeating-linear-gradient(135deg, #1B1F28 0 14px, #161920 14px 28px);
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to top, var(--ink) 0%, rgba(13, 15, 20, 0.85) 45%, rgba(13, 15, 20, 0.55) 100%);
}
.eyebrow { margin: 0 0 1rem; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.hero h1 { margin: 0; max-width: 14ch; font-size: clamp(3rem, 8vw, 5.5rem); line-height: 0.98; }
.lede { margin: 1.5rem 0 0; max-width: 38rem; font-size: clamp(1.0625rem, 2vw, 1.25rem); color: rgba(var(--ivory), 0.8); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

/* ---------- Home: sections ---------- */

main { padding: 2rem 0 5rem; }
section + section { margin-top: 4rem; }
section > h2 { margin: 0 0 1rem; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1.5rem; }
.card {
    padding: 1.5rem; border-radius: 18px; background: var(--smoke);
    box-shadow: inset 0 0 0 1px rgba(var(--ivory), 0.06);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.card p { margin: 0; color: var(--text-2); }
.card .icon { width: 2.25rem; height: 2.25rem; margin-bottom: 0.75rem; color: var(--brass); }

.callout {
    margin-top: 1.5rem; padding: 1.25rem 1.5rem; border-radius: 16px;
    background: rgba(205, 167, 102, 0.07); box-shadow: inset 0 0 0 1px var(--hairline);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */

.page-head { padding: 4rem 0 1rem; }
.page-head h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 4rem); }
.page-head p { max-width: var(--measure); color: var(--text-2); }

.faq-layout { display: grid; gap: 2rem; }
@media (min-width: 60rem) {
    .faq-layout { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; }
    .toc { position: sticky; top: 5.5rem; }
}

.toc { font-size: 0.9375rem; }
.toc h2 { margin: 0 0 0.5rem; font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.toc ul { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.toc li { margin: 0.2rem 0; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: rgb(var(--ivory)); }

.faq-section + .faq-section { margin-top: 3.5rem; }
.faq-section > h2 { margin: 0 0 0.25rem; font-size: clamp(1.9rem, 4vw, 2.5rem); scroll-margin-top: 5rem; }
.faq-section > p { color: var(--text-2); margin: 0 0 1.25rem; }

details {
    margin-top: 0.75rem;
    border-radius: 16px; background: var(--smoke);
    box-shadow: inset 0 0 0 1px rgba(var(--ivory), 0.06);
    scroll-margin-top: 5rem;
}
details[open] { box-shadow: inset 0 0 0 1px var(--hairline); }
summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 3.75rem; padding: 0.75rem 1.5rem;
    font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.2; color: rgb(var(--ivory));
    border-radius: 16px;
}
summary::-webkit-details-marker { display: none; }
summary:hover { background: rgba(205, 167, 102, 0.06); }
summary::after {
    content: ""; flex-shrink: 0; width: 0.6rem; height: 0.6rem;
    border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass);
    transform: rotate(45deg); transition: transform 0.25s ease; margin-top: -0.3rem;
}
details[open] > summary::after { transform: rotate(-135deg); margin-top: 0.3rem; }

.answer { padding: 0.25rem 1.5rem 1.5rem; max-width: calc(var(--measure) + 3rem); }
.answer > :first-child { margin-top: 0; }
.answer > :last-child { margin-bottom: 0; }
.answer p { margin: 0.6rem 0; }
.answer ol, .answer ul { padding-left: 1.3rem; margin: 0.6rem 0; }
.answer li + li { margin-top: 0.35rem; }
.answer li::marker { color: var(--brass); }
.answer h3 { margin: 1.25rem 0 0.25rem; font-family: var(--sans); font-size: 1rem; font-weight: 500; }

.note {
    margin: 0.9rem 0; padding: 0.8rem 1rem; border-radius: 12px;
    background: rgba(205, 167, 102, 0.07); box-shadow: inset 0 0 0 1px var(--hairline);
    font-size: 0.9375rem;
}
.note.warn { background: rgba(229, 145, 140, 0.07); box-shadow: inset 0 0 0 1px rgba(229, 145, 140, 0.3); }

.table-wrap { overflow-x: auto; margin: 0.9rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th { font-weight: 500; color: rgb(var(--ivory)); }
td.yes { color: var(--sage); white-space: nowrap; }
td.no { color: var(--rose); white-space: nowrap; }

/* ---------- Footer ---------- */

footer { padding: 2rem 0 3rem; box-shadow: 0 -1px 0 var(--hairline); font-size: 0.9375rem; color: var(--text-2); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; }
footer p { margin: 0; }

@media (max-width: 40rem) {
    .hero { padding: 5rem 0 3.5rem; }
    .actions .btn { flex: 1 1 100%; }
    summary { font-size: 1.25rem; padding: 0.75rem 1.1rem; }
    .answer { padding: 0.25rem 1.1rem 1.25rem; }
    .bar nav { gap: 0.25rem 0.9rem; }
}
