/* ==========================================================================
   Living Homes — design tokens
   Every value used in more than one place lives here. Change it once.
   ========================================================================== */

:root {
  /* ---- Brand palette (Living Home guideline 2026) ---- */
  --color-brown: #311000;
  --color-rust: #944C24;
  --color-green: #193020;
  --color-red: #812018;
  --color-sand: #E2B791;
  --color-offwhite: #FFFCF6;
  --color-white: #FFFFFF;

  /* ---- Roles on light surfaces ---- */
  --color-bg: var(--color-offwhite);
  --color-surface: var(--color-white);
  --color-placeholder: #EADBCB;          /* behind images while they load */
  --color-sand-soft: #F1E4D2;            /* light sand band, brown text 13:1 */
  --color-scrim: rgba(49, 16, 0, .55);   /* darkens a photo under white text */
  --color-text: var(--color-brown);
  --color-text-muted: #5C4A40;           /* 7.5:1 on bg */
  --color-text-subtle: #75625A;          /* 5.1:1 on bg */
  --color-accent: var(--color-rust);
  --color-favorite: var(--color-red);
  --color-line: rgba(49, 16, 0, .14);
  --color-line-strong: rgba(49, 16, 0, .2);   /* hairlines on sand */
  --color-text-muted-on-sand: #5A3418;        /* 6:1 on sand */
  --color-glass: rgba(255, 255, 255, .94);    /* round buttons over photos */
  --color-veil: rgba(255, 252, 246, .8);      /* lifts text off a photo */

  /* ---- Roles on dark surfaces (brown / green bands) ---- */
  --color-on-dark: var(--color-offwhite);
  --color-on-dark-muted: var(--color-sand);
  --color-on-dark-subtle: #CDAE93;
  --color-line-on-dark: rgba(226, 183, 145, .22);
  --color-line-on-dark-strong: rgba(226, 183, 145, .4);
  --color-line-on-green: rgba(242, 242, 242, .14);

  /* ---- Typography ---- */
  --font-family: "Tajawal", system-ui, sans-serif;

  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-nav: 14px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 18px;
  --fs-xl: 26px;
  --fs-2xl: 34px;
  --fs-3xl: 38px;
  --fs-4xl: 52px;
  --fs-5xl: 64px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 700;   /* Tajawal has no 600; buttons and small headings use bold */
  --fw-bold: 700;
  --fw-black: 800;

  --lh-tight: 1.25;     /* display */
  --lh-heading: 1.35;   /* h2/h3 */
  --lh-body: 1.8;       /* Arabic running text */

  /* ---- Spacing scale ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 48px;
  --space-11: 64px;
  --space-12: 72px;
  --space-13: 88px;
  --space-14: 96px;
  --space-section: 48px;    /* gap between sections, on every screen size */

  /* ---- Layout ---- */
  --container-max: 1312px;
  --container-gutter: 64px;   /* each side */
  --container-width: min(var(--container-max), 100vw - var(--container-gutter) * 2);
  --edge-offset: max(var(--container-gutter), (100vw - var(--container-max)) / 2);   /* container edge → viewport edge */
  --header-height: 65px;
  --nav-height: 60px;
  --notice-height: 38px;

  /* ---- Radius ---- */
  --radius-xs: 3px;     /* tags, tooltips */
  --radius-sm: 6px;     /* buttons, inputs, small thumbs */
  --radius-md: 10px;    /* product and room images */
  --radius-lg: 16px;    /* large feature images */
  --radius-pill: 999px; /* round controls, chips, badges */

  /* ---- Shadows (offset + soft blur, tinted brown) ---- */
  --shadow-sm: 0 2px 8px rgba(49, 16, 0, .08);
  --shadow-md: 0 6px 18px rgba(49, 16, 0, .16);
  --shadow-lg: 0 16px 40px rgba(49, 16, 0, .18);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --duration-xfast: .2s;   /* menus appearing */
  --duration-fast: .3s;    /* colour, background, nav underline */
  --duration-base: .4s;    /* transforms */
  --duration-slow: 1.2s;   /* image zoom, slide crossfade */
  --zoom-scale: 1.04;

  /* ---- Navigation ---- */
  --nav-underline: 3px;

  /* ---- Controls ---- */
  --control-height: 46px;   /* round icon buttons, pills */
  --input-height: 40px;     /* every text field on the site */
  --button-height: 54px;
  --button-padding-x: 32px;
  --icon-size: 22px;
  --icon-size-sm: 18px;
  --icon-stroke: 1.5;

  /* ---- Focus ---- */
  --focus-ring: 2px solid var(--color-accent);
  --focus-offset: 3px;

  /* ---- Layers ---- */
  --z-raised: 1;
  --z-overlay: 10;
  --z-toast: 20;
}

/* ---- Smaller screens: the same tokens, scaled down ----
   Breakpoints: 1024px (tablet: the nav becomes a drawer), 640px (phone). */
@media (max-width: 1024px) {
  :root {
    --container-gutter: 32px;
    --fs-5xl: 48px;
    --fs-4xl: 42px;
    --fs-3xl: 32px;
  }
}
@media (max-width: 640px) {
  :root {
    --container-gutter: 16px;
    --fs-md: 16px;
    --fs-lg: 16px;
    --fs-xl: 20px;
    --fs-2xl: 26px;
    --fs-3xl: 26px;
    --fs-4xl: 30px;
    --fs-5xl: 34px;
    --control-height: 42px;
    --button-height: 50px;
    --button-padding-x: 24px;
  }
}
