/* ============================================
   CSS Custom Properties & Reset
   ============================================ */

:root {
    /* Brand Colors — weirdfruit design system, dark theme.
       Legacy names kept so existing rules keep working:
       --orange = fruit, --red = flesh, --green = leaf,
       --black = pith (ground), --white = soil (ink), --gray = soil-muted. */
    --orange: #f67644;      /* fruit */
    --green: #749b4f;       /* leaf */
    --red: #f8565a;         /* flesh */
    --black: #1a1512;       /* pith */
    --white: #f4ede2;       /* soil */
    --gray: #b9ab9b;        /* soil-muted */
    --pith-raised: #241e19; /* cards and panels on pith */
    --line: #3b322b;        /* hairlines and quiet borders */
    --on-brand: #221a14;    /* text on fruit/flesh/leaf fills */
    --fruit-soft: #4a2112;
    --flesh-soft: #4a1517;
    --leaf-soft: #1f2c16;
    /* Brand colours used as text (links, emphasis) — darker in light theme for contrast */
    --fruit-ink: #f67644;
    --flesh-ink: #f8565a;
    --leaf-ink: #749b4f;
    /* --white as an RGB triplet, for translucent ink: rgba(var(--white-rgb), 0.8) */
    --white-rgb: 244, 237, 226;
    color-scheme: dark;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 14px;
    --radius-pill: 999px;

    /* Gradients — the design system keeps gradients for the logo mark only.
       These are now flat so any remaining usages render as solid colour. */
    --gradient-primary: linear-gradient(var(--orange), var(--orange));
    --gradient-secondary: linear-gradient(var(--orange), var(--orange));
    --gradient-accent: linear-gradient(var(--orange), var(--orange));

    /* Typography */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Spacing */
    --section-padding: clamp(3.5rem, 9vh, 6rem);
    --container-padding: clamp(1.5rem, 5vw, 3rem);
}

/* Light theme — follows the browser/OS setting. Values from the weirdfruit
   design system's light theme. Legacy names keep their roles, so --black is
   the (now light) ground and --white the (now dark) ink. */
@media (prefers-color-scheme: light) {
    :root {
        --black: #f7f2e8;       /* pith */
        --white: #221a14;       /* soil */
        --gray: #6b5d50;        /* soil-muted */
        --pith-raised: #fffdf8;
        --line: #e2d8c6;
        --fruit-soft: #fde6dc;
        --flesh-soft: #fee1e1;
        --leaf-soft: #e6eedd;
        --fruit-ink: #a8441a;
        --flesh-ink: #b8262f;
        --leaf-ink: #4a6b2f;
        --white-rgb: 34, 26, 20;
        color-scheme: light;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Keep anchor jumps (nav dots) clear of the solid fixed nav bar */
    scroll-padding-top: 5rem;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--black);
    color: var(--white);
    line-height: 1.7;
    font-size: 18px;
    position: relative;
}

/* ============================================
   Grain Texture Overlay
   ============================================ */

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Solid flat ground so the page scrolls under the bar, not through it */
    background-color: var(--black);
    border-bottom: 1px solid var(--line);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.02em;
}

.nav-dots {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(var(--white-rgb), 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--white);
    transform: scale(1.5);
}

.dot:hover {
    background-color: rgba(var(--white-rgb), 0.7);
}

/* ============================================
   Layout Structure
   ============================================ */

/* Sections size to their content; only the hero fills the viewport */
.section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--section-padding) 0;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    width: 100%;
    padding: 0 var(--container-padding);
    margin: 0 auto;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    background: radial-gradient(ellipse at center, rgba(246, 118, 68, 0.1) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    position: relative;
}

.logo-mark {
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease forwards;
}

