/* archetypic.dev — fairycore × developer, F-pattern discipline
   compliance tokens from DESIGN.md typography parser: (Google Intersection threshold crossed (threshold:
   palette:
     #0a0510 abyssal black (primary bg)
     #3d0c1c deep burgundy (secondary bg)
     #ff2d7b neon rose (accent primary)
     #00e5c7 enchanted cyan (accent secondary)
     #e8e0f0 pale orchid (text primary)
     #c8b8d8 muted lavender (text secondary)
     #f0c040 fae gold (decorative glow, ≤3 per viewport)
     #7a1830 thorn red (border / rule)
*/

:root {
    --bg-abyss: #0a0510;
    --bg-burgundy: #3d0c1c;
    --accent-rose: #ff2d7b;
    --accent-cyan: #00e5c7;
    --text-primary: #e8e0f0;
    --text-secondary: #c8b8d8;
    --fae-gold: #f0c040;
    --thorn-red: #7a1830;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-abyss);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(61, 12, 28, 0.85) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(61, 12, 28, 0.5) 0%, transparent 60%),
        var(--bg-abyss);
    color: var(--text-primary);
    font-family: "Work Sans", "Inter", system-ui, sans-serif;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.75;
    font-weight: 400;
    overflow-x: hidden;
    position: relative;
}

/* Noise overlay — subtle grain */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    z-index: 100;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    mix-blend-mode: screen;
}

/* Custom angular scrollbar */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background:
        repeating-linear-gradient(
            to bottom,
            var(--bg-abyss) 0 10px,
            var(--bg-burgundy) 10px 12px
        );
}
::-webkit-scrollbar-thumb {
    background: var(--accent-rose);
    clip-path: polygon(0 4px, 100% 0, 100% calc(100% - 4px), 0 100%);
    border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--fae-gold);
}

/* Typography */
.display-headline,
.panel-title,
.chamber-title,
.footer-headline {
    font-family: "Righteous", "Work Sans", sans-serif;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
}

code,
.tech-line,
.panel-tag,
.chamber-num,
.section-label,
.hero-label,
.hero-tag,
.corr-key,
.corr-val,
.scroll-index {
    font-family: "Fira Code", "Courier New", monospace;
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

em {
    font-style: italic;
    color: var(--accent-rose);
}

.accent {
    color: var(--accent-rose);
    font-weight: 600;
}

/* Sharp triangular caret before headlines */
.glyph-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 0.45em solid transparent;
    border-bottom: 0.45em solid transparent;
    border-left: 0.7em solid var(--accent-rose);
    margin-right: 0.45em;
    vertical-align: middle;
    transform: translateY(-0.08em);
    filter: drop-shadow(0 0 4px var(--accent-rose))
            drop-shadow(0 0 10px rgba(255, 45, 123, 0.6));
}

.glyph-caret.small {
    border-top: 0.35em solid transparent;
    border-bottom: 0.35em solid transparent;
    border-left: 0.55em solid var(--accent-rose);
    margin-right: 0.3em;
}

