/* ==========================================================================
   Risha — brand foundation
   Values taken verbatim from "4. Stylesheet/Stylesheet.pdf" (Stylesheet v02).
   Shared by every theme; themes layer their own palette on top.
   ========================================================================== */

/* --- Typefaces ----------------------------------------------------------- */

/* English title face */
@font-face {
    font-family: "Lyon";
    src: url("/fonts/risha/lyon-text-regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lyon";
    src: url("/fonts/risha/lyon-text-italic.otf") format("opentype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Lyon";
    src: url("/fonts/risha/lyon-text-semibold.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Lyon's Arabic cut — used for the ريشة lockup and Arabic display lines */
@font-face {
    font-family: "Lyon Arabic";
    src: url("/fonts/risha/lyon-arabic-regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lyon Arabic";
    src: url("/fonts/risha/lyon-arabic-bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* English paragraph face */
@font-face {
    font-family: "Satoshi";
    src: url("/fonts/risha/satoshi-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Satoshi";
    src: url("/fonts/risha/satoshi-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Satoshi";
    src: url("/fonts/risha/satoshi-black.woff2") format("woff2");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Kurdish / Arabic title face */
@font-face {
    font-family: "Shahd";
    src: url("/fonts/risha/shahd-regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Kurdish / Arabic paragraph face */
@font-face {
    font-family: "Bahij";
    src: url("/fonts/risha/bahij-roman.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* --- Tokens -------------------------------------------------------------- */

:root {
    /* Palette — Stylesheet v02, five swatches, no others exist */
    --risha-green: #275629;
    --risha-brown: #96765a;
    --risha-cream: #eddabe;
    --risha-white: #ffffff;
    --risha-black: #000000;

    /* Tints derived for UI states only — not brand colours */
    --risha-green-deep: #1b3c1d;
    --risha-green-soft: #3a7440;
    --risha-cream-soft: #f6ecdc;
    --risha-ink: #16140f;

    /* Type stacks */
    --risha-title: "Lyon", "Lyon Arabic", Georgia, "Times New Roman", serif;
    --risha-body: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --risha-title-ar: "Shahd", "Lyon Arabic", serif;
    --risha-body-ar: "Bahij", "Satoshi", sans-serif;

    /* House easing — used across all themes */
    --risha-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --risha-ease-quart: cubic-bezier(0.76, 0, 0.24, 1);
}

/* --- Resets shared by the themes ---------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--risha-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* `clip`, not `hidden`: hidden computes overflow-y to `auto`, which makes
       this a scroll container and silently disables `position: sticky` on
       every descendant — which is what the hero stage runs on. */
    overflow-x: clip;
}

/* RTL: Arabic and Kurdish swap the whole type system */
[dir="rtl"] {
    --risha-title: var(--risha-title-ar);
    --risha-body: var(--risha-body-ar);
}

.risha-mark {
    display: block;
    width: auto;
    height: 100%;
}

.u-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}

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

/* --- Media placeholders -------------------------------------------------- */
/* Every slot that will later hold a generated image or video renders as a
   labelled plate, so the composition reads correctly before any media exists. */

.slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        repeating-linear-gradient(
            45deg,
            rgba(150, 118, 90, 0.16) 0 12px,
            rgba(150, 118, 90, 0.06) 12px 24px
        ),
        var(--risha-green-deep);
    color: var(--risha-cream);
    isolation: isolate;
}

.slot::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(237, 218, 190, 0.45);
    pointer-events: none;
}

.slot__label {
    position: relative;
    z-index: 1;
    max-width: 80%;
    padding: 10px 16px;
    border: 1px solid rgba(237, 218, 190, 0.4);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    font-family: var(--risha-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.6;
    text-transform: uppercase;
    text-align: center;
}

.slot__label span {
    display: block;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: none;
    opacity: 0.72;
}
