/* lunch.day - Surreal Midday Threshold */
/* Colors: #e8c547, #6d4ca2, #0d1117, #1a1f28, #2d333b, #2dd4a8, #c4cdd6, #e8f0e4 */
/* Fonts: Jost 700, Work Sans 400/600, Space Mono 400 */

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

html {
    scroll-behavior: smooth;
    background-color: #0d1117;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    color: #c4cdd6;
    background-color: #0d1117;
    overflow-x: hidden;
    line-height: 1.72;
    letter-spacing: 0.01em;
    font-size: clamp(15px, 1.1vw, 19px);
}

/* ========================================
   Aurora Background Layer
   ======================================== */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #6d4ca2 0%, #2dd4a8 50%, #e8c547 100%);
    background-size: 300% 300%;
    animation: aurora-shift 30s ease infinite;
}

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

/* ========================================
   Sections
   ======================================== */
.section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.section-threshold {
    min-height: 100vh;
}

.section-architecture {
    min-height: 100vh;
}

.section-taxonomy {
    min-height: 120vh;
}

.section-meditation {
    min-height: 100vh;
}

.section-departure {
    min-height: 100vh;
}

.section-divider {
    width: 100%;
    height: 1px;
    background-color: #e8c547;
    opacity: 0.4;
}

/* ========================================
   Section Grids
   ======================================== */
.section-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 0;
    min-height: 100vh;
    padding: 0;
}

/* ========================================
   Modular Blocks
   ======================================== */
.block {
    position: relative;
    z-index: var(--block-z, 1);
    padding: clamp(24px, 3vw, 64px);
    box-shadow: 8px 8px 0 rgba(109, 76, 162, 0.25), 0 2px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    opacity: 0;
    transform: translateX(calc(var(--reveal-direction) * 80px));
    transition: opacity 600ms ease-out, transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--block-index, 0) * 120ms);
    filter: contrast(1.02) brightness(0.98);
}

.block[style*="--reveal-direction:0"] {
    transform: translateY(30px) scale(0.92);
}

.block.revealed {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}

.block-content {
    position: relative;
    z-index: 3;
}

/* ========================================
   Leather Texture
   ======================================== */
.leather-texture {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #1a1f28;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 1px, transparent 1px),
        radial-gradient(circle at 50% 80%, rgba(255,255,255,0.03) 1px, transparent 1px),
        repeating-linear-gradient(67deg, rgba(0,0,0,0.08) 0px, transparent 1px, transparent 3px),
        linear-gradient(to bottom right, rgba(255,255,255,0.04) 0%, transparent 50%);
    background-size: 4px 4px, 4px 4px, 4px 4px, 100% 100%, 100% 100%;
}

/* ========================================
   Aperture Windows
   ======================================== */
.aperture {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, #6d4ca2 0%, #2dd4a8 50%, #e8c547 100%);
    background-size: 300% 300%;
    animation: aurora-shift 30s ease infinite;
    pointer-events: none;
}

.aperture-hero {
    clip-path: inset(35% 30% 40% 30%);
    transition: clip-path 400ms ease-out;
}

.block:hover .aperture-hero {
    clip-path: inset(30% 25% 35% 25%);
}

.aperture-small-h {
    clip-path: inset(40% 20% 45% 20%);
    transition: clip-path 400ms ease-out;
}

.block:hover .aperture-small-h {
    clip-path: inset(37% 17% 42% 17%);
}

.aperture-strip {
    clip-path: inset(48% 5% 48% 5%);
    transition: clip-path 400ms ease-out;
}

.block:hover .aperture-strip {
    clip-path: inset(46% 5% 46% 5%);
}

.aperture-small-sq {
    clip-path: inset(30% 35% 40% 35%);
    transition: clip-path 400ms ease-out;
}

.block:hover .aperture-small-sq {
    clip-path: inset(25% 30% 35% 30%);
}

.aperture-wide {
    clip-path: inset(42% 10% 46% 10%);
    transition: clip-path 400ms ease-out;
}

.block:hover .aperture-wide {
    clip-path: inset(39% 7% 43% 7%);
}

.aperture-med-rect {
    clip-path: inset(25% 30% 50% 30%);
    transition: clip-path 400ms ease-out;
}

.block:hover .aperture-med-rect {
    clip-path: inset(20% 25% 45% 25%);
}

.aperture-departure {
    clip-path: inset(20% 20% 50% 20%);
    transition: clip-path 400ms ease-out;
}

