/* =====================================================================
   TechnoVista Consult — Design Tokens
   Palette: "Oasis"  ·  Style: Claymorphism  ·  Voice: friendly-forward
   Fonts: Fredoka (display) · Nunito (body) · Baloo Bhaijaan 2 + IBM Plex
          Sans Arabic (Arabic companions). Loaded from Google Fonts.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Baloo+Bhaijaan+2:wght@500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  /* ---------- BRAND · Teal / Emerald scale ---------- */
  --teal-50:  #E7F7F2;
  --teal-100: #C7EEE3;
  --teal-200: #9DE0CD;
  --teal-300: #5FD0B6;
  --teal-400: #2BB89A;
  --teal-500: #0E9B82;   /* PRIMARY */
  --teal-600: #0B7E6B;   /* primary deep / hover */
  --teal-700: #0A6353;
  --teal-800: #08493E;
  --teal-900: #0A3A33;

  /* ---------- ACCENT · Apricot "sun" scale ---------- */
  --sun-50:  #FDF1E3;
  --sun-100: #FBE0C4;
  --sun-200: #F8C795;
  --sun-300: #F4A259;   /* ACCENT */
  --sun-400: #E8893B;
  --sun-500: #D2702A;   /* accent deep / hover */

  /* ---------- NEUTRAL · warm sand scale ---------- */
  --cream:    #FBF6EC;  /* card / raised surface */
  --sand-50:  #F7F0E2;
  --sand-100: #F3EADB;  /* PAGE BACKGROUND */
  --sand-200: #EADFC9;
  --sand-300: #DCCBA8;
  --sand-400: #C9B68F;
  --sand-500: #A38F73;  /* hairlines on sand */

  /* ---------- INK · text on light ---------- */
  --ink:        #1C2B2A;  /* fg1 — headings, strong text */
  --ink-soft:   #3A4A47;
  --ink-muted:  #50605C;  /* fg2 — body */
  --ink-subtle: #76847F;  /* fg3 — captions, meta */
  --taupe:      #97836A;  /* fg on sand / labels */

  /* ---------- ON-DARK text ---------- */
  --on-teal:        #EAFBF5;
  --on-teal-muted:  #9FD8CB;
  --cream-on-dark:  #FBF6EC;

  /* ---------- SEMANTIC ---------- */
  --success: #1F9D6B;  --success-bg: #E4F4EC;
  --warning: #F2B544;  --warning-bg: #FBF0D6;
  --danger:  #E5604D;  --danger-bg:  #FBE5E1;
  --info:    #2B9FC4;  --info-bg:    #E1F2F8;

  /* ---------- SURFACE roles ---------- */
  --bg:            var(--sand-100);
  --surface:       var(--cream);
  --surface-sunk:  var(--sand-50);
  --surface-deep:  var(--sand-200);
  --primary:       var(--teal-500);
  --primary-hover: var(--teal-600);
  --accent:        var(--sun-300);
  --accent-hover:  var(--sun-400);
  --hairline:      rgba(151,131,106,0.22);
  --hairline-strong: rgba(151,131,106,0.38);

  /* ---------- TYPE families ---------- */
  --font-display:    'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body:       'Nunito', system-ui, sans-serif;
  --font-display-ar: 'Baloo Bhaijaan 2', 'Tahoma', sans-serif;
  --font-body-ar:    'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
  --font-mono:       'Nunito', ui-monospace, monospace; /* numerals; system has no clay mono */

  /* ---------- TYPE scale (fluid) ---------- */
  --fs-display: clamp(40px, 6vw, 72px);
  --fs-h1:      clamp(32px, 4.4vw, 52px);
  --fs-h2:      clamp(26px, 3.2vw, 38px);
  --fs-h3:      clamp(21px, 2.2vw, 27px);
  --fs-h4:      19px;
  --fs-lead:    clamp(17px, 1.7vw, 20px);
  --fs-body:    16px;
  --fs-sm:      14px;
  --fs-xs:      12.5px;
  --fs-eyebrow: 13px;

  --lh-tight: 1.04;
  --lh-snug:  1.2;
  --lh-body:  1.6;
  --tracking-eyebrow: 0.16em;

  /* ---------- RADII (clay loves big radii) ---------- */
  --r-xs:  10px;
  --r-sm:  14px;
  --r-md:  20px;
  --r-lg:  28px;
  --r-xl:  36px;
  --r-2xl: 48px;
  --r-pill: 999px;

  /* ---------- SPACING (4px base) ---------- */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;  --s-8: 32px;  --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* =================================================================
     CLAY SHADOW SYSTEM
     Light source: top-left. Recipe = soft outer drop (bottom-right)
     + outer light (top-left) + inner highlight + inner shade.
     ================================================================= */
  --clay-sm:
     6px 6px 14px rgba(150,128,96,0.20),
    -4px -4px 10px rgba(255,255,255,0.85),
     inset 2px 2px 5px rgba(255,255,255,0.55),
     inset -2px -2px 5px rgba(150,128,96,0.08);

  --clay:
     14px 14px 30px rgba(150,128,96,0.24),
    -10px -10px 24px rgba(255,255,255,0.85),
     inset 3px 3px 7px rgba(255,255,255,0.65),
     inset -4px -4px 9px rgba(150,128,96,0.10);

  --clay-lg:
     26px 26px 56px rgba(150,128,96,0.28),
    -16px -16px 38px rgba(255,255,255,0.9),
     inset 4px 4px 9px rgba(255,255,255,0.7),
     inset -6px -6px 14px rgba(150,128,96,0.12);

  /* pressed / pulled-in (toggles, active states) */
  --clay-inset:
     inset 5px 5px 11px rgba(150,128,96,0.22),
     inset -5px -5px 11px rgba(255,255,255,0.85);

  /* deep well — inputs, tracks, recessed panels */
  --clay-well:
     inset 6px 6px 13px rgba(150,128,96,0.20),
     inset -5px -5px 12px rgba(255,255,255,0.9);

  /* colored clay — for teal surfaces / primary buttons */
  --clay-teal:
     12px 12px 26px rgba(11,126,107,0.34),
    -6px -6px 16px rgba(95,208,182,0.30),
     inset 3px 3px 7px rgba(255,255,255,0.30),
     inset -4px -4px 10px rgba(8,73,62,0.40);

  --clay-accent:
     12px 12px 26px rgba(210,112,42,0.30),
    -6px -6px 16px rgba(255,255,255,0.40),
     inset 3px 3px 7px rgba(255,255,255,0.45),
     inset -4px -4px 10px rgba(150,84,30,0.32);

  /* page ambient background wash */
  --bg-wash:
    radial-gradient(1200px 720px at 10% -10%, #FBF6EC 0%, transparent 55%),
    radial-gradient(1000px 620px at 100% 0%, #EFE2CC 0%, transparent 50%),
    var(--sand-100);

  --motion-spring: cubic-bezier(.34,1.56,.64,1); /* gentle clay bounce */
  --motion-ease:   cubic-bezier(.4,0,.2,1);
}

/* =====================================================================
   SEMANTIC ELEMENT STYLES  (opt-in via .tv-prose or root usage)
   ===================================================================== */
.tv-display, .tv-h1, .tv-h2, .tv-h3, .tv-h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
.tv-display { font-size: var(--fs-display); font-weight: 600; line-height: var(--lh-tight); }
.tv-h1 { font-size: var(--fs-h1); font-weight: 600; line-height: var(--lh-tight); }
.tv-h2 { font-size: var(--fs-h2); font-weight: 600; line-height: var(--lh-snug); }
.tv-h3 { font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-snug); }
.tv-h4 { font-size: var(--fs-h4); font-weight: 600; line-height: 1.3; }

