/* ==========================================================================
   bada.city — An Atlas of the Sea
   Victorian-ornate · vertical-timeline · gradient palette
   ========================================================================== */

:root {
    --foam:    #F4F1E8;
    --shallow: #7FB8C9;
    --surface: #3A7A99;
    --deep:    #1E4D6B;
    --abyss:   #0A1A2E;
    --abyss-2: #0F1A24;
    --gilt:    #C8A24B;
    --coral:   #B84A3F;
    --ink:     #0F1A24;
    --vellum:  #E8E2CF;

    --font-display: 'Bebas Neue', 'Impact', 'Arial Narrow', sans-serif;
    --font-serif:   'Cormorant Garamond', 'Lora', 'Georgia', serif;
    --font-mono:    'JetBrains Mono', 'Menlo', monospace;

    --ease-ornate: cubic-bezier(0.2, 0.8, 0.2, 1);

    --spine-x: 50%;
    --shadow-card: 0 8px 24px rgba(10, 26, 46, 0.35);
    --shadow-bloom: 0 14px 48px rgba(200, 162, 75, 0.18);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.7;
    color: var(--vellum);
    background: var(--abyss);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.page-gradient {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(
        180deg,
        var(--foam) 0%,
        var(--shallow) 8%,
        var(--surface) 28%,
        var(--deep) 55%,
        var(--abyss) 85%,
        var(--abyss-2) 100%
    );
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image:
        radial-gradient(rgba(15, 26, 36, 0.7) 1px, transparent 1.2px),
        radial-gradient(rgba(232, 226, 207, 0.5) 1px, transparent 1.2px);
    background-size: 3px 3px, 5px 5px;
    background-position: 0 0, 1px 1px;
}

/* ==========================================================================
   MASTHEAD
   ========================================================================== */

.masthead {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(244, 241, 232, 0.55);
    border-bottom: 1px double rgba(15, 26, 36, 0.4);
    transition: background 600ms var(--ease-ornate),
                color 600ms var(--ease-ornate),
                border-color 600ms var(--ease-ornate);
}

.masthead.is-deep {
    background: rgba(10, 26, 46, 0.6);
    border-bottom-color: rgba(200, 162, 75, 0.4);
}

.masthead-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--ink);
    transition: color 600ms var(--ease-ornate);
    font-family: var(--font-display);
    letter-spacing: 0.08em;
}

.masthead.is-deep .brand {
    color: var(--vellum);
}

.brand-mark {
    font-size: 1.4rem;
    letter-spacing: 0.04em;
}

.brand-han {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--gilt);
    letter-spacing: 0;
}

.brand-rule {
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: 0.55;
}

.brand-est {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    opacity: 0.7;
}

.primary-nav {
    display: flex;
    gap: 1.2rem;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.18em;
}

.primary-nav a {
    text-decoration: none;
    padding: 0.3rem 0.5rem;
    border: 1px solid transparent;
    transition: all 240ms var(--ease-ornate);
    color: var(--ink);
}

.masthead.is-deep .primary-nav a {
    color: var(--vellum);
}

.primary-nav a:hover,
.primary-nav a.is-active {
    color: var(--gilt);
    border-color: var(--gilt);
}

/* ==========================================================================
   TIMELINE INDEX (sticky right rail)
   ========================================================================== */

.timeline-index {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    padding: 1rem 0.9rem;
    border: 1px double rgba(232, 226, 207, 0.35);
    background: rgba(10, 26, 46, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.index-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--gilt);
    margin-bottom: 0.6rem;
    text-align: center;
    border-bottom: 1px solid rgba(200, 162, 75, 0.4);
    padding-bottom: 0.4rem;
}

.index-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.index-list a {
    display: grid;
    grid-template-columns: 26px 1fr;
    align-items: center;
    gap: 0.55rem;
    padding: 0.25rem 0.4rem;
    color: var(--vellum);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    border-left: 2px solid transparent;
    transition: all 240ms var(--ease-ornate);
}

.index-list .num {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--gilt);
    letter-spacing: 0.08em;
    text-align: center;
}

.index-list .lbl {
    opacity: 0.85;
}