/* ============================================================
   HERO — top bar of F, full viewport
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(122, 24, 48, 0.5);
}

.hero-grid {
    display: grid;
    grid-template-columns: 15% 1fr 15%;
    grid-template-areas: "gutter headline sigil";
    min-height: 100vh;
    width: 100%;
    align-items: center;
    gap: 2rem;
    padding: 4rem 0;
}

.hero-gutter {
    grid-area: gutter;
    align-self: start;
    padding-top: 3rem;
    padding-left: 1.5rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.hero-label {
    color: var(--accent-cyan);
    opacity: 0.75;
    letter-spacing: 0.12em;
}

.hero-headline {
    grid-area: headline;
    padding: 0 2rem 0 0;
    max-width: 900px;
}

.hero-kicker {
    display: inline-block;
    font-family: "Fira Code", monospace;
    color: var(--accent-cyan);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
    padding-left: 0.25rem;
    border-left: 2px solid var(--accent-rose);
    padding: 0.35rem 0 0.35rem 0.85rem;
}

.hero-kicker em {
    color: var(--fae-gold);
    font-style: normal;
    font-weight: 600;
}

.display-headline {
    font-size: clamp(3rem, 12vw, 10rem);
    color: var(--text-primary);
    text-shadow:
        0 0 4px rgba(255, 45, 123, 0.3),
        0 0 18px rgba(255, 45, 123, 0.15);
}

.display-headline .glyph-caret {
    border-top: 0.4em solid transparent;
    border-bottom: 0.4em solid transparent;
    border-left: 0.6em solid var(--fae-gold);
    filter: drop-shadow(0 0 8px var(--fae-gold))
            drop-shadow(0 0 22px rgba(240, 192, 64, 0.6));
}

.hero-sub {
    margin-top: 1.8rem;
    max-width: 560px;
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.7;
}

.hero-tag {
    display: inline-block;
    margin-top: 1.8rem;
    padding: 0.45rem 0.9rem;
    font-family: "Fira Code", monospace;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    background: rgba(0, 229, 199, 0.06);
    border: 1px solid rgba(0, 229, 199, 0.35);
    position: relative;
}
.hero-tag::before,
.hero-tag::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid var(--accent-cyan);
}
.hero-tag::before {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}
.hero-tag::after {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

/* Hero sigil wrap — right side, holds main SVG + fireflies */
.hero-sigil-wrap {
    grid-area: sigil;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.main-sigil {
    width: clamp(280px, 32vw, 520px);
    height: auto;
    filter:
        drop-shadow(0 0 4px var(--accent-rose))
        drop-shadow(0 0 12px var(--accent-rose))
        drop-shadow(0 0 30px rgba(255, 45, 123, 0.3));
    animation: sigil-rotate 60s linear infinite, pulse-glow 4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes sigil-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% {
        filter:
            drop-shadow(0 0 4px var(--accent-rose))
            drop-shadow(0 0 12px var(--accent-rose))
            drop-shadow(0 0 20px rgba(255, 45, 123, 0.3));
    }
    50% {
        filter:
            drop-shadow(0 0 6px var(--accent-rose))
            drop-shadow(0 0 18px var(--accent-rose))
            drop-shadow(0 0 40px rgba(255, 45, 123, 0.5));
    }
}

.sigil-stroke {
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* stroke-dasharray draw-on-load — controlled via JS adding .drawn */
.main-sigil .sigil-stroke {
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    transition: stroke-dashoffset 2.5s ease-in-out, fill-opacity 0.8s ease 2.4s;
}
.main-sigil.drawn .sigil-stroke {
    stroke-dashoffset: 0;
}

.pulse-core {
    transform-origin: 200px 200px;
    animation: core-pulse 2.4s ease-in-out infinite;
}
@keyframes core-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.8); opacity: 0.55; }
}

/* Fireflies — ≤6 gold particles drifting upward */
.firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--fae-gold);
    border-radius: 0; /* sharp angles, even for particles */
    opacity: 0.4;
    filter:
        drop-shadow(0 0 3px var(--fae-gold))
        drop-shadow(0 0 8px rgba(240, 192, 64, 0.6));
    pointer-events: none;
}
.firefly.f1 { left: 20%; bottom: -10%; animation: firefly-drift 14s linear infinite; }
.firefly.f2 { left: 55%; bottom: -10%; animation: firefly-drift 18s linear infinite 2s; }
.firefly.f3 { left: 78%; bottom: -10%; animation: firefly-drift 12s linear infinite 5s; }
.firefly.f4 { left: 35%; bottom: -10%; animation: firefly-drift 20s linear infinite 7s; }
.firefly.f5 { left: 88%; bottom: -10%; animation: firefly-drift 16s linear infinite 3s; }
.firefly.f6 { left: 10%; bottom: -10%; animation: firefly-drift 22s linear infinite 9s; }

@keyframes firefly-drift {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% { opacity: 0.5; }
    50% {
        transform: translate(18px, -55vh);
        opacity: 0.6;
    }
    90% { opacity: 0.35; }
    100% {
        transform: translate(-10px, -110vh);
        opacity: 0;
    }
}

