/* ==========================================================================
   کودکستان درخشش مهتاب — Design Tokens
   Generated 2026-09-12 from the LIVE Figma variable collections.
   File: HPDCutAu8XG3jvg4nCz0bF

   This SUPERSEDES the archived dmk-tokens.css, which predates two approved
   corrections: the border-token fix (border-soft/default #EDE4D4,
   border-strong #C9BCA8, border-focus → Teal/brand) and the spacing-ramp fix
   (space/5 is now 24, not a duplicate of space/4).

   Mapping
     Color / Semantic    → :root (Default)  ·  [data-theme="inverse"] (Inverse)
     Color / Illustration→ --ill-*
     Spacing             → --space-* (mode-agnostic) + --layout-* (mode-aware)
     Typography / Size   → --size-* / --leading-* / --tracking-* (mode-aware)
     Radius / Stroke /
     Font Weight /Opacity→ --radius-* / --stroke-* / --fw-* / --opacity-*
   Shadows are Figma Effect Styles, mirrored here as --shadow-*.

   Mode-aware tokens switch at 768px. Figma has exactly two modes
   (Desktop, Mobile); the 768–1023 tablet band is a DERIVED step and is
   marked as such below — it needs sign-off, it is not in the Figma file.
   ========================================================================== */

:root {
  /* ---------- Color · Semantic (Default mode) ---------- */
  --color-surface-page:            #fdfbf7;
  --color-surface-card:            #ffffff;
  --color-surface-raised:          #f4e285;
  --color-surface-field:           #f8f4ec;
  --color-surface-tint:            #fbf3e4;
  --color-surface-hover:           #fff8f2;
  --color-surface-press:           #fff2f4;
  --color-surface-inverse:         #1f150d;
  --color-surface-inverse-container:#123b47;
  --color-surface-light-50:        #fdfbf780;
  --color-surface-dark-50:         #2e2a2680;
  --color-surface-sand-dark-30:    #3842554d;
  --color-surface-ink-soft-30:     #3a36304d;

  --color-text-heading:            #02153e;
  --color-text-body:               #042161;
  --color-text-muted:              #486c9d;
  --color-text-inverse:            #fdfbf7;
  --color-text-on-primary:         #1f150d;
  --color-text-disabled:           #a8b4b0;
  --color-text-complementary:      #2a9d8f;
  --color-text-complementary-alt:  #1f7a6f;

  --color-action-primary:          #f4a261;
  --color-action-primary-hover:    #e08a3e;
  --color-action-primary-press:    #c97529;
  --color-action-primary-tint:     #fdf0e2;
  --color-action-primary-30:       #f4a2614d;
  --color-action-accent:           #2a9d8f;
  --color-action-accent-hover:     #5b8e7d;
  --color-action-accent-press:     #1f7a6f;
  --color-action-accent-tint:      #e6f4f1;
  --color-action-highlight:        #8cb369;
  --color-action-highlight-tint:   #eff5e8;

  --color-border-soft:             #ede4d4;
  --color-border-default:          #ede4d4;
  --color-border-strong:           #c9bca8;
  --color-border-focus:            #2a9d8f;
  --color-border-disabled:         #a8b4b0;

  --color-feedback-success:        #8cb369;
  --color-feedback-success-tint:   #eff5e8;
  --color-feedback-warning:        #d9a93f;
  --color-feedback-warning-tint:   #fcf4e0;
  --color-feedback-error:          #bc4b51;
  --color-feedback-error-tint:     #f5dbda;
  --color-feedback-info:           #2a9d8f;
  --color-feedback-info-tint:      #e6f4f1;

  /* ---------- Color · Illustration ---------- */
  --ill-ink:#02153e;      --ill-teal:#2a9d8f;       --ill-teal-light:#7ed0c3;
  --ill-green:#8cb369;    --ill-green-light:#bbdd9a;--ill-yellow:#f4e285;
  --ill-yellow-warm:#ffd470; --ill-orange:#f4a261;  --ill-coral:#e76f51;
  --ill-rose:#f3a6a0;     --ill-cream:#fbf3e4;      --ill-white:#ffffff;
  --ill-brown:#cf975e;    --ill-brown-warm:#805d3a; --ill-brown-hair:#673b1e;
  --ill-blue:#0098d0;     --ill-blue-warm:#007eae;

  /* ---------- Gradients · mirrored from Figma paint styles ---------- */
  /* gradient/title — the sanctioned hero identity gradient.
     Figma paint style S:dcc527c3a3a76b4dcf7f0634f82f165ff3bf1752,
     stops bind Coral/light (#E76F51) @0.00 and Orange/brand (#F4A261) @1.00,
     CSS 135deg, top-left to bottom-right.
     illustration/coral aliases Coral/light and illustration/orange aliases
     Orange/brand, so these are the same source variables the Figma style uses.
     USE ONLY on the hero title / underline identity moment. Never on buttons,
     body text, text under 24px, badges, form fields, admin, or illustration art. */
  --gradient-title: linear-gradient(135deg, var(--ill-coral) 0%, var(--ill-orange) 100%);

  /* ---------- Spacing · primitives (identical in both modes) ---------- */
  --space-0:2px;  --space-1:4px;  --space-2:8px;   --space-3:12px;
  --space-4:16px; --space-5:24px; --space-6:32px;  --space-7:48px;
  --space-8:64px; --space-9:96px; --space-10:128px;--space-11:352px;

  /* ---------- Spacing · layout aliases (Desktop mode) ---------- */
  --layout-section-y:        var(--space-9);  /* 96 */
  --layout-container-pad-md: var(--space-6);  /* 32 */
  --layout-container-pad-lg: var(--space-8);  /* 64 */
  --layout-container-pad-side:var(--space-11);/* 352 — narrow measure blocks */
  --layout-card-pad:         var(--space-5);  /* 24 */
  --layout-grid-gap:         var(--space-5);  /* 24 */
  --layout-form-gap:         var(--space-4);  /* 16 */
  --layout-block-gap-lg:     var(--space-4);  /* 16 */
  --layout-block-gap-md:     var(--space-3);  /* 12 */
  --layout-block-gap-sm:     var(--space-2);  /* 8  */
  --layout-block-gap-xsm:    var(--space-1);  /* 4  */

  /* ---------- Containers (derived from Final Draft measurements) ---------- */
  --container:      1200px;  /* footer, blog, CTA band, page hero */
  --container-wide: 1248px;  /* pillars + programs grids */
  --gutter:         var(--space-5);

  /* ---------- Typography · families ---------- */
  --font-display: "Lalezar", "Vazirmatn", Tahoma, sans-serif;
  --font-ui:      "Vazirmatn", Tahoma, sans-serif;

  /* ---------- Typography · scale (Desktop mode) ---------- */
  --size-hero:64px;     --leading-hero:80px;
  --size-h1:40px;       --leading-h1:52px;
  --size-h2:30px;       --leading-h2:42px;
  --size-h3:20px;       --leading-h3:32px;
  --size-body-lg:18px;
  --size-body:16px;     --leading-body:30px;
  --size-body-sm:14px;
  --size-caption:12.5px;--leading-caption:28px;
  --size-eyebrow:12px;  --leading-eyebrow:20px;
  --size-eyebrow-sm:10px;
  --tracking-eyebrow:0.7px;
  --tracking-display:0;

  /* ---------- Font weight ---------- */
  --fw-regular:400; --fw-medium:500; --fw-semibold:600; --fw-bold:700; --fw-extrabold:800;

  /* ---------- Radius ---------- */
  --radius-xsm:4px; --radius-sm:8px; --radius-md:14px;
  --radius-lg:20px; --radius-xl:28px; --radius-pill:999px;

  /* ---------- Stroke ---------- */
  --stroke-icon-sm:1.22px; --stroke-icon-md:1.75px; --stroke-icon-lg:2.33px;
  --stroke-border:1px; --stroke-border-field:1.5px;
  --stroke-focus:3px; --stroke-highlight:6px;

  /* ---------- Opacity ---------- */
  --opacity-10:.10; --opacity-20:.20; --opacity-30:.30; --opacity-40:.40;
  --opacity-50:.50; --opacity-65:.65; --opacity-75:.75; --opacity-85:.85;
  --opacity-90:.90; --opacity-95:.95;

  /* ---------- Shadows (Effect Styles) ---------- */
  --shadow-xs:0 1px 2px rgba(43,38,32,.05);
  --shadow-sm:0 1px 2px rgba(43,38,32,.05), 0 2px 8px rgba(43,38,32,.06);
  --shadow-md:0 8px 24px rgba(43,38,32,.08);
  --shadow-lg:0 20px 48px rgba(43,38,32,.12);

  /* ---------- Motion (approved pattern sheet) ---------- */
  --ease-out:cubic-bezier(.22,1,.36,1);
  --dur-fast:150ms; --dur-base:250ms; --dur-slow:450ms;
}

