/* =============================================================
   core.css — Reset, design tokens, site-wide components
   ============================================================= */


/* ── RESET ────────────────────────────────────────────────────── */

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

html {
    font-size: 62.5%;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    min-height: 100vh;
    line-height: 1.5;
}

h1, h2, h3, h4, button, input, label {
    line-height: 1.2;
}

h1, h2, h3, h4 {
    text-wrap: balance;
}

img, picture {
    max-width: 100%;
    display: block;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

ul[role='list'],
ol[role='list'] {
    list-style: none;
    padding: 0;
    margin: 0;
}


/* ── DESIGN TOKENS ────────────────────────────────────────────── */

:root {
    /* Colours */
    --color-dominant:        #F7F9FC;
    --color-paper:           #FAFAF7;
    --color-secondary:       #1F2A44;
    --color-secondary-hover: #162033;
    --color-accent:          #2F7F7A;
    --color-accent-hover:    #256965;
    --color-border:          #E1E6EF;
    --color-text:            #1A1A1A;
    --color-text-muted:      #5F6C7B;
    --color-success:         #2E7D32;
    --color-warning:         #C47A2C;
    --color-error:           #B00020;

    /* Fonts */
    --font-primary:   'Raleway', Georgia, serif;
    --font-secondary: 'DM Sans', Arial, sans-serif;

    /* Font sizes */
    --text-xs:  1.2rem;
    --text-sm:  1.4rem;
    --text-md:  1.6rem;
    --text-lg:  2rem;
    --text-xl:  2.8rem;
    --text-2xl: 3.6rem;
    --text-3xl: 4.8rem;

    /* Font weights */
    --weight-regular: 400;
    --weight-medium:  500;
    --weight-bold:    700;
    --weight-black:   800;

    /* Spacing */
    --space-1: 0.8rem;
    --space-2: 1.6rem;
    --space-3: 2.4rem;
    --space-4: 3.2rem;
    --space-5: 4rem;
    --space-6: 6rem;
    --space-8: 8rem;

    /* Layout */
    --max-width:        1100px;
    --max-width-narrow: 720px;

    /*
       --pad-x: single responsive horizontal padding token.
       Used on every full-width container so gutters are consistent
       across all screen sizes without repeating media queries.
       320-639px  → 1.6rem (16px)
       640-1023px → 2.4rem (24px)
       1024px+    → 3.2rem (32px)
    */
    --pad-x: 1.6rem;
}

@media (min-width: 640px)  { :root { --pad-x: 2.4rem; } }
@media (min-width: 1024px) { :root { --pad-x: 3.2rem; } }


/* ── BASE PAGE ────────────────────────────────────────────────── */

.page {
    font-family: var(--font-secondary);
    font-size: var(--text-md);
    font-weight: var(--weight-regular);
    color: var(--color-text);
    background-color: var(--color-dominant);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}


/* ── BUTTON ───────────────────────────────────────────────────── */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-secondary);
    font-size: var(--text-md);
    font-weight: var(--weight-bold);
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0.6rem;
    /* Slightly smaller horizontal padding on mobile to avoid overflow in header */
    padding: 1rem 1.6rem;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s,
                transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .button {
        padding: 1.2rem 2.4rem;
    }
}

.button--cta {
    background-color: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 2px 0 var(--color-accent-hover);
}

.button--cta:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 127, 122, 0.35);
}

.button--cta-light {
    background-color: #fff;
    color: var(--color-secondary);
    border-color: #fff;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.button--cta-light:hover {
    background-color: var(--color-dominant);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
}

.button--ghost {
    background-color: transparent;
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.button--ghost:hover {
    background-color: var(--color-secondary);
    color: #fff;
}


/* ── LINK ─────────────────────────────────────────────────────── */

.link {
    color: var(--color-accent);
    font-family: var(--font-secondary);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

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


/* ── CHECKLIST ────────────────────────────────────────────────── */

.checklist {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.checklist__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-family: var(--font-secondary);
    font-size: var(--text-md);
    color: var(--color-text);
    line-height: 1.6;
}

.checklist__item::before {
    content: '✓';
    color: var(--color-success);
    font-weight: var(--weight-bold);
    flex-shrink: 0;
    margin-top: 0.1rem;
}


/* ── SITE HEADER ──────────────────────────────────────────────── */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 1.4rem var(--pad-x);
    background-color: #fff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__logo-link {
    font-family: var(--font-primary);
    /* Slightly smaller on mobile so it doesn't squeeze the CTA button */
    font-size: 1.8rem;
    font-weight: var(--weight-black);
    color: var(--color-secondary);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .site-header__logo-link {
        font-size: var(--text-lg);
    }
}

.site-header__tagline {
    font-family: var(--font-secondary);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    /* Hidden on small screens — tagline would crowd logo + CTA */
    display: none;
}

@media (min-width: 768px) {
    .site-header__tagline {
        display: block;
    }
}

/* ── Hamburger toggle — visible on mobile only ──────────────── */

.site-header__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 110;
}

.site-header__toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-secondary);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

