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

:root {
    --gold: #c9a84c;
    --cyan: #4ca8c9;
    --cream: #e8e0d0;
    --deep-navy: #1a1b2e;
    --rose: #c94c6a;
    --parchment: #f0e4b8;
    --panel-bg: #252740;
    --void: #0d0f14;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void);
    color: var(--cream);
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
.display-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 300;
    font-style: italic;
    color: var(--cream);
    text-align: center;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.tagline {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--parchment);
    text-align: center;
    opacity: 0.7;
    margin-top: 1.5rem;
}

.section-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(1.4rem, 3.5vw, 2.8rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
}

/* === PANELS === */
.panel {
    padding: 5rem 2rem;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

/* === DECO BORDERS === */
.deco-border {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto;
    width: 80%;
}

.deco-border.top { margin-bottom: 2rem; }
.deco-border.bottom { margin-top: 2rem; }

/* === ZIGZAG DIVIDER === */
.zigzag-divider {
    width: 200px;
    height: 20px;
    margin: 1.5rem auto;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        var(--gold) 10px,
        var(--gold) 11px
    );
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'%3E%3Cpath d='M0,10 L10,0 L20,10 L30,0 L40,10 L50,0 L60,10 L70,0 L80,10 L90,0 L100,10 L110,0 L120,10 L130,0 L140,10 L150,0 L160,10 L170,0 L180,10 L190,0 L200,10 L200,20 L190,10 L180,20 L170,10 L160,20 L150,10 L140,20 L130,10 L120,20 L110,10 L100,20 L90,10 L80,20 L70,10 L60,20 L50,10 L40,20 L30,10 L20,20 L10,10 L0,20 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'%3E%3Cpath d='M0,10 L10,0 L20,10 L30,0 L40,10 L50,0 L60,10 L70,0 L80,10 L90,0 L100,10 L110,0 L120,10 L130,0 L140,10 L150,0 L160,10 L170,0 L180,10 L190,0 L200,10 L200,20 L190,10 L180,20 L170,10 L160,20 L150,10 L140,20 L130,10 L120,20 L110,10 L100,20 L90,10 L80,20 L70,10 L60,20 L50,10 L40,20 L30,10 L20,20 L10,10 L0,20 Z' fill='white'/%3E%3C/svg%3E");
    background: var(--gold);
}

.zigzag-divider.wide {
    width: 400px;
    max-width: 80%;
}

/* === HERO === */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

#orbital-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.keystone-arch {
    width: 300px;
    max-width: 80%;
    margin: 0 auto 1rem;
}

.arch-svg {
    width: 100%;
    height: auto;
}

/* === PANEL HEADER === */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.deco-line {
    flex: 1;
    max-width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}

.deco-line.right {
    background: linear-gradient(90deg, var(--gold), transparent);
}

/* === TRADE ROUTES GRID === */
.console-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.route-card {
    background: var(--panel-bg);
    border: 1px solid rgba(201, 168, 76, 0.3);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.route-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--gold);
    transition: left 0.4s, right 0.4s;
}

.route-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.1);
}

.route-card:hover::before {
    left: 0;
    right: 0;
}

.gauge {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Poiret One', cursive;
    font-size: 1.4rem;
    color: var(--cream);
}

.route-name {
    font-family: 'Poiret One', cursive;
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.route-detail {
    font-size: 0.8rem;
    color: var(--parchment);
    opacity: 0.7;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.route-status {
    display: inline-block;
    padding: 0.3rem 1rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid;
}

.route-status.active {
    color: var(--cyan);
    border-color: var(--cyan);
}

.route-status.pending {
    color: var(--rose);
    border-color: var(--rose);
}

/* === REGISTRY TABLE === */
.registry-table {
    width: 100%;
    overflow-x: auto;
}

.registry-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.2fr 1.5fr 1fr;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    transition: background 0.3s ease;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.registry-row.header {
    font-family: 'Poiret One', cursive;
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(201, 168, 76, 0.4);
}

.registry-row:not(.header):hover {
    background: rgba(201, 168, 76, 0.05);
}

.registry-row span {
    padding: 0.25rem 0;
}

/* === CHARTER === */
.charter-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.charter-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-style: italic;
    font-weight: 300;
    color: var(--parchment);
    line-height: 1.8;
    margin-bottom: 2rem;
    padding: 0 1rem;
    border-left: 2px solid var(--gold);
    text-align: left;
}

.charter-body {
    font-size: 0.95rem;
    color: var(--cream);
    opacity: 0.8;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.charter-seal {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    animation: rotate-slow 60s linear infinite;
}

.seal-svg {
    width: 100%;
    height: 100%;
}

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

/* === TERMINUS === */
#terminus {
    text-align: center;
    padding-bottom: 4rem;
}

.terminus-text {
    font-family: 'Poiret One', cursive;
    font-size: 1rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    margin-top: 2rem;
}

.terminus-sub {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--cream);
    opacity: 0.5;
    margin-top: 0.5rem;
}

/* === ANIMATIONS === */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    opacity: 0;
    animation: fade-in-up 1s ease forwards;
}

#hero { animation-delay: 0s; }
#trade-routes { animation-delay: 0.2s; }
#registry { animation-delay: 0.4s; }
#charter { animation-delay: 0.6s; }
#terminus { animation-delay: 0.8s; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .panel { padding: 3rem 1rem; }
    .console-grid { grid-template-columns: 1fr; padding: 0; }
    .registry-row { grid-template-columns: 1fr 1fr; gap: 0.5rem; font-size: 0.75rem; }
    .registry-row.header .col-cargo,
    .registry-row.header .col-eta,
    .registry-row .col-cargo,
    .registry-row .col-eta { display: none; }
    .registry-row { grid-template-columns: 1fr 1.5fr 1.5fr; }
}