/* ======================= Inverse colour mode ======================= */
[data-theme="inverse"]{
  --color-surface-page:#1f150d;            --color-surface-card:#1f150d;
  --color-surface-raised:#0090c4;          --color-surface-field:#4e4d4a;
  --color-surface-tint:#46443f;            --color-surface-hover:#586e50;
  --color-surface-press:#3c4b37;           --color-surface-inverse:#fdfbf7;
  --color-surface-inverse-container:#fff2f4;

  --color-text-heading:#e7f0f2;            --color-text-body:#c5e5f2;
  --color-text-muted:#8c8375;              --color-text-inverse:#1f150d;
  --color-text-on-primary:#02153e;         --color-text-disabled:#486c9d;
  --color-text-complementary:#fff2f4;      --color-text-complementary-alt:#fff8f2;

  --color-action-primary:#f4a259;          --color-action-primary-hover:#f4a261;
  --color-action-primary-press:#e08a3e;    --color-action-primary-tint:#e7f0f2;
  --color-action-accent:#2a9d8f;           --color-action-accent-hover:#5b8e7d;
  --color-action-accent-press:#1f7a6f;     --color-action-accent-tint:#fcf4e0;

  --color-border-soft:#57544d;             --color-border-default:#57544d;
  --color-border-strong:#aea392;           --color-border-focus:#e6f4f1;
}

