/* ═══════════════════════════════════════════════════════════════════════
   EFBA Pharma (Malaysia) — Design Tokens
   Tema: "Pucuk Rebung" — songket bamboo-shoot triangle; plum + ink,
   cool grey section ground, copper only as fine decoration.
   Type: Young Serif (headings, single weight) + Hanken Grotesk (body).
   Look layer: my-theme.css. LIGHT THEME ONLY.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* Erik (tek vurgu rengi) */
    --plum-950: #25122a;   /* ink: headings */
    --plum-900: #2a1530;   /* dark plum: footer, dark surfaces */
    --plum-800: #441f41;   /* hover (button) */
    --plum-700: #5a2b57;   /* button, link, accent (white text 10.95:1) */
    --plum-600: #7b4478;   /* field pattern line (decor only) */
    --terra-300: #d6906a;  /* koyu zeminde vurgu */
    --copper-600: #b0643a; /* ONLY fine decor (line/small fill); not a text or button colour */
    --cool: #f2f1f5;       /* section / media ground (cool grey, not cream) */

    /* Neutrals */
    --paper:      #ffffff;
    --paper-soft: var(--cool);
    --card:       #ffffff;
    --line:       #e3dfe6;
    --line-soft:  #eeecf1;
    --ink:        var(--plum-950);
    --ink-strong: var(--plum-950);
    --ink-body:   #3d3042;
    --ink-muted:  #665a6b;

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

    /* Shadows - restrained, dark plum based */
    --shadow-xs: 0 1px 2px rgba(42, 21, 48, 0.05);
    --shadow-sm: 0 2px 6px rgba(42, 21, 48, 0.06);
    --shadow-md: 0 10px 28px rgba(42, 21, 48, 0.08);
    --shadow-lg: 0 24px 56px rgba(42, 21, 48, 0.11);

    /* Typography - Young Serif (display, single weight) + Hanken Grotesk (body) */
    --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;
    --font-body:    'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --text-xs:   0.8125rem;
    --text-sm:   0.9375rem;
    --text-base: 1.0625rem;
    --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.3125rem;
    --h2-size:   clamp(1.6rem, 1.25rem + 1.2vw, 2rem);
    --h1-size:   clamp(1.95rem, 1.4rem + 1.9vw, 2.625rem);

    --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.02em;

    /* 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, 4px corners (no pill buttons) */
    --radius-sm:   0.25rem;
    --radius-md:   0.25rem;
    --radius-lg:   0.25rem;
    --radius-xl:   0.375rem;
    --radius-pill: 0.25rem;

    /* 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 */
    --container-max: 1240px;
    --container-narrow: 960px;
    --nav-height: 72px;
    --section-pad-y: clamp(3.5rem, 6vw, 6rem);

    /* 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%;
    overflow-x: hidden;
    /* Reserve scrollbar gutter so toggling body overflow doesn't shift layout */
    scrollbar-gutter: stable;
    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;
    overflow-x: hidden;
    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: 400;
    letter-spacing: var(--tracking-tight);
}

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

em {
    font-style: normal;
    font-family: var(--font-display);
}

::selection {
    background: var(--cool);
    color: var(--plum-900);
}

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

.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; }

/* Persistent brand colours — never invert under Samsung Internet dark mode,
   Chrome Android forced dark, Windows High Contrast or similar UA overrides. */
@media (forced-colors: active) {
    *, *::before, *::after { forced-color-adjust: none !important; }
}
