/* ═══════════════════════════════════════════════════════════════════════
   EFBA Pharma (Philippines) - design tokens, reset, base
   Look: "Kapis" - capiz shell windows set in narra wood; ocean blue + ink,
   cool grey ground. Component and shell styles: ph-theme.css. LIGHT THEME ONLY.
   Type: Spectral (headings) + Figtree (body).
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* Ocean (single accent) */
    --ocean-900: #1f3347;   /* night blue: footer, dark surfaces */
    --ocean-700: #2d4f6c;   /* button, link, accent (white text 8.58:1) */
    --ocean-800: #243f58;   /* hover */
    --glass-line: #9fc0d8;  /* hairline on dark glass */
    --narra: #6b4a33;       /* ONLY lattice bars, frames and 2px rules; never text or button fill */
    --cool: #eff2f5;        /* menu rail / section ground */
    --shell: #e8edf1;       /* media ground (capiz shell) */

    /* Neutrals */
    --paper:      #ffffff;
    --paper-soft: var(--cool);
    --card:       #ffffff;
    --line:       #dde3e8;
    --line-soft:  #e8edf1;
    --ink:        #14222f;
    --ink-strong: #14222f;
    --ink-body:   #34424f;
    --ink-muted:  #5a6773;

    /* Semantic */
    --bg-page:        var(--paper);
    --bg-card:        var(--card);
    --bg-soft:        var(--paper-soft);
    --bg-dark:        var(--ocean-900);
    --text:           var(--ink-body);
    --text-strong:    var(--ink);
    --text-heading:   var(--ink);
    --text-muted:     var(--ink-muted);
    --text-on-dark:   #ffffff;
    --text-on-dark-muted: #d3dde8;
    --text-accent:    var(--ocean-700);
    --border:         var(--line);
    --border-strong:  #c3ccd4;
    --accent:         var(--ocean-700);
    --accent-text:    var(--ocean-700);
    --accent-hover:   var(--ocean-800);
    --accent-soft:    var(--cool);
    --link:           var(--ocean-700);
    --link-hover:     var(--ocean-800);
    --error:          #b3261e;   /* form errors - separate from the accent color */

    /* Shadows - restrained */
    --shadow-xs: 0 1px 2px rgba(20, 34, 47, 0.05);
    --shadow-sm: 0 2px 6px rgba(20, 34, 47, 0.06);
    --shadow-md: 0 10px 28px rgba(20, 34, 47, 0.08);
    --shadow-lg: 0 24px 56px rgba(20, 34, 47, 0.12);

    /* Typography */
    --font-display: 'Spectral', Georgia, 'Times New Roman', serif;
    --font-body:    'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --text-xs:   0.8125rem;
    --text-sm:   0.9375rem;
    --text-base: 1.03125rem;   /* 16.5px */
    --text-lg:   1.1875rem;
    --text-xl:   clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
    --text-2xl:  clamp(1.4rem, 1.2rem + 0.9vw, 1.75rem);
    --h4-size:   1.125rem;
    --h3-size:   1.25rem;
    --h2-size:   1.75rem;      /* 28px */
    --h1-size:   clamp(1.75rem, 1.4rem + 1.1vw, 2.25rem);   /* page h1 up to 36px */

    --leading-tight:   1.15;
    --leading-snug:    1.35;
    --leading-normal:  1.55;
    --leading-relaxed: 1.6;

    --tracking-tight:  0;
    --tracking-normal: 0;
    --tracking-wide:   0.01em;
    --tracking-wider:  0.01em;

    /* Spacing */
    --space-2xs: 0.25rem;
    --space-xs:  0.5rem;
    --space-sm:  0.75rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2.5rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;

    /* Radius - matte, 2px corners (no pill buttons) */
    --radius-sm:   2px;
    --radius-md:   2px;
    --radius-lg:   2px;
    --radius-xl:   2px;
    --radius-pill: 2px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast:   0.18s var(--ease-out);
    --transition-smooth: 0.3s var(--ease-out);
    --transition-slow:   0.5s var(--ease-out);

    /* Layout */
    --rail-w: 232px;
    --read-max: 980px;
    --container-max: 980px;
    --container-narrow: 760px;
    --nav-height: 0px;         /* mobile bar is sticky, not fixed: pages need no top offset */
    --section-pad-y: clamp(2.5rem, 5vw, 4rem);

    /* Divider */
    --hairline: 1px solid var(--line);
    --divider-w: 56px;

    /* z-index */
    --z-base: 1;
    --z-nav: 100;
    --z-overlay: 200;
    --z-modal: 300;

    color-scheme: only light;
}


/* ═══════════════════════════════════════════════════════════════════════
   Reset + Base
   ═══════════════════════════════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    forced-color-adjust: none;
    -webkit-forced-color-adjust: none;
    color-scheme: only light;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a { color: inherit; text-decoration: none; }

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-heading);
    line-height: var(--leading-tight);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
}

p { line-height: var(--leading-relaxed); }

em, i, cite, address {
    font-style: normal;
}

::selection {
    background: var(--shell);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    background: var(--ink);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

[hidden] { display: none; }
.hcp-gate[hidden] { display: none; }

/* Persistent brand colors: never invert under forced dark modes. */
@media (forced-colors: active) {
    *, *::before, *::after { forced-color-adjust: none !important; }
}
