/* ============================================================
   gusstories.ca
   Brighter, warm fantasy feel, from Gus's answers of Sep 11, 2026
   (not dark or spooky; green is nice; colours left to Media Ladder).
   Warm parchment ground, forest green, a touch of old gold.
   Headings and story text: Alegreya. Menus, buttons, forms: Alegreya Sans.
   Colours and fonts all live in the variables below.
   ============================================================ */

:root {
    --green:      #2f6b3a;
    --green-dark: #1f4a28;
    --green-tint: #e8f1e3;
    --gold:       #b7832a;
    --gold-text:  #7d5512;
    --gold-tint:  #fbf1dc;
    --ink:        #2d2a26;
    --text:       #4a4540;
    --muted:      #6f675e;
    --line:       #e4dccb;
    --paper:      #fffdf8;
    --parchment:  #f6efe0;
    --header-bg:  #fbf6ea;
    --footer:     #1e3324;
    --cursor:     #2f7fd6;
    --squiggle:   #c2455a;
    --serif:      'Alegreya', Georgia, 'Times New Roman', serif;
    --sans:       'Alegreya Sans', 'Segoe UI', Arial, sans-serif;
    --url-font:   'Helvetica Neue', Helvetica, Arial, sans-serif;
    --radius:     6px;
    --max:        1140px;
    --read:       40rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 19px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); }
a:hover { color: var(--green-dark); }

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

h1, h2, h3 {
    font-family: var(--serif);
    color: var(--ink);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 0.5em;
}
h1 { font-size: clamp(34px, 4.6vw, 46px); }
h2 { font-size: clamp(27px, 3.4vw, 34px); }
h3 { font-size: clamp(23px, 2.6vw, 29px); }

.heading-primary { color: var(--green); }

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 100; background: #fff; padding: 8px 14px; }
.skip-link:focus { left: 10px; }

/* ---------- Header ---------- */

#site-header {
    background: var(--header-bg);
    border-bottom: 3px solid var(--green);
    position: relative;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 80px;
}

/* The typed web address from Gus's business card, used as the logo. */
.wordmark {
    font-family: var(--url-font);
    font-size: clamp(21px, 2.6vw, 28px);
    letter-spacing: -0.3px;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
}
.wordmark:hover { color: #000; }

.tu-name {
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-decoration-color: var(--squiggle);
    text-decoration-thickness: 0.07em;
    text-underline-offset: 0.3em;
    text-decoration-skip-ink: none;
}

.tu-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 0.06em;
    vertical-align: -0.18em;
    background: var(--cursor);
    animation: tu-blink 1.1s steps(1) infinite;
}

@keyframes tu-blink { 50% { opacity: 0; } }

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

.main-nav { display: flex; align-items: center; gap: 20px; }

.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav-links a {
    display: block;
    padding: 8px 12px;
    color: var(--ink);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    border-radius: var(--radius);
}
.nav-links a:hover { color: var(--green); background: var(--green-tint); }
.nav-links .current a { color: var(--green); box-shadow: inset 0 -3px 0 var(--gold); }
.nav-links .nav-account a { color: var(--green); font-weight: 700; }

.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--green);
}
.social a:hover { color: var(--green-dark); background: var(--green-tint); }
.social svg { width: 18px; height: 18px; fill: currentColor; }

.menu-toggle { display: none; }

@media (max-width: 1060px) {
    .main-nav { gap: 8px; }
    .nav-links a { padding: 8px 8px; font-size: 17px; }
    .social-header { display: none; }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: 0;
        padding: 10px;
        cursor: pointer;
    }
    .menu-toggle .bar { display: block; width: 26px; height: 3px; background: var(--ink); border-radius: 2px; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 20;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 8px 20px 20px;
        background: var(--header-bg);
        border-bottom: 3px solid var(--green);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    }
    .main-nav.open { display: flex; }
    .nav-links { flex-direction: column; }
    .nav-links a { padding: 12px 4px; font-size: 19px; }
    .nav-links .current a { box-shadow: none; }
    .social-header { display: flex; }
}

