/*!
 * True Makeup Theme — base.css
 *
 * First stylesheet loaded on every page. Owns the design tokens,
 * reset, body typography, global scrollbar + selection colours,
 * shared keyframes, a11y utilities, and the hero-strip fade loop.
 * Per-feature chrome (navs, cards, woo pages) lives in the
 * individual stylesheets under assets/css/*.
 *
 * Section order:
 *   1.  Font loading
 *   2.  Reset + box model
 *   3.  Design tokens (:root)
 *   4.  Root typography + body
 *   5.  Full-bleed enforcement
 *   6.  Selection + scrollbars
 *   7.  Shared keyframes
 *   8.  Decorative gradient borders
 *   9.  Section rhythm utilities
 *  10.  Accessibility utilities (skip link, focus ring, sr-only)
 *  11.  Reduced-motion + motion-paused overrides
 *  12.  Slide progress bar + touch-target sizing for dot indicators
 *  13.  Animated hero strip
 *  14.  Motion pause button (promo bar)
 *  15.  Material Symbols
 */


/* ─── 1. Font loading ─────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,900&family=Noto+Serif:ital,wght@0,400;0,700;1,400&family=Manrope:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');


/* ─── 2. Reset + box model ────────────────────────────────────── */

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


/* ─── 3. Design tokens ────────────────────────────────────────── *
 * Trimmed significantly from the starter token list. Only tokens
 * that are actually referenced elsewhere in the CSS tree live
 * here; every rename or removal of a token propagates to the
 * stylesheets that depend on it.                                  */

:root {
    /* Typography */
    --font-primary:   'DM Sans', sans-serif;
    --font-secondary: 'Noto Serif', Georgia, serif;
    --font-heading:   var(--font-secondary);
    --font-body:      var(--font-primary);
    --font-ui:        var(--font-primary);

    /* Layout */
    --layout-max-width:       90%;
    --layout-section-spacing: 40px;
    --layout-section-gap:     8px;

    /* Neutral surfaces */
    --color-background:            #ffffff;
    --color-surface:               #ffffff;
    --color-surface-container:     #fee9e7;
    --color-surface-container-low: #DCDCDC;

    /* Ink / text colours */
    --color-on-background:      #000000;
    --color-on-surface:         #000000;
    --color-on-surface-variant: #6d5b59;

    /* Brand palette */
    --color-primary:             #FFFFFF;
    --color-primary-dim:         #FFFFFF;
    --color-primary-container:   #fdaca5;
    --color-secondary:           #785754;
    --color-secondary-container: #ffdad6;

    /* Outlines */
    --color-outline:         #8a7674;
    --color-outline-variant: #c3adaa;

    /* Ethereal Peony accent — used by woo pages + gradient borders */
    --ep-primary:     #B07B5F;
    --ep-secondary:   #CC9E80;
    --ep-surface:     #FFF8F7;
    --ep-blush-block: #E0BAB2;
}


/* ─── 4. Root typography + body ───────────────────────────────── */

html {
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: max(12px, 1em);    /* 12px floor — nothing smaller */
}

