/* ====================================================================
   graphers.net — v2
   Aesthetic: Neomorphism · Hero-dominant · Elegant serif
   Palette: Triadic warm (greige + gold + sage + dusty rose)
   Motifs: Bezier-curved graph edges, gilt frames, neomorphic depth
   Tone: Quiet, sophisticated, library-like
   ==================================================================== */

:root {
    --bg-surface: #E8E4DF;
    --shadow-dark: #C8C2BA;
    --shadow-light: #FFFFFF;
    --text-primary: #3D3530;
    --accent-gold: #C4A882;
    --accent-sage: #7D8B6B;
    --accent-rose: #B8838A;
    --edge-stroke: #8B7D6B;

    --font-serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
    --font-body:  "Libre Baskerville", "Libre", Georgia, serif;
    --font-label: "Josefin Sans", "Inter", sans-serif;

    --neo-extrude: 8px 8px 20px rgba(0, 0, 0, 0.12), -8px -8px 20px rgba(255, 255, 255, 0.85);
    --neo-extrude-soft: 5px 5px 14px rgba(0, 0, 0, 0.10), -5px -5px 14px rgba(255, 255, 255, 0.82);
    --neo-flat: 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(255, 255, 255, 0);
    --neo-inset: inset 5px 5px 12px rgba(0, 0, 0, 0.10), inset -5px -5px 12px rgba(255, 255, 255, 0.85);
    --neo-inset-deep: inset 7px 7px 16px rgba(0, 0, 0, 0.13), inset -7px -7px 16px rgba(255, 255, 255, 0.85);

    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 32px;
    --radius-xl: 40px;

    --container-pad: clamp(20px, 4vw, 64px);
    --section-pad-y: clamp(80px, 12vh, 160px);

    --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.85;
    color: var(--text-primary);
    background: var(--bg-surface);
    font-size: clamp(15px, 1.05vw, 17px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dot-grid texture beneath the surface */
.dot-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(200, 194, 186, 0.30) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.55;
}

section {
    position: relative;
    z-index: 1;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    min-height: 100vh;
    padding: clamp(50px, 9vh, 110px) var(--container-pad) 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    position: relative;
}

.hero-inner {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.logotype {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(34px, 5.5vw, 64px);
    color: var(--text-primary);
    letter-spacing: 0.08em;
    text-align: center;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 800ms var(--ease-soft), letter-spacing 1200ms var(--ease-soft);
}

.logotype.is-revealed {
    opacity: 1;
}

.tagline {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent-gold);
    opacity: 0;
    transition: opacity 600ms var(--ease-soft);
}

.tagline.is-revealed {
    opacity: 1;
}

.hero-container {
    width: min(600px, 92vw);
    height: clamp(280px, 50vh, 400px);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--neo-flat);
    position: relative;
    overflow: hidden;
    transition: box-shadow 800ms var(--ease-soft);
}

.hero-container.is-revealed {
    box-shadow: var(--neo-extrude);
}

.hero-container::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: calc(var(--radius-lg) - 6px);
    border: 1px solid rgba(196, 168, 130, 0.0);
    pointer-events: none;
    transition: border-color 600ms var(--ease-soft);
}

.hero-container.is-revealed::before {
    border-color: rgba(196, 168, 130, 0.25);
}

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

.hero-graph .node,
.card-nodes circle,
.frame-nodes circle {
    fill: var(--bg-surface);
    stroke: var(--edge-stroke);
    stroke-width: 1.5;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.15)) drop-shadow(-2px -2px 3px rgba(255, 255, 255, 0.6));
}

.hero-graph .node {
    transform-origin: center;
    transform-box: fill-box;
    transform: scale(0);
    transition: transform 600ms var(--ease-spring);
}

.hero-graph .node.is-drawn {
    transform: scale(1);
}

.hero-graph .edge {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 700ms var(--ease-soft);
}

.hero-graph .edge.is-drawn {
    stroke-dashoffset: 0;
}

.hero-caption {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 20px);
    color: var(--accent-gold);
    text-align: center;
    opacity: 0;
    transition: opacity 700ms var(--ease-soft);
}

.hero-caption.is-revealed {
    opacity: 0.85;
}

.scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 600ms var(--ease-soft);
}

.scroll-cue.is-revealed {
    opacity: 0.7;
}

.cue-label {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.cue-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, var(--accent-gold), transparent);
    animation: pulseLine 2.4s ease-in-out infinite;
}

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

/* ============================================================
   Section Heads
   ============================================================ */
.section-head {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.section-head-left {
    align-items: flex-start;
    text-align: left;
}

.section-label {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent-gold);
}

.section-title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(28px, 4.5vw, 56px);
    letter-spacing: 0.04em;
    color: var(--text-primary);
    line-height: 1.18;
    max-width: 22ch;
}

.section-head-left .section-title {
    max-width: 18ch;
}

/* ============================================================
   Showcase Cards (Three Disciplines)
   ============================================================ */