.index-list a:hover,
.index-list a.is-active {
    border-left-color: var(--gilt);
    color: var(--gilt);
    background: rgba(200, 162, 75, 0.06);
    transform: translateX(-2px);
}

@media (max-width: 900px) {
    .timeline-index {
        display: none;
    }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.atlas {
    position: relative;
    padding-top: 100px;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.hero-frame {
    position: relative;
    max-width: 1100px;
    width: 100%;
    padding: clamp(2rem, 6vw, 5rem);
    border: 1px solid rgba(15, 26, 36, 0.4);
    background:
        linear-gradient(180deg, rgba(244, 241, 232, 0.78), rgba(244, 241, 232, 0.62));
    box-shadow:
        inset 0 0 0 6px rgba(244, 241, 232, 0.5),
        inset 0 0 0 7px rgba(15, 26, 36, 0.4),
        0 30px 60px rgba(15, 26, 36, 0.2);
    text-align: center;
    will-change: transform, opacity;
}

.hero-corner {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--gilt);
}

.hero-corner.tl { top: -8px; left: -8px; border-right: none; border-bottom: none; }
.hero-corner.tr { top: -8px; right: -8px; border-left: none; border-bottom: none; }
.hero-corner.bl { bottom: -8px; left: -8px; border-right: none; border-top: none; }
.hero-corner.br { bottom: -8px; right: -8px; border-left: none; border-top: none; }

.eyebrow {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.32em;
    color: var(--coral);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.6rem;
}

.hero-han {
    font-family: var(--font-serif);
    font-weight: 600;
    font-style: italic;
    font-size: clamp(4.5rem, 12vw, 9rem);
    line-height: 0.95;
    color: var(--ink);
    letter-spacing: 0;
    position: relative;
}

.hero-han::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: var(--gilt);
    margin: 0.6rem auto 0;
}

.hero-roman {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.6rem);
    letter-spacing: 0.12em;
    color: var(--ink);
}

.hero-lede {
    max-width: 36em;
    margin: 0 auto 2.4rem;
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
    line-height: 1.7;
    color: var(--ink);
    font-style: italic;
}

.cta-descend {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.4rem;
    border: 1.5px solid var(--gilt);
    background: rgba(200, 162, 75, 0.08);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-decoration: none;
    overflow: hidden;
    transition: all 360ms var(--ease-ornate);
    cursor: pointer;
}

.cta-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(200, 162, 75, 0.5) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shimmer 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    20% { transform: translateX(100%); }
    21%, 99% { transform: translateX(100%); }
}

.cta-descend:hover {
    background: var(--gilt);
    color: var(--abyss);
    transform: translateY(-2px);
    box-shadow: var(--shadow-bloom);
}

.cta-arrow {
    transition: transform 360ms var(--ease-ornate);
}

.cta-descend:hover .cta-arrow {
    transform: translateY(4px);
}

.hero-meta {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2.4rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(15, 26, 36, 0.25);
    padding-top: 1.4rem;
}

.hero-meta > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink);
    letter-spacing: 0.08em;
}

.hero-meta dt {
    font-size: 0.65rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    opacity: 0.6;
}

.hero-meta dd {
    color: var(--coral);
    font-weight: 500;
}

/* ==========================================================================
   SPINE
   ========================================================================== */

.spine {
    position: absolute;
    top: 100vh;
    left: var(--spine-x);
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% - 100vh);
    pointer-events: none;
    z-index: 1;
}

.spine-line {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 26, 36, 0.3) 0%,
        rgba(232, 226, 207, 0.25) 30%,
        rgba(232, 226, 207, 0.25) 70%,
        rgba(200, 162, 75, 0.4) 100%
    );
}

.spine-progress {
    position: absolute;
    left: -1px;
    top: 0;
    width: 4px;
    height: 0%;
    background: linear-gradient(to bottom, var(--gilt), var(--coral));
    box-shadow: 0 0 12px rgba(200, 162, 75, 0.6);
    transition: height 100ms linear;
}

@media (max-width: 900px) {
    .spine {
        left: 1.5rem;
        transform: none;
    }
}

/* ==========================================================================
   CHAPTERS / CARTOUCHES
   ========================================================================== */