/* ---------- Page layout ---------- */

.page-body { padding-top: 40px; padding-bottom: 64px; }
.page-body.narrow { max-width: 760px; }

.page-head {
    background: var(--parchment);
    border-bottom: 1px solid var(--line);
    padding: 32px 0;
}
.page-head h1 { color: var(--green-dark); margin: 0; }
.page-sub { margin: 8px 0 0; color: var(--text); font-size: 20px; }

.section-title { margin-top: 48px; color: var(--green-dark); }

.btn {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 26px;
    background: var(--green);
    color: #fff;
    border: 2px solid var(--green);
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn-large { font-size: 21px; padding: 15px 32px; }
.btn-quiet { background: #fff; color: var(--green); }
.btn-quiet:hover { background: var(--green-tint); color: var(--green-dark); }

.notice {
    margin: 0 0 28px;
    padding: 12px 16px;
    border-left: 4px solid var(--gold);
    background: var(--gold-tint);
    color: #5a4300;
    font-size: 17px;
}

.hint { margin: 6px 0 0; font-size: 16px; color: var(--muted); }
.small-print { font-size: 16px; color: var(--muted); }

/* ---------- Home ---------- */

.home-hero {
    background:
        radial-gradient(900px 380px at 90% 0%, rgba(183, 131, 42, 0.12), transparent 70%),
        linear-gradient(var(--header-bg), var(--parchment));
    border-bottom: 1px solid var(--line);
    padding: clamp(36px, 6vw, 64px) 0;
}

.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-grid.has-painting { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.hero-text h1 { color: var(--green-dark); }

.hero-painting { margin: 0; }
.hero-painting img {
    width: 100%;
    border-radius: 10px;
    border: 6px solid #fff;
    box-shadow: 0 16px 40px rgba(60, 45, 20, 0.22);
}

@media (max-width: 820px) {
    .hero-grid.has-painting { grid-template-columns: 1fr; }
}

.welcome {
    max-width: var(--read);
    font-family: var(--serif);
    font-size: 21px;
    line-height: 1.65;
    color: var(--ink);
}
.welcome .signoff { font-style: italic; }

.featured {
    margin: 0;
    padding: 28px;
    border: 2px solid var(--gold);
    border-radius: 10px;
    background: var(--gold-tint);
}
.featured .kicker {
    margin: 0 0 6px;
    color: var(--gold-text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.featured h2 a { color: var(--ink); text-decoration: none; }
.featured h2 a:hover { color: var(--green); }
.featured-note { margin: 0 0 8px; color: var(--gold-text); font-weight: 500; }
.featured .story-body { margin: 20px 0; }

.list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 20px;
    margin: 56px 0 0;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--green);
}
.list-head h2 { margin: 0; color: var(--green-dark); }
.list-head p { margin: 0; color: var(--muted); font-size: 16px; }

.story-list { list-style: none; margin: 0; padding: 0; }

.story-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 28px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
}
.story-thumb img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(60, 45, 20, 0.15);
}
.story-card h3 { margin: 0 0 6px; }
.story-card h3 a { color: var(--ink); text-decoration: none; }
.story-card h3 a:hover { color: var(--green); }

.tagline { margin: 0 0 6px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--text); }

.story-meta { margin: 0 0 16px; font-size: 16px; color: var(--muted); }

@media (max-width: 640px) {
    .story-card { grid-template-columns: 96px 1fr; gap: 16px; padding: 24px 0; }
}

/* ---------- The three story actions ---------- */

.story-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.action {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 176px;
    padding: 9px 16px;
    border: 2px solid var(--green);
    border-radius: var(--radius);
    font-size: 17px;
    line-height: 1.25;
    text-decoration: none;
}
.action-label { font-weight: 700; }
.action-note { font-size: 14px; }

