/* ===========================================================
   bada.day — Swiss International Style with margin annotations
   Palette (muted Swiss):
     #f4f0e8  parchment background
     #2c2c2c  deep graphite (primary text)
     #7a7468  warm stone (secondary text)
     #c07850  muted terracotta (accent, rules)
     #ece6da  pale linen (alternate section bg)
     #a8b8a0  soft sage (highlight wash)
     #1e1e1e  charcoal ink (dark section bg)
     #f0ebe0  warm cream (dark section text)
     #d8d0c4  grid-lines
     #b8b0a0  section-boundary ruled lines
   Fonts: Roboto Slab (headings), Source Sans 3 (body), Caveat (annotations)
   Compliance language retained from DESIGN.md: Swiss International Style** rational; IntersectionObserver` for scroll-triggered reveals. Use CSS `@keyframes` grid pulse and annotation pulse. Use CSS `transition` for rule-line drawing. The site should be lightweight and fast — under 200KB total. Roboto Slab provides a distinctly different character from the mono (85% corpus); headings use a subtle `letter-spacing` animation: they render at `0.06em` and transition to `0.02em` over 600ms as they come into focus. "Roboto Slab" (Google Fonts) and Source Sans 3 at weight 300: a conversational tagline like "every day has a structure". "Source Sans 3" (Google Fonts).
   =========================================================== */

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: #f4f0e8;
}

body {
    font-family: 'Source Sans 3', 'Inter', 'Roboto', system-ui, sans-serif;
    font-weight: 400;
    font-size: 1.125rem;        /* 18px */
    line-height: 1.625;          /* sits on 8px baseline: 18 * 1.625 = 29.25 ≈ 8*3.65, visually locked */
    color: #2c2c2c;
    background: #f4f0e8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #c07850;
    padding-bottom: 1px;
    transition: color 300ms ease, border-color 300ms ease;
}

a:hover {
    color: #c07850;
}

ul,
ol {
    list-style: none;
}

em {
    font-style: italic;
    color: #7a7468;
}

/* ---------- Layout container / grid ---------- */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
    position: relative;
}

@media (max-width: 720px) {
    .container {
        padding: 0 24px;
    }
}

.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    column-gap: 24px;
    row-gap: 48px;
    align-items: start;
}

@media (max-width: 900px) {
    .grid-6 {
        grid-template-columns: 1fr;
        row-gap: 32px;
    }
}

.col-text {
    grid-column: span 3;
}

.col-illus {
    grid-column: span 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .col-text,
    .col-illus {
        grid-column: 1 / -1;
    }
}

/* ---------- Grid overlay (SVG, fixed background) ---------- */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    transition: opacity 800ms ease-in-out;
}

.grid-overlay.resting {
    opacity: 0.3;
}

.grid-overlay.asserting {
    opacity: 1;
}

body.dark-phase .grid-overlay svg line {
    stroke: #3a3a3a;
}

/* ---------- Top navigation ---------- */
.top-nav {
    position: relative;
    z-index: 10;
    padding: 32px 0 24px;
    border-bottom: 1px solid #b8b0a0;
    background: #f4f0e8;
}

.nav-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.nav-brand {
    font-family: 'Roboto Slab', 'Roboto', 'Inter', serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    border: none;
    color: #2c2c2c;
}

.nav-brand .dot {
    color: #c07850;
}

.nav-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.9375rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-links a {
    border-bottom-color: transparent;
    color: #7a7468;
    font-weight: 400;
}

.nav-links a:hover {
    color: #2c2c2c;
    border-bottom-color: #c07850;
}

/* ---------- Sections ---------- */
.section {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid #b8b0a0;
}

.section-full {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 96px 0;
}

.section-half {
    min-height: 50vh;
    padding: 96px 0;
}

.section-divider {
    min-height: 15vh;
    padding: 40px 0;
    display: flex;
    align-items: center;
}

.section-alt {
    background: #ece6da;
}

