/*
Theme Name: Sublime Child
Theme URI: https://sublime.mixedsweetmedia.com/
Description: SublimeCulture — premium cannabis cultivation, Laval QC. Custom child theme on Twenty Twenty-Four, mirrors the v0 design system 1:1.
Author: Mixed Sweet Media
Author URI: https://mixedsweetmedia.com/
Template: twentytwentyfour
Version: 0.4.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sublime-child
*/

/* =========================================================
   Self-hosted Archivo (variable)
   ========================================================= */
@font-face {
    font-family: 'Archivo';
    src: url('assets/fonts/Archivo-Variable.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-stretch: 62.5% 125%;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Archivo';
    src: url('assets/fonts/Archivo-Italic-Variable.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-stretch: 62.5% 125%;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Archivo Narrow';
    src: url('assets/fonts/ArchivoNarrow-Variable.ttf') format('truetype-variations');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Archivo Narrow';
    src: url('assets/fonts/ArchivoNarrow-Italic-Variable.ttf') format('truetype-variations');
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}

/* =========================================================
   Brand tokens (mirror v0 globals.css)
   ========================================================= */
:root {
    --gold:     #d6ab4d;
    --forest:   #63785c;
    --dark:     #242b22;
    --cream:    #f8f4dd;
    --offwhite: #faf8f2;

    --background: #faf8f2;
    --foreground: #242b22;
    --card: #ffffff;
    --card-foreground: #242b22;
    --primary: #d6ab4d;
    --primary-foreground: #242b22;
    --secondary: #63785c;
    --secondary-foreground: #ffffff;
    --muted: #f8f4dd;
    --muted-foreground: #63785c;
    --accent: #63785c;
    --accent-foreground: #ffffff;
    --border: #e5e2d3;
    --input: #e5e2d3;
    --ring: #d6ab4d;
    --radius: 0.25rem;

    /* Type families (match v0 naming) */
    --font-sans:  'Archivo Narrow', system-ui, sans-serif;
    --font-serif: 'Archivo', system-ui, sans-serif;
}

/* =========================================================
   Base reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Dark base so the blank moment during navigation (e.g. language
       switch) never flashes white — the gate, hero, and footer are dark. */
    background-color: var(--dark);
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 800;
    line-height: 1.1;
    color: var(--foreground);
    margin: 0;
}

p { margin: 0; }

button { font: inherit; cursor: pointer; }

/* =========================================================
   Custom scrollbar (parity with v0 globals.css)
   ========================================================= */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--forest); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--dark); }

/* =========================================================
   Accessibility helpers
   ========================================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   Age gate — critical layout. Duplicates the gate's Tailwind
   utilities so the page stays blocked even if the Tailwind
   CDN script fails to load or hasn't executed yet.
   ========================================================= */
#sublime-age-gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    overflow-y: auto;
    background: var(--dark);
    color: var(--cream);
    transition: opacity 0.4s ease;
}
#sublime-age-gate.sc-age-gate-leaving {
    opacity: 0;
    pointer-events: none;
}
html.sc-age-locked,
html.sc-age-locked body {
    overflow: hidden;
}

/* =========================================================
   Language switch — "dip to dark" curtain. main.js fades a
   dark overlay in before navigating (sc-lang-leaving); on the
   next page an inline head script (inc/i18n.php) restores the
   overlay before first paint (sc-lang-entering) and main.js
   fades it back out (sc-lang-reveal). Without JS no classes
   are ever set and navigation is a plain reload on the dark
   html base above.
   ========================================================= */
html.sc-lang-leaving::before,
html.sc-lang-entering::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--dark);
    opacity: 1;
}
html.sc-lang-leaving::before {
    animation: sc-curtain-in 0.36s cubic-bezier(0.4, 0, 0.2, 1) both;
}
html.sc-lang-entering.sc-lang-reveal::before {
    animation: sc-curtain-out 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/*
 * Gold accent bar centered on the curtain (echoes the section dividers).
 * It occupies the identical viewport position on the outgoing and incoming
 * page, so the only visible pixels during the document swap are identical —
 * the swap itself is invisible.
 */
html.sc-lang-leaving::after,
html.sc-lang-entering::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 4px;
    margin: -2px 0 0 -32px;
    background: var(--gold);
    z-index: 201;
    opacity: 1;
}
html.sc-lang-leaving::after {
    animation: sc-curtain-bar-in 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}
html.sc-lang-entering.sc-lang-reveal::after {
    animation: sc-curtain-bar-out 0.25s ease both;
}

@keyframes sc-curtain-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes sc-curtain-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes sc-curtain-bar-in {
    from { opacity: 0; transform: scaleX(0); }
    to   { opacity: 1; transform: scaleX(1); }
}
@keyframes sc-curtain-bar-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* =========================================================
   Hero gradient overlay helper (used inline in hero partial)
   ========================================================= */
.sc-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(36, 43, 34, 0.80) 0%,
        rgba(36, 43, 34, 0.60) 50%,
        rgba(36, 43, 34, 0.40) 100%
    );
}
