/* archaic.studio - Design Language Stylesheet */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    /* Colors */
    --burnt-sienna: #C8553D;
    --marble-cream: #F5F0E8;
    --warm-parchment: #EDE5D5;
    --obsidian-umber: #2A2118;
    --aged-gold: #B8943F;
    --quarry-dust: #A8998A;
    --terracotta-blush: #E8A87C;
    --sandstone: #A68B6B;
    --deep-shadow: #3D3229;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
    --font-ui: 'DM Sans', 'Inter', system-ui, sans-serif;

    /* Spacing */
    --section-padding: 120px;
    --content-max-width: 520px;
    --grid-gap: 2vw;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.85;
    color: var(--deep-shadow);
    background-color: var(--marble-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

#scroll-container {
    scroll-snap-type: y proximity;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */
.display-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(56px, 8vw, 96px);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--obsidian-umber);
    margin-bottom: 0.4em;
}

.display-heading--light {
    color: var(--marble-cream);
}

.display-heading .dot {
    color: var(--burnt-sienna);
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.85;
    color: var(--deep-shadow);
    max-width: var(--content-max-width);
}

.body-text--light {
    color: var(--warm-parchment);
}

.section-label {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sandstone);
    display: block;
    margin-bottom: 1.5em;
}

.section-label--light {
    color: var(--quarry-dust);
}

/* ============================================
   Sections - Stacked Strata
   ============================================ */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    padding: var(--section-padding) 5vw;
}

.section--cream {
    background-color: var(--marble-cream);
}

.section--umber {
    background-color: var(--obsidian-umber);
}

.section__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.section--umber .section__canvas {
    mix-blend-mode: screen;
    opacity: 0.3;
}

.section__canvas--particles {
    mix-blend-mode: normal;
    opacity: 1;
}

/* ============================================
   Section Content Layout
   ============================================ */
.section__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section__content--asymmetric {
    align-items: flex-end;
}

.section__content--asymmetric-left {
    align-items: flex-start;
}

.text-block {
    max-width: var(--content-max-width);
}

.text-block--center {
    text-align: center;
    margin: 0 auto;
}

.text-block--center .body-text {
    margin: 0 auto;
}

.text-block--right {
    margin-right: 5vw;
}

.text-block--left {
    margin-left: 5vw;
}

/* Column fluting - subtle vertical lines */
.text-block--left::before,
.text-block--right::after {
    content: '';
    position: absolute;
    top: 15%;
    height: 70%;
    width: 1px;
    background-color: var(--quarry-dust);
    opacity: 0.2;
}

.text-block--left::before {
    left: 3vw;
}

.text-block--right::after {
    right: 3vw;
}

/* ============================================
   Blur-Focus Transition
   ============================================ */
.section__blur-target {
    transition: filter 0.6s ease-out, opacity 0.6s ease-out;
}

.section__blur-target.is-blurred {
    filter: blur(8px);
    opacity: 0.3;
}

.section__blur-target.is-focused {
    filter: blur(0px);
    opacity: 1;
}

/* Staggered blur for children */
.section__blur-target .display-heading {
    transition: filter 0.4s ease-out, opacity 0.4s ease-out;
}

.section__blur-target .body-text {
    transition: filter 0.6s ease-out 0.1s, opacity 0.6s ease-out 0.1s;
}

.section__blur-target .works-grid {
    transition: filter 0.8s ease-out 0.2s, opacity 0.8s ease-out 0.2s;
}

/* ============================================
   Hero Section
   ============================================ */
#hero {
    min-height: 100vh;
}

.hero__text {
    text-align: center;
}

.hero__tagline {
    margin-top: 0.5em;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator__line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--aged-gold));
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   Meander Divider
   ============================================ */
.meander-divider {
    display: flex;
    justify-content: center;
    padding: 0;
    background-color: var(--marble-cream);
    overflow: hidden;
}

.section--umber + .meander-divider {
    background-color: var(--marble-cream);
}

.meander-svg {
    width: 60vw;
    max-width: 600px;
    height: 12px;
    display: block;
}

/* ============================================
   Works Grid
   ============================================ */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    width: 100%;
    max-width: 1000px;
    margin: 3em auto 0;
}

.work-card {
    position: relative;
    background-color: var(--deep-shadow);
    border: 1px solid rgba(184, 148, 63, 0.2);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease;
    aspect-ratio: 1 / 1;
}

.work-card--tall {
    aspect-ratio: 4 / 5;
    grid-row: span 1;
}

.work-card--wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.work-card:hover {
    transform: scale(1.02);
    border-color: var(--aged-gold);
}

.work-card__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.work-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.2em;
    background: linear-gradient(transparent, rgba(42, 33, 24, 0.85));
    z-index: 2;
}

.work-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--marble-cream);
    letter-spacing: -0.02em;
    margin-bottom: 0.15em;
}

