/* gunsul.studio - Blueprint Construction Aesthetic */
/* Colors: #f4f0e8 (Aged Cream), #faf8f2 (Warm White), #1a264e (Blueprint Indigo), 
   #3a5a8c (Faded Indigo), #d4652a (Construction Orange), #0e1629 (Deep Navy),
   #b8453a (Pencil Red), #ede9df (Tracing Paper) */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #f4f0e8;
    color: #1a264e;
    font-family: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   PLANE 0: Blueprint Background
   ======================================== */

#blueprint-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#blueprint-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fold-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 0;
    border-top: 1px solid rgba(26, 38, 78, 0.06);
    box-shadow: 0 1px 0 rgba(26, 38, 78, 0.03);
}

/* Isometric Icons */
.iso-icon {
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.iso-icon.visible {
    opacity: 0.35;
}

.iso-icon-1 {
    width: 100px;
    height: 100px;
    top: 15vh;
    left: 8vw;
}

.iso-icon-2 {
    width: 80px;
    height: 80px;
    top: 25vh;
    right: 12vw;
}

.iso-icon-3 {
    width: 90px;
    height: 90px;
    top: 55vh;
    left: 75vw;
}

.iso-icon-4 {
    width: 110px;
    height: 110px;
    top: 40vh;
    left: 3vw;
}

.iso-icon-5 {
    width: 70px;
    height: 70px;
    top: 70vh;
    left: 20vw;
}

.iso-icon-6 {
    width: 95px;
    height: 95px;
    top: 80vh;
    right: 8vw;
}

/* ========================================
   WAVE FORMS
   ======================================== */

.wave-form {
    position: fixed;
    left: 0;
    width: 100vw;
    height: 60px;
    z-index: 1;
    pointer-events: none;
}

#wave-1 {
    top: 78vh;
}

#wave-2 {
    top: 50vh;
}

#wave-3 {
    top: 30vh;
}

.wave-path {
    animation: wave-drift 20s linear infinite;
}

.wave-form-2 .wave-path {
    animation: wave-drift-reverse 25s linear infinite;
}

.wave-form-3 .wave-path {
    animation: wave-drift 30s linear infinite;
}

@keyframes wave-drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-360px); }
}

@keyframes wave-drift-reverse {
    0% { transform: translateX(0); }
    100% { transform: translateX(270px); }
}

/* ========================================
   SCROLL PROGRESS
   ======================================== */

#scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    width: 3px;
    height: 0%;
    background-color: #d4652a;
    z-index: 1000;
    transition: height 0.1s linear;
}

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

.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

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

.hero-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: #1a264e;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.8vw, 0.78rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #3a5a8c;
}

/* Registration Marks */
.reg-mark {
    position: absolute;
    width: 24px;
    height: 24px;
    z-index: 3;
}

.reg-mark-tl {
    top: 48px;
    left: 48px;
}

.reg-mark-tr {
    top: 48px;
    right: 48px;
}

.reg-mark-bl {
    bottom: 48px;
    left: 48px;
}

.reg-mark.pulse {
    animation: reg-pulse 600ms ease-in-out;
}

@keyframes reg-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ========================================
   CONTENT SECTIONS (PLANE 1)
   ======================================== */

.content-section {
    position: relative;
    z-index: 5;
    padding: 0 24px;
    margin-bottom: 128px;
}

.content-section[data-section="01"] {
    margin-top: 0;
}