/* ============================================================
   SECONDARY SCAN — middle bar of F
   60vw effective width, left-aligned, two skewed panels
   ============================================================ */
.secondary-scan {
    padding: 8rem 0 6rem;
    position: relative;
}

.scan-grid {
    display: grid;
    grid-template-columns: 15% 45% 1fr;
    grid-template-areas: "gutter panels tail";
    gap: 1.5rem;
    align-items: start;
}

.scan-gutter {
    grid-area: gutter;
    padding-left: 1.5rem;
    position: relative;
}

.section-label {
    color: var(--accent-cyan);
    letter-spacing: 0.1em;
    display: inline-block;
    padding-top: 1rem;
    border-top: 1px solid var(--thorn-red);
}

.scan-panels {
    grid-area: panels;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    width: 60vw;
    max-width: 900px;
}

.panel {
    position: relative;
    transform: skewX(-4deg);
    background: rgba(61, 12, 28, 0.55);
    border: 1px solid var(--accent-rose);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 2rem 2.25rem;
    box-shadow:
        inset 0 0 22px rgba(61, 12, 28, 0.4),
        0 0 18px rgba(255, 45, 123, 0.12);
}

.panel-content {
    transform: skewX(4deg);
}

.panel-tag {
    display: inline-block;
    color: var(--fae-gold);
    opacity: 0.85;
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.panel-title {
    font-size: clamp(1.5rem, 2.4vw, 2.3rem);
    color: var(--text-primary);
    margin-bottom: 0.85rem;
}

.panel-body {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
}

.panel-body code {
    color: var(--accent-cyan);
    background: rgba(0, 229, 199, 0.06);
    padding: 0 0.35em;
    font-size: 0.82rem;
}

/* Corner brackets — targeting reticle */
.corner-bracket {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--accent-cyan);
    pointer-events: none;
}
.corner-bracket.corner-tl {
    top: -6px;
    left: -6px;
    border-right: none;
    border-bottom: none;
}
.corner-bracket.corner-br {
    bottom: -6px;
    right: -6px;
    border-left: none;
    border-top: none;
}

/* ============================================================
   DESCENT — F-stem: 40vw left-anchored column
   ============================================================ */
.descent {
    padding: 6rem 0 4rem;
    position: relative;
}

.descent-grid {
    display: grid;
    grid-template-columns: 15% 40% 1fr;
    grid-template-areas: "gutter column tail";
    gap: 2rem;
    align-items: start;
}

.descent-gutter {
    grid-area: gutter;
    position: sticky;
    top: 0;
    align-self: stretch;
    height: 100%;
    min-height: 100%;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18rem;
    position: relative;
}

.sigil-marker {
    width: 46px;
    height: 46px;
    opacity: 0.55;
    filter:
        drop-shadow(0 0 3px var(--accent-cyan))
        drop-shadow(0 0 8px rgba(0, 229, 199, 0.4));
    animation: marker-float 6s ease-in-out infinite;
}
.sigil-marker.sm-2 { animation-delay: 1s; }
.sigil-marker.sm-3 { animation-delay: 2s; filter: drop-shadow(0 0 3px var(--fae-gold)) drop-shadow(0 0 8px rgba(240, 192, 64, 0.35)); }
.sigil-marker.sm-4 { animation-delay: 3s; }

@keyframes marker-float {
    0%, 100% { transform: translateY(0); opacity: 0.55; }
    50% { transform: translateY(-6px); opacity: 0.85; }
}

.neural-path {
    position: absolute;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% - 6rem);
    z-index: -1;
    overflow: visible;
}

.neural-path path {
    filter: drop-shadow(0 0 3px var(--accent-cyan));
    opacity: 0.6;
    stroke-dasharray: 4 6;
    stroke-dashoffset: 0;
    animation: neural-flow 8s linear infinite;
}

@keyframes neural-flow {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -200; }
}

.descent-column {
    grid-area: column;
    display: flex;
    flex-direction: column;
    gap: 120px;
}

.chamber {
    position: relative;
    padding-bottom: 2rem;
}

