/* ==========================================================================
   base.css
   Fonts, design tokens (CSS variables), reset, typography, layout helpers,
   scrollbars, focus styles and the scroll-reveal animation.
   Every other stylesheet uses the variables defined here.
   ========================================================================== */

/* ---------- Fonts (local copies, see docs/CREDITS.md) ---------- */
@font-face {
    font-family: "Parkinsans";
    src: url("../fonts/parkinsans-latin-wght-normal.woff2") format("woff2");
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Outfit";
    src: url("../fonts/outfit-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
    /* Colours, taken from the logo (gold) and the bridal banners (wine red).
       Gold is for buttons and decoration only: gold text on white fails contrast.
       Wine is used for coloured text and dark panels (about 11:1 on white). */
    --ks-gold: #d9ab1c;
    --ks-gold-deep: #b8890b;       /* ornament lines, small marks */
    --ks-wine: #6e1230;
    --ks-wine-text: #6e1230;
    --ks-wine-dark: #4f0b22;       /* hover on wine buttons */
    --ks-wine-pale: #f8edee;       /* blush tint for soft cards */
    --ks-cream: #fbf6ec;
    --ks-white: #fff;
    --ks-black: #24161b;           /* warm ink used for all body text */
    --ks-line: rgba(36, 22, 27, 0.12);
    --ks-muted: rgba(36, 22, 27, 0.7);
    --ks-wine-soft: rgba(110, 18, 48, 0.25);
    --ks-gradient-gold: linear-gradient(135deg, #f0d27a 0%, #fbf3dd 55%);
    --ks-gradient-fade: linear-gradient(180deg, var(--ks-cream) 0%, rgba(251, 246, 236, 0) 100%);

    /* Typography: the template's original pair (owner's choice 2026-11-21).
       Parkinsans for headings, buttons, menu and labels; Outfit for body text. */
    --ks-font-head: "Parkinsans", system-ui, sans-serif;
    --ks-font-body: "Outfit", system-ui, sans-serif;
    --ks-font-ui: "Parkinsans", system-ui, sans-serif;
    --ks-h1: 46px;
    --ks-h2: 40px;
    --ks-h3: 30px;
    --ks-h4: 24px;
    --ks-h5: 18px;
    --ks-h6: 12px;

    /* Layout */
    --ks-container: 1280px;
    --ks-gutter: 30px;             /* side padding inside the container */
    --ks-edge: 20px;               /* gap between full-width panels and the screen edge */
    --ks-section: 120px;           /* vertical space between sections */
    --ks-radius-xl: 40px;          /* big panels */
    --ks-radius-lg: 30px;          /* cards */
    --ks-radius-md: 20px;
    --ks-radius-sm: 16px;
    --ks-shadow: 0 10px 30px rgba(36, 22, 27, 0.08);
    --ks-header-h: 96px;

    /* Motion */
    --ks-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (max-width: 1024px) {
    :root {
        --ks-h1: 36px; --ks-h2: 30px; --ks-h3: 23px; --ks-h4: 19px; --ks-h5: 16px;
        --ks-gutter: 20px;
        --ks-section: 90px;
        --ks-radius-xl: 30px;
    }
}
@media (max-width: 767px) {
    :root {
        --ks-h1: 27px; --ks-h2: 23px; --ks-h3: 19px; --ks-h4: 17px;
        --ks-edge: 16px;
        --ks-gutter: 16px;
        --ks-section: 70px;
        --ks-radius-lg: 24px;
        --ks-header-h: 78px;
    }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--ks-font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.4;
    color: var(--ks-black);
    background: var(--ks-white);
    overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1em; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
p:last-child { margin-bottom: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--ks-font-head);
    font-weight: 400;
    color: var(--ks-black);
}
h1, .ks-h1 { font-size: var(--ks-h1); line-height: 1.2; }
h2, .ks-h2 { font-size: var(--ks-h2); line-height: 1.2; }
h3, .ks-h3 { font-size: var(--ks-h3); line-height: 1.3; }
h4, .ks-h4 { font-size: var(--ks-h4); line-height: 1.4; }
h5, .ks-h5 { font-size: var(--ks-h5); line-height: 1.5; }
h6, .ks-h6 { font-family: var(--ks-font-ui); font-size: var(--ks-h6); line-height: 1.7; letter-spacing: 1px; text-transform: uppercase; }

.ks-text-muted { color: var(--ks-muted); }
.ks-text-lead { font-family: var(--ks-font-head); font-size: 18px; line-height: 1.6; }
.ks-small { font-size: 14px; line-height: 1.6; }
.ks-link { text-decoration: underline; text-underline-offset: 3px; }
.ks-link:hover { color: var(--ks-wine-text); }

/* ---------- Layout helpers ---------- */
.ks-container {
    width: 100%;
    max-width: calc(var(--ks-container) + var(--ks-gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--ks-gutter);
}
.ks-container--narrow { max-width: calc(850px + var(--ks-gutter) * 2); }

/* Full-width rounded panel that sits 20px from the screen edges */
.ks-panel {
    margin-inline: var(--ks-edge);
    border-radius: var(--ks-radius-xl);
}
.ks-panel--cream { background: var(--ks-cream); }
.ks-panel--pale { background: var(--ks-wine-pale); }
.ks-panel--wine { background: var(--ks-wine); color: var(--ks-white); }
.ks-panel--fade { background: var(--ks-gradient-fade); }

.ks-section { padding-block: var(--ks-section); }
.ks-section--top { padding-top: var(--ks-section); }
.ks-section--tight { padding-block: calc(var(--ks-section) * 0.6); }

.ks-grid { display: grid; gap: 20px; }
.ks-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ks-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ks-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
    .ks-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .ks-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .ks-grid--2, .ks-grid--3, .ks-grid--4 { grid-template-columns: 1fr; }
}

.ks-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* Skip link: visible only when focused with the keyboard */
.ks-skip-link {
    position: absolute;
    left: 16px; top: -60px;
    z-index: 1000;
    padding: 12px 20px;
    border-radius: 30px;
    background: var(--ks-gold);
    font-weight: 500;
    transition: top 0.2s;
}
.ks-skip-link:focus { top: 16px; }

/* ---------- Focus ---------- */
:focus-visible {
    outline: 2px solid var(--ks-wine-text);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Icons (inline SVG from helpers.php icon()) ---------- */
.ks-icon { width: 1em; height: 1em; flex-shrink: 0; }
.ks-icon--brand { fill: currentColor; }   /* solid brand marks (WhatsApp, Instagram, Facebook) */

/* ---------- Scrollbars: thin, on-palette (global rule) ---------- */
html, .ks-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--ks-wine) var(--ks-cream);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ks-cream); }
::-webkit-scrollbar-thumb { background: var(--ks-wine); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--ks-wine-text); }

