/* graphers.net - Neomorphic Graph Visualization */
/* Palette from DESIGN.md */
:root {
    --bg-surface: #E8E4DF;
    --shadow-dark: #C8C2BA;
    --shadow-light: #FFFFFF;
    --text-primary: #3D3530;
    --accent-gold: #C4A882;
    --accent-sage: #7D8B6B;
    --accent-rose: #B8838A;
    --edge-color: #8B7D6B;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.85;
    overflow-x: hidden;
}

/* Dot grid background overlay */
.dot-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #C8C2BA 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* Neomorphic container mixin-style classes */
.neo-container {
    background: var(--bg-surface);
    border-radius: 32px;
    box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.12),
                -8px -8px 20px rgba(255, 255, 255, 0.8);
    transition: box-shadow 800ms ease-out;
}

.neo-container--flat {
    box-shadow: 0px 0px 0px rgba(0, 0, 0, 0),
                0px 0px 0px rgba(255, 255, 255, 0);
}

.neo-inset {
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.08),
                inset -4px -4px 10px rgba(255, 255, 255, 0.6);
}

/* Logotype */
.logotype {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(28px, 4.5vw, 60px);
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-align: center;
    opacity: 0;
    transition: opacity 600ms ease-out, letter-spacing 600ms ease-out;
}

.logotype.animate-in {
    opacity: 1;
    letter-spacing: 0.08em;
}

/* Section titles */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(24px, 3.5vw, 48px);
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 60px;
}

/* ======================== */
/* HERO SECTION             */
/* ======================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    overflow: hidden;
}

.hero-graph-container {
    width: min(600px, 85vw);
    height: min(400px, 55vh);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.hero-graph {
    width: 100%;
    height: 100%;
}

.graph-node {
    fill: var(--bg-surface);
    stroke: var(--edge-color);
    stroke-width: 1.5;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.12)) drop-shadow(-2px -2px 3px rgba(255,255,255,0.8));
    transform: scale(0);
    transform-origin: center;
    transform-box: fill-box;
}

.graph-node.animate-in {
    transform: scale(1);
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.graph-edge {
    fill: none;
    stroke: var(--edge-color);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.graph-edge.animate-in {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 600ms ease-out;
}

.hero-tagline {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--edge-color);
    opacity: 0;
    transition: opacity 800ms ease-out;
    position: relative;
    z-index: 1;
}

.hero-tagline.animate-in {
    opacity: 1;
}

/* ======================== */
/* CARDS SECTION            */
/* ======================== */
.cards-section {
    position: relative;
    padding: 120px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cards-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 40px;
    max-width: 1100px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.neo-card {
    background: var(--bg-surface);
    border-radius: 24px;
    box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.1),
                -6px -6px 16px rgba(255, 255, 255, 0.7);
    width: 300px;
    padding: 50px 36px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 300ms ease-in-out, transform 300ms ease-in-out;
    opacity: 0;
    transform: translateY(30px);
}

.neo-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease-out, transform 500ms ease-out, box-shadow 300ms ease-in-out;
}

.neo-card--elevated {
    margin-bottom: 20px;
}

.neo-card:hover {
    box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.08),
                inset -4px -4px 10px rgba(255, 255, 255, 0.6);
}

.neo-card:hover .card-content {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
}

.card-graph {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: block;
}

.card-graph .graph-node {
    transform: scale(1);
}

.card-graph .graph-edge {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 28px;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.card-content {
    opacity: 0;
    transform: translateY(10px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 400ms ease-out, transform 400ms ease-out, max-height 400ms ease-out;
}

.card-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--edge-color);
    margin-bottom: 16px;
}

.card-link {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-sage);
    border-bottom: 1px solid var(--accent-sage);
    padding-bottom: 2px;
}

/* ======================== */
/* READING SECTION          */
/* ======================== */
.reading-section {
    position: relative;
    padding: 120px 40px;
    display: flex;
    justify-content: center;
}

.reading-content {
    max-width: 70ch;
    position: relative;
    z-index: 1;
}

.reading-paragraph {
    margin-bottom: 36px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.reading-paragraph.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.pull-quote {
    padding: 36px 42px;
    margin: 48px 0;
    border-left: 3px solid var(--accent-gold);
    box-shadow: inset 0 0 0 rgba(0, 0, 0, 0),
                inset 0 0 0 rgba(255, 255, 255, 0);
    transition: box-shadow 500ms ease-out;
    opacity: 0;
    transform: translateY(15px);
}

.pull-quote.animate-in {
    opacity: 1;
    transform: translateY(0);
    box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.08),
                inset -4px -4px 10px rgba(255, 255, 255, 0.6);
    transition: opacity 400ms ease-out, transform 400ms ease-out, box-shadow 500ms ease-out;
}

.pull-quote p {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(16px, 1.8vw, 22px);
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
}

.reading-formula {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(20px, 2.5vw, 32px);
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.05em;
    color: var(--accent-gold);
    margin: 48px 0;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.reading-formula.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ======================== */
/* GALLERY SECTION          */
/* ======================== */
.gallery-section {
    position: relative;
    padding: 120px 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.neo-frame {
    background: var(--bg-surface);
    border-radius: 24px;
    box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.1),
                -6px -6px 16px rgba(255, 255, 255, 0.7);
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.neo-frame.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.frame-glow {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border-radius: 20px;
    border: 1px solid rgba(196, 168, 130, 0.2);
    pointer-events: none;
    transition: border-color 400ms ease-in-out;
}

.neo-frame:hover .frame-glow {
    border-color: rgba(196, 168, 130, 0.6);
}

.gallery-graph {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
}

.gallery-graph .graph-node {
    transform: scale(1);
}

.gallery-graph .graph-edge {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
}

.gallery-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--edge-color);
}

/* ======================== */
/* FOOTER                   */
/* ======================== */
.footer-section {
    padding: 20px 40px 20px;
}

.footer-inner {
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-nav-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--shadow-dark);
    margin-right: 8px;
}

.footer-link {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 300ms ease;
}

.footer-link:hover {
    color: var(--accent-sage);
}

.footer-link:visited {
    color: var(--accent-rose);
}

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

.footer-logotype {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.08em;
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-copyright {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--shadow-dark);
}

/* ======================== */
/* RESPONSIVE               */
/* ======================== */
@media (max-width: 768px) {
    .cards-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .neo-card--elevated {
        margin-bottom: 0;
    }

    .neo-card {
        width: min(300px, 85vw);
    }

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

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

    .footer-nav {
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}
