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

/* === SCAN-LINE OVERLAY === */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(212,169,76,0.02) 2px, rgba(212,169,76,0.02) 4px);
}

/* === BASE === */
body {
    background: #0f0a0c;
    color: #e8d5a3;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.85;
    letter-spacing: 0.015em;
    overflow-x: hidden;
}

/* === PROGRESS DIAL === */
#progress-dial {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    z-index: 1000;
}

#progress-dial svg {
    display: block;
}

.dial-bg {
    fill: none;
    stroke: #4a0e1b;
    stroke-width: 1.5;
}

.dial-progress {
    fill: none;
    stroke: #c41e3a;
    stroke-width: 2;
    stroke-dasharray: 125.66;
    stroke-dashoffset: 125.66;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 0.1s linear;
}

.tick {
    stroke: #d4a94c;
    stroke-width: 0.75;
}

#dial-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    color: #d4a94c;
    letter-spacing: 0.05em;
}

/* === THRESHOLD === */
#threshold {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #0f0a0c 0%, #1a0d12 100%);
}

.arch {
    position: relative;
    width: clamp(280px, 50vw, 500px);
    height: clamp(350px, 60vh, 550px);
    clip-path: polygon(50% 5%, 95% 35%, 95% 100%, 5% 100%, 5% 35%);
    background: #4a0e1b;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d4a94c;
}

.arch::before {
    content: '';
    position: absolute;
    inset: 2px;
    clip-path: polygon(50% 5%, 95% 35%, 95% 100%, 5% 100%, 5% 35%);
    border: 1px solid #d4a94c;
    pointer-events: none;
}

.arch-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.keystone {
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.4; transform: scale(1); }
}

.site-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(4rem, 12vw, 9rem);
    letter-spacing: 0.35em;
    line-height: 1.0;
    color: #f0ebe3;
    text-transform: uppercase;
}

.gold-rule {
    width: 60%;
    border: none;
    height: 1px;
    background: #d4a94c;
}

.site-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #e8d5a3;
    letter-spacing: 0.1em;
}

