/* ==========================================================================
   Fiction Factory Workshops
   Design tokens, reset and typography.

   Palette is drawn from two client assets: the Fiction Factory logo lockup
   (slate and cream) and the printed service flyer (ink, cream and brass).
   Type pairs a slab serif to the typewriter wordmark, a plain reading sans
   for body copy, and a typewriter mono used only for small labels.
   ========================================================================== */

:root {
    /* Ink and slate */
    --ink:            #14202a;
    --ink-soft:       #24343f;
    --slate:          #536c7c;
    --slate-mid:      #46596a;
    --slate-light:    #7b949c;

    /* Paper */
    --cream:          #f6f1e4;
    --cream-deep:     #ece3ce;
    --paper:          #fffdf8;
    --white:          #ffffff;

    /* Brass, taken from the service flyer */
    --gold:           #b08d3e;
    /* Deepened until brass text clears 4.5:1 on every cream surface. */
    --gold-deep:      #805f1c;
    --gold-bright:    #d9b45c;
    --gold-pale:      #e8d9ae;

    /* Lines */
    --rule:           rgba(20, 32, 42, .15);
    --rule-strong:    rgba(20, 32, 42, .28);
    --rule-light:     rgba(255, 253, 248, .22);

    /* Type */
    --font-display:   "Zilla Slab", Georgia, "Times New Roman", serif;
    --font-body:      "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono:      "Courier Prime", "Courier New", Courier, monospace;

    /* Rhythm */
    --gutter:         clamp(20px, 5vw, 40px);
    --shell:          1240px;
    --shell-narrow:   980px;
    --section-y:      clamp(56px, 7vw, 104px);

    --shadow-card:    0 1px 2px rgba(20, 32, 42, .06), 0 12px 30px rgba(20, 32, 42, .09);
    --shadow-cover:   0 10px 26px rgba(20, 32, 42, .28);
}

/* --------------------------------------------------------------- reset -- */

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
    overflow-x: hidden;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button { cursor: pointer; }

figure,
h1, h2, h3, h4, p, ul, ol, blockquote {
    margin: 0;
}

ul, ol { padding: 0; list-style: none; }

a {
    color: var(--slate-mid);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover { color: var(--gold-deep); }

/*
 * Any surface that paints itself dark restates its link colour here. Leaving a
 * link to inherit the page default puts slate text on a slate panel, which is
 * the single easiest way to ship invisible text.
 */
.section--deep a:not(.btn),
.section--slate a:not(.btn),
.format--lead a:not(.btn),
.aside-card a:not(.btn),
.cta-band a:not(.btn),
.page-hero--slate a:not(.btn),
.addon a:not(.btn) {
    color: var(--gold-bright);
}

.section--deep a:not(.btn):hover,
.section--slate a:not(.btn):hover,
.format--lead a:not(.btn):hover,
.aside-card a:not(.btn):hover,
.cta-band a:not(.btn):hover,
.page-hero--slate a:not(.btn):hover,
.addon a:not(.btn):hover {
    color: var(--white);
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* ---------------------------------------------------------- typography -- */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.005em;
    color: var(--ink);
}

h1 { font-size: clamp(2.15rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 3.1vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); }
h4 { font-size: clamp(1.05rem, 1.4vw, 1.2rem); }

p { max-width: 68ch; }

strong { font-weight: 600; }

.lede {
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.6;
    color: var(--slate-mid);
}

/* Typewriter label. Used for prices, step numbers and small meta only,
   never as a decorative line above every heading. */
.label {
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.label--light { color: var(--gold-bright); }

.rule-mark {
    display: block;
    width: 68px;
    height: 3px;
    background: var(--gold);
    margin: 22px 0 0;
}

/* ------------------------------------------------------------- helpers -- */

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -70px;
    z-index: 200;
    background: var(--ink);
    color: var(--white);
    padding: 12px 20px;
    font-weight: 600;
    transition: top .18s ease;
}

.skip-link:focus { top: 12px; color: var(--white); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
