/* ===========================================
   showa.boo - Corporate Circuit Archive
   Palette (Triadic):
     Warm White #FFF8F0 - background
     Deep Navy  #1A2040 - headings
     Steel Gray #5A5A6A - body text
     Crimson    #C83030 - primary accent
     Cobalt     #3050C8 - secondary accent
     Amber      #C8A030 - tertiary accent
   Fonts: Playfair Display 700, Inter 400/500
   =========================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: #5A5A6A;
    background-color: #FFF8F0;
    overflow-x: hidden;
    position: relative;
}

/* ---- Circuit Background ---- */
#circuit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.07;
}

#circuit-svg {
    width: 100%;
    height: 100%;
}

.circuit-trace {
    fill: none;
    stroke: #3050C8;
    stroke-width: 1;
}

.circuit-node {
    fill: #C83030;
}

.circuit-pad {
    fill: #C8A030;
}

/* ---- Header ---- */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 248, 240, 0.95);
    border-bottom: 1px solid rgba(26, 32, 64, 0.08);
    backdrop-filter: blur(8px);
}

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

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #1A2040;
    letter-spacing: -0.02em;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #5A5A6A;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    background-image: linear-gradient(#C83030, #C83030);
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 0.4s ease, color 0.3s ease;
}

.nav-link:hover {
    color: #1A2040;
    background-size: 100% 2px;
}

/* ---- Z-Pattern Sections ---- */
.z-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
}

.z-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Z-pattern alternation */
.z-left .z-section-inner {
    direction: ltr;
}

.z-right .z-section-inner {
    direction: rtl;
}

.z-right .z-section-inner > * {
    direction: ltr;
}

/* First section offset for header */
#hero {
    padding-top: 10rem;
}

/* ---- Typography ---- */
.section-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #C83030;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 4rem);
    color: #1A2040;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    color: #1A2040;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #5A5A6A;
    max-width: 480px;
    margin-bottom: 2rem;
}

.section-body {
    font-size: 1rem;
    color: #5A5A6A;
    max-width: 480px;
    margin-bottom: 1.5rem;
}