.work-card__type {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--quarry-dust);
}

/* Broken pediment clip-path on cards */
.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    background-color: var(--obsidian-umber);
    clip-path: polygon(0 0, 40% 0, 44% 100%, 56% 100%, 60% 0, 100% 0, 100% 100%, 0 100%);
    z-index: 3;
    opacity: 0.6;
}

/* ============================================
   Process Phases
   ============================================ */
.process-phases {
    display: flex;
    gap: 2em;
    margin-top: 2.5em;
    flex-wrap: wrap;
}

.process-phase {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

.process-phase__number {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--burnt-sienna);
}

.process-phase__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    color: var(--obsidian-umber);
    letter-spacing: -0.02em;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-link {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 28px;
    color: var(--terracotta-blush);
    text-decoration: none;
    margin-top: 1.5em;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
    letter-spacing: -0.02em;
}

.contact-link:hover {
    color: var(--burnt-sienna);
    border-bottom-color: var(--burnt-sienna);
}

.colophon {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.colophon__text {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--quarry-dust);
    opacity: 0.6;
}

/* ============================================
   Sigil Navigation
   ============================================ */
.sigil-nav {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 100;
}

.sigil-nav__circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 30%, var(--warm-parchment), var(--quarry-dust) 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
    box-shadow: 0 2px 12px rgba(42, 33, 24, 0.2);
}

.sigil-nav__circle:hover {
    box-shadow: 0 4px 20px rgba(42, 33, 24, 0.35);
}

.sigil-nav__icon {
    width: 32px;
    height: 32px;
    transition: opacity 0.3s ease;
}

.sigil-nav__menu {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 240px;
    height: 240px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sigil-nav.is-open .sigil-nav__menu {
    pointer-events: auto;
    opacity: 1;
}

.sigil-nav.is-open .sigil-nav__circle {
    transform: scale(0.8);
    opacity: 0.6;
}

.sigil-nav__link {
    position: absolute;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--marble-cream);
    text-decoration: none;
    background-color: rgba(42, 33, 24, 0.9);
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
    transform: translate(0, 0) scale(0.8);
}

.sigil-nav.is-open .sigil-nav__link {
    opacity: 1;
    transform: scale(1);
}

.sigil-nav__link:hover {
    background-color: var(--burnt-sienna);
    color: var(--marble-cream);
}

/* Radial positioning for nav links */
.sigil-nav__link[data-target='0'] {
    bottom: 200px;
    right: 0;
    transition-delay: 0.05s;
}

.sigil-nav__link[data-target='1'] {
    bottom: 168px;
    right: 60px;
    transition-delay: 0.1s;
}

.sigil-nav__link[data-target='2'] {
    bottom: 136px;
    right: 10px;
    transition-delay: 0.15s;
}

.sigil-nav__link[data-target='3'] {
    bottom: 104px;
    right: 55px;
    transition-delay: 0.2s;
}

.sigil-nav__link[data-target='4'] {
    bottom: 72px;
    right: 5px;
    transition-delay: 0.25s;
}

.sigil-nav__link[data-target='5'] {
    bottom: 40px;
    right: 65px;
    transition-delay: 0.3s;
}

.sigil-nav.is-open .sigil-nav__link[data-target='0'] { transform: translate(-20px, 0) scale(1); }
.sigil-nav.is-open .sigil-nav__link[data-target='1'] { transform: translate(-10px, 0) scale(1); }
.sigil-nav.is-open .sigil-nav__link[data-target='2'] { transform: translate(-25px, 0) scale(1); }
.sigil-nav.is-open .sigil-nav__link[data-target='3'] { transform: translate(-5px, 0) scale(1); }
.sigil-nav.is-open .sigil-nav__link[data-target='4'] { transform: translate(-30px, 0) scale(1); }
.sigil-nav.is-open .sigil-nav__link[data-target='5'] { transform: translate(-10px, 0) scale(1); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .display-heading {
        font-size: clamp(36px, 10vw, 56px);
    }

    .section {
        padding: 80px 6vw;
    }

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

    .work-card--wide {
        grid-column: span 2;
    }

    .text-block--right {
        margin-right: 0;
    }

    .text-block--left {
        margin-left: 0;
    }

    .section__content--asymmetric,
    .section__content--asymmetric-left {
        align-items: center;
    }

    .process-phases {
        gap: 1.5em;
    }

    .sigil-nav {
        bottom: 20px;
        right: 20px;
    }

    .contact-link {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .works-grid {
        grid-template-columns: 1fr;
    }

    .work-card--wide {
        grid-column: span 1;
        aspect-ratio: 3 / 2;
    }

    .process-phases {
        flex-direction: column;
        gap: 1em;
    }
}

/* ============================================
   Selection Styling
   ============================================ */
::selection {
    background-color: var(--terracotta-blush);
    color: var(--obsidian-umber);
}