body {
    width: 100%;
    min-width: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: #000;
    /* White page background. Was previously #f0ece9 (warm off-white) which
       leaked through the 8px margin strips between full-bleed sections and
       around the edges of containerised homepage sections. */
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Skip-to-content link (a11y) ──────────────────────────
 * Visually hidden until focused. Without this rule the link
 * rendered as a normal inline-block 21px tall above the
 * masthead, leaving a visible strip below the admin bar (or
 * the top of the viewport for logged-out users).
 * Standard clip-path pattern — reads out to screen readers,
 * pops into view (top-left) when a keyboard user tabs to it.
 * ─────────────────────────────────────────────────────────── */
.tmt-shell__skip {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 100000;
}
.tmt-shell__skip:focus,
.tmt-shell__skip:focus-visible {
    position: fixed;
    left: 12px;
    top: 12px;
    width: auto;
    height: auto;
    padding: 10px 16px;
    background: #000;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    outline: 2px solid #fff;
}

h1, h2, h3, h4, h5, h6,
.serif,
.font-headline,
.font-serif                   { font-family: var(--font-heading); }

.font-body                    { font-family: var(--font-body); }

.font-label,
button, input, select, textarea { font-family: var(--font-ui); }


/* ─── 5. Full-bleed enforcement ───────────────────────────────── */

.site-main,
.site-main > *   { width: 100%; max-width: 100%; }
main,
main > section,
main > div       { width: 100%; max-width: 100vw; }


/* ─── 6. Selection + scrollbars ───────────────────────────────── */

::selection { background-color: rgba(176, 123, 95, 0.2); }

::-webkit-scrollbar        { width: 10px; }
::-webkit-scrollbar-track  { background: #FAE8DD; }
::-webkit-scrollbar-thumb  { background: #CC9E80; border-radius: 0; }

.no-scrollbar                       { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar    { display: none; }


/* ─── 7. Shared keyframes ─────────────────────────────────────── */

@keyframes tmt-gradient-flow {
    0%   { background-position:   0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position:   0% 50%; }
}

@keyframes tmt-slide-progress-fill {
    from { width:   0; }
    to   { width: 100%; }
}


/* ─── 8. Decorative gradient borders ──────────────────────────── *
 * .tmt-gradient-top → animated 3px line on the top edge
 * .tmt-gradient-bottom → animated 3px line on the bottom edge    */

.tmt-gradient-top,
.tmt-gradient-bottom { position: relative; }

.tmt-gradient-top::before,
.tmt-gradient-bottom::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1;
    background: linear-gradient(90deg, #554350, #B07B5F, #CC9E80, #E0BAB2, #FAE8DD, #E0BAB2, #CC9E80, #B07B5F, #554350);
    background-size: 200% 100%;
    animation: tmt-gradient-flow 4s ease infinite;
}
.tmt-gradient-top::before    { top: 0; }
.tmt-gradient-bottom::after  { bottom: 0; }


/* ─── 9. Section rhythm utilities ─────────────────────────────── */

section + section               { margin-top: var(--layout-section-gap); }

.py-20 {
    padding-top:    var(--layout-section-spacing);
    padding-bottom: var(--layout-section-spacing);
}

/* Adjacent black / blush bars should touch without a gap. */
section[style*="background:#000"]     + section[style*="background:#E0BAB2"],
section[style*="background:#E0BAB2"]  + section[style*="background:#000"],
section[style*="background:#000"]     + footer { margin-top: 0 !important; }

footer                        { margin-top: 0 !important; }
main ~ section + section,
main ~ section + footer       { margin-top: 0; }

.tmt-mobile-br                { display: none; }


/* ─── 10. Accessibility utilities ─────────────────────────────── */

/* Skip-to-content link — off-screen until keyboard focus */
.tmt-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 10000;
    padding: 14px 20px;
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: top 0.18s ease;
}
.tmt-skip-link:focus,
.tmt-skip-link:focus-visible {
    top: 8px;
    left: 8px;
    outline: 3px solid #fff;
    outline-offset: 2px;
}
/* Prevent the :focus landing on <main> from drawing a ring when the
 * skip-link jumps into it. */
main[tabindex="-1"]:focus { outline: none; }

/* Global keyboard focus ring — only shown to keyboard users. */
:focus-visible {
    outline:        2px solid #000 !important;
    outline-offset: 2px            !important;
}
/* Dark surfaces get a white ring for legibility. */
section[style*="background:#000"] :focus-visible,
.tmt-quiz-card                    :focus-visible,
footer                            :focus-visible {
    outline-color: #fff !important;
}

/* Screen-reader-only utility. */
.tmt-sr-only {
    position: absolute !important;
    width: 1px         !important;
    height: 1px        !important;
    padding: 0         !important;
    margin: -1px       !important;
    overflow: hidden   !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap    !important;
    border: 0              !important;
}


/* ─── 11. Reduced-motion + motion-paused ──────────────────────── *
 * Targeted overrides — we only disable DECORATIVE continuous
 * animations (gradient flow, scroll reveals, marquee). Interactive
 * transitions like button hovers and focus rings are left alone
 * so users keep the feedback they rely on.                       */

@media (prefers-reduced-motion: reduce) {
    .tmt-reveal,
    .tmt-reveal-left,
    .tmt-reveal-right,
    .tmt-reveal-scale,
    .tmt-reveal-stagger > * {
        opacity:    1    !important;
        transform:  none !important;
        transition: none !important;
    }

    .tmt-gradient-top::before,
    .tmt-gradient-bottom::after { animation: none !important; }

    .tmt-word-carousel-track { animation-duration: 240s !important; }

    .hero-slide,
    .tmt-quiz-slide,
    .tmt-newsletter-slide    { transition: none !important; }

    .tmt-hero-strip__slot img { transition: none !important; }

    html { scroll-behavior: auto !important; }
}

/* Manual pause (via the promo-bar button). Mirrors the reduced-motion
 * overrides but applied by toggling `body.tmt-motion-paused`. */
body.tmt-motion-paused .tmt-gradient-top::before,
body.tmt-motion-paused .tmt-gradient-bottom::after,
body.tmt-motion-paused .tmt-word-carousel-track,
body.tmt-motion-paused .tmt-reveal,
body.tmt-motion-paused .tmt-reveal-left,
body.tmt-motion-paused .tmt-reveal-right,
body.tmt-motion-paused .tmt-reveal-scale,
body.tmt-motion-paused .tmt-reveal-stagger > * {
    animation-play-state: paused !important;
}


/* ─── 12. Slide progress bar + dot indicator touch targets ────── *
 * WCAG 2.5.8 (target size minimum AA) requires 24×24 CSS-pixel hit
 * area. The visible dot stays 10×10 — padding + transparent
 * background clip the visible mark while the full square remains
 * tappable.                                                       */

.tmt-quiz-dot,
.tmt-newsletter-dot,
.tmt-hero-dot {
    position: relative;
    cursor: pointer;
    box-sizing: border-box     !important;
    min-width: 24px            !important;
    min-height: 24px           !important;
    width: 24px                !important;
    height: 24px               !important;
    max-width: 24px            !important;
    max-height: 24px           !important;
    padding: 7px               !important;
    background-clip: content-box !important;
    background-color: transparent !important;
    border: none               !important;
}

.tmt-quiz-dot::before,
.tmt-newsletter-dot::before,
.tmt-hero-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: transparent;
    border: 1px solid #000;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    transition: background 0.3s;
}

/* Active dot fills with ink. */
.tmt-quiz-dot[data-active="true"]::before,
.tmt-newsletter-dot[data-active="true"]::before,
.tmt-hero-dot[data-active="true"]::before,
.tmt-quiz-dot.is-active::before,
.tmt-newsletter-dot.is-active::before,
.tmt-hero-dot.is-active::before { background: #000 !important; }

/* Hero dots sit on video → use white markings instead. */
.tmt-hero-dot::before                     { border-color: #fff; }
.tmt-hero-dot[data-active="true"]::before,
.tmt-hero-dot.is-active::before           { background: #fff !important; }

/* Thin progress bar under dot groups — fills over the slide
 * duration (10s) then resets on the next slide. */
.tmt-slide-progress {
    display: block;
    width: 100%;
    max-width: 160px;
    height: 2px;
    margin: 12px auto 0;
    background: #e0e0e0;
    overflow: hidden;
}
.tmt-slide-progress__fill {
    display: block;
    width: 0;
    height: 100%;
    background: #000;
    animation: tmt-slide-progress-fill 10s linear forwards;
}
body.tmt-motion-paused .tmt-slide-progress__fill { animation-play-state: paused; }


/* ─── 13. Animated hero strip ─────────────────────────────────── *
 * 10-slot crossfade background behind heading strips. Desktop
 * shows the animated version; mobile swaps to a single static
 * image so small screens aren't taxed with the timer loop.      */

.tmt-hero-strip {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: 1fr;
    gap: 0;
    overflow: hidden;
}

.tmt-hero-strip__slot {
    position: relative;
    overflow: hidden;
    background: transparent;
}
.tmt-hero-strip__slot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.tmt-hero-strip__slot img.tmt-hs-active                             { opacity: 1; }
.tmt-hero-strip__slot.tmt-hs-faded img.tmt-hs-final                 { opacity: 0.1; transition: opacity 0.3s ease; }
.tmt-hero-strip__slot.tmt-hs-persist img.tmt-hs-active              { opacity: 1 !important; }

/* Heading strips: standardise vertical padding to match the shop
 * heading (166px total). Exclude the shop heading itself so its
 * own rule still wins. */
header[class*="-heading"]:not(.tmt-shop-heading) {
    padding-top:    40px !important;
    padding-bottom: 40px !important;
}

header[class*="-heading"] > [class*="__desc"],
header[class*="-heading"]   [class*="__desc"] {
    font-weight: 700 !important;
    opacity:     0.8 !important;
}

/* Everything inside a heading strip (except the strip itself) is
 * layered above it. */
header[class*="-heading"] > *:not(.tmt-hero-strip):not(.tmt-hero-strip-mobile),
header[class*="-heading"] > h1,
header[class*="-heading"] > p,
header[class*="-heading"] > div:not(.tmt-hero-strip):not(.tmt-hero-strip-mobile) {
    position: relative;
    z-index: 1;
}

.tmt-hero-strip-mobile { display: none; }

@media (max-width: 1023px) {
    .tmt-hero-strip        { display: none !important; }

    .tmt-hero-strip-mobile {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 0;
        background: #fff !important;
        overflow: hidden;
    }
    .tmt-hero-strip-mobile img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        opacity: 0.1;
    }

    /* Reset heading strips so the absolute mobile image can fill. */
    header[class*="-heading"],
    .tmt-shop-heading {
        position: relative !important;
        overflow: hidden   !important;
    }
    header[class*="-heading"] {
        display:         flex       !important;
        flex-direction:  column     !important;
        align-items:     center     !important;
        justify-content: center     !important;
        text-align:      center     !important;
    }
}


/* ─── 14. Motion pause button (promo bar) ─────────────────────── */

.tmt-motion-pause-btn {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    cursor: pointer;
    opacity: 0.75;
    line-height: 1;
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    transition: background 0.18s, border-color 0.18s, opacity 0.18s;
}
.tmt-motion-pause-btn:hover {
    opacity: 1;
    background:  rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
}
.tmt-motion-pause-btn:focus-visible {
    opacity: 1;
    outline:        2px solid #ffffff !important;
    outline-offset: 2px               !important;
}
.tmt-motion-pause-btn svg {
    display: block;
    width:  12px;
    height: 12px;
    fill:   currentColor;
}

@media (max-width: 640px) {
    /* Hide the motion pause/play toggle on phones — the promo bar is now
       tappable (opens the newsletter lightbox) so the pause button is
       both cramped and fights the tap target. Keep it accessible to
       desktop / tablet users where hover is available. */
    .tmt-motion-pause-btn { display: none !important; }
    #tmt-promo-bar > span { padding-left: 16px; padding-right: 16px; }
}


/* ─── 15. Material Symbols ────────────────────────────────────── */

.material-symbols-outlined {
    display: inline-block;
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: normal;
    font-style:  normal;
    font-size:   24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap:   normal;
    direction:   ltr;
    -webkit-font-feature-settings: 'liga';
            font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

@supports not (font-variation-settings: normal) {
    .material-symbols-outlined          { font-family: sans-serif; font-size: 0; }
    .material-symbols-outlined::before  { font-size: 18px; }
}