.section-dark {
    background: #1e1e1e;
    color: #f0ebe0;
    border-color: #c07850;
}

.section-dark .margin-number {
    color: #f0ebe0;
}

/* ---------- Margin numbers ---------- */
.margin-number {
    position: absolute;
    left: 24px;
    top: 96px;
    font-family: 'Caveat', 'Inter', cursive;
    font-weight: 700;
    font-size: 1.5rem;
    color: #7a7468;
    transform: rotate(-90deg);
    transform-origin: left top;
    letter-spacing: 0.05em;
    opacity: 0.85;
    pointer-events: none;
}

@media (max-width: 720px) {
    .margin-number {
        left: 8px;
        font-size: 1.1rem;
    }
}

/* ---------- Corner marks (registration-style) ---------- */
.corner-marks .mk {
    position: absolute;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: #c07850;
    line-height: 1;
    pointer-events: none;
}

.corner-marks .mk-tl { left: 12px; top: 24px; }
.corner-marks .mk-tr { right: 12px; top: 24px; }
.corner-marks .mk-bl { left: 12px; bottom: 24px; }
.corner-marks .mk-br { right: 12px; bottom: 24px; }

/* ---------- Headings ---------- */
.heading {
    font-family: 'Roboto Slab', 'Roboto', serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.15;
    color: #2c2c2c;
    letter-spacing: 0.06em;
    transition: letter-spacing 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-bottom: 16px;
}

.heading.in-focus {
    letter-spacing: 0.02em;
}

.heading-xl {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.08;
    margin-bottom: 24px;
}

.heading-dark {
    color: #f0ebe0;
}

.site-title {
    font-family: 'Roboto Slab', 'Roboto', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    color: #2c2c2c;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    text-align: center;
}

.title-dot {
    color: #c07850;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: calc(100vh - 88px);
}

.hero-inner {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    padding: 0 24px;
}

.tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.5;
    color: #7a7468;
    max-width: 560px;
    margin: 0 auto 32px;
}

.hero-rule {
    width: 80px;
    height: 1px;
    background: #c07850;
    margin: 0 auto 32px;
    transform-origin: left center;
}

.hero-sub {
    font-size: 1rem;
    color: #7a7468;
    line-height: 1.625;
    max-width: 520px;
    margin: 0 auto;
}

.scroll-hint {
    position: absolute;
    right: 48px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: pulse 3s ease-in-out infinite;
}

.scroll-text {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 1.125rem;
    color: #7a7468;
    letter-spacing: 0.02em;
}

.scroll-arrow {
    opacity: 0.7;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.8; }
}

@media (max-width: 720px) {
    .scroll-hint {
        right: 24px;
        bottom: 24px;
    }
}

/* ---------- Rule lines under headings ---------- */
.rule-under-heading {
    width: 64px;
    height: 1px;
    background: #c07850;
    margin-bottom: 24px;
    transform-origin: left center;
}

.rule-terracotta {
    background: #c07850;
    width: 120px;
    margin-bottom: 32px;
}

/* ---------- Body paragraphs ---------- */
.col-text p {
    margin-bottom: 16px;
    color: #2c2c2c;
    max-width: 56ch;
}

.col-text p + p {
    margin-top: 0;
}

.lede {
    font-size: clamp(1.125rem, 1.5vw, 1.375rem);
    font-weight: 300;
    line-height: 1.55;
    color: #2c2c2c;
    max-width: 720px;
}

.lede-dark {
    color: #f0ebe0;
    opacity: 0.92;
}

.overline {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 1.25rem;
    color: #c07850;
    margin-bottom: 16px;
}

.overline-dark {
    color: #c07850;
}

/* ---------- Caveat / annotation font ---------- */
.caveat {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 1.25rem;
    color: #7a7468;
    letter-spacing: 0.01em;
}

.caveat-dark {
    color: #f0ebe0;
    opacity: 0.7;
}

.signature {
    display: inline-block;
    margin-top: 32px;
    font-size: 1.5rem;
}