.chapter {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    padding: 8rem 2rem;
}

.cartouche {
    position: relative;
    text-align: center;
    margin-bottom: 4rem;
    z-index: 2;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 600ms var(--ease-ornate),
                transform 600ms var(--ease-ornate);
}

.chapter.in-view .cartouche {
    opacity: 1;
    transform: translateY(0);
}

.cartouche-frame {
    display: inline-block;
    padding: 2rem 3.5rem;
    border: 1.5px solid rgba(232, 226, 207, 0.5);
    background: rgba(10, 26, 46, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow:
        inset 0 0 0 4px rgba(10, 26, 46, 0.45),
        inset 0 0 0 5px rgba(200, 162, 75, 0.25),
        0 16px 36px rgba(10, 26, 46, 0.4);
    position: relative;
    transition: all 800ms var(--ease-ornate);
}

#i-shore .cartouche-frame,
#ii-epipelagic .cartouche-frame {
    background: rgba(244, 241, 232, 0.7);
    border-color: rgba(15, 26, 36, 0.4);
    box-shadow:
        inset 0 0 0 4px rgba(244, 241, 232, 0.5),
        inset 0 0 0 5px rgba(15, 26, 36, 0.3),
        0 16px 36px rgba(15, 26, 36, 0.2);
    color: var(--ink);
}

.cartouche-frame::before,
.cartouche-frame::after {
    content: '◆';
    position: absolute;
    color: var(--gilt);
    font-size: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
}

.cartouche-frame::before { left: 12px; }
.cartouche-frame::after { right: 12px; }

.cartouche-roman {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    color: var(--gilt);
    letter-spacing: 0.32em;
    margin-bottom: 0.4rem;
}

.cartouche-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: inherit;
}

.cartouche-depth {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.24em;
    opacity: 0.8;
    text-transform: uppercase;
}

.diamond-marker {
    position: absolute;
    left: 50%;
    bottom: -3rem;
    transform: translateX(-50%) rotate(45deg);
    width: 18px;
    height: 18px;
    background: rgba(232, 226, 207, 0.2);
    border: 1.5px solid rgba(232, 226, 207, 0.6);
    transition: all 600ms var(--ease-ornate);
}

#i-shore .diamond-marker,
#ii-epipelagic .diamond-marker {
    background: rgba(15, 26, 36, 0.15);
    border-color: rgba(15, 26, 36, 0.5);
}

.chapter.is-active .diamond-marker {
    background: var(--gilt);
    border-color: var(--gilt);
    box-shadow: 0 0 24px rgba(200, 162, 75, 0.7);
    transform: translateX(-50%) rotate(45deg) scale(1.25);
}

@media (max-width: 900px) {
    .diamond-marker {
        left: calc(1.5rem - 9px);
        transform: rotate(45deg);
    }
    .chapter.is-active .diamond-marker {
        transform: rotate(45deg) scale(1.25);
    }
}

/* ==========================================================================
   EPIGRAPHS
   ========================================================================== */

.epigraph {
    max-width: 42rem;
    margin: 0 auto 5rem;
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    line-height: 1.8;
    color: var(--vellum);
    position: relative;
    z-index: 2;
}

#i-shore .epigraph,
#ii-epipelagic .epigraph {
    color: var(--ink);
}

.dropcap {
    float: left;
    font-family: var(--font-display);
    font-style: normal;
    font-size: 4.5rem;
    line-height: 0.85;
    margin: 0.2rem 0.6rem 0 0;
    color: var(--gilt);
    text-shadow: 0 2px 0 rgba(184, 74, 63, 0.3);
}

.chapter.in-view .epigraph {
    animation: epigraph-in 800ms var(--ease-ornate) 200ms both;
}

@keyframes epigraph-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ARTIFACTS (staggered around spine)
   ========================================================================== */

.artifacts {
    position: relative;
    display: grid;
    gap: 5rem;
    z-index: 2;
}

