/* ============================================
   gamelicense.info - Styles
   Ethereal Magazine-Spread Design
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --coastal-sand: #E8D8C0;
    --ocean-teal: #2E8B8B;
    --sky-periwinkle: #7B91C7;
    --driftwood-gray: #7A7268;
    --foam-white: #FAF8F2;
    --coral-blush: #D4847A;
    --deep-kelp: #1E3A34;
}

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

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

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.8;
    color: var(--driftwood-gray);
    background-color: var(--foam-white);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--deep-kelp);
    letter-spacing: -0.02em;
}

h2 {
    font-weight: 800;
    font-size: clamp(28px, 5vw, 64px);
    line-height: 1.1;
}

h3.section-subhead {
    font-weight: 700;
    font-size: clamp(18px, 2vw, 26px);
    margin-top: 2em;
    margin-bottom: 0.5em;
    color: var(--deep-kelp);
}

.chapter-label {
    font-family: 'Figtree', sans-serif;
    font-weight: 500;
    font-size: clamp(11px, 1.2vw, 14px);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ocean-teal);
    display: block;
    margin-bottom: 1.5em;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(170deg, var(--coastal-sand) 0%, var(--foam-white) 35%, rgba(123, 145, 199, 0.12) 65%, rgba(46, 139, 139, 0.15) 100%);
    overflow: hidden;
}

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

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: clamp(42px, 8vw, 120px);
    color: var(--deep-kelp);
    letter-spacing: -0.02em;
    line-height: 1;
    opacity: 0;
    transform: translateY(-10px);
    animation: heroTitleIn 600ms ease-out 500ms forwards;
}

.hero-subtitle {
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    font-size: clamp(14px, 2vw, 24px);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--ocean-teal);
    margin-top: 0.5em;
    opacity: 0;
    transform: scale(0.9);
    animation: heroSubIn 300ms ease-out 1200ms forwards;
}

/* --- Hero Animations --- */
@keyframes heroTitleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroSubIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Organic Blob Shapes --- */
.blob {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.blob svg {
    width: 100%;
    height: 100%;
}

.blob-1 {
    width: clamp(300px, 50vw, 700px);
    height: clamp(300px, 50vw, 700px);
    top: -10%;
    right: -10%;
    opacity: 0;
    animation: blobFadeIn 500ms ease-out 0ms forwards;
}

.blob-1 svg path {
    fill: rgba(46, 139, 139, 0.06);
    animation: blobMorph1 10s ease-in-out infinite;
}

.blob-2 {
    width: clamp(250px, 40vw, 550px);
    height: clamp(250px, 40vw, 550px);
    bottom: -5%;
    left: -8%;
    opacity: 0;
    animation: blobFadeIn 500ms ease-out 300ms forwards;
}

.blob-2 svg path {
    fill: rgba(123, 145, 199, 0.08);
    animation: blobMorph2 12s ease-in-out infinite;
}

.blob-3 {
    width: clamp(200px, 30vw, 400px);
    height: clamp(200px, 30vw, 400px);
    top: 20%;
    left: 15%;
    opacity: 0;
    animation: blobFadeIn 500ms ease-out 600ms forwards;
}

.blob-3 svg path {
    fill: rgba(232, 216, 192, 0.15);
    animation: blobMorph3 14s ease-in-out infinite;
}

@keyframes blobFadeIn {
    to { opacity: 1; }
}

@keyframes blobMorph1 {
    0%, 100% {
        d: path("M420,100 C520,120 560,220 540,320 C520,420 440,500 340,520 C240,540 140,480 100,380 C60,280 80,160 180,100 C280,40 320,80 420,100 Z");
    }
    50% {
        d: path("M400,120 C510,140 570,230 545,330 C520,430 430,490 330,510 C230,530 150,490 110,390 C70,290 100,170 190,110 C290,50 330,100 400,120 Z");
    }
}

@keyframes blobMorph2 {
    0%, 100% {
        d: path("M300,80 C420,60 520,140 540,260 C560,380 500,480 380,530 C260,580 140,540 80,420 C20,300 60,180 160,110 C220,70 260,85 300,80 Z");
    }
    50% {
        d: path("M310,90 C430,70 510,150 530,270 C550,390 490,470 370,520 C250,570 150,530 90,410 C30,290 70,190 170,120 C230,80 270,95 310,90 Z");
    }
}

@keyframes blobMorph3 {
    0%, 100% {
        d: path("M350,60 C460,80 540,180 530,300 C520,420 450,510 330,540 C210,570 110,500 70,380 C30,260 80,130 200,70 C280,30 300,50 350,60 Z");
    }
    50% {
        d: path("M340,70 C450,90 530,190 520,310 C510,430 440,500 320,530 C200,560 120,510 80,390 C40,270 90,140 210,80 C290,40 310,60 340,70 Z");
    }
}

/* --- Ocean Wave SVGs --- */
.ocean-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1;
}

.ocean-wave path {
    stroke: rgba(46, 139, 139, 0.1);
    stroke-linecap: round;
}

.hero-wave {
    opacity: 0;
    animation: waveDrawIn 500ms ease-out 1200ms forwards;
}