.logo-mark .logo-img {
    width: clamp(5rem, 15vw, 12rem);
    height: auto;
    display: inline-block;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 600;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.title-word {
    display: inline-block;
}

.title-word.highlight {
    color: var(--fruit-ink);
}

.hero-tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.4rem, 3.5vw, 2.25rem);
    color: var(--white);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--gray);
    font-weight: 300;
    letter-spacing: 0.05em;
    animation: fadeInUp 1s ease 0.55s forwards;
    opacity: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: -8rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeIn 1s ease 0.8s forwards;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--orange), transparent);
    animation: scrollLineGrow 2s ease infinite;
}

/* ============================================
   Opening Section
   ============================================ */

.opening {
    background: radial-gradient(ellipse at top left, rgba(116, 155, 79, 0.1) 0%, transparent 60%);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-title.centered {
    text-align: center;
    margin-bottom: 4rem;
}

/* "weirdfruit" in the manifesto: display face, coloured like the hero's "fruit" */
.wf-name {
    font-family: var(--font-display);
    color: var(--fruit-ink);
}

.opening-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
}

.large-text {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--white);
}

.opening-text p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(var(--white-rgb), 0.8);
    font-weight: 300;
}

/* .opening-text p sets body size; restore the larger sizes inside the manifesto */
.opening-text .large-text {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    color: var(--white);
}

.opening-text .emphasis {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 400;
    color: var(--white);
}

.opening-text .manifesto-close {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.2;
    color: var(--white);
    margin-top: 1.5rem;
}

.emphasis {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 400;
    color: var(--white);
    margin-top: 1rem;
}

/* Class names kept for compatibility; the design system uses flat
   colour, so these are now fruit-coloured accent text. */
.gradient-text {
    color: var(--fruit-ink);
    font-weight: 600;
}

.gradient-text-large {
    font-family: var(--font-display);
    color: var(--fruit-ink);
    font-weight: 600;
    font-size: 1.2em;
}

/* ============================================
   Beliefs Section
   ============================================ */

.beliefs {
    background: radial-gradient(ellipse at center, rgba(248, 86, 90, 0.08) 0%, transparent 70%);
}