/* ── Nav — hidden on mobile, row on desktop ─────────────────── */

.site-header__nav {
    display: none;
    flex-direction: column;
    gap: var(--space-2);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    padding: var(--space-3) var(--pad-x);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.site-header--open .site-header__nav {
    display: flex;
}

.site-header__nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-header__nav-item a {
    font-family: var(--font-secondary);
    font-size: var(--text-md);
    font-weight: var(--weight-medium);
    color: var(--color-secondary);
    text-decoration: none;
    padding: 0.6rem 0;
    display: block;
    transition: color 0.15s;
}

.site-header__nav-item a:hover {
    color: var(--color-accent);
}

.site-header__nav-cta {
    padding-top: var(--space-1);
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ── Desktop breakpoint — inline nav, hide hamburger ────────── */

@media (min-width: 768px) {
    .site-header__toggle {
        display: none;
    }

    .site-header__nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--space-3);
        position: static;
        padding: 0;
        border-bottom: none;
        box-shadow: none;
        background-color: transparent;
    }

    .site-header__nav-list {
        flex-direction: row;
        gap: var(--space-3);
    }

    .site-header__nav-item a {
        font-size: var(--text-sm);
        padding: 0;
    }

    .site-header__nav-cta {
        padding-top: 0;
    }
}


/* ── SECTION SCAFFOLD ─────────────────────────────────────────── */

/*
   Mobile-first vertical rhythm:
   phone  → 4rem top/bottom
   tablet → 6rem
   desktop → 8rem
   Horizontal padding uses --pad-x token.
*/

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-5) var(--pad-x);
    gap: var(--space-4);
    width: 100%;
}

@media (min-width: 640px) {
    .section {
        padding: var(--space-6) var(--pad-x);
        gap: var(--space-5);
    }
}

@media (min-width: 1024px) {
    .section {
        padding: var(--space-8) var(--pad-x);
        gap: var(--space-6);
    }
}

.section--paper {
    background-color: var(--color-paper);
}

.section--ink {
    background-color: var(--color-secondary);
}

.section__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-2);
    width: 100%;
    max-width: var(--max-width-narrow);
}

.section__label {
    font-family: var(--font-secondary);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.section__label--light {
    color: rgba(255, 255, 255, 0.5);
}

.section__heading {
    font-family: var(--font-primary);
    /* Fluid: 2.4rem on small phone → 2.8rem default → scales with viewport */
    font-size: clamp(2.4rem, 4vw, var(--text-xl));
    font-weight: var(--weight-bold);
    color: var(--color-secondary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

@media (min-width: 900px) {
    .section__heading {
        font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
    }
}

.section__heading--light {
    color: #fff;
}

.section__subtitle {
    font-family: var(--font-secondary);
    font-size: var(--text-md);
    color: var(--color-text-muted);
    line-height: 1.75;
}

.section__subtitle--light {
    color: rgba(255, 255, 255, 0.6);
}

.section__note {
    font-family: var(--font-secondary);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    max-width: var(--max-width-narrow);
    line-height: 1.7;
}

/* ── CTA CARD ─────────────────────────────────────────────────── */
/* Inline waitlist / conversion card. Reusable across articles. */

.post-cta {
    background-color: var(--color-secondary);
    border-radius: 0.6rem;
    padding: var(--space-4) var(--space-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
}

@media (min-width: 640px) {
    .post-cta {
        padding: var(--space-5) var(--space-4);
    }
}

.post-cta__heading {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 3.5vw, var(--text-xl));
    font-weight: var(--weight-bold);
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.post-cta__subtitle {
    font-family: var(--font-secondary);
    font-size: var(--text-md);
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.post-cta__form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.post-cta__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
}

.post-cta__label {
    font-family: var(--font-secondary);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: rgba(255, 255, 255, 0.7);
}

.post-cta__input {
    width: 100%;
    padding: 1.2rem 1.4rem;
    font-family: var(--font-secondary);
    font-size: var(--text-md);
    color: var(--color-text);
    background-color: #fff;
    border: 2px solid transparent;
    border-radius: 0.4rem;
    transition: border-color 0.15s;
}

.post-cta__input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.post-cta__input::placeholder {
    color: var(--color-text-muted);
}

.post-cta__link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
    transition: color 0.15s;
}
 
.post-cta__link:hover {
    color: #fff;
}

/* Select element — match input height and style */
select.post-cta__input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%235F6C7B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.4rem center;
    padding-right: 3.6rem;
    cursor: pointer;
}

.post-cta__button {
    margin-top: 0.4rem;
}


/* ── FOOTER ───────────────────────────────────────────────────── */

.footer {
    background-color: var(--color-secondary);
    padding: var(--space-5) var(--pad-x);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 640px) {
    .footer {
        padding: var(--space-6) var(--pad-x);
    }
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer__brand {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--weight-black);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem 2rem;
    justify-content: center;
}

.footer__link {
    font-family: var(--font-secondary);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.15s;
}

.footer__link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer__legal {
    font-family: var(--font-secondary);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.25);
    line-height: 1.7;
    max-width: 580px;
}