.chamber-head {
    margin-bottom: 1.75rem;
}

.chamber-num {
    display: block;
    color: var(--accent-cyan);
    opacity: 0.75;
    margin-bottom: 0.6rem;
    letter-spacing: 0.1em;
}

.chamber-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--text-primary);
    line-height: 1;
}

.chamber-body {
    color: var(--text-secondary);
}

.chamber-body p {
    margin-bottom: 1.1rem;
    max-width: 60ch;
}

.chamber-body p:last-child {
    margin-bottom: 0;
}

/* sharp-angle decorative rule between chambers, rotated 12deg */
.chamber-rule {
    display: block;
    margin-top: 2.5rem;
    width: 180px;
    height: 2px;
    background: var(--thorn-red);
    transform: rotate(12deg);
    transform-origin: left center;
    box-shadow: 0 0 4px rgba(122, 24, 48, 0.8);
}

.tech-line {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(10, 5, 16, 0.6);
    border-left: 2px solid var(--accent-rose);
    color: var(--text-primary);
    font-size: 0.88rem;
}
.tech-line .tag {
    color: var(--fae-gold);
}

/* Rune list */
.rune-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.rune-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding-left: 0.25rem;
}

.rune-mark {
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-top: 0.3em solid transparent;
    border-bottom: 0.3em solid transparent;
    border-left: 0.45em solid var(--accent-cyan);
    filter: drop-shadow(0 0 3px var(--accent-cyan));
    transform: translateY(-0.08em);
}

.rune-list code {
    color: var(--accent-cyan);
    font-size: 0.88rem;
    margin-right: 0.3em;
    padding: 0 0.3em;
    background: rgba(0, 229, 199, 0.05);
    border: 1px solid rgba(0, 229, 199, 0.15);
}

/* Quote frame */
.quote-frame {
    position: relative;
    margin-top: 2rem;
    padding: 1.75rem 1.75rem 1.25rem;
    background: rgba(61, 12, 28, 0.4);
    border: 1px solid var(--thorn-red);
}

.quote-frame blockquote {
    font-family: "Righteous", "Work Sans", sans-serif;
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    color: var(--text-primary);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.quote-cite {
    display: block;
    margin-top: 0.85rem;
    color: var(--accent-cyan);
    font-family: "Fira Code", monospace;
    font-size: 0.8rem;
    opacity: 0.8;
}

.quote-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--fae-gold);
    filter: drop-shadow(0 0 3px var(--fae-gold));
}
.quote-corner.tl {
    top: -4px;
    left: -4px;
    border-right: none;
    border-bottom: none;
}
.quote-corner.br {
    bottom: -4px;
    right: -4px;
    border-left: none;
    border-top: none;
}

/* Scroll list — ordered grimoire entries */
.scroll-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    counter-reset: none;
}

.scroll-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 1rem;
    padding: 0.85rem 0 0.85rem 0.4rem;
    border-left: 1px solid var(--thorn-red);
    position: relative;
    transform: skewX(-2deg);
}

.scroll-list li > * {
    transform: skewX(2deg);
}

.scroll-list li::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px;
    width: 6px;
    height: 6px;
    background: var(--accent-rose);
    transform: translateY(-50%) rotate(45deg);
    filter: drop-shadow(0 0 4px var(--accent-rose));
}

.scroll-index {
    color: var(--fae-gold);
    font-size: 1.2rem;
    padding-top: 0.15rem;
    text-align: right;
    opacity: 0.9;
}

.scroll-body h4 {
    font-family: "Righteous", sans-serif;
    font-weight: 400;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.scroll-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 48ch;
    margin: 0;
}

/* Correspondence block */
.correspondence {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.corr-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px dashed rgba(122, 24, 48, 0.6);
}