/* Accent colors for text spans */
.accent-crimson { color: #C83030; }
.accent-cobalt { color: #3050C8; }
.accent-amber { color: #C8A030; }
.accent-crimson-text { color: #C83030; }
.accent-cobalt-text { color: #3050C8; }
.accent-amber-text { color: #C8A030; }

/* ---- Underline-draw links ---- */
.underline-draw {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #3050C8;
    text-decoration: none;
    background-image: linear-gradient(#3050C8, #3050C8);
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 0.4s ease;
    padding-bottom: 2px;
}

.underline-draw:hover {
    background-size: 100% 2px;
}

.text-link {
    display: inline-block;
    margin-top: 0.5rem;
}

/* ---- CTA Buttons ---- */
.hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-primary {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #FFF8F0;
    background-color: #C83030;
    text-decoration: none;
    padding: 0.75rem 1.75rem;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.cta-primary:hover {
    background-color: #1A2040;
}

.cta-secondary {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1A2040;
    text-decoration: none;
    padding: 0.75rem 1.75rem;
    border: 1px solid #1A2040;
    border-radius: 2px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-secondary:hover {
    background-color: #1A2040;
    color: #FFF8F0;
}

/* ---- Duotone Frame ---- */
.duotone-frame {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(26, 32, 64, 0.1);
}

.duotone-image {
    display: block;
    filter: grayscale(1) sepia(0.4);
    transition: filter 0.6s ease;
}

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

.duotone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(200, 48, 48, 0.15), rgba(48, 80, 200, 0.15));
    mix-blend-mode: multiply;
    pointer-events: none;
}

.duotone-frame:hover .duotone-image {
    filter: grayscale(0.5) sepia(0.2);
}

/* ---- Archive Grid ---- */
.archive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.archive-card {
    position: relative;
    background: #FFF8F0;
    border: 1px solid rgba(26, 32, 64, 0.1);
    padding: 1.75rem;
    border-radius: 2px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.archive-card:hover {
    border-color: rgba(200, 48, 48, 0.3);
    box-shadow: 0 4px 20px rgba(26, 32, 64, 0.06);
}

/* Circuit corner decorations on cards */
.card-circuit-corner {
    position: absolute;
    width: 20px;
    height: 20px;
}

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

.card-corner-br {
    bottom: 0;
    right: 0;
    border-bottom: 1px solid #3050C8;
    border-right: 1px solid #3050C8;
}

.card-number {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: #C8A030;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.75rem;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1A2040;
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.85rem;
    color: #5A5A6A;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.card-tag {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ---- Timeline ---- */
.timeline {
    position: relative;
    padding: 1rem 0 1rem 2.5rem;
}

.timeline-track {
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, #C83030, #3050C8, #C8A030);
}

.timeline-node {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-node:last-child {
    margin-bottom: 0;
}

.node-dot {
    position: absolute;
    left: -2.25rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #C83030;
    border: 2px solid #FFF8F0;
    box-shadow: 0 0 0 1px #C83030;
    z-index: 2;
}

.timeline-node:nth-child(odd) .node-dot {
    background: #3050C8;
    box-shadow: 0 0 0 1px #3050C8;
}

.timeline-node:nth-child(3n) .node-dot {
    background: #C8A030;
    box-shadow: 0 0 0 1px #C8A030;
}

.node-content {
    padding-left: 0.5rem;
}

.node-year {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #1A2040;
    display: block;
    margin-bottom: 0.15rem;
}

.node-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #C83030;
    display: block;
    margin-bottom: 0.4rem;
}

.node-desc {
    font-size: 0.875rem;
    color: #5A5A6A;
    line-height: 1.6;
    max-width: 360px;
}

/* ---- Registry Board ---- */
.registry-board {
    background: #1A2040;
    border-radius: 4px;
    padding: 0.5rem;
    overflow: hidden;
}

.registry-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    align-items: center;
    border-bottom: 1px solid rgba(255, 248, 240, 0.06);
    transition: background 0.3s ease;
}

.registry-row:last-child {
    border-bottom: none;
}

.registry-row:hover {
    background: rgba(255, 248, 240, 0.04);
}

.reg-id {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #C8A030;
    letter-spacing: 0.05em;
}

.reg-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #FFF8F0;
    opacity: 0.9;
}

.reg-status {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
}

.status-catalogued {
    color: #3050C8;
    background: rgba(48, 80, 200, 0.15);
}

.status-archived {
    color: #C8A030;
    background: rgba(200, 160, 48, 0.15);
}

.status-verified {
    color: #C83030;
    background: rgba(200, 48, 48, 0.15);
}

/* ---- Registry Stats ---- */
.registry-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.1;
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #5A5A6A;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* ---- About Circuit Diagram ---- */
.about-circuit-diagram {
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(26, 32, 64, 0.1);
}

.about-circuit-diagram svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- Footer ---- */
#site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(26, 32, 64, 0.08);
    padding: 3rem 2rem;
    margin-top: 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1A2040;
}

.footer-tagline {
    font-size: 0.8rem;
    color: #5A5A6A;
    margin-top: 0.25rem;
}

.footer-right {
    text-align: right;
}

.footer-copy {
    font-size: 0.8rem;
    color: #5A5A6A;
}

.footer-circuit-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, #C83030, #3050C8, #C8A030);
    margin-top: 0.75rem;
    margin-left: auto;
}

/* ---- Section Alternating Borders (Circuit Motif) ---- */
.z-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 1200px;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        rgba(26, 32, 64, 0.08) 0px,
        rgba(26, 32, 64, 0.08) 20px,
        transparent 20px,
        transparent 24px
    );
}

#hero::before {
    display: none;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .z-section-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .z-right .z-section-inner {
        direction: ltr;
    }

    .header-nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }

    .registry-row {
        grid-template-columns: 60px 1fr auto;
        gap: 0.5rem;
        padding: 0.65rem 0.75rem;
    }

    .reg-id {
        font-size: 0.65rem;
    }

    .reg-title {
        font-size: 0.8rem;
    }

    .registry-stats {
        gap: 1.5rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-right {
        text-align: center;
    }

    .footer-circuit-line {
        margin: 0.75rem auto 0;
    }

    .z-section {
        padding: 4rem 1.5rem;
    }

    #hero {
        padding-top: 7rem;
    }
}

@media (max-width: 480px) {
    .header-inner {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta-group {
        flex-direction: column;
    }

    .cta-primary,
    .cta-secondary {
        text-align: center;
    }

    .registry-row {
        grid-template-columns: 1fr auto;
    }

    .reg-id {
        display: none;
    }
}
