:root {
    --bg-primary: #1a1510;
    --bg-secondary: #2a2218;
    --text-primary: #d4c8b0;
    --text-secondary: #8c8474;
    --accent-warm: #c47b3f;
    --accent-cool: #3a8f8f;
    --accent-bright: #e8854a;
    --border-patina: #4a6b5a;
}

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

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(42, 34, 24, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(42, 34, 24, 0.4) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect x='0' y='0' width='1' height='1' fill='rgba(212,200,176,0.03)'/%3E%3Crect x='2' y='3' width='1' height='1' fill='rgba(212,200,176,0.02)'/%3E%3Crect x='3' y='1' width='1' height='1' fill='rgba(212,200,176,0.015)'/%3E%3C/svg%3E");
    color: var(--text-primary);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    line-height: 1.85;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

/* Zone 1 - Threshold */
.zone-threshold {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.domain-name-wrapper {
    position: relative;
    padding: 30px;
}

.domain-name-wrapper::before,
.domain-name-wrapper::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-color: var(--accent-warm);
    transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1), height 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.domain-name-wrapper::before {
    top: 0;
    left: 0;
    border-top: 1px solid var(--accent-warm);
    border-left: 1px solid var(--accent-warm);
}

.domain-name-wrapper::after {
    bottom: 0;
    right: 0;
    border-bottom: 1px solid var(--accent-warm);
    border-right: 1px solid var(--accent-warm);
}

.domain-name-wrapper.brackets-visible::before,
.domain-name-wrapper.brackets-visible::after {
    width: 20px;
    height: 20px;
}

.domain-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    white-space: nowrap;
}

.domain-name .letter {
    display: inline-block;
    will-change: transform;
    transition: transform 2.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 2.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.domain-name .letter.scattered {
    opacity: 0;
}

.threshold-line {
    width: 0;
    height: 1px;
    background-color: #8c6d4f;
    margin-top: 40px;
    transition: width 1.8s cubic-bezier(0.22, 1, 0.36, 1) 2.6s;
}

.threshold-line.visible {
    width: 40vw;
}

/* Zone 2 - Contradiction */
.zone-contradiction {
    position: relative;
    min-height: 80vh;
}

.contradiction-text {
    position: absolute;
    left: 8%;
    top: 15%;
    max-width: 28ch;
    font-style: italic;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contradiction-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.spear-shield-glyph {
    position: absolute;
    right: 15%;
    top: 55%;
    width: 120px;
    height: 180px;
    animation: slow-spin 120s linear infinite;
}

.shield {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid var(--accent-cool);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spear {
    position: absolute;
    width: 16px;
    height: 160px;
    border: 1px solid var(--accent-warm);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.glyph-glow {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(232, 133, 74, 0.2);
}

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

/* Zone 3 - Forge */
.zone-forge {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.horizon-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-warm), var(--accent-cool), var(--border-patina), var(--accent-warm));
    background-size: 300% 100%;
    animation: shimmer 12s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.zigzag-border {
    width: 45ch;
    max-width: 90%;
    height: 6px;
    margin-top: 40px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 4px,
        var(--text-secondary) 4px,
        var(--text-secondary) 5px
    );
    opacity: 0.4;
}

.forge-text {
    max-width: 45ch;
    margin-top: 40px;
    text-align: center;
    padding: 0 20px;
}

.forge-text .line {
    display: block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.forge-text .line.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Zone 4 - Tools */
.zone-tools {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-item {
    position: absolute;
    max-width: 200px;
    padding: 20px 24px;
    text-align: center;
    background: var(--bg-secondary);
}

.tool-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, var(--accent-warm) 50%, transparent 50%) top / 8px 1px repeat-x,
        linear-gradient(90deg, var(--accent-warm) 50%, transparent 50%) bottom / 8px 1px repeat-x,
        linear-gradient(0deg, var(--accent-warm) 50%, transparent 50%) left / 1px 8px repeat-y,
        linear-gradient(0deg, var(--accent-warm) 50%, transparent 50%) right / 1px 8px repeat-y;
    animation: dash-flow 8s linear infinite;
}

@keyframes dash-flow {
    from { background-position: 0 0, 0 100%, 0 0, 100% 0; }
    to { background-position: 100px 0, -100px 100%, 0 100px, 100% -100px; }
}

.tool-1 {
    left: 20%;
    top: 20%;
}

.tool-2 {
    left: 55%;
    top: 45%;
}

.tool-3 {
    left: 30%;
    top: 70%;
}

.tool-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-warm);
    margin-bottom: 8px;
}

.tool-desc {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: var(--text-secondary);
}

/* Zone 5 - Mark */
.zone-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20vh;
}

.mark-wrapper {
    position: relative;
    padding: 16px 24px;
}

.mark-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--accent-warm);
    opacity: 0;
    animation: mark-trace 6s ease-in-out infinite;
}

@keyframes mark-trace {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.mark-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Diamond separators */
.ma-spacer {
    position: relative;
}