.chevron-down {
    position: absolute;
    bottom: 2rem;
    font-size: 1.5rem;
    color: #d4a94c;
    transform: rotate(90deg);
    animation: blink 1.2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* === DECO BORDERS === */
.deco-border {
    width: 100%;
    height: 12px;
    background: repeating-linear-gradient(90deg, #d4a94c 0px, #d4a94c 6px, transparent 6px, transparent 12px, #d4a94c 12px, #d4a94c 14px, transparent 14px, transparent 24px);
    opacity: 0.6;
}

.deco-border.zigzag {
    background: repeating-linear-gradient(135deg, transparent 0px, transparent 5px, #d4a94c 5px, #d4a94c 6px, transparent 6px, transparent 11px, #d4a94c 11px, #d4a94c 12px);
}

.deco-border.dot-dash {
    height: 8px;
    background: repeating-linear-gradient(90deg, transparent 0px, transparent 4px, #d4a94c 4px, #d4a94c 8px, transparent 8px, transparent 12px, #d4a94c 12px, #d4a94c 16px, transparent 16px, transparent 24px);
}

/* === STRATA === */
.stratum {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(4rem, 8vh, 8rem) 1rem;
}

.stratum-content {
    width: clamp(360px, 60vw, 780px);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* === GLYPHS === */
.glyph-container {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.memorial-glyph path,
.memorial-glyph line,
.memorial-glyph circle {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.2s ease-out;
}

.stratum.visible .memorial-glyph path,
.stratum.visible .memorial-glyph line,
.stratum.visible .memorial-glyph circle {
    stroke-dashoffset: 0;
}

/* === HEADINGS === */
.stratum-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 8rem);
    letter-spacing: 0.25em;
    line-height: 1.0;
    text-transform: uppercase;
    color: #f0ebe3;
    text-align: center;
    position: relative;
}

.final-heading {
    font-size: clamp(4rem, 12vw, 10rem);
}

/* === DATA BAR === */
.data-bar {
    display: block;
    width: 0%;
    height: 4px;
    background: #d4a94c;
    margin-top: 0.5rem;
    transition: width 0.8s ease-out;
}

.stratum.visible .data-bar {
    width: 100%;
}

/* === BRACKETED TEXT === */
.bracketed-text {
    position: relative;
    padding: 2rem;
    max-width: 100%;
}

.corner-bracket {
    position: absolute;
    width: 16px;
    height: 16px;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.corner-bracket.tl {
    top: 0; left: 0;
    border-top: 1px solid #d4a94c;
    border-left: 1px solid #d4a94c;
}

.corner-bracket.tr {
    top: 0; right: 0;
    border-top: 1px solid #d4a94c;
    border-right: 1px solid #d4a94c;
}

.corner-bracket.bl {
    bottom: 0; left: 0;
    border-bottom: 1px solid #d4a94c;
    border-left: 1px solid #d4a94c;
}

.corner-bracket.br {
    bottom: 0; right: 0;
    border-bottom: 1px solid #d4a94c;
    border-right: 1px solid #d4a94c;
}

.bracketed-text:hover .corner-bracket.tl { transform: translate(4px, 4px); }
.bracketed-text:hover .corner-bracket.tr { transform: translate(-4px, 4px); }
.bracketed-text:hover .corner-bracket.bl { transform: translate(4px, -4px); }
.bracketed-text:hover .corner-bracket.br { transform: translate(-4px, -4px); }

/* === BODY TEXT === */
.body-text {
    color: #e8d5a3;
    margin-bottom: 1.2rem;
}

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

/* === METADATA === */
.metadata {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8892;
}

.inline-meta {
    display: block;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #4a0e1b;
}

/* === PULL QUOTES === */
.pull-quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: #f0ebe3;
    padding: 1.5rem 0;
    border-top: 1px solid #4a0e1b;
    border-bottom: 1px solid #4a0e1b;
    text-align: center;
    margin: 1.5rem 0;
}

/* === BROADCAST ANIMATION === */
.broadcast-animation {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.wave {
    animation: wave-expand 3s infinite;
    opacity: 0;
}

.wave-1 { animation-delay: 0s; }
.wave-2 { animation-delay: 1s; }
.wave-3 { animation-delay: 2s; }

@keyframes wave-expand {
    0% { opacity: 0.8; transform: scale(0.8); }
    100% { opacity: 0; transform: scale(1.3); }
}

/* === BEGIN SECTION === */
.stratum-final {
    gap: 3rem;
}

.begin-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
}

.form-input-wrapper {
    position: relative;
    width: 100%;
    padding: 4px;
}

.memorial-input {
    width: 100%;
    background: #1a0d12;
    border: 1px solid #4a0e1b;
    padding: 1rem 1.2rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: #e8d5a3;
    letter-spacing: 0.02em;
    outline: none;
}

.memorial-input::placeholder {
    color: #6b1d2e;
}

.form-button {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    color: #d4a94c;
    border: 1px solid #d4a94c;
    padding: 0.8rem 2.5rem;
    cursor: pointer;
    position: relative;
    transition: background 0.3s, color 0.3s;
}

.form-button:hover {
    background: #d4a94c;
    color: #0f0a0c;
}

/* === INTERACTIVE PING === */
.ping-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid #d4a94c;
    pointer-events: none;
    animation: ping-out 0.35s ease-out forwards;
}

@keyframes ping-out {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

/* === CLICK RIPPLE === */
.ripple-burst {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
}

.ripple-line {
    position: absolute;
    width: 20px;
    height: 1px;
    background: #d4a94c;
    top: 50%;
    left: 50%;
    transform-origin: 0 50%;
    animation: burst-out 0.3s ease-out forwards;
}

@keyframes burst-out {
    0% { transform: rotate(var(--angle)) scaleX(0); opacity: 1; }
    100% { transform: rotate(var(--angle)) scaleX(1) translateX(15px); opacity: 0; }
}