.corr-key {
    color: var(--fae-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.corr-val {
    color: var(--text-primary);
    font-size: 0.92rem;
}

/* ============================================================
   FOOTER — full width callback to hero
   ============================================================ */
.site-footer {
    margin-top: 6rem;
    padding: 4rem 0 3rem;
    position: relative;
    border-top: 1px solid var(--thorn-red);
    background:
        radial-gradient(ellipse at 80% 100%, rgba(0, 229, 199, 0.06) 0%, transparent 60%),
        var(--bg-abyss);
}

.footer-grid {
    display: grid;
    grid-template-columns: 15% 1fr 25%;
    grid-template-areas: "sigil content tail";
    align-items: center;
    gap: 2rem;
    padding: 0;
}

.footer-sigil-wrap {
    grid-area: sigil;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-sigil {
    width: 120px;
    height: 120px;
    filter:
        drop-shadow(0 0 4px var(--accent-cyan))
        drop-shadow(0 0 14px var(--accent-cyan))
        drop-shadow(0 0 28px rgba(0, 229, 199, 0.3));
    animation: sigil-rotate 80s linear infinite reverse, footer-pulse 5s ease-in-out infinite;
}

@keyframes footer-pulse {
    0%, 100% {
        filter:
            drop-shadow(0 0 4px var(--accent-cyan))
            drop-shadow(0 0 14px var(--accent-cyan))
            drop-shadow(0 0 28px rgba(0, 229, 199, 0.3));
    }
    50% {
        filter:
            drop-shadow(0 0 6px var(--accent-cyan))
            drop-shadow(0 0 20px var(--accent-cyan))
            drop-shadow(0 0 42px rgba(0, 229, 199, 0.45));
    }
}

.footer-content {
    grid-area: content;
}

.footer-headline {
    font-family: "Righteous", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}
.footer-headline .glyph-caret {
    border-left-color: var(--accent-cyan);
    filter:
        drop-shadow(0 0 4px var(--accent-cyan))
        drop-shadow(0 0 10px rgba(0, 229, 199, 0.6));
}

.footer-line {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-family: "Fira Code", monospace;
    letter-spacing: 0.04em;
}
.footer-small {
    font-size: 0.82rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.footer-tail {
    grid-area: tail;
    text-align: right;
    padding-right: 2rem;
    overflow: hidden;
}

.chevron-rule {
    color: var(--thorn-red);
    font-family: "Fira Code", monospace;
    font-size: 1rem;
    letter-spacing: 0.1em;
    transform: rotate(45deg);
    display: inline-block;
    opacity: 0.5;
}

/* ============================================================
   FADE-REVEAL — the sole entrance animation
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Responsive — preserve F-pattern intent at narrow widths
   ============================================================ */
@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 8% 1fr 8%;
        grid-template-rows: auto auto;
        grid-template-areas:
            "gutter headline headline"
            "gutter sigil    sigil";
        padding: 3rem 0;
    }
    .hero-sigil-wrap {
        min-height: 320px;
    }
    .scan-grid {
        grid-template-columns: 8% 1fr 1fr;
        grid-template-areas: "gutter panels panels";
    }
    .scan-panels {
        width: auto;
        grid-template-columns: 1fr;
    }
    .descent-grid {
        grid-template-columns: 12% 1fr 1fr;
        grid-template-areas: "gutter column column";
        gap: 1rem;
    }
    .descent-gutter {
        gap: 10rem;
    }
    .footer-grid {
        grid-template-columns: 15% 1fr;
        grid-template-areas: "sigil content";
    }
    .footer-tail { display: none; }
}

@media (max-width: 560px) {
    .hero-grid {
        grid-template-columns: 6% 1fr 6%;
        padding: 2rem 0;
    }
    .hero-gutter {
        writing-mode: horizontal-tb;
        transform: none;
        padding: 1rem;
    }
    .hero-headline {
        padding: 0 1rem;
    }
    .descent-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "column";
    }
    .descent-gutter { display: none; }
    .descent-column { padding: 0 1rem; gap: 80px; }
    .scan-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "panels";
        padding: 0 1rem;
    }
    .scan-gutter { display: none; }
    .scan-panels { width: auto; }
    .chamber-rule { width: 120px; }
    .footer-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "content";
        padding: 0 1.25rem;
    }
    .footer-sigil-wrap, .footer-tail { display: none; }
}