.block:hover .aperture-departure {
    clip-path: inset(15% 15% 45% 15%);
}

/* Aperture glow border */
.aperture::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid #e8c547;
    box-shadow: 0 0 20px rgba(45, 212, 168, 0.3);
    pointer-events: none;
}

/* ========================================
   Typography
   ======================================== */
.domain-name {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 160px);
    letter-spacing: 0.04em;
    line-height: 0.92;
    text-transform: uppercase;
    color: #e8f0e4;
    text-shadow: 4px 4px 0 rgba(109, 76, 162, 0.35);
}

.block-word {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 5vw, 80px);
    letter-spacing: 0.04em;
    line-height: 0.92;
    text-transform: uppercase;
    color: #e8f0e4;
    text-shadow: 4px 4px 0 rgba(109, 76, 162, 0.35);
    margin-bottom: 0.5em;
}

.block-phrase {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    color: #c4cdd6;
    font-size: clamp(15px, 1.1vw, 19px);
    line-height: 1.72;
}

.hero-tagline {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(11px, 0.85vw, 14px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d4ca2;
    opacity: 0.8;
    margin-top: 1.5em;
}

/* Clock */
.clock-container {
    margin: 0.5em 0;
}

.clock {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(48px, 20vw, 240px);
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #6d4ca2, #2dd4a8, #e8c547);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: aurora-shift 30s ease infinite;
    display: inline-block;
}

.clock-small .clock {
    font-size: clamp(24px, 6vw, 80px);
}

/* Taxonomy */
.tax-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(11px, 0.85vw, 14px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d4ca2;
    opacity: 0.8;
    display: block;
    margin-bottom: 0.5em;
}

.tax-name {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 48px);
    letter-spacing: 0.04em;
    line-height: 0.92;
    text-transform: uppercase;
    color: #e8f0e4;
    text-shadow: 4px 4px 0 rgba(109, 76, 162, 0.35);
    margin-bottom: 0.5em;
}

.tax-desc {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    color: #c4cdd6;
    font-size: clamp(13px, 1vw, 17px);
    line-height: 1.72;
}

.tax-content {
    padding-top: 60px;
}

/* Meditation */
.meditation-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    color: #c4cdd6;
    font-size: clamp(16px, 1.3vw, 22px);
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding-top: 200px;
}

.meditation-aside {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    color: #c4cdd6;
    font-size: clamp(14px, 1vw, 18px);
    line-height: 1.72;
    font-style: italic;
}

/* Departure */
.departure-title {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 120px);
    letter-spacing: 0.04em;
    line-height: 0.92;
    text-transform: uppercase;
    color: #e8f0e4;
    text-shadow: 4px 4px 0 rgba(109, 76, 162, 0.35);
    text-align: center;
}

.departure-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    color: #c4cdd6;
    font-size: clamp(15px, 1.1vw, 19px);
    line-height: 1.72;
    text-align: center;
    max-width: 500px;
    margin: 1em auto 0;
}

.departure-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.departure-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(11px, 0.85vw, 14px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8c547;
    opacity: 0.7;
}

/* ========================================
   Geometric Decorations
   ======================================== */
.geo-decor {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    animation: geo-breathe 8s ease-in-out infinite;
}

@keyframes geo-breathe {
    0%, 100% { transform: scale(0.95); opacity: 0.4; }
    50% { transform: scale(1.05); opacity: 0.6; }
}

.geo-category {
    animation: geo-breathe 8s ease-in-out infinite;
}

.geo-circle {
    border: 1.5px solid #2dd4a8;
    border-radius: 50%;
    background: transparent;
}

.geo-triangle {
    border: none;
    background: transparent;
    width: 0;
    height: 0;
    border-left: calc(var(--tri-size, 18px)) solid transparent;
    border-right: calc(var(--tri-size, 18px)) solid transparent;
    border-bottom: calc(var(--tri-size, 18px) * 1.732) solid transparent;
    position: absolute;
}

.geo-triangle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 28px solid #2dd4a8;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    opacity: 0;
}

.geo-square {
    border: 1.5px solid #e8c547;
    background: transparent;
}

.geo-hex {
    background: transparent;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border: none;
    position: absolute;
}

.geo-hex::before {
    content: '';
    position: absolute;
    inset: 1.5px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: #1a1f28;
}

.geo-hex::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #2dd4a8;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    z-index: -1;
}

.geo-diamond {
    border: 1.5px solid #e8c547;
    background: transparent;
    transform: rotate(45deg);
}

/* ========================================
   Concentric Squares (Meditation)
   ======================================== */