.tv-lead { font-family: var(--font-body); font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-muted); }
.tv-body { font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-muted); }
.tv-small { font-family: var(--font-body); font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-subtle); }

.tv-eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--teal-600);
}

/* Arabic / RTL — swap families and relax letter-spacing */
[dir="rtl"], .tv-ar {
  font-family: var(--font-body-ar);
}
[dir="rtl"] .tv-display, [dir="rtl"] .tv-h1, [dir="rtl"] .tv-h2,
[dir="rtl"] .tv-h3, [dir="rtl"] .tv-h4, .tv-ar.tv-display, .tv-ar .tv-h1 {
  font-family: var(--font-display-ar);
  letter-spacing: 0;
}
[dir="rtl"] .tv-eyebrow { letter-spacing: 0; }

/* =====================================================================
   CLAY PRIMITIVES — reusable helpers
   ===================================================================== */
.clay-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--clay);
}
.clay-card--sm { border-radius: var(--r-md); box-shadow: var(--clay-sm); }
.clay-card--lg { border-radius: var(--r-xl); box-shadow: var(--clay-lg); }
.clay-well { background: var(--surface-sunk); border-radius: var(--r-md); box-shadow: var(--clay-well); }
.clay-pressed { box-shadow: var(--clay-inset); }

/* Buttons */
.tv-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: var(--r-pill);
  padding: 14px 26px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .18s var(--motion-spring), box-shadow .18s var(--motion-ease), background .18s;
}
.tv-btn:active { transform: translateY(1px) scale(0.98); }

.tv-btn--primary { background: var(--teal-500); color: var(--on-teal); box-shadow: var(--clay-teal); }
.tv-btn--primary:hover { background: var(--teal-600); transform: translateY(-1px); }
.tv-btn--accent  { background: var(--sun-300); color: #3a2410; box-shadow: var(--clay-accent); }
.tv-btn--accent:hover { background: var(--sun-400); transform: translateY(-1px); }
.tv-btn--soft {
  background: var(--cream); color: var(--ink); box-shadow: var(--clay-sm);
}
.tv-btn--soft:hover { transform: translateY(-1px); box-shadow: var(--clay); }
.tv-btn--ghost { background: transparent; color: var(--teal-600); box-shadow: none; }
.tv-btn--ghost:hover { background: var(--teal-50); }

/* Pill / chip */
.tv-chip {
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--cream); color: var(--ink-soft); box-shadow: var(--clay-sm);
}

/* Input */
.tv-input {
  font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: var(--surface-sunk); border: none; outline: none;
  border-radius: var(--r-sm); padding: 13px 16px; width: 100%;
  box-shadow: var(--clay-well);
}
.tv-input::placeholder { color: var(--ink-subtle); }
.tv-input:focus { box-shadow: var(--clay-well), 0 0 0 3px rgba(14,155,130,0.28); }

html, body { background: var(--bg); color: var(--ink); }
body { font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
