/* ================================================================
   The Wandering Story — shared stylesheet
   Tone: Victorian Dublin, gaslit, restrained. One glow, one motif,
   everything else quiet.
   ================================================================ */

:root {
    --ink:            #14110D;   /* soot / night background */
    --ink-soft:       #1D1811;   /* panel / input background */
    --parchment:      #E4D9BE;   /* primary text */
    --parchment-dim:  #9C8F71;   /* secondary text, nav links */
    --gaslight:       #C98A3B;   /* primary accent, the lamp glow */
    --gaslight-dim:   #8C5F27;   /* pressed / border state */
    --verdigris:      #5C7A6E;   /* used sparingly for form focus alt */
    --claret:         #6B2737;   /* reserved for error states */
    --rule:           rgba(228, 217, 190, 0.18);

    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body:    'Crimson Text', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--ink);
    color: var(--parchment);
}

body {
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

main {
    display: block;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Hero (coming-soon masthead) ---------- */

.hero {
    position: relative;
    text-align: center;
    padding: 6rem 0 2.5rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -220px;
    left: 50%;
    width: 640px;
    height: 640px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(201, 138, 59, 0.32), rgba(201, 138, 59, 0) 62%);
    filter: blur(6px);
    z-index: 0;
    animation: flicker 7s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 0.8; }
    40%      { opacity: 1; }
    55%      { opacity: 0.72; }
}

@media (prefers-reduced-motion: reduce) {
    .hero::before { animation: none; }
}

.hero > * {
    position: relative;
    z-index: 1;
}

h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 3rem;
    letter-spacing: 0.01em;
    margin: 0 0 0.5rem;
    color: var(--parchment);
}

.tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--parchment-dim);
    margin: 0;
}

/* ---------- Divider motif ---------- */

.divider {
    width: 140px;
    height: 1px;
    background: var(--rule);
    margin: 2.5rem auto;
    position: relative;
}

.divider::after {
    content: '\2766';
    position: absolute;
    top: -0.7em;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gaslight-dim);
    background: var(--ink);
    padding: 0 0.6rem;
    font-size: 1rem;
}

/* ---------- Prose ---------- */

.prose { padding-bottom: 1rem; }
.prose-wide { max-width: 640px; }

.prose h1 {
    font-size: 2.4rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.prose p {
    margin: 0 0 1.3rem;
    color: var(--parchment);
}

.prose-meta {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--parchment-dim);
    margin-top: -0.8rem;
}

.legal h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--gaslight);
    margin: 2rem 0 0.6rem;
}

.legal a { color: var(--gaslight); }

/* ---------- Calls to action ---------- */

.cta-row {
    text-align: center;
    margin: 2rem 0 3rem;
}

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--gaslight);
    padding: 0.75rem 1.7rem;
    border-radius: 2px;
    text-decoration: none;
    border: 1px solid var(--gaslight-dim);
    margin: 0.4rem 0.5rem;
}

.btn:hover, .btn:focus-visible {
    background: var(--gaslight-dim);
    color: var(--parchment);
}

.btn-quiet {
    background: transparent;
    color: var(--parchment);
    border: 1px solid var(--rule);
}

.btn-quiet:hover, .btn-quiet:focus-visible {
    border-color: var(--gaslight);
    color: var(--gaslight);
    background: transparent;
}

/* ---------- Forms (signup.cgi) ---------- */

.form-panel {
    background: var(--ink-soft);
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.form-group { margin-bottom: 1.3rem; }

label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--parchment-dim);
    margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 2px;
    color: var(--parchment);
    font-family: var(--font-body);
    font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--gaslight);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.checkbox-row input[type="checkbox"] {
    margin-top: 0.3rem;
}

.checkbox-row label {
    margin-bottom: 0;
    color: var(--parchment);
}

.form-actions { text-align: left; margin-top: 1.6rem; }

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.errors {
    border: 1px solid var(--claret);
    background: rgba(107, 39, 55, 0.15);
    color: var(--parchment);
    padding: 1rem 1.2rem;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.errors ul { margin: 0; padding-left: 1.2rem; }

.confirmation {
    text-align: center;
    padding: 2rem 0 1rem;
}

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

.site-footer {
    text-align: center;
    padding: 2.5rem 1.5rem 3.5rem;
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--parchment-dim);
    text-decoration: none;
    padding: 0 0.9rem;
    border-left: 1px solid var(--rule);
}

.site-footer a:first-child { border-left: none; padding-left: 0; }

.site-footer a:hover, .site-footer a:focus-visible {
    color: var(--gaslight);
}

:focus-visible {
    outline: 2px solid var(--gaslight);
    outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    .hero { padding: 4rem 0 2rem; }
    h1 { font-size: 2.3rem; }
    .tagline { font-size: 1.15rem; }
    .prose h1 { font-size: 1.9rem; }
    .form-panel { padding: 1.4rem; }
}