.artifact {
    position: relative;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 540px;
    padding: 1.8rem;
    background: rgba(10, 26, 46, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(232, 226, 207, 0.18);
    box-shadow: var(--shadow-card);
    transition: box-shadow 480ms var(--ease-ornate),
                border-color 480ms var(--ease-ornate),
                transform 480ms var(--ease-ornate);
}

#i-shore .artifact,
#ii-epipelagic .artifact {
    background: rgba(244, 241, 232, 0.78);
    border-color: rgba(15, 26, 36, 0.2);
    color: var(--ink);
}

.artifact.left {
    justify-self: start;
    margin-right: auto;
    padding-right: 3rem;
}

.artifact.right {
    justify-self: end;
    margin-left: auto;
    padding-left: 3rem;
    grid-template-columns: 1fr 200px;
}

.artifact.right figcaption {
    order: -1;
    text-align: right;
}

.artifact.right .ledger {
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .artifact,
    .artifact.right {
        grid-template-columns: 100px 1fr;
        max-width: none;
        margin-left: 3rem !important;
        margin-right: 0 !important;
        padding: 1.4rem;
    }
    .artifact.right figcaption {
        order: 0;
        text-align: left;
    }
    .artifact.right .ledger {
        justify-content: flex-start;
    }
}

.artifact-frame {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 480ms var(--ease-ornate);
    perspective: 800px;
}

@media (max-width: 900px) {
    .artifact-frame {
        width: 96px;
        height: 96px;
    }
}

.artifact-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.5px solid rgba(232, 226, 207, 0.6);
    transition: all 480ms var(--ease-ornate);
}

#i-shore .artifact-frame::before,
#ii-epipelagic .artifact-frame::before {
    border-color: rgba(15, 26, 36, 0.5);
}

.artifact-frame.hex::before {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: rgba(232, 226, 207, 0.04);
}

.artifact-frame.diamond::before {
    transform: rotate(45deg) scale(0.74);
    background: rgba(232, 226, 207, 0.04);
}

.artifact-frame.circle-square::before {
    border-radius: 50%;
    background: rgba(232, 226, 207, 0.04);
}

.artifact-frame.circle-square::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(200, 162, 75, 0.4);
    transition: all 480ms var(--ease-ornate);
}

.iso-icon {
    width: 70%;
    height: 70%;
    color: var(--vellum);
    transition: transform 360ms var(--ease-ornate),
                color 360ms var(--ease-ornate);
    z-index: 2;
    position: relative;
    transform-origin: center;
    transform: rotateX(20deg) rotateZ(0deg);
}

#i-shore .iso-icon,
#ii-epipelagic .iso-icon {
    color: var(--ink);
}

.iso-stroke {
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.iso-stroke text {
    fill: currentColor;
    stroke: none;
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.08em;
}

/* HOVER scale-bloom */
.artifact:hover {
    border-color: var(--gilt);
    box-shadow: var(--shadow-card), var(--shadow-bloom);
    transform: translateY(-3px);
}

.artifact:hover .iso-icon {
    transform: rotateX(20deg) scale(1.08);
    color: var(--gilt);
}

.artifact:hover .artifact-frame::before {
    transform: rotate(4deg);
    border-color: var(--gilt);
}

.artifact:hover .artifact-frame.diamond::before {
    transform: rotate(49deg) scale(0.74);
}

.artifact:hover .artifact-frame.circle-square::after {
    border-color: var(--gilt);
    transform: scale(1.06);
}

.artifact.in-view {
    animation: artifact-rise 700ms var(--ease-ornate) both;
}

@keyframes artifact-rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chapter.in-view .artifact:nth-child(1) { animation-delay: 80ms; }
.chapter.in-view .artifact:nth-child(2) { animation-delay: 160ms; }
.chapter.in-view .artifact:nth-child(3) { animation-delay: 240ms; }

/* CAPTIONS */
figcaption h3 {
    font-family: var(--font-serif);
    font-variant: small-caps;
    font-weight: 600;
    font-size: clamp(1.3rem, 1.8vw, 1.7rem);
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    color: var(--gilt);
    position: relative;
    display: inline-block;
}

figcaption h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: var(--gilt);
    transition: width 360ms var(--ease-ornate);
}

.artifact:hover figcaption h3::after {
    width: 100%;
}

figcaption p {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    opacity: 0.88;
}