/* ============ Mobile mode — Figma "Mobile" (≤767px) ============
   These are the Figma Mobile-mode values, applied verbatim. */
@media (max-width:767px){
  :root{
    --layout-section-y:        var(--space-7);  /* 48 */
    --layout-container-pad-md: var(--space-4);  /* 16 */
    --layout-container-pad-lg: var(--space-6);  /* 32 */
    --layout-container-pad-side:var(--space-9); /* 96 */
    --layout-card-pad:         var(--space-4);  /* 16 */
    --layout-grid-gap:         var(--space-4);  /* 16 */
    --layout-form-gap:         var(--space-3);  /* 12 */
    --layout-block-gap-lg:     var(--space-3);  /* 12 */
    --layout-block-gap-md:     var(--space-2);  /* 8  */
    --layout-block-gap-sm:     var(--space-1);  /* 4  */
    --layout-block-gap-xsm:    var(--space-0);  /* 2  */

    --gutter: var(--space-4);

    --size-hero:38px;     --leading-hero:48px;
    --size-h1:28px;       --leading-h1:36px;
    --size-h2:22px;       --leading-h2:32px;
    --size-h3:18px;       --leading-h3:28px;
    --size-body-lg:16px;
    --size-body:15px;     --leading-body:26px;
    --size-body-sm:13.5px;
    --size-caption:12px;  --leading-caption:24px;
    --size-eyebrow:12px;  --leading-eyebrow:16px;
  }
}

/* ============ Tablet step — DERIVED, not in Figma (768–1023px) ============
   Figma has no third mode. This band keeps the Desktop type scale but
   relaxes vertical rhythm so a 4-up grid can become 2-up without the page
   feeling airy. Flagged for sign-off. */
@media (min-width:768px) and (max-width:1023px){
  :root{
    --layout-section-y: var(--space-8);   /* 64 — derived */
    --gutter:           var(--space-6);   /* 32 — derived */
    --size-hero:48px;   --leading-hero:60px;  /* derived midpoint */
  }
}