@keyframes waveDrawIn {
    to { opacity: 1; }
}

.spread-wave {
    bottom: -40px;
    opacity: 0.5;
}

/* --- Magazine Spread Layout --- */
.spread {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--foam-white);
}

.spread-left {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6vh 4vw;
    background: linear-gradient(135deg, rgba(232, 216, 192, 0.3) 0%, rgba(250, 248, 242, 0.5) 100%);
    position: relative;
}

.spread-left-inner {
    max-width: 400px;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.spread-left-inner.visible {
    opacity: 1;
    transform: translateX(0);
}

.spread-headline {
    margin-bottom: 1.5em;
}

.highlight-word {
    color: var(--coral-blush);
    font-style: italic;
}

/* --- Gutter --- */
.spread-gutter {
    flex: 0 0 1px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.gutter-line {
    width: 1px;
    flex: 1;
    background: rgba(122, 114, 104, 0.15);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.8s ease-out 0.3s;
}

.spread.visible .gutter-line {
    transform: scaleY(1);
}

.gutter-shell {
    width: 12px;
    height: 12px;
    margin-top: 20px;
    flex-shrink: 0;
}

.gutter-shell path {
    stroke: var(--driftwood-gray);
    fill: none;
    opacity: 0.3;
}

/* --- Spread Right (Content) --- */
.spread-right {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6vh 4vw;
    position: relative;
}

.spread-right-inner {
    max-width: 500px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out 0.15s, transform 0.8s ease-out 0.15s;
}

.spread-right-inner.visible {
    opacity: 1;
    transform: translateX(0);
}

.body-text {
    margin-bottom: 1.5em;
    color: var(--driftwood-gray);
}

/* --- Glassmorphic Panels --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1.5em 2em;
    margin: 2em 0;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.glass-text {
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 1.7;
    color: var(--deep-kelp);
    margin-bottom: 0;
}

/* --- Underline Draw Effect --- */
.underline-draw {
    position: relative;
    display: inline;
    background-image: linear-gradient(to right, var(--coral-blush), var(--coral-blush));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.4s ease-out;
    padding-bottom: 2px;
}

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

/* --- Coral Accent SVGs --- */
.coral-accent {
    width: clamp(50px, 6vw, 80px);
    height: auto;
    margin-top: 1em;
}

.coral-accent path,
.coral-accent line,
.coral-accent circle {
    stroke: var(--coral-blush);
    fill: none;
    opacity: 0.5;
}

/* --- Blob Transitions --- */
.blob-transition {
    position: relative;
    height: 20vh;
    overflow: hidden;
    background: var(--foam-white);
}

.blob-transition .blob {
    position: absolute;
    width: clamp(300px, 45vw, 600px);
    height: clamp(300px, 45vw, 600px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.blob-trans-1 svg path {
    fill: rgba(46, 139, 139, 0.05);
    animation: blobMorph1 11s ease-in-out infinite;
}

.blob-trans-2 svg path {
    fill: rgba(123, 145, 199, 0.06);
    animation: blobMorph2 13s ease-in-out infinite;
}

.blob-trans-3 svg path {
    fill: rgba(212, 132, 122, 0.05);
    animation: blobMorph3 12s ease-in-out infinite;
}

.blob-trans-4 svg path {
    fill: rgba(46, 139, 139, 0.04);
    animation: blobMorph1 14s ease-in-out infinite;
}

/* --- Footer --- */
#site-footer {
    position: relative;
    padding: 6em 2em 4em;
    text-align: center;
    background: linear-gradient(180deg, var(--foam-white) 0%, var(--coastal-sand) 100%);
    overflow: hidden;
}

.footer-wave {
    top: 0;
    bottom: auto;
    opacity: 0.6;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-domain {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 36px);
    color: var(--deep-kelp);
    letter-spacing: -0.02em;
    margin-bottom: 0.3em;
}

.footer-tagline {
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: clamp(12px, 1.2vw, 16px);
    color: var(--driftwood-gray);
    letter-spacing: 0.05em;
}

/* --- Responsive / Mobile --- */
@media (max-width: 768px) {
    .spread {
        flex-direction: column;
        min-height: auto;
    }

    .spread-left,
    .spread-right {
        flex: 0 0 auto;
        padding: 8vh 6vw;
    }

    .spread-gutter {
        flex-direction: row;
        height: 1px;
        width: 80%;
        margin: 0 auto;
    }

    .gutter-line {
        width: 100%;
        height: 1px;
        transform: scaleX(0);
        transform-origin: left;
    }

    .spread.visible .gutter-line {
        transform: scaleX(1);
    }

    .gutter-shell {
        margin-top: 0;
        margin-left: 10px;
    }

    .spread-left-inner,
    .spread-right-inner {
        max-width: 100%;
    }

    .spread-left-inner {
        transform: translateY(-30px);
    }

    .spread-left-inner.visible {
        transform: translateY(0);
    }

    .spread-right-inner {
        transform: translateY(30px);
    }

    .spread-right-inner.visible {
        transform: translateY(0);
    }

    .blob-transition {
        height: 10vh;
    }
}