.showcase {
    padding: var(--section-pad-y) var(--container-pad);
}

.card-arc {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 36px);
    max-width: 1180px;
    margin: 0 auto;
    align-items: stretch;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    cursor: pointer;
    transition: box-shadow 350ms var(--ease-soft), transform 600ms var(--ease-soft);
    position: relative;
    overflow: hidden;
    box-shadow: var(--neo-flat);
}

.card.is-revealed {
    box-shadow: var(--neo-extrude);
}

.card-elevated.is-revealed {
    transform: translateY(-20px);
}

.card::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: calc(var(--radius-lg) - 5px);
    border: 1px solid rgba(196, 168, 130, 0.0);
    pointer-events: none;
    transition: border-color 400ms var(--ease-soft);
}

.card:hover {
    box-shadow: var(--neo-inset-deep);
}

.card.is-pressed {
    box-shadow: var(--neo-inset-deep);
}

.card:hover::before,
.card.is-pressed::before {
    border-color: rgba(196, 168, 130, 0.6);
}

.card-label {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 14px;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
}

.card-title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(24px, 2.6vw, 32px);
    letter-spacing: 0.06em;
    color: var(--text-primary);
}

.card-reveal {
    display: flex;
    flex-direction: column;
    gap: 18px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 350ms var(--ease-soft) 80ms, transform 400ms var(--ease-soft) 80ms;
}

.card:hover .card-reveal,
.card.is-pressed .card-reveal {
    opacity: 1;
    transform: translateY(0);
}

.card-desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
    opacity: 0.85;
}

.card-graph {
    width: 100%;
    height: 70px;
    display: block;
}

.card-link {
    font-family: var(--font-label);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent-sage);
    text-decoration: none;
    margin-top: auto;
    border-bottom: 1px solid rgba(125, 139, 107, 0.4);
    padding-bottom: 6px;
    align-self: flex-start;
    transition: color 250ms var(--ease-soft), border-color 250ms var(--ease-soft);
}

.card-link:hover {
    color: var(--accent-rose);
    border-bottom-color: rgba(184, 131, 138, 0.8);
}

/* ============================================================
   Reading Section
   ============================================================ */
.reading {
    padding: var(--section-pad-y) var(--container-pad);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 880px;
    margin: 0 auto;
}

.essay {
    max-width: 70ch;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.essay p {
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.85;
    color: var(--text-primary);
}

.lede {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(20px, 2vw, 26px) !important;
    line-height: 1.5 !important;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.pullquote {
    margin: 12px 0;
    padding: 32px 36px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    box-shadow: var(--neo-flat);
    transition: box-shadow 600ms var(--ease-soft);
}

.pullquote.is-revealed {
    box-shadow: var(--neo-inset-deep);
}

.pullquote p {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(18px, 1.6vw, 22px) !important;
    line-height: 1.5 !important;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.formula {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: var(--accent-gold);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.formula em {
    font-style: italic;
}

/* ============================================================
   Gallery (Featured Frames)
   ============================================================ */
.gallery {
    padding: var(--section-pad-y) var(--container-pad);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(24px, 3vw, 40px);
    max-width: 1180px;
    margin: 0 auto;
}

.frame {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--neo-flat);
    transition: box-shadow 500ms var(--ease-soft), transform 400ms var(--ease-soft);
    position: relative;
}

.frame.is-revealed {
    box-shadow: var(--neo-extrude-soft);
}

.gilt::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: calc(var(--radius-md) - 8px);
    border: 1px solid rgba(196, 168, 130, 0.20);
    pointer-events: none;
    transition: border-color 400ms var(--ease-soft);
}

.frame:hover {
    transform: translateY(-4px);
}

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

.frame-inner {
    border-radius: var(--radius-sm);
    padding: 14px;
    background: var(--bg-surface);
    box-shadow: var(--neo-inset);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-graph {
    width: 100%;
    height: 100%;
    display: block;
}

.frame-caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.frame-name {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 18px;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

.frame-meta {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent-gold);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    margin: var(--container-pad);
    margin-top: 60px;
    padding: 28px clamp(24px, 4vw, 56px);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    box-shadow: var(--neo-inset);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    max-width: 1180px;
    margin: 0 auto;
}

.footer-mark {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

.footer-nav {
    display: flex;
    gap: clamp(14px, 2vw, 28px);
    flex-wrap: wrap;
}

.footer-link {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 250ms var(--ease-soft);
}

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

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

.footer-meta {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent-gold);
}

/* ============================================================
   Generic Neomorphic Helpers
   ============================================================ */
.neo-extruded {
    background: var(--bg-surface);
}

.neo-inset {
    background: var(--bg-surface);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
    .card-arc {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .card-elevated.is-revealed {
        transform: none;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 540px) {
    .hero-container {
        height: 320px;
    }
    .pullquote {
        padding: 24px 22px;
    }
    .frame {
        padding: 18px;
    }
}