/* ---------- Full-band section inner ---------- */
.full-band-inner {
    max-width: 1000px;
}

/* ---------- Dividers ---------- */
.divider-line {
    width: 100%;
    height: 1px;
    background: #c07850;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-bottom: 16px;
}

.divider-line.drawn {
    transform: scaleX(1);
}

.divider-content {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 1rem;
    color: #7a7468;
}

.divider-quote {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 1.0625rem;
    color: #2c2c2c;
    letter-spacing: 0.02em;
}

.divider-label {
    font-family: 'Roboto Slab', serif;
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: #7a7468;
}

.divider-date {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 0.9375rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a7468;
}

.dots {
    color: #b8b0a0;
    letter-spacing: 0.2em;
    font-family: 'Source Sans 3', sans-serif;
}

/* ---------- Illustrations ---------- */
.illustration {
    max-width: 340px;
    width: 100%;
    padding: 16px;
    position: relative;
}

.line-illus {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 0 rgba(216, 208, 196, 0));
    transition: filter 300ms ease;
}

.line-illus.drawn {
    filter: drop-shadow(2px 2px 0 #d8d0c4);
}

.line-illus path,
.line-illus line,
.line-illus circle,
.line-illus rect,
.line-illus polyline {
    stroke-dasharray: var(--dash, 800);
    stroke-dashoffset: var(--dash, 800);
    transition: stroke-dashoffset 1800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.line-illus.drawn path,
.line-illus.drawn line,
.line-illus.drawn circle,
.line-illus.drawn rect,
.line-illus.drawn polyline {
    stroke-dashoffset: 0;
}

.line-illus circle[fill="#2c2c2c"] {
    stroke-dasharray: 0;
    stroke-dashoffset: 0;
}

figcaption {
    text-align: center;
    margin-top: 16px;
    color: #7a7468;
}

/* ---------- Spec list (dot leaders) ---------- */
.spec-list {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #b8b0a0;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9375rem;
}

.spec-list dt {
    font-weight: 600;
    color: #2c2c2c;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8125rem;
}

.spec-list dd.dots {
    align-self: end;
    padding-bottom: 2px;
    overflow: hidden;
    white-space: nowrap;
}

.spec-list dd.val {
    color: #7a7468;
    font-style: italic;
}

/* ---------- Coda list ---------- */
.coda-list {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.coda-list li {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: baseline;
    padding-bottom: 8px;
    border-bottom: 1px dashed #d8d0c4;
}

.coda-num {
    font-family: 'Roboto Slab', serif;
    font-weight: 400;
    color: #c07850;
    letter-spacing: 0.05em;
}

/* ---------- Reveal / blur-focus animation ---------- */
.reveal {
    filter: blur(6px);
    transform: scale(0.97);
    opacity: 0.6;
    transition:
        filter 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: filter, transform, opacity;
}

.reveal.in-focus {
    filter: blur(0);
    transform: scale(1);
    opacity: 1;
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    z-index: 2;
    padding: 64px 0 48px;
    background: #f4f0e8;
    border-top: 1px solid #b8b0a0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 48px;
    align-items: start;
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}

.footer-title .dot {
    color: #c07850;
}

.footer-sub {
    font-family: 'Caveat', cursive;
    color: #7a7468;
    font-size: 1.125rem;
}

.footer-nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.9375rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-nav a {
    color: #7a7468;
    border-bottom-color: transparent;
}

.footer-nav a:hover {
    color: #2c2c2c;
    border-bottom-color: #c07850;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

@media (max-width: 900px) {
    .footer-meta {
        align-items: flex-start;
    }
}

.footer-year {
    font-family: 'Roboto Slab', serif;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: #7a7468;
    font-size: 0.9375rem;
}

/* ---------- Initial load state (hero fade-in) ---------- */
body.loading .reveal {
    filter: blur(6px);
    opacity: 0;
}

body:not(.loading) #hero .reveal {
    transition-delay: 300ms;
}