/* Content Cards */
.content-card {
    background-color: #faf8f2;
    border: 1px solid rgba(58, 90, 140, 0.3);
    padding: 48px;
    position: relative;
    box-shadow: 0 4px 24px rgba(26, 38, 62, 0.12);
    backdrop-filter: blur(1px);
    border-radius: 0;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.content-card.revealed {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(26, 38, 62, 0.18);
    border-color: #1a264e;
}

/* Grid System */
.card-span-4 {
    max-width: calc((4 / 12) * 100% - 48px);
    width: 100%;
}

.card-span-5 {
    max-width: calc((5 / 12) * 100% - 48px);
    width: 100%;
}

.card-span-6 {
    max-width: calc((6 / 12) * 100% - 48px);
    width: 100%;
}

.card-span-8 {
    max-width: calc((8 / 12) * 100% - 48px);
    width: 100%;
}

.card-offset-1 {
    margin-left: calc((1 / 12) * 100%);
}

.card-offset-2 {
    margin-left: calc((2 / 12) * 100%);
}

.card-offset-4 {
    margin-left: calc((4 / 12) * 100%);
}

.card-offset-5 {
    margin-left: calc((5 / 12) * 100%);
}

/* Card Animation Directions */
[data-reveal="left"] .content-card {
    transform: translateX(-60px);
}

[data-reveal="left"] .content-card.revealed {
    transform: translateX(0);
}

[data-reveal="right"] .content-card {
    transform: translateX(60px);
}

[data-reveal="right"] .content-card.revealed {
    transform: translateX(0);
}

[data-reveal="up"] .content-card {
    transform: translateY(60px);
}

[data-reveal="up"] .content-card.revealed {
    transform: translateY(0);
}

/* Card Annotation */
.card-annotation {
    position: absolute;
    top: -16px;
    right: -16px;
}

.callout-circle {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.callout-circle:hover circle {
    fill: #d4652a;
    stroke: #d4652a;
}

.callout-circle:hover text {
    fill: #faf8f2;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h2 {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(1.6rem, 3.2vw, 2.6rem);
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: #1a264e;
    margin-bottom: 1.5rem;
}

h3 {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #1a264e;
    margin-bottom: 0.5rem;
}

.body-text {
    color: #1a264e;
    margin-bottom: 1.5rem;
    max-width: 60ch;
}

.pull-quote {
    border-left: 2px solid #d4652a;
    padding-left: 1.5rem;
    margin: 2rem 0;
}

.pull-quote p {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    line-height: 1.4;
    color: #3a5a8c;
}

/* ========================================
   DIMENSION LINES (PLANE 2)
   ======================================== */

.dimension-line {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
    z-index: 10;
}

.dimension-line.visible {
    opacity: 1;
}

.dimension-line-left {
    left: 0;
    flex-direction: row;
}

.dimension-line-right {
    right: 0;
    flex-direction: row-reverse;
}

.dim-svg {
    width: 120px;
    height: 20px;
    flex-shrink: 0;
}

.dim-label {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.6rem, 0.75vw, 0.72rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #3a5a8c;
    white-space: nowrap;
}

/* Connector Dimensions */
.connector-dimension {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    position: relative;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.connector-dimension.visible {
    opacity: 1;
}

.connector-svg {
    width: 20px;
    height: 96px;
}

.connector-label {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.6rem, 0.75vw, 0.72rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #3a5a8c;
    margin-top: 8px;
}

/* ========================================
   PROCESS PHASES
   ======================================== */

.process-phases {
    display: flex;
    gap: 32px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.phase-number {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: 1.8rem;
    color: #d4652a;
    line-height: 1;
}

.phase-name {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #3a5a8c;
}

/* ========================================
   WORKS GRID
   ======================================== */

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 2rem;
}

.work-item {
    cursor: default;
}

.work-drawing {
    width: 100%;
    aspect-ratio: 4/3;
    border: 1px solid rgba(58, 90, 140, 0.2);
    padding: 16px;
    background-color: #ede9df;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.work-drawing:hover {
    border-color: #d4652a;
    background-color: #f4f0e8;
}

.work-drawing svg {
    width: 100%;
    height: 100%;
}

.work-title {
    margin-bottom: 0.25rem;
}

.work-meta {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.6rem, 0.75vw, 0.72rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #3a5a8c;
}

/* ========================================
   CONTACT
   ======================================== */

.contact-info {
    margin-top: 1rem;
}

.contact-line {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(58, 90, 140, 0.15);
}

.contact-label {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.6rem, 0.75vw, 0.72rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #3a5a8c;
    min-width: 120px;
    flex-shrink: 0;
}

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

.footer-annotation {
    position: relative;
    z-index: 5;
    padding: 64px 48px 48px;
    text-align: center;
}

.footer-line {
    width: 200px;
    height: 1px;
    background-color: rgba(58, 90, 140, 0.3);
    margin: 0 auto 32px;
}

.footer-text {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.6rem, 0.75vw, 0.72rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #3a5a8c;
    margin-bottom: 24px;
}

.footer-marks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-reg-mark {
    width: 20px;
    height: 20px;
}

.footer-stamp {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #b8453a;
}

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

@media (max-width: 1024px) {
    .card-span-4,
    .card-span-5,
    .card-span-6,
    .card-span-8 {
        max-width: calc(100% - 48px);
    }

    .card-offset-1,
    .card-offset-2,
    .card-offset-4,
    .card-offset-5 {
        margin-left: 24px;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dimension-line-left {
        left: 8px;
    }

    .dimension-line-right {
        right: 8px;
    }
}

@media (max-width: 640px) {
    .content-card {
        padding: 32px 24px;
    }

    .card-offset-1,
    .card-offset-2,
    .card-offset-4,
    .card-offset-5 {
        margin-left: 0;
    }

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

    .process-phases {
        gap: 24px;
    }

    .dimension-line {
        display: none;
    }

    .contact-line {
        flex-direction: column;
        gap: 4px;
    }

    .contact-label {
        min-width: unset;
    }

    .iso-icon {
        display: none;
    }
}