.belief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.belief-card {
    position: relative;
    padding: 3rem;
    background: var(--pith-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(30px);
}

.belief-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.belief-card[data-index="1"] {
    transition-delay: 0.2s;
}

.belief-card[data-index="2"] {
    transition-delay: 0.4s;
}

.belief-card:hover {
    border-color: rgba(246, 118, 68, 0.5);
    transform: translateY(-5px);
}

.belief-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    font-weight: 300;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.belief-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.belief-content p {
    font-size: 1.1rem;
    color: rgba(var(--white-rgb), 0.75);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.belief-emphasis {
    font-weight: 600;
    color: var(--white);
    font-style: italic;
}

/* ============================================
   For Whom Section
   ============================================ */

.for-whom {
    background: radial-gradient(ellipse at bottom right, rgba(246, 118, 68, 0.1) 0%, transparent 60%);
}

.for-whom-content {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.for-whom-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-left: 2rem;
    border-left: 2px solid var(--orange);
}

.for-whom-list p {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: rgba(var(--white-rgb), 0.85);
    font-weight: 300;
}

.wilderness-quote {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.3;
    margin-top: 2rem;
}

/* ============================================
   Closing Section
   ============================================ */

.closing {
    background: radial-gradient(ellipse at center, rgba(116, 155, 79, 0.15) 0%, transparent 70%);
}

/* Merged for-whom + closing: stack the two halves, closing as the payoff */
.for-whom.closing {
    background: radial-gradient(ellipse at bottom center, rgba(116, 155, 79, 0.15) 0%, transparent 60%);
}

.for-whom.closing .closing-content {
    width: 100%;
    gap: 3rem;
}

.for-whom.closing .closing-statement {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.for-whom.closing .we-are {
    margin-bottom: 0;
}

.for-whom.closing .for-whom-list {
    padding-left: 0;
    border-left: none;
    gap: 1rem;
}

.closing-line {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 300;
    color: rgba(var(--white-rgb), 0.85);
}

@media (max-width: 768px) {
    .for-whom.closing {
        padding: 4rem 0;
    }

    .for-whom.closing .closing-statement {
        gap: 2rem;
    }
}

.closing-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.we-are {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    margin-bottom: 2rem;
}

.closing-principles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.closing-principles p {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300;
    color: rgba(var(--white-rgb), 0.9);
}

.logo-mark-bottom {
    margin-top: 3rem;
}

.site-footer {
    position: relative;
    text-align: center;
    padding: 4rem 1.5rem 5rem;
    border-top: 1px solid var(--line);
}

.site-footer .logo-mark-bottom {
    margin-top: 0;
}

.logo-mark-bottom .logo-img {
    width: clamp(4rem, 10vw, 8rem);
    height: auto;
    display: inline-block;
    opacity: 0.3;
}

.closing-lockup {
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray);
}

.lockup-name {
    font-weight: 600;
    color: var(--white);
}

.lockup-tagline {
    font-style: italic;
    font-weight: 300;
}

/* ============================================
   What is weirdfruit? Section
   Tells the half-formed → formed story: scattered
   seeds settle into rows, a dashed sketch card
   becomes a solid fruit-filled one.
   ============================================ */

.what-is {
    background: radial-gradient(ellipse at top right, rgba(246, 118, 68, 0.08) 0%, transparent 60%);
}

.what-is-intro {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.what-is-intro .section-title {
    margin-bottom: 0.5rem;
}

.seeds {
    width: clamp(160px, 30vw, 240px);
    height: auto;
    display: block;
}

.seeds-scatter circle {
    fill: var(--gray);
}

.seeds-rows circle {
    fill: var(--orange);
}

.seed-misfit {
    fill: var(--red);
}

.what-is-body {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(var(--white-rgb), 0.85);
    font-weight: 300;
    max-width: 65ch;
}

.journey {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.journey-step {
    padding: 2rem;
    border-radius: var(--radius-md);
}

.journey-step p {
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Half-formed: sketch outline, no fill */
.journey-sketch {
    border: 1.5px dashed var(--gray);
    color: var(--white);
}

.journey-sketch p {
    color: rgba(var(--white-rgb), 0.8);
}

/* Forming: raised ground, dashed fruit outline */
.journey-forming {
    background: var(--pith-raised);
    border: 1.5px dashed var(--orange);
    color: var(--white);
}

.journey-forming p {
    color: rgba(var(--white-rgb), 0.85);
}

/* Formed: solid fruit fill, on-brand text */
.journey-formed {
    background: var(--orange);
    border: 1.5px solid var(--orange);
    color: var(--on-brand);
}

.journey-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--gray);
}

.journey-formed .journey-number {
    color: var(--on-brand);
}

.journey-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.rough-clear {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
}

.rough-clear p {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.25rem;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 2rem);
    line-height: 1.3;
}

.rough {
    font-style: italic;
    font-weight: 300;
    color: var(--gray);
}

.arrow {
    font-family: var(--font-body);
    color: var(--fruit-ink);
}

.clear {
    font-weight: 600;
    color: var(--white);
}

.what-is-close {
    margin-top: 3rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 400;
    line-height: 1.3;
}

/* The boring bit — quiet credentials box, just above smallprint */
.boring-bit {
    max-width: 720px;
    margin-top: 3rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--pith-raised);
}

.boring-bit-title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.boring-bit p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--gray);
}

/* ============================================
   Portfolio
   Cards with a dashed "sketch" image slot: until
   assets/portfolio/<slug>.jpg exists the placeholder
   shows; once the photo is dropped in it fills the slot.
   ============================================ */