.action-read { background: #fff; color: var(--green); }
.action-read:hover { background: var(--green-tint); color: var(--green-dark); }

.action-print { background: var(--green); color: #fff; }
.action-print:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

.action-listen.is-soon {
    border: 2px dashed #bcb2a2;
    background: #faf7f0;
    color: var(--muted);
    cursor: not-allowed;
}
.action-listen.is-ready { border-color: var(--gold); background: var(--gold-tint); color: var(--gold-text); }
.action-listen.is-ready:hover { background: #f6e5c2; }
.action-listen.is-locked { border-color: var(--gold); background: #fff; color: var(--ink); }
.action-listen.is-locked:hover { background: var(--gold-tint); }

@media (max-width: 640px) {
    .action { flex: 1 1 100%; min-width: 0; }
}

/* ---------- Story page ---------- */

.story { max-width: 860px; padding-top: 24px; padding-bottom: 64px; }

.story-back { margin: 0 0 18px; font-size: 16px; }

.story-head h1 {
    color: var(--green-dark);
    font-size: clamp(34px, 5vw, 50px);
    margin-bottom: 0.25em;
}
.story-head .tagline { font-size: 22px; }

.story-figure { margin: 24px 0; }
.story-figure img {
    width: auto;
    max-height: 560px;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(60, 45, 20, 0.18);
}

.story > .story-actions { margin: 0 0 32px; }

.listen-panel {
    display: flex;
    gap: 18px;
    align-items: center;
    max-width: var(--read);
    margin: 0 auto 32px;
    padding: 16px;
    border: 2px solid var(--gold);
    border-radius: 10px;
    background: var(--gold-tint);
}
.listen-art {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    object-fit: cover;
    border-radius: var(--radius);
}
.listen-main { flex: 1; min-width: 0; }
.listen-panel h2 { margin: 0; font-size: 22px; color: var(--gold-text); }
.listen-title { margin: 0 0 8px; font-family: var(--serif); font-style: italic; }
.listen-panel audio { display: block; width: 100%; }

@media (max-width: 480px) {
    .listen-art { width: 64px; height: 64px; flex-basis: 64px; }
}

.story-body {
    max-width: var(--read);
    margin: 0 auto;
    font-family: var(--serif);
    font-size: 21px;
    line-height: 1.75;
    color: #2b2723;
}
.story-body p { margin: 0 0 1.1em; }
.story-body p.center { text-align: center; }

/* Scene break: a blank line in Gus's manuscript, shown as three small stars. */
.story-body hr.scene-break {
    border: 0;
    height: auto;
    margin: 1.6em 0;
    text-align: center;
    overflow: visible;
}
.story-body hr.scene-break::after {
    content: "\2217\00a0\00a0\2217\00a0\00a0\2217";
    color: var(--gold);
    font-size: 18px;
    letter-spacing: 0.2em;
}

.story-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 18px;
}
.story-nav a { display: block; max-width: 48%; text-decoration: none; font-family: var(--serif); }
.story-nav-older { text-align: right; margin-left: auto; }
.story-nav small {
    display: block;
    font-family: var(--sans);
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ---------- About ---------- */

.about-intro { max-width: 860px; }
.about-intro::after { content: ""; display: block; clear: both; }
.about-photo {
    float: left;
    width: min(240px, 40%);
    margin: 6px 24px 12px 0;
    border-radius: var(--radius);
}
.about-intro p { font-family: var(--serif); font-size: 20px; color: var(--ink); }

.social-inline { margin: 16px 0 0; }
.social-inline a { border: 1px solid var(--line); }

.video-list { display: grid; gap: 28px; max-width: 760px; }
.video-item { margin: 0; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-item figcaption { margin-top: 8px; font-size: 16px; color: var(--muted); }

.shirt { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 28px; align-items: center; max-width: 760px; }
.shirt img { border-radius: var(--radius); }
@media (max-width: 640px) { .shirt { grid-template-columns: 1fr; } }

/* ---------- Forms: contact, sign-in, upload ---------- */

.form-panel { max-width: 640px; }
.form-panel label {
    display: block;
    margin: 18px 0 6px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
}
.form-panel input[type="text"],
.form-panel input[type="email"],
.form-panel input[type="file"],
.form-panel select,
.form-panel textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #b9ad99;
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    font-size: 18px;
    color: var(--ink);
}
.form-panel textarea { min-height: 180px; resize: vertical; }
.upload-form select,
.upload-form input[type="file"] { font-size: 19px; }

.form-panel .check-label { display: flex; gap: 10px; align-items: center; margin-top: 22px; }
.check-label input { width: 24px; height: 24px; flex: 0 0 24px; accent-color: var(--green); }

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

.form-msg { margin: 16px 0; padding: 14px 16px; border-radius: var(--radius); font-size: 17px; }
.form-msg.ok  { background: #eaf5e7; border: 1px solid #a9d09f; color: #1f4a28; }
.form-msg.err { background: #fbecec; border: 1px solid #e3a5a5; color: #7a1f1f; }

/* ---------- Membership ---------- */

.member-box { max-width: 680px; }
.member-box .lead { font-family: var(--serif); font-size: 22px; color: var(--ink); }
.member-list { margin: 0 0 24px; padding-left: 1.2em; color: var(--ink); }
.member-list li { margin-bottom: 8px; }

.notify-box {
    margin: 24px 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--parchment);
}
.notify-box p { margin: 0; }

.dev-box {
    margin-top: 32px;
    padding: 16px 18px;
    border: 2px dashed var(--gold);
    border-radius: var(--radius);
    background: var(--gold-tint);
    font-size: 16px;
    word-break: break-all;
}

.recorded-list { list-style: none; margin: 0; padding: 0; max-width: 680px; }
.recorded-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.recorded-list span { display: block; font-size: 16px; color: var(--muted); }

/* ---------- Subscribe band (bottom of every page) ---------- */

.subscribe-band {
    background: var(--green-tint);
    border-top: 1px solid #cfe0c8;
    padding: 28px 0;
}
.subscribe-form { max-width: 640px; }
.subscribe-form label {
    display: block;
    margin: 0 0 10px;
    font-family: var(--serif);
    font-size: 23px;
    color: var(--green-dark);
}
.subscribe-row { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-row input {
    flex: 1 1 260px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #b9ad99;
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    font-size: 18px;
}
.subscribe-row .btn { margin-top: 0; }
.subscribe-note { margin: 8px 0 0; font-size: 15px; color: var(--muted); }

/* ---------- Send an email (admin) ---------- */

.send-form fieldset.audience { margin: 0; padding: 0; border: 0; }
.send-form legend { padding: 0; margin: 18px 0 6px; color: var(--ink); font-size: 17px; font-weight: 700; }
.send-form .check-label { margin: 8px 0 0; font-weight: 500; }
.send-form .count { color: var(--muted); }
.send-form textarea { min-height: 260px; }
.send-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.send-buttons .btn { margin-top: 0; }

/* ---------- Legal pages ---------- */

.legal-content { max-width: 860px; font-size: 17px; }
.legal-content .SubHead { display: block; margin-top: 1.2em; color: var(--ink); font-weight: 700; }

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

#site-footer {
    background: var(--footer);
    color: #c9d3c5;
    padding: 40px 0;
    font-size: 16px;
}
#site-footer a { color: #eef3ea; }
#site-footer a:hover { color: #fff; }

.footer-nav {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0 0 18px;
    padding: 0;
}
.social-footer a { color: #eef3ea; border: 1px solid #3d5a44; }
.social-footer a:hover { background: #2b4633; }
.copyright { margin: 18px 0 0; color: #aab8a6; }

/* ---------- Printing a story page from the browser ---------- */

@media print {
    #site-header, #site-footer, .skip-link, .home-hero, .listen-panel,
    .story-actions, .story-nav, .story-back, .notice { display: none !important; }
    body { font-size: 12pt; color: #000; background: #fff; }
    .story-body { max-width: none; font-size: 12pt; color: #000; }
    .story-figure img { max-height: 3in; box-shadow: none; }
    a { color: #000; text-decoration: none; }
}