.concentric-squares {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    animation: concentric-rotate 60s linear infinite;
}

@keyframes concentric-rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.c-square {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1.5px solid #2dd4a8;
    background: transparent;
    opacity: 0.5;
    transform: translate(-50%, -50%) rotate(calc(var(--depth) * 5deg));
}

.c-square:nth-child(1) { width: 100%; height: 100%; }
.c-square:nth-child(2) { width: 80%; height: 80%; }
.c-square:nth-child(3) { width: 60%; height: 60%; }
.c-square:nth-child(4) { width: 40%; height: 40%; }
.c-square:nth-child(5) { width: 20%; height: 20%; }

/* ========================================
   Section 1: Threshold Grid
   ======================================== */
.section-threshold .section-grid {
    min-height: 100vh;
    align-items: center;
    justify-items: center;
}

.block-hero {
    grid-column: 1 / -1;
    grid-row: 1 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========================================
   Section 2: Architecture Grid
   ======================================== */
.architecture-grid {
    grid-auto-rows: minmax(180px, auto);
    align-content: center;
    padding: 40px 0;
}

.block-arch-1 {
    grid-column: 1 / 7;
    grid-row: 1 / 3;
}

.block-arch-2 {
    grid-column: 7 / 13;
    grid-row: 1 / 4;
}

.block-arch-3 {
    grid-column: 1 / 5;
    grid-row: 3 / 5;
}

.block-arch-4 {
    grid-column: 5 / 9;
    grid-row: 3 / 5;
}

.block-arch-5 {
    grid-column: 4 / 10;
    grid-row: 5 / 7;
}

.block-arch-6 {
    grid-column: 9 / 13;
    grid-row: 4 / 7;
}

/* ========================================
   Section 3: Taxonomy Grid
   ======================================== */
.taxonomy-grid {
    grid-auto-rows: minmax(150px, auto);
    padding: 40px 0;
}

.block-tax-1 {
    grid-column: 1 / 5;
    grid-row: 1 / 3;
}

.block-tax-2 {
    grid-column: 5 / 9;
    grid-row: 1 / 3;
}

.block-tax-3 {
    grid-column: 9 / 13;
    grid-row: 1 / 3;
}

.block-tax-4 {
    grid-column: 1 / 5;
    grid-row: 3 / 5;
}

.block-tax-5 {
    grid-column: 5 / 9;
    grid-row: 3 / 5;
}

.block-tax-6 {
    grid-column: 9 / 13;
    grid-row: 3 / 5;
}

.block-tax-7 {
    grid-column: 1 / 5;
    grid-row: 5 / 7;
}

.block-tax-8 {
    grid-column: 5 / 9;
    grid-row: 5 / 7;
}

.block-tax-9 {
    grid-column: 9 / 13;
    grid-row: 5 / 7;
}

/* ========================================
   Section 4: Meditation Grid
   ======================================== */
.meditation-grid {
    grid-auto-rows: minmax(150px, auto);
    padding: 40px 0;
}

.block-meditation-main {
    grid-column: 2 / 12;
    grid-row: 1 / 5;
    min-height: 500px;
}

.meditation-content {
    position: relative;
    min-height: 400px;
}

.block-meditation-side {
    grid-column: 1 / 7;
    grid-row: 5 / 7;
}

.block-meditation-bottom {
    grid-column: 7 / 13;
    grid-row: 5 / 7;
}

/* ========================================
   Section 5: Departure Grid
   ======================================== */
.departure-grid {
    grid-auto-rows: minmax(150px, auto);
    padding: 40px 0;
    min-height: 100vh;
    align-content: center;
}

.block-departure-main {
    grid-column: 2 / 12;
    grid-row: 1 / 5;
}

.block-departure-left {
    grid-column: 1 / 7;
    grid-row: 5 / 6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-departure-right {
    grid-column: 7 / 13;
    grid-row: 5 / 6;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .block-arch-1, .block-arch-2, .block-arch-3,
    .block-arch-4, .block-arch-5, .block-arch-6,
    .block-tax-1, .block-tax-2, .block-tax-3,
    .block-tax-4, .block-tax-5, .block-tax-6,
    .block-tax-7, .block-tax-8, .block-tax-9,
    .block-meditation-main, .block-meditation-side, .block-meditation-bottom,
    .block-departure-main, .block-departure-left, .block-departure-right {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .concentric-squares {
        width: 200px;
        height: 200px;
    }

    .meditation-text {
        padding-top: 140px;
    }
}
