/*
 * Log Design Tokens + MediRoyal Brand System
 * Loaded unconditionally before style.css on every page.
 *
 * Namespace: --lc-* (legacy), --mr-* (MediRoyal)
 * Both color sets: Set A (maroon) for homepage/blog, Set B (crimson) for all other pages
 */

:root {
    /* ── Legacy tokens (remapped to MediRoyal gold theme) ───────── */
    --lc-primary: #4BE3B5;
    --lc-primary-hover: #3CC8E8;
    --lc-primary-pale: #10292B;
    --lc-primary-subtle: #3CC8E8;
    --lc-secondary: #3CC8E8;
    --lc-navy-darkest: #030A0B;
    --lc-navy-dark: #081719;
    --lc-navy-mid: #0B1C1E;
    --lc-navy-nav: #061112;
    --lc-text-dark: #F4FBF9;
    --lc-text-muted: #9DB7B1;
    --lc-text-light: rgba(255, 255, 255, .78);
    --lc-white: #0B1C1E;
    --lc-cream: #061112;
    --lc-overlay-92: rgba(0, 0, 0, .92);
    --lc-overlay-97: rgba(0, 0, 0, .97);
    --lc-overlay-98: rgba(0, 0, 0, .98);
    --lc-shadow-sm: 0 2px 12px rgba(0, 0, 0, .08);
    --lc-shadow-md: 0 8px 40px rgba(0, 0, 0, .13);
    --lc-shadow-lg: 0 20px 70px rgba(0, 0, 0, .18);
    --lc-shadow-header: 0 2px 12px rgba(0, 0, 0, .07);
    --lc-border: rgba(214, 240, 236, .10);
    --lc-border-mid: rgba(214, 240, 236, .16);
    --lc-border-header: #223537;
    --lc-radius: 4px;
    --lc-radius-md: 8px;
    --lc-radius-lg: 12px;
    --lc-radius-xl: 20px;
    --lc-radius-pill: 100px;
    --lc-font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --lc-font-body: 'Plus Jakarta Sans', sans-serif;
    --lc-transition: .35s cubic-bezier(.4, 0, .2, 1);
    --lc-nav-height: 76px;
    --lc-nav-height-sm: 64px;
    --lc-container-max: 1200px;

    /* ════════════════════════════════════════════════════════════════
       MEDIROYAL BRAND TOKENS
       ════════════════════════════════════════════════════════════════ */

    /* ── Set A: Maroon → warm near-black brown (homepage / blog) ── */
    --mr-maroon-950: #030A0B;
    --mr-maroon-900: #061112;
    --mr-maroon-800: #3CC8E8;
    --mr-maroon-700: #4BE3B5;
    --mr-maroon-600: #4BE3B5;
    --mr-maroon-500: #FF8A65;

    /* ── Set B: Crimson → gold (shop, product, cart, checkout, etc.) ── */
    --mr-crimson-deep: #4BE3B5;
    --mr-crimson: #4BE3B5;
    --mr-crimson-light: #3CC8E8;

    /* ── Gold accent (shared across both sets) ──────────────── */
    --mr-gold-700: #3CC8E8;
    --mr-gold-600: #3CC8E8;
    --mr-gold-500: #4BE3B5;
    --mr-gold-400: #4BE3B5;
    --mr-gold: #4BE3B5;
    --mr-gold-light: #4BE3B5;
    --mr-gold-pale: #10292B;

    /* ── Neutrals ───────────────────────────────────────────── */
    --mr-white: #0B1C1E;
    --mr-cream: #061112;
    --mr-cream-dark: #10292B;
    --mr-cream-100: #061112;
    --mr-cream-50: #0B1C1E;
    --mr-tan-100: #10292B;
    --mr-ink: #F4FBF9;
    --mr-ink-900: #F4FBF9;
    --mr-ink-700: #BFD4CF;
    --mr-ink-mid: #BFD4CF;
    --mr-ink-soft: #9DB7B1;
    --mr-gray-600: #9DB7B1;
    --mr-gray-400: #5F7E78;
    --mr-line: #223537;
    --mr-border: #223537;

    /* ── Shadows ────────────────────────────────────────────── */
    --mr-shadow-sm: 0 2px 12px rgba(0, 0, 0, .06);
    --mr-shadow-md: 0 14px 34px rgba(0, 0, 0, .10);
    --mr-shadow-lg: 0 24px 60px rgba(0, 0, 0, .20);

    /* ── Border Radius ──────────────────────────────────────── */
    --mr-radius-sm: 10px;
    --mr-radius-md: 18px;
    --mr-radius-lg: 28px;
    --mr-radius-pill: 999px;

    /* ── Typography ─────────────────────────────────────────── */
    --mr-display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --mr-body: 'Plus Jakarta Sans', system-ui, sans-serif;

    /* ── Motion ─────────────────────────────────────────────── */
    --mr-ease: cubic-bezier(.22, .61, .36, 1);

    /* ════════════════════════════════════════════════════════════════
       REFERENCE DESIGN SYSTEM TOKENS (header, footer, blocks)
       Sage "gold" ramp + plum "warm near-black brown" ramp — matches
       Website 9 reference (Website 9/Website_9/shipping_policy.html).
       ════════════════════════════════════════════════════════════════ */

    /* Sage palette — blue accent */
    --sage-50:  #0B1C1E;
    --sage-100: #10292B;
    --sage-200: #163538;
    --sage-300: #2A6B66;
    --sage-400: #4BE3B5;
    --sage-500: #4BE3B5;
    --sage-600: #3CC8E8;
    --sage-700: #3CC8E8;
    --sage-800: #1E8FA8;
    --sage-900: #0D5566;

    /* Plum palette — maroon */
    --plum-50:  #10292B;
    --plum-100: #163538;
    --plum-500: #FF8A65;
    --plum-700: #4BE3B5;
    --plum-800: #3CC8E8;
    /* Back-compat aliases: older component CSS still references the deep
       dark-section shades under the plum-9xx/8xx names it originally used. */
    --plum-950: #030A0B;
    --plum-900: #061112;
    --plum-600: #4BE3B5;

    /* Neutrals */
    --paper: #061112;
    --paper-50: #0B1C1E;
    --blush-50: #0B1C1E;
    --blush-100: #10292B;
    --white: #0B1C1E;

    /* Ink / text */
    --ink-900: #F4FBF9;
    --ink-700: #BFD4CF;
    --ink-400: #9DB7B1;
    --gray-600: #9DB7B1;
    --gray-400: #5F7E78;
    --line: #223537;
    --max-width: 1340px;

    /* Shadows */
    --shadow-sm: 0 2px 14px rgba(0, 0, 0, .08);
    --shadow-md: 0 16px 36px rgba(0, 0, 0, .14);
    --shadow-lg: 0 28px 64px rgba(0, 0, 0, .26);


    /* ════════════════════════════════════════════════════════════════
       WEBSITE 11 REFERENCE TOKENS (source of truth; legacy --paper /
       --plum-* / --sage-* / --mr-* / --lc-* above are remapped onto these)
       ════════════════════════════════════════════════════════════════ */
    --log-bg: #061112;
    --log-bg-deep: #030A0B;
    --log-surface: #0B1C1E;
    --log-surface-2: #10292B;
    --log-surface-3: #163538;
    --log-mint: #4BE3B5;
    --log-aqua: #3CC8E8;
    --log-coral: #FF8A65;
    --log-gold: #F2C46D;
    --log-on-accent: #04241C;
    --log-text: #E6F2EF;
    --log-text-strong: #F4FBF9;
    --log-text-soft: #BFD4CF;
    --log-muted: #9DB7B1;
    --log-muted-2: #86A39D;
    --log-border: #223537;
    --log-divider: #18292B;
    --log-line: rgba(214, 240, 236, .10);
    --log-line-2: rgba(214, 240, 236, .16);
    --log-grad: linear-gradient(120deg, #4BE3B5 0%, #3CC8E8 100%);
    --log-grad-warm: linear-gradient(120deg, #FF8A65, #F2C46D);
    --log-ease: cubic-bezier(.16, 1, .3, 1);
    --log-radius: 26px;
    --log-serif: 'Instrument Serif', Georgia, serif;
    --log-sans: 'Plus Jakarta Sans', system-ui, sans-serif;

    /* Monospace accent — testimonial spotlight name-tag/counter */
    --mono: 'JetBrains Mono', monospace;
}

/* assets/css/style.css (legacy token-remap layer, loads after this file) redefines
   --shadow-sm/md/lg at a bare :root selector, which wins at equal specificity by
   load order. Re-declaring under html:root here (0-0-1-1 beats 0-0-1-0) restores
   the real design-token values sitewide without touching the legacy file. */
html:root {
    --shadow-sm: 0 2px 14px rgba(0, 0, 0, .08);
    --shadow-md: 0 16px 36px rgba(0, 0, 0, .14);
    --shadow-lg: 0 28px 64px rgba(0, 0, 0, .26);

    /* Border radius */
    --r-sm: 10px;
    --r-md: 18px;
    --r-lg: 28px;
    --r-pill: 999px;

    /* Semantic */
    --danger: #FF8A65;
    --danger-light: #2A1410;

    /* Typography */
    --display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --body: 'Plus Jakarta Sans', system-ui, sans-serif;

    /* Motion */
    --ease: cubic-bezier(.22, .61, .36, 1);

    /* Blocksy's main.min.css sets h1-h6{margin-block-end:calc(var(--has-theme-content-spacing,1)*(.3em+10px))} —
       the var is unset anywhere in our theme, so it falls back to 1 and adds ~21px of
       unintended bottom margin under every heading sitewide. Zeroing it here kills that
       extra space without touching the parent theme (var used for no other purpose in Blocksy). */
    --has-theme-content-spacing: 0;
}

/* ── Global typography ───────────────────────────────────────────── */
body {
    background: var(--paper) !important;
    color: var(--ink-900);
    font-family: var(--body, 'Plus Jakarta Sans', system-ui, sans-serif);
}

body {
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(900px 600px at 85% -10%, rgba(60, 200, 232, .10), transparent 60%),
        radial-gradient(800px 600px at -10% 40%, rgba(75, 227, 181, .07), transparent 60%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--display, 'Plus Jakarta Sans', system-ui, sans-serif);
    color: var(--log-text-strong);
    letter-spacing: -.035em;
}

/* Editorial accent: serif italic with the mint→aqua gradient (reference em.s). */
h1 em,
h2 em,
h3 em,
.log-em {
    font-family: var(--log-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -.01em;
    background: var(--log-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: .06em;
}

/* Blocksy's own compiled CSS sets a:hover to its theme accent color, which
   bleeds onto any anchor a component doesn't already give its own hover
   color to (plain page-content links, etc.). Reset to inherit as the sitewide
   default — any component's own more specific ".foo a:hover" rule still
   wins on specificity and keeps its intentional hover color unaffected. */
a:hover {
    color: inherit;
}

/* ── Icon utility class ──────────────────────────────────────────── */
.icon {
    width: 1em;
    height: 1em;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    display: inline-block;
}

/* ── Scroll-reveal animation base styles ─────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}

.reveal.visible,
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity .7s var(--mr-ease), transform .7s var(--mr-ease);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .7s var(--mr-ease), transform .7s var(--mr-ease);
}

.reveal-left.visible,
.reveal-left.in,
.reveal-right.visible,
.reveal-right.in {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(.92);
    transition: opacity .7s var(--mr-ease), transform .7s var(--mr-ease);
}

.reveal-scale.visible,
.reveal-scale.in {
    opacity: 1;
    transform: scale(1);
}

/* ── Section helper classes ──────────────────────────────────────── */
.section {
    padding: 88px 24px;
}

.section-tan {
    background: var(--mr-tan-100);
}

.section-dark {
    background: linear-gradient(160deg, var(--mr-maroon-950), var(--mr-maroon-900));
    color: #fff;
}

.section-maroon {
    background: linear-gradient(120deg, var(--mr-maroon-800), var(--mr-maroon-700));
    color: #fff;
}

.section-blush {
    background: var(--paper, #faf7f8);
}

.section-deep {
    background: linear-gradient(160deg, var(--plum-950, #22040a), var(--plum-900, #3a0810));
    color: #fff;
}

/* ── Product card star colors (homepage carousels) ── */
.p-stars {
    display: flex;
    gap: 2px;
    color: var(--sage-600, #284e79);
    margin-top: 8px;
}

.p-stars .icon {
    width: 12px;
    height: 12px;
    fill: currentColor;
    stroke: none;
}

.p-stars .icon.star--muted {
    opacity: .25;
}

/* ── Marquee animation (dir-right) ───────────────────────────────── */
.marquee-track.dir-right {
    animation: marqueeRight var(--speed, 38s) linear infinite;
}

@keyframes marqueeRight {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

/* ── Eyebrow + headline shared styles ────────────────────────────── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--sage-700);
    margin-bottom: 16px;
}

.eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--sage-600);
    display: inline-block;
}

.on-deep .eyebrow {
    color: var(--sage-400);
}

h2.headline {
    font-family: var(--mr-display);
    font-weight: 600;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -.02em;
    color: var(--ink-900);
    margin-block-end: 0;
}

.on-deep h2.headline {
    color: #fff;
}

h2.headline em {
    font-style: italic;
    font-weight: 600;
    background: linear-gradient(100deg, var(--sage-700) 20%, var(--plum-500) 50%, var(--sage-700) 80%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: log-headline-shimmer 7s linear infinite;
}

.on-deep h2.headline em {
    background: linear-gradient(100deg, var(--sage-400) 20%, var(--plum-500) 50%, var(--sage-400) 80%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@keyframes log-headline-shimmer {
    to { background-position: -220% center; }
}

p.section-sub {
    color: var(--gray-600);
    font-size: 15px;
    /* No auto horizontal centering by default — it was silently centering
       this element's own box inside left-aligned head columns (Trending,
       Arrivals, Categories, Health Library, …), drifting it out of line
       with the eyebrow/headline siblings above it. Sections that want it
       centered opt in via .center-head, or their own inline margin. */
    margin: 12px 0 0;
    max-width: 560px;
}

.on-deep p.section-sub {
    color: #cdd9bd;
}

.center-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.center-head p.section-sub {
    margin: 12px auto 0;
}

.on-deep p.section-sub {
    color: #cdd9bd;
}

.dark-pill-btn {
    background: var(--ink-900);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 13px 22px;
    border-radius: var(--mr-r-pill, 999px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .25s var(--mr-ease);
    text-decoration: none;
}

.dark-pill-btn:hover {
    background: var(--plum-700);
    transform: translateY(-2px);
}

.dark-pill-btn .icon {
    width: 14px;
    height: 14px;
}

/* ── Wrap utility (scoped to homepage blocks) ──────────────────── */
.log-homepage .wrap {
    max-width: var(--mr-content, 1280px);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Gutter-wide layout ──────────────────────────────────────────── */
.gutter-wide {
    padding-left: 0;
    padding-right: 0;
}

.gutter-wide .wrap {
    padding-left: 88px;
    padding-right: 88px;
}

.gutter-wide .marquee-wrap,
.gutter-wide .tag-marquee-wrap {
    margin-left: 88px;
    margin-right: 88px;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width:1020px) {

    .stats-grid,
    .numbers-grid,
    .icon4-grid,
    .ship-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gutter-wide .wrap {
        padding-left: 24px;
        padding-right: 24px;
    }

    .gutter-wide .marquee-wrap,
    .gutter-wide .tag-marquee-wrap {
        margin-left: 24px;
        margin-right: 24px;
    }
}

@media (max-width:760px) {
    .section {
        padding: 60px 18px;
    }

    .stats-grid,
    .numbers-grid,
    .icon4-grid,
    .ship-grid {
        grid-template-columns: 1fr;
    }

    .log-homepage .wrap,
    .marquee-wrap,
    .tag-marquee-wrap {
        padding: 0 18px;
    }

    .marquee-track.dir-left,
    .marquee-track.dir-right {
        animation-duration: calc(var(--speed, 38s) * .65);
    }
}
/* Dark theme: native form controls must not fall back to the browser's black "buttontext". */
button,
input,
select,
textarea,
optgroup {
    color: inherit;
}

/* Unstyled native buttons would otherwise paint the browser's light "buttonface" on the dark canvas. */
:where(button) {
    background-color: transparent;
}