.ledger {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-top: 1px solid rgba(232, 226, 207, 0.25);
    padding-top: 0.7rem;
}

#i-shore .ledger,
#ii-epipelagic .ledger {
    border-top-color: rgba(15, 26, 36, 0.25);
}

.ledger dt {
    opacity: 0.55;
}

.ledger dt::after { content: ' · '; opacity: 0.4; }

.ledger dd {
    color: var(--coral);
    margin-right: 0.6rem;
}

#i-shore .ledger dd,
#ii-epipelagic .ledger dd {
    color: var(--coral);
}

/* ==========================================================================
   ARCHIVE / PLATES
   ========================================================================== */

.archive .plates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.plate {
    padding: 1.5rem;
    border: 1px solid rgba(232, 226, 207, 0.35);
    background: rgba(10, 26, 46, 0.55);
    transition: all 480ms var(--ease-ornate);
    position: relative;
}

.plate::before,
.plate::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--gilt);
}

.plate::before { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.plate::after  { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.plate:hover {
    border-color: var(--gilt);
    transform: translateY(-3px);
    box-shadow: var(--shadow-bloom);
}

.plate-svg {
    margin-bottom: 1rem;
    color: var(--vellum);
    transition: color 360ms var(--ease-ornate);
}

.plate:hover .plate-svg {
    color: var(--gilt);
}

.plate-svg svg {
    width: 100%;
    height: auto;
    display: block;
}

.plate-label {
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.15em;
    fill: var(--vellum);
}

.plate-caption {
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.92rem;
    color: var(--vellum);
    opacity: 0.85;
    border-top: 1px solid rgba(200, 162, 75, 0.35);
    padding-top: 0.8rem;
}

/* ==========================================================================
   COLOPHON / FOOTER
   ========================================================================== */

.colophon {
    position: relative;
    z-index: 5;
    padding: 5rem 2rem 3rem;
    color: var(--vellum);
    background: linear-gradient(180deg, transparent, var(--abyss-2));
}

.colophon-rule {
    max-width: 1100px;
    margin: 0 auto 3rem;
    height: 4px;
    border-top: 1px solid var(--gilt);
    border-bottom: 1px solid var(--gilt);
    position: relative;
}

.colophon-rule::before {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--abyss-2);
    color: var(--gilt);
    padding: 0 1rem;
    font-size: 0.8rem;
}

.colophon-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.col-block h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.32em;
    color: var(--gilt);
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(200, 162, 75, 0.35);
    padding-bottom: 0.5rem;
}

.col-block p {
    font-size: 0.92rem;
    line-height: 1.65;
    opacity: 0.85;
}

.col-block .ledger {
    border-top: none;
    padding-top: 0;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
}

.col-block .ledger dt,
.col-block .ledger dd {
    display: inline;
}

kbd {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 0.15rem 0.45rem;
    background: rgba(200, 162, 75, 0.15);
    border: 1px solid rgba(200, 162, 75, 0.5);
    color: var(--gilt);
    border-radius: 2px;
}

.colophon-mark {
    text-align: center;
    margin-top: 3rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.4em;
    color: var(--gilt);
    opacity: 0.7;
}

/* ==========================================================================
   ENTRY / PULSE ANIMATIONS
   ========================================================================== */

.diamond-marker.pulse {
    animation: pulse-once 700ms var(--ease-ornate);
}

@keyframes pulse-once {
    0%   { transform: translateX(-50%) rotate(45deg) scale(1); }
    50%  { transform: translateX(-50%) rotate(45deg) scale(1.4); }
    100% { transform: translateX(-50%) rotate(45deg) scale(1.25); }
}

@media (max-width: 900px) {
    @keyframes pulse-once {
        0%   { transform: rotate(45deg) scale(1); }
        50%  { transform: rotate(45deg) scale(1.4); }
        100% { transform: rotate(45deg) scale(1.25); }
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 700px) {
    .masthead-inner {
        padding: 0.8rem 1rem;
        gap: 1rem;
    }
    .brand-est { display: none; }
    .primary-nav { gap: 0.5rem; font-size: 0.85rem; }
    .chapter { padding: 5rem 1.2rem; }
    .hero-frame { padding: 2rem 1.4rem; }
}
