/* ============================================================
   Base — design tokens, reset, typography
   Palette is taken from the app itself (lib/core/theme/app_colors.dart)
   and the PG Management logo: deep forest green, cream, brass gold.
   ============================================================ */

:root {
    /* Brand — pulled from the logo artwork */
    --forest-900: #0E2116;
    --forest-800: #14301F;
    --forest-700: #1B4029;
    --forest-600: #235337;
    --forest-500: #2F8F63;   /* app jade */
    --forest-300: #5FC08E;

    --cream-050: #FBF8F1;
    --cream-100: #F3EEE2;
    --cream-200: #E6DDC9;

    --brass-500: #C89A4A;
    --brass-400: #D9AF63;
    --brass-300: #E8C98D;

    /* Neutrals biased toward the green so nothing reads as flat grey */
    --ink: #101512;
    --ink-2: #2A322C;
    --ink-3: #5A665E;
    --ink-4: #8A948C;
    --line: #E4E7E3;
    --line-2: #EFF1EE;
    --surface: #FFFFFF;
    --surface-2: #F7F8F6;

    /* App accent colours, reused for feature chips */
    --amber: #DE9524;
    --coral: #D6543A;
    --sky: #2B8FD6;
    --teal: #1F8A8A;

    /* Banner — sampled straight from banner.mp4 so the stage can extend
       past the frame edges without a seam. */
    --rose-700: #A8003A;
    --rose-600: #D90041;
    --rose-500: #EB1160;
    --rose-300: #F8438A;
    --rose-ink: #FFEAF1;
    --rose-deep: #61001F;

    /* App deck — sampled from the *emitted* frames rather than the source
       PNGs, because WebP shifts the flat red a little and the stage has to
       match what actually ships. --tomato-top is the frames' top edge,
       which is all the ground a contained frame ever exposes. */
    --tomato-600: #FB483A;
    --tomato-top: #F84737;
    --tomato-700: #D9271C;
    --tomato-800: #8E1610;
    --tomato-050: #FFF0EE;
    --tomato-ink: #FFE3DF;

    /* Type */
    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    /* Fluid scale — kept modest so section titles fit a single screen */
    --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.86rem);
    --step-0: clamp(0.92rem, 0.9rem + 0.12vw, 1rem);
    --step-1: clamp(1.02rem, 0.98rem + 0.2vw, 1.18rem);
    --step-2: clamp(1.16rem, 1.08rem + 0.35vw, 1.4rem);
    --step-3: clamp(1.32rem, 1.18rem + 0.55vw, 1.7rem);
    --step-4: clamp(1.5rem, 1.28rem + 0.85vw, 2.05rem);
    --step-5: clamp(1.7rem, 1.4rem + 1.15vw, 2.35rem);

    /* Rhythm */
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section-y: clamp(1.5rem, 4vh, 2.75rem);
    --max: 1200px;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 34px;

    --shadow-1: 0 1px 2px rgba(16, 21, 18, 0.04), 0 4px 12px rgba(16, 21, 18, 0.05);
    --shadow-2: 0 2px 6px rgba(16, 21, 18, 0.05), 0 18px 40px -18px rgba(16, 21, 18, 0.18);
    --shadow-3: 0 30px 80px -30px rgba(14, 33, 22, 0.45);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* The nav is fixed at 72px; without this every #anchor lands with its
       heading hidden underneath it. */
    scroll-padding-top: 88px;
}

:target {
    scroll-margin-top: 88px;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.is-loading {
    overflow: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0;
    text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p {
    margin: 0;
    text-wrap: pretty;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    border: 0;
    background: none;
    cursor: pointer;
}

a,
button,
[role='button'] {
    /* Removes the 300ms tap delay and the default blue flash on Android. */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(47, 143, 99, 0.14);
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--forest-500);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--forest-500);
    color: #fff;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--forest-500);
}

.lede {
    font-size: var(--step-0);
    line-height: 1.5;
    color: var(--ink-3);
    max-width: 58ch;
}

.muted {
    color: var(--ink-3);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    background: var(--forest-800);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
    left: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