/* ---------- Scroll reveal (soft entrance animations) ----------
   Elements get data-reveal="fade|up|left|right" and optional data-delay (ms).
   reveal.js adds .is-visible when they scroll into view. Without JS, nothing is hidden
   (the hidden state only applies once <html> has the .has-js class). */
.has-js [data-reveal] {
    opacity: 0;
    transition: opacity 1s var(--ks-ease), transform 1s var(--ks-ease);
}
.has-js [data-reveal="up"] { transform: translateY(60px); }
.has-js [data-reveal="left"] { transform: translateX(-60px); }
.has-js [data-reveal="right"] { transform: translateX(60px); }
.has-js [data-reveal].is-visible { opacity: 1; transform: none; }
/* On tablet and mobile, side slide-ins rise from below instead: a sideways start
   position would push past the screen edge and widen the page before it animates in. */
@media (max-width: 1024px) {
    .has-js [data-reveal="left"]:not(.is-visible), .has-js [data-reveal="right"]:not(.is-visible) { transform: translateY(40px); }
}
/* Safety net: nothing inside main can create sideways scrolling ("clip" keeps sticky working) */
main { overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .has-js [data-reveal] { opacity: 1; transform: none; }
}

/* Anchor targets (e.g. contact-us.php#book) land below the sticky header */
section[id], article[id] { scroll-margin-top: calc(var(--ks-header-h) + 20px); }