.portfolio-intro {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(var(--white-rgb), 0.85);
    font-weight: 300;
    max-width: 65ch;
    margin-top: -1.5rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.portfolio-card {
    display: flex;
    flex-direction: column;
    background: var(--pith-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.portfolio-image-wrap {
    position: relative;
    aspect-ratio: 1200 / 630;
    margin: 0.75rem 0.75rem 0;
    border: 1.5px dashed var(--gray);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-image-placeholder {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    color: var(--gray);
}

.portfolio-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem 1.75rem 1.75rem;
    flex: 1;
}

.portfolio-role {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fruit-ink);
}

.portfolio-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.75rem);
    font-weight: 500;
    line-height: 1.2;
}

.portfolio-body p:not(.portfolio-role) {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(var(--white-rgb), 0.8);
}

.portfolio-link {
    margin-top: auto;
    padding-top: 0.5rem;
    color: var(--fruit-ink);
    font-weight: 500;
    text-decoration: none;
}

.portfolio-link:hover,
.portfolio-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scrollLineGrow {
    0%, 100% {
        transform: scaleY(1);
        opacity: 1;
    }
    50% {
        transform: scaleY(1.5);
        opacity: 0.5;
    }
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(20deg);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-dots {
        gap: 0.5rem;
    }

    .dot {
        width: 6px;
        height: 6px;
    }

    .belief-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .belief-card {
        padding: 2rem;
    }

    .journey {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2.5rem;
    }

    .journey-step {
        padding: 1.5rem;
    }

    .rough-clear {
        margin-top: 2.5rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2.5rem;
    }

    .for-whom-list {
        padding-left: 1rem;
    }

    .scroll-indicator {
        bottom: -6rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .section {
        min-height: auto;
        padding: 3rem 0;
    }

    .hero {
        min-height: 100vh;
    }

    .belief-card {
        padding: 1.5rem;
    }

    .belief-number {
        font-size: 2rem;
    }
}

/* ============================================
   Accessibility & Print
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
.dot:focus {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}

/* Selection color */
::selection {
    background-color: var(--orange);
    color: var(--on-brand);
}

/* ============================================
   Nav Blog Link
   ============================================ */

.nav-blog-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.nav-blog-link:hover,
.nav-blog-link:focus {
    color: var(--fruit-ink);
    opacity: 1;
}

/* Homepage nav: blog + experiments side by side, between logo and dots */
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.9rem;
    }

    .nav-links .nav-blog-link {
        font-size: 0.72rem;
        letter-spacing: 0.06em;
    }

    /* Two text links + six dots don't fit beside the logo on a phone;
       the dots are a progress hint only, scrolling still works */
    .nav-dots {
        display: none;
    }
}

/* Belief card → experiment link */
.belief-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--fruit-ink);
    font-weight: 500;
    text-decoration: none;
}

.belief-link:hover,
.belief-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* ============================================================
   Blog Section
   Simple top-to-bottom layouts for the blog index and post
   pages. These intentionally do NOT use the homepage's
   full-viewport scroll-snap `.section` treatment.
   ============================================================ */

/* --- Shared blog nav/header --- */

.blog-nav {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem var(--container-padding);
    max-width: 1200px;
    margin: 0 auto;
}

.blog-nav .nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.blog-nav-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-nav-link:hover,
.blog-nav-link:focus {
    color: var(--fruit-ink);
}

/* --- Blog background wash (reuses hero-style radial gradient) --- */

.blog-main {
    position: relative;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, rgba(246, 118, 68, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at bottom right, rgba(116, 155, 79, 0.08) 0%, transparent 60%);
}

/* --- Tag / category pills --- */

.tag-pill {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    margin: 0 0.4rem 0.4rem 0;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    background: var(--flesh-soft);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--flesh-ink);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* --- Blog index / listing page --- */

.blog-header {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem var(--container-padding) 3rem;
    text-align: center;
}

.blog-header-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.blog-header-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray);
    font-weight: 300;
}

/* Two-column masonry. Without JS this is a plain two-column grid; the small
   script in blog/index.html adds .is-masonry and sets each card's row span
   from its height, so cards pack tightly while keeping newest-first order
   reading left → right. */
