/*
 * 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 brand) ────────────── */
    --lc-primary: #9B1B30;
    --lc-primary-hover: #6B1222;
    --lc-primary-pale: #F5E9C8;
    --lc-primary-subtle: #C0384F;
    --lc-secondary: #e91e8c;
    --lc-navy-darkest: #0f172a;
    --lc-navy-dark: #1e293b;
    --lc-navy-mid: #1e3a5f;
    --lc-navy-nav: #1a1a2e;
    --lc-text-dark: #0f172a;
    --lc-text-muted: #475569;
    --lc-text-light: rgba(255, 255, 255, .78);
    --lc-white: #ffffff;
    --lc-cream: #f8fafc;
    --lc-overlay-92: rgba(15, 23, 42, .92);
    --lc-overlay-97: rgba(15, 23, 42, .97);
    --lc-overlay-98: rgba(15, 23, 42, .98);
    --lc-shadow-sm: 0 2px 12px rgba(13, 13, 26, .08);
    --lc-shadow-md: 0 8px 40px rgba(13, 13, 26, .13);
    --lc-shadow-lg: 0 20px 70px rgba(13, 13, 26, .18);
    --lc-shadow-header: 0 2px 12px rgba(0, 0, 0, .07);
    --lc-border: rgba(155, 27, 48, .12);
    --lc-border-mid: rgba(155, 27, 48, .20);
    --lc-border-header: #e8ecf0;
    --lc-radius: 4px;
    --lc-radius-md: 8px;
    --lc-radius-lg: 12px;
    --lc-radius-xl: 20px;
    --lc-radius-pill: 100px;
    --lc-font-display: 'Cormorant Garamond', Georgia, serif;
    --lc-font-body: 'Lato', 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 (homepage / blog) ─────────────────────── */
    --mr-maroon-950: #270a11;
    --mr-maroon-900: #380e18;
    --mr-maroon-800: #561223;
    --mr-maroon-700: #761a31;
    --mr-maroon-600: #8d2140;
    --mr-maroon-500: #a52f4d;

    /* ── Set B: Crimson (shop, product, cart, checkout, etc.) ── */
    --mr-crimson-deep: #6B1222;
    --mr-crimson: #9B1B30;
    --mr-crimson-light: #C0384F;

    /* ── Gold accent (shared across both sets) ──────────────── */
    --mr-gold-700: #b07f2e;
    --mr-gold-600: #c79640;
    --mr-gold-500: #d9aa55;
    --mr-gold-400: #e6c074;
    --mr-gold: #C9A84C;
    --mr-gold-light: #E8C87A;
    --mr-gold-pale: #F5E9C8;

    /* ── Neutrals ───────────────────────────────────────────── */
    --mr-white: #ffffff;
    --mr-cream: #fdf6ec;
    --mr-cream-dark: #F0E8D8;
    --mr-cream-100: #fdf6ec;
    --mr-cream-50: #fffaf2;
    --mr-tan-100: #efe2cc;
    --mr-ink: #1A0A0F;
    --mr-ink-900: #241417;
    --mr-ink-700: #43302f;
    --mr-ink-mid: #3D2030;
    --mr-ink-soft: #7A5060;
    --mr-gray-600: #7d6e6c;
    --mr-gray-400: #b6a9a4;
    --mr-line: #ece1d3;
    --mr-border: #E8D8C0;

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

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

    /* ── Typography ─────────────────────────────────────────── */
    --mr-display: 'Cormorant Garamond', Georgia, serif;
    --mr-body: 'Manrope', -apple-system, sans-serif;

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

    /* ════════════════════════════════════════════════════════════════
       REFERENCE DESIGN SYSTEM TOKENS (header, footer, blocks)
       ════════════════════════════════════════════════════════════════ */

    /* Plum palette */
    --plum-950: #2d0a35;
    --plum-900: #430f4a;
    --plum-800: #5c1760;
    --plum-700: #7a1f6e;
    --plum-600: #9b2f8a;
    --plum-500: #b8377f;

    /* Sage palette */
    --sage-700: #0c8f5e;
    --sage-600: #12b377;
    --sage-500: #1ddb95;
    --sage-400: #5eeec0;

    /* Neutrals */
    --paper: #f7f1ec;
    --paper-50: #fdfaf7;
    --blush-100: #f9e3f1;
    --white: #ffffff;

    /* Ink / text */
    --ink-900: #241620;
    --ink-700: #4a3645;
    --gray-600: #7d6e79;
    --gray-400: #b6a8b2;
    --line: #e8dfe1;

    /* Shadows */
    --shadow-sm: 0 2px 14px rgba(31, 14, 28, .07);
    --shadow-md: 0 16px 36px rgba(31, 14, 28, .12);
    --shadow-lg: 0 28px 64px rgba(31, 14, 28, .22);

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

    /* Typography */
    --display: 'Cormorant Garamond', Georgia, serif;
    --body: 'Manrope', -apple-system, sans-serif;

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

/* ── Global typography ───────────────────────────────────────────── */
body {
    background: var(--paper) !important;
    color: var(--mr-ink);
    font-family: var(--body, 'Inter', -apple-system, sans-serif);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--display, 'Playfair Display', Georgia, serif);
}

/* 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;
}

body.home,
body.blog,
body.single-post {
    background: var(--mr-cream-100) !important;
}

/* ── 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(--blush-100, #f9e3f1);
}

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

/* ── Product card star colors (homepage carousels) ── */
.p-stars {
    display: flex;
    gap: 2px;
    color: var(--sage-600, #12b377);
    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(--plum-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: 800;
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1.16;
    color: var(--ink-900);
}

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

h2.headline em {
    font-style: italic;
    font-weight: 600;
    color: var(--plum-700);
}

.on-deep h2.headline em {
    color: var(--sage-400);
}

p.section-sub {
    color: var(--gray-600);
    font-size: 15px;
    margin: 12px auto 0;
    max-width: 560px;
}

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

.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: #d6c4cd;
}

.dark-pill-btn {
    background: var(--mr-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);
    }
}