/* Tawleh.lb design tokens: exactly the client design handoff §2 (docs/client-design-handoff.md).
   60/30/10: cream surfaces dominate, chocolate for the header, footer and summary, chartreuse only on
   calls to action and selections. Change colours here only. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/inter-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/plus-jakarta-sans-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/plus-jakarta-sans-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-800-normal.woff2") format("woff2"); }

:root {
    /* ---------------------------------------------------------- colour (handoff §2.1) */
    --cream: #F5EBE0;
    --cream-light: #FDF9F4;
    --cream-soft: #EFE2D3;
    --cream-border: #DFCDBA;
    --choco: #5B2C1B;
    --choco-dark: #3E1D11;
    --choco-muted: #7D4E3B;
    --choco-light: #9A6B57;
    --chartreuse: #C2C629;
    --chartreuse-hover: #B2B61E;
    --chartreuse-soft: #E6E896;
    --wa-green: #1E8E3E;
    --white: #FFFFFF;

    /* Translucent tints the handoff uses as Tailwind opacity modifiers (cream/15, choco-dark/40, ...). */
    --cream-line: rgb(253 249 244 / 0.15);          /* dividers on chocolate */
    --choco-dark-line: rgb(62 29 17 / 0.40);        /* header bottom border */
    --choco-muted-line: rgb(125 78 59 / 0.30);      /* announcement bottom border */
    --backdrop: rgb(62 29 17 / 0.60);               /* drawer / modal backdrop */
    --placeholder: rgb(154 107 87 / 0.60);

    /* Preview stage gradient stops */
    --stage-1: #F9F2EA;
    --stage-2: #F4E8DA;
    --stage-3: #EAD9C6;

    /* ---------------------------------------------------------- type (handoff §2.2) */
    --font-sans: "Inter", system-ui, -apple-system, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --text-2xs: 0.6875rem;  /* 11 */
    --text-xs: 0.75rem;     /* 12 / 16 */
    --text-sm: 0.875rem;    /* 14 / 20 */
    --text-base: 1rem;      /* 16 / 24 */
    --text-lg: 1.125rem;    /* 18 / 28 */
    --text-xl: 1.25rem;     /* 20 / 28 */
    --text-2xl: 1.5rem;     /* 24 / 32 */
    --text-3xl: 1.875rem;   /* 30 / 36 */
    --text-4xl: 2.25rem;    /* 36 / 40 */

    --tracking-tight: -0.025em;
    --tracking-wide: 0.025em;
    --tracking-widest: 0.1em;

    /* ---------------------------------------------------------- spacing (handoff §2.3, Tailwind scale) */
    --space-1: 0.25rem;     /*  4 */
    --space-1-5: 0.375rem;  /*  6 */
    --space-2: 0.5rem;      /*  8 */
    --space-2-5: 0.625rem;  /* 10 */
    --space-3: 0.75rem;     /* 12 */
    --space-3-5: 0.875rem;  /* 14 */
    --space-4: 1rem;        /* 16 */
    --space-5: 1.25rem;     /* 20 */
    --space-6: 1.5rem;      /* 24 */
    --space-7: 1.75rem;     /* 28 */
    --space-8: 2rem;        /* 32 */
    --space-10: 2.5rem;     /* 40 */
    --space-12: 3rem;       /* 48 */
    --space-14: 3.5rem;     /* 56 */
    --space-16: 4rem;       /* 64 */
    --space-20: 5rem;       /* 80 */

    /* ---------------------------------------------------------- radii */
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-3xl: 24px;
    --radius-full: 9999px;

    /* ---------------------------------------------------------- shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-warm: 0 12px 32px -8px rgba(91, 44, 27, 0.12);
    --shadow-warm-lg: 0 20px 45px -12px rgba(62, 29, 17, 0.18);
    --shadow-chartreuse: 0 8px 20px -4px rgba(194, 198, 41, 0.45);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* ---------------------------------------------------------- z-index */
    --z-chart-line: 10;
    --z-chart-table: 20;
    --z-header: 40;
    --z-buybar: 44;     /* mobile buy bar: above the page, below the chat button and every overlay */
    --z-chat: 45;       /* floating chat button: above the page, below every overlay */
    --z-overlay: 50;    /* drawer backdrop and panel, modal, toast */
    --z-toast: 51;      /* the handoff's toast is z-50 but later in the DOM than the drawer */

    /* ---------------------------------------------------------- layout (handoff §2.4) */
    --container-max: 80rem;        /* 1280, max-w-7xl */
    --container-narrow: 48rem;     /* 768, max-w-3xl */
    --gutter: 1rem;                /* px-4, sm:px-6, lg:px-8 */
    --header-height: 72px;         /* h-18, sm:h-20 */
    --header-condensed: 64px;      /* the header once it has stuck (polish §5.2) */
    --chat-size: 52px;             /* floating chat button height */
    --chat-offset: 16px;           /* its distance from the viewport edges */
    --chat-clearance: calc(var(--chat-size) + var(--chat-offset)); /* space the button covers at the bottom */

    /* ---------------------------------------------------------- motion (handoff §6) */
    --ease: ease;
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);   /* Tailwind default transition timing */
    --ease-in-out: ease-in-out;
    --ease-drawer: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-press: 150ms;
    --dur-hover: 200ms;
    --dur-backdrop: 250ms;
    --dur-panel: 300ms;
    --dur-reveal: 700ms;

    /* ================================================================== polish additions (polish spec §5.1)
       Added tokens only: every value above stays as the handoff defines it. */

    /* ---------------------------------------------------------- fluid type scale (phone -> desktop) */
    --fs-xs: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);      /* 12 -> 13 */
    --fs-sm: clamp(0.875rem, 0.85rem + 0.12vw, 0.9375rem);    /* 14 -> 15 */
    --fs-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);      /* 16 -> 17 */
    --fs-lg: clamp(1.125rem, 1.08rem + 0.25vw, 1.25rem);      /* 18 -> 20 */
    --fs-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);         /* 20 -> 24 */
    --fs-2xl: clamp(1.5rem, 1.32rem + 0.9vw, 1.875rem);       /* 24 -> 30 */
    --fs-3xl: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);        /* 28 -> 40 */
    --fs-4xl: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);            /* 32 -> 56 */

    /* ---------------------------------------------------------- section rhythm and line length */
    --section-space: clamp(4rem, 2.5rem + 5vw, 7rem);         /* about 64 px on phones, 112 px on desktop */
    --measure: 65ch;

    /* ---------------------------------------------------------- elevation, built from the warm shadows above */
    --elev-1: var(--shadow-sm), 0 4px 12px -6px rgba(91, 44, 27, 0.10);   /* resting cards */
    --elev-2: var(--shadow-sm), var(--shadow-warm);                        /* raised / hovered cards */
    --elev-3: var(--shadow-warm-lg);                                       /* floating bars and panels */

    /* ---------------------------------------------------------- motion durations and easings
       (--ease-out already names the handoff's Tailwind curve, so the smooth ease is --ease-smooth) */
    --dur-fast: 150ms;
    --dur: 250ms;
    --dur-slow: 400ms;
    --ease-smooth: cubic-bezier(0.2, 0.7, 0.2, 1);
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
    :root {
        --gutter: 1.5rem;
        --header-height: 80px;
    }
}

@media (min-width: 1024px) {
    :root { --gutter: 2rem; }
}