.post-list {
    --post-gap: 1.75rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--container-padding) 6rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--post-gap);
}

.post-list.is-masonry {
    grid-auto-rows: 1px;
    row-gap: 0;
    align-items: start;
}

.post-list.is-masonry .post-card {
    margin-bottom: var(--post-gap);
}

.post-card {
    display: block;
    background: var(--pith-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s ease;
}

.post-card:hover,
.post-card:focus {
    border-color: rgba(246, 118, 68, 0.5);
    transform: translateY(-3px);
}

.post-card-image-wrap {
    aspect-ratio: 1200 / 630;
    overflow: hidden;
    background: rgba(var(--white-rgb), 0.03);
}

.post-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.04);
}

.post-card-content {
    padding: 1.75rem 2rem 2rem;
}

.post-card-date {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.post-card:hover .post-card-title {
    color: var(--fruit-ink);
}

.post-card-excerpt {
    font-size: 1rem;
    color: rgba(var(--white-rgb), 0.75);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* --- Single article page --- */

.article-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem var(--container-padding) 6rem;
}

.article-back-link {
    display: inline-block;
    margin-bottom: 3rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-back-link:hover,
.article-back-link:focus {
    color: var(--fruit-ink);
}

.article-header {
    margin-bottom: 3rem;
}

.article-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-date {
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.article-featured-image {
    display: block;
    width: 100%;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 3rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(var(--white-rgb), 0.85);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--white);
    margin: 2.5rem 0 1.25rem;
    line-height: 1.3;
}

.article-body h3 {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: var(--white);
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.article-body li {
    color: rgba(var(--white-rgb), 0.8);
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 1rem 1.75rem;
    border-left: 3px solid var(--orange);
    background: rgba(var(--white-rgb), 0.03);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--white);
    font-size: 1.15rem;
}

.article-body a {
    color: var(--fruit-ink);
    text-decoration: underline;
    text-decoration-color: rgba(246, 118, 68, 0.4);
}

.article-body a:hover {
    text-decoration-color: var(--fruit-ink);
}

.article-body strong {
    color: var(--white);
    font-weight: 600;
}

.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.article-author {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.article-author strong {
    color: var(--white);
}

/* --- Blog responsive --- */

@media (max-width: 768px) {
    .blog-nav {
        padding: 1.5rem;
    }

    .post-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-card-content {
        padding: 1.5rem;
    }

    .article-wrap {
        padding-top: 1rem;
    }
}
/* ============================================================
   Experiments
   Hub page (experiments/index.html) reuses the blog listing
   shell: .blog-nav, .blog-main, .blog-header, .post-card.
   The experiments themselves carry their own inline CSS.
   ============================================================ */

.blog-nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.experiment-list {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--container-padding) 6rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

@media (max-width: 1024px) {
    .experiment-list .post-card-content {
        padding: 1.5rem;
    }
}

/* Dashed "image to come" placeholder until assets/experiments/<slug>.jpg exists */
.experiment-list .post-card-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px dashed var(--line);
}

.experiment-list .post-card-image {
    position: absolute;
    inset: 0;
}

.experiment-belief {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--gray);
    margin-bottom: 0;
}

.experiment-cta {
    display: inline-block;
    margin-top: 1rem;
    color: var(--fruit-ink);
    font-weight: 500;
}

@media (max-width: 860px) {
    .experiment-list {
        grid-template-columns: minmax(0, 1fr);
        max-width: 640px;
    }
}

/* ============================================================
   Site footer (every page) + calls to action
   The homepage footer keeps its logo lockup; other pages use the
   same .site-footer with a CTA line, links and the copyright.
   ============================================================ */

.footer-cta {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: var(--gray);
    margin-bottom: 1.75rem;
}

.footer-cta a,
.cta-line a {
    color: var(--fruit-ink);
    text-decoration: none;
    font-weight: 400;
}

.footer-cta a:hover,
.footer-cta a:focus-visible,
.cta-line a:hover,
.cta-line a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.75rem;
    margin-bottom: 1.25rem;
}

