/*
Theme Name: Caesarstone Natural Stone Catalog
Description: Thin standalone theme for the Natural Stone hand-selection tool. Holds the design tokens (dark and light) and fonts shared with the Digital Dashboard; the UI itself is rendered by the ns-slab-catalog plugin.
Author: Itay Haephrati
Version: 0.3.0
Requires PHP: 8.2
Text Domain: ns-catalog
*/

/* ==========================================================================
   Fonts. Self-hosted Frutiger LT Pro, the same files as the other sites.
   ========================================================================== */

@font-face {
    font-family: 'Frutiger LT Pro';
    src: url('assets/fonts/FrutigerLTPro-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Frutiger LT Pro';
    src: url('assets/fonts/FrutigerLTPro-Roman.woff2') format('woff2');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Frutiger LT Pro';
    src: url('assets/fonts/FrutigerLTPro-Bold.woff2') format('woff2');
    font-weight: 600 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Design tokens, the Digital Dashboard's: built only from the Caesarstone
   style guide (Figma "Style Guide & Components").

     Black        #0D0D0D   ground
     Grey         #383838   hairlines, quiet surfaces
     Terracotta   #F46C42   the one accent: active state, focus, selection
     Light Grey   #EDEDEF / #FBFBFB   text on dark
     Error        #CC1A1A   Confirmation #269414

   Dark is the tool's own look; light is a per-browser choice (the sun/moon
   in the rail), set as html.ns-light so every rule stays the same and only
   these values change. An element marked .ns-force-dark (the sign-in page,
   the photo viewer) keeps the dark values in either mode.

   scripts/check-tokens.sh fails the build on a literal colour, font-size,
   font-weight or radius anywhere but this file.

   Contrast  Text 4.5:1 or more on its own background, in both modes;
             the edge of a control (input, button, checkbox) 3:1 or more.
   Buttons   One primary per screen (ink: black on light, white on dark),
             everything else secondary (outlined) or ghost. Terracotta
             marks state (active, selected, focus), it is never a button.
   Size    12 / 14 / 16 / 20 / 32 by role; labels 14; inputs never below 16 (iOS zoom).
   Weight  400 text, 500 controls, 600 card titles, 700 page titles and figures.
   Radius  0 for cards and photos, 6 for controls, 10 for pop-ups, pill for chips.
   No letter-spacing and no uppercase.
   ========================================================================== */

:root,
.ns-force-dark {
    color-scheme: dark;

    --cs-guide-black: #0d0d0d;
    --cs-guide-grey: #383838;
    --cs-guide-terracotta: #f46c42;
    --cs-guide-light-1: #ededef;
    --cs-guide-light-3: #fbfbfb;
    --cs-guide-white: #ffffff;

    --bg: var(--cs-guide-black);
    --bg-glass: rgba(13, 13, 13, 0.86);
    --surface: #141414;
    --surface-2: #1b1b1b;
    --surface-3: #262626;
    --surface-media: #1f1f1f;   /* behind a photo while it loads */
    --hover: rgba(237, 237, 239, 0.05);
    --press: rgba(237, 237, 239, 0.09);
    --line: rgba(237, 237, 239, 0.09);
    --line-strong: var(--cs-guide-grey);
    --ctl-border: #6b6b71;     /* the edge of anything you type into or press: 3.4:1 on the surface (WCAG 1.4.11) */

    --ink: var(--cs-guide-light-3);
    --ink-2: #bdbdc1;   /* 9.8:1 */
    --ink-3: #9a9aa0;   /* 6.6:1 */
    --ink-4: #8a8a90;   /* 5.0:1: the faintest text */
    --ink-inverse: var(--cs-guide-black);
    --ink-on-accent: var(--cs-guide-black);
    --ink-on-photo: var(--cs-guide-white);

    --accent: var(--cs-guide-terracotta);
    --accent-strong: #f68a68;
    --accent-soft: rgba(244, 108, 66, 0.13);
    --accent-line: rgba(244, 108, 66, 0.5);
    --focus: var(--cs-guide-terracotta);

    --good: #2fa31b;
    --good-soft: rgba(38, 148, 20, 0.16);
    --critical: #ec4b4b;
    --critical-soft: rgba(204, 26, 26, 0.16);
    --critical-line: rgba(204, 26, 26, 0.5);

    /* Slab statuses: a text colour, a tint and a dot each. */
    --st-available: #4cbf38;
    --st-available-soft: rgba(38, 148, 20, 0.17);
    --st-sent: #e5b04c;
    --st-sent-soft: rgba(229, 176, 76, 0.14);
    --st-reserved: #f68a68;
    --st-reserved-soft: rgba(244, 108, 66, 0.15);
    --st-sold: #9a9aa0;
    --st-sold-soft: rgba(237, 237, 239, 0.07);

    --scrim: rgba(5, 5, 5, 0.62);
    --scrim-photo: rgba(5, 5, 5, 0.55);
    --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(237, 237, 239, 0.08);
    --shadow-card-hover: 0 12px 30px rgba(0, 0, 0, 0.45);
    --photo-fade: linear-gradient(180deg, transparent 55%, rgba(5, 5, 5, 0.55));
    --hero-wash: linear-gradient(180deg, rgba(244, 108, 66, 0.13), transparent 70%);
    --login-veil: linear-gradient(180deg, rgba(5, 5, 5, 0.5) 0%, rgba(5, 5, 5, 0.62) 60%, rgba(5, 5, 5, 0.78) 100%);
    --glass: rgba(20, 20, 20, 0.8);

    --theme-color: #0d0d0d;
}

html.ns-light {
    color-scheme: light;

    --bg: #f4f4f5;
    --bg-glass: rgba(244, 244, 245, 0.88);
    --surface: #ffffff;
    --surface-2: #ffffff;
    --surface-3: #ececee;
    --surface-media: #e7e6e3;
    --hover: rgba(13, 13, 13, 0.04);
    --press: rgba(13, 13, 13, 0.08);
    --line: rgba(13, 13, 13, 0.09);
    --line-strong: #d4d4d8;
    --ctl-border: #8a8a91;     /* 3.4:1 on white */

    --ink: var(--cs-guide-black);
    --ink-2: #3f3f44;   /* 10.5:1 on white */
    --ink-3: #5f5f66;   /* 6.3:1 */
    --ink-4: #6e6e75;   /* 5.0:1 */
    --ink-inverse: var(--cs-guide-white);

    --accent-strong: #b8411a;   /* terracotta that carries text: 5.4:1 on white, 5.0:1 on the page */
    --accent-soft: rgba(244, 108, 66, 0.12);
    --focus: #e0562c;

    --good: #1f7a10;
    --good-soft: rgba(38, 148, 20, 0.11);
    --critical: #c21818;
    --critical-soft: rgba(204, 26, 26, 0.08);
    --critical-line: rgba(204, 26, 26, 0.4);

    --st-available: #1a6b0d;   /* 5.8:1 on its tint */
    --st-available-soft: rgba(38, 148, 20, 0.11);
    --st-sent: #7a4f00;       /* 5.6:1 on its tint */
    --st-sent-soft: rgba(234, 179, 8, 0.16);
    --st-reserved: #a83a14;    /* 5.2:1 on its tint */
    --st-reserved-soft: rgba(244, 108, 66, 0.13);
    --st-sold: #5f5f66;
    --st-sold-soft: rgba(13, 13, 13, 0.06);

    --scrim: rgba(13, 13, 13, 0.38);
    --shadow-pop: 0 18px 50px rgba(13, 13, 13, 0.14), 0 0 0 1px rgba(13, 13, 13, 0.08);
    --shadow-card-hover: 0 12px 30px rgba(13, 13, 13, 0.12);
    --hero-wash: linear-gradient(180deg, rgba(244, 108, 66, 0.12), transparent 70%);
    --glass: rgba(255, 255, 255, 0.86);

    --theme-color: #f4f4f5;
}

:root {
    --font-sans: 'Frutiger LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Consolas', monospace;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    --lh-tight: 1.2;
    --lh-base: 1.5;

    --cs-text-2xs: 0.75rem;    /* 12  rail labels: nothing on screen is smaller */
    --cs-text-xs: 0.75rem;     /* 12  meta, chips, eyebrows */
    --cs-text-sm: 0.875rem;    /* 14  UI text */
    --cs-text: 1rem;           /* 16  body, inputs */
    --cs-text-lg: 1.25rem;     /* 20  card and section titles */
    --cs-kpi: 1.75rem;         /* 28  a figure on a tile */
    --cs-display-sm: 2rem;     /* 32  the page title */
    --cs-display: 2.75rem;     /* 44  the sign-in headline */

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    --radius-card: 0;
    --radius-ctl: 6px;
    --radius-sm: 4px;
    --radius-pop: 10px;
    --radius-pill: 9999px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    --rail-w: 84px;
    --bar-h: 64px;
    --tabbar-h: 0px;
    --ctl-h: 44px;          /* a thumb's target on a phone */
    --tap: 44px;
    --page-max-w: 1480px;

    /* Older names the theme's fallback template uses. */
    --ink-muted: var(--ink-3);
    --border: 1px solid var(--line);
}

@media (min-width: 900px) {
    :root {
        --ctl-h: 40px;
    }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scrollbar-color: var(--surface-3) transparent;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--cs-text);
    font-weight: var(--fw-regular);
    line-height: var(--lh-base);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern";
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
    margin: 0;
    padding: 0;
}

ul,
ol {
    list-style: none;
}

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

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

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

[hidden] {
    display: none !important;
}