.site-footer .logo-mark-bottom + .footer-links {
    margin-top: 2.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--fruit-ink);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--gray);
    opacity: 0.8;
}

/* Inline CTA line: homepage close and the end of each blog post */
.cta-line {
    margin-top: 2rem;
    font-size: 1.05rem;
    color: var(--gray);
}

.closing-statement .cta-line {
    margin-top: 0;
}

.article-footer .cta-line {
    margin: 0 0 2rem;
    padding: 1.25rem 1.5rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
}

/* ============================================================
   Contact page (contact/index.html, thanks.html, error.html)
   Form posts to contact/send.php. No JS needed.
   ============================================================ */

/* Short pages: let the footer sit under the content, not a screen away */
.blog-main.contact-main {
    min-height: 0;
}

.contact-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 var(--container-padding) 6rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 0;
}

.form-label {
    padding: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
}

.form-optional {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.form-input {
    width: 100%;
    font: inherit;
    font-size: 1.05rem;
    color: var(--white);
    background: var(--pith-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease;
}

.form-input:hover {
    border-color: var(--gray);
}

.form-input:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-color: var(--orange);
}

textarea.form-input {
    min-height: 11rem;
    resize: vertical;
    line-height: 1.6;
}

.form-input::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

/* "Where is it at?" — dashed sketch pills that fill solid when chosen */
legend.form-label {
    margin-bottom: 0.75rem;
}

.stage-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.stage-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.stage-option span {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border: 1px dashed var(--gray);
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    color: var(--white);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.stage-option span:hover {
    border-color: var(--orange);
}

.stage-option input:checked + span {
    background: var(--orange);
    border: 1px solid var(--orange);
    color: var(--on-brand);
}

.stage-option input:focus-visible + span {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}

/* Honeypot: off-screen for people, still in the DOM for bots */
.form-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.form-submit {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.95rem 1.9rem;
    border-radius: var(--radius-md);
    background: var(--orange);
    color: var(--on-brand);
    transition: transform 0.15s ease;
}

.form-submit:hover {
    transform: translateY(-1px);
}

.form-small {
    font-size: 0.85rem;
    color: var(--gray);
}

.contact-aside {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    color: var(--gray);
    font-size: 0.95rem;
}

.contact-aside a,
.contact-message a {
    color: var(--fruit-ink);
}

/* Thanks / error pages */
.contact-message {
    font-size: 1.1rem;
    color: rgba(var(--white-rgb), 0.85);
}

.contact-message p {
    margin-bottom: 1.25rem;
}

.contact-message .rough-clear-inline {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin: 2rem 0;
}

.contact-message .rough-clear-inline .rough {
    color: var(--gray);
    font-style: italic;
}

.contact-message .rough-clear-inline .clear {
    color: var(--fruit-ink);
}

/* ============================================================
   Small-screen navs (three links since contact was added)
   ============================================================ */

@media (max-width: 560px) {
    .blog-nav .nav-logo {
        font-size: 1.25rem;
    }

    .blog-nav-links {
        gap: 0.9rem;
    }

    .blog-nav-links .blog-nav-link {
        font-size: 0.72rem;
        letter-spacing: 0.06em;
    }

    .footer-links {
        gap: 0.5rem 1.1rem;
    }

    /* The trailing "← Home" link: the wordmark already goes home */
    .blog-nav-links .blog-nav-link:last-child {
        display: none;
    }
}

@media (max-width: 400px) {
    .nav {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .nav .nav-logo {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 0.65rem;
    }

    .nav-links .nav-blog-link {
        font-size: 0.68rem;
        letter-spacing: 0.04em;
    }
}
