/* =========================================================================
   IndieVision Design System — Tokens
   The Open Television
   =========================================================================
   Drop-in stylesheet. Load this once at the top of any IndieVision artifact:
     <link rel="stylesheet" href="colors_and_type.css" />
   ========================================================================= */

/* ---- Fonts ----------------------------------------------------------------
   SUBSTITUTION FLAG: Loading from Google Fonts as working choice.
   Replace with self-hosted in fonts/ if/when files are provided.
*/
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Heebo:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* =========================================================================
     COLOR
     ========================================================================= */

  /* Brand green — sampled from the Reco parrot mark */
  --iv-orange-deep:   #0E8C5E;   /* deep green — pressed states    */
  --iv-orange:        #16A974;   /* signature Reco green           */
  --iv-orange-warm:   #43C68E;   /* light green — highlights       */

  /* Reco-named aliases (same values) for clarity in markup */
  --reco-green-deep:  #0E8C5E;
  --reco-green:       #16A974;
  --reco-green-light: #43C68E;
  --reco-navy:        #16243F;
  --reco-navy-soft:   #2C3E5C;

  --iv-gradient:      linear-gradient(135deg, #0E8C5E 0%, #16A974 55%, #43C68E 100%);
  --iv-gradient-soft: linear-gradient(135deg, rgba(22, 169, 116, 0.10) 0%, rgba(67, 198, 142, 0.08) 100%);

  /* Ink — deep navy neutrals from the wordmark, never pure black */
  --iv-ink:           #16243F;   /* primary text              */
  --iv-ink-soft:      #5B6B82;   /* secondary text            */
  --iv-ink-muted:     #93A0B2;   /* tertiary / captions       */
  --iv-ink-faint:     #C2CAD6;   /* disabled, placeholder     */

  /* Paper — backgrounds */
  --iv-paper:         #FFFFFF;
  --iv-paper-warm:    #F6FAF8;   /* subtle green-tinted wash  */
  --iv-paper-warmer:  #ECF6F1;   /* editorial blocks          */

  /* Lines & glow */
  --iv-line:          #E8EDEB;   /* hairline borders          */
  --iv-line-strong:   #DBE3E0;   /* heavier dividers          */
  --iv-glow:          rgba(22, 169, 116, 0.12);
  --iv-glow-strong:   rgba(22, 169, 116, 0.22);
  --iv-glow-orange:   0 0 0 4px rgba(22, 169, 116, 0.20);

  /* Semantic (kept quiet — used for text + icon, not large fills) */
  --iv-live:          #E0321A;   /* the live red dot          */
  --iv-ok:            #1F8A5B;
  --iv-warn:          #C7821A;
  --iv-error:         #C13B1B;

  /* =========================================================================
     SHADOW & ELEVATION (warm-tinted, never pure black)
     ========================================================================= */
  --iv-shadow-1: 0 1px 2px rgba(16, 36, 63, 0.05), 0 1px 1px rgba(16, 36, 63, 0.03);
  --iv-shadow-2: 0 4px 14px rgba(16, 36, 63, 0.07), 0 2px 4px rgba(16, 36, 63, 0.04);
  --iv-shadow-3: 0 18px 44px rgba(16, 36, 63, 0.12), 0 4px 10px rgba(16, 36, 63, 0.06);
  --iv-shadow-glow: 0 0 0 4px rgba(22, 169, 116, 0.20);

  /* =========================================================================
     RADII
     ========================================================================= */
  --iv-radius-s:    6px;
  --iv-radius-m:    12px;
  --iv-radius-l:    20px;
  --iv-radius-xl:   28px;
  --iv-radius-full: 999px;

  /* =========================================================================
     SPACING — 4px base
     ========================================================================= */
  --iv-space-1:  4px;
  --iv-space-2:  8px;
  --iv-space-3:  12px;
  --iv-space-4:  16px;
  --iv-space-5:  24px;
  --iv-space-6:  32px;
  --iv-space-7:  48px;
  --iv-space-8:  64px;
  --iv-space-9:  96px;
  --iv-space-10: 128px;

  /* =========================================================================
     TYPOGRAPHY
     ========================================================================= */
  --iv-font-sans:    'Geist', 'Heebo', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --iv-font-serif:   'Instrument Serif', 'Heebo', ui-serif, Georgia, serif;
  --iv-font-mono:    'Geist Mono', 'Heebo', ui-monospace, 'JetBrains Mono', Menlo, monospace;

  /* Type scale — size / line-height pairs. Tracking applied by class. */
  --iv-display-xl-size:  72px;   --iv-display-xl-line:  76px;
  --iv-display-l-size:   56px;   --iv-display-l-line:   60px;
  --iv-h1-size:          40px;   --iv-h1-line:          44px;
  --iv-h2-size:          28px;   --iv-h2-line:          34px;
  --iv-h3-size:          20px;   --iv-h3-line:          26px;
  --iv-body-size:        16px;   --iv-body-line:        24px;
  --iv-body-s-size:      14px;   --iv-body-s-line:      20px;
  --iv-caption-size:     12px;   --iv-caption-line:     16px;
  --iv-overline-size:    11px;   --iv-overline-line:    14px;
  --iv-mono-size:        13px;   --iv-mono-line:        18px;

  /* Weights */
  --iv-w-light:    300;
  --iv-w-regular:  400;
  --iv-w-medium:   500;
  --iv-w-semibold: 600;
  --iv-w-bold:     700;

  /* =========================================================================
     MOTION
     ========================================================================= */
  --iv-ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --iv-ease-soft:  cubic-bezier(0.16, 1, 0.30, 1);
  --iv-ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  --iv-dur-micro:  120ms;
  --iv-dur-fast:   180ms;
  --iv-dur:        240ms;
  --iv-dur-slow:   400ms;

  /* =========================================================================
     LAYOUT
     ========================================================================= */
  --iv-content-max: 1280px;
  --iv-gutter:      48px;
  --iv-gutter-mobile: 24px;
}

/* =========================================================================
   BASE
   ========================================================================= */
html {
  font-family: var(--iv-font-sans);
  color: var(--iv-ink);
  background: var(--iv-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-size: var(--iv-body-size);
  line-height: var(--iv-body-line);
}

/* =========================================================================
   SEMANTIC TYPE — apply on the actual elements
   ========================================================================= */

.iv-display-xl {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-display-xl-size);
  line-height: var(--iv-display-xl-line);
  font-weight: var(--iv-w-medium);
  letter-spacing: -0.02em;
}

.iv-display-l {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-display-l-size);
  line-height: var(--iv-display-l-line);
  font-weight: var(--iv-w-medium);
  letter-spacing: -0.02em;
}

/* Editorial display — the "credits" voice. Use for show titles + hero accents. */
.iv-editorial-xl {
  font-family: var(--iv-font-serif);
  font-size: var(--iv-display-xl-size);
  line-height: var(--iv-display-xl-line);
  font-weight: var(--iv-w-regular);
  font-style: italic;
  letter-spacing: -0.01em;
}

.iv-editorial-l {
  font-family: var(--iv-font-serif);
  font-size: var(--iv-display-l-size);
  line-height: var(--iv-display-l-line);
  font-weight: var(--iv-w-regular);
  font-style: italic;
  letter-spacing: -0.005em;
}

h1, .iv-h1 {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-h1-size);
  line-height: var(--iv-h1-line);
  font-weight: var(--iv-w-semibold);
  letter-spacing: -0.015em;
  margin: 0;
}

h2, .iv-h2 {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-h2-size);
  line-height: var(--iv-h2-line);
  font-weight: var(--iv-w-semibold);
  letter-spacing: -0.01em;
  margin: 0;
}

h3, .iv-h3 {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-h3-size);
  line-height: var(--iv-h3-line);
  font-weight: var(--iv-w-semibold);
  letter-spacing: -0.005em;
  margin: 0;
}

p, .iv-body {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-body-size);
  line-height: var(--iv-body-line);
  font-weight: var(--iv-w-regular);
  margin: 0;
  text-wrap: pretty;
}

.iv-body-s {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-body-s-size);
  line-height: var(--iv-body-s-line);
  font-weight: var(--iv-w-regular);
}

.iv-caption {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-caption-size);
  line-height: var(--iv-caption-line);
  color: var(--iv-ink-muted);
}

.iv-overline {
  font-family: var(--iv-font-sans);
  font-size: var(--iv-overline-size);
  line-height: var(--iv-overline-line);
  font-weight: var(--iv-w-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--iv-ink-soft);
}

.iv-mono, code, kbd, samp {
  font-family: var(--iv-font-mono);
  font-size: var(--iv-mono-size);
  line-height: var(--iv-mono-line);
  font-feature-settings: "ss01", "cv01";
}

/* =========================================================================
   PRIMITIVES — building blocks UI kits reuse
   ========================================================================= */

/* Focus ring — universal */
.iv-focus:focus-visible,
:where(button, a, [role="button"], input, textarea, select):focus-visible {
  outline: none;
  box-shadow: var(--iv-glow-orange);
  border-radius: var(--iv-radius-m);
}

/* Buttons */
.iv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--iv-space-2);
  height: 40px;
  padding: 0 var(--iv-space-5);
  border-radius: var(--iv-radius-m);
  border: 1px solid transparent;
  background: transparent;
  color: var(--iv-ink);
  font-family: var(--iv-font-sans);
  font-size: var(--iv-body-s-size);
  font-weight: var(--iv-w-medium);
  letter-spacing: -0.005em;
  cursor: pointer;
  transition:
    background var(--iv-dur-fast) var(--iv-ease-out),
    color var(--iv-dur-fast) var(--iv-ease-out),
    border-color var(--iv-dur-fast) var(--iv-ease-out),
    transform var(--iv-dur-micro) var(--iv-ease-out);
  white-space: nowrap;
  user-select: none;
}
.iv-btn:active { transform: scale(0.98); }
.iv-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.iv-btn-primary {
  background: var(--iv-orange);
  color: var(--iv-paper);
}
.iv-btn-primary:hover { background: color-mix(in oklab, var(--iv-orange), black 8%); }

.iv-btn-secondary {
  background: var(--iv-paper);
  color: var(--iv-ink);
  border-color: var(--iv-line-strong);
}
.iv-btn-secondary:hover { background: var(--iv-paper-warm); border-color: var(--iv-ink-faint); }

.iv-btn-ghost {
  background: transparent;
  color: var(--iv-ink);
}
.iv-btn-ghost:hover { background: var(--iv-glow); color: var(--iv-orange-deep); }

.iv-btn-sm { height: 32px; padding: 0 var(--iv-space-4); font-size: 13px; }
.iv-btn-lg { height: 48px; padding: 0 var(--iv-space-6); font-size: 15px; }

/* Inputs */
.iv-input {
  height: 40px;
  padding: 0 var(--iv-space-4);
  border-radius: var(--iv-radius-m);
  border: 1px solid var(--iv-line-strong);
  background: var(--iv-paper);
  color: var(--iv-ink);
  font-family: var(--iv-font-sans);
  font-size: var(--iv-body-size);
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--iv-dur-fast) var(--iv-ease-out),
              box-shadow var(--iv-dur-fast) var(--iv-ease-out);
}
.iv-input::placeholder { color: var(--iv-ink-faint); }
.iv-input:hover { border-color: var(--iv-ink-faint); }
.iv-input:focus { outline: none; border-color: var(--iv-orange); box-shadow: var(--iv-glow-orange); }

/* Cards */
.iv-card {
  background: var(--iv-paper);
  border: 1px solid var(--iv-line);
  border-radius: var(--iv-radius-l);
  transition:
    box-shadow var(--iv-dur) var(--iv-ease-out),
    border-color var(--iv-dur) var(--iv-ease-out),
    transform var(--iv-dur) var(--iv-ease-out);
  overflow: hidden;
}
.iv-card-hoverable:hover {
  box-shadow: var(--iv-shadow-2);
  border-color: transparent;
}

/* Pills / chips */
.iv-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--iv-space-2);
  height: 28px;
  padding: 0 var(--iv-space-3);
  border-radius: var(--iv-radius-full);
  background: var(--iv-paper-warm);
  border: 1px solid var(--iv-line);
  color: var(--iv-ink-soft);
  font-size: 12px;
  font-weight: var(--iv-w-medium);
  letter-spacing: -0.005em;
}
.iv-pill-orange {
  background: var(--iv-glow);
  border-color: transparent;
  color: var(--iv-orange-deep);
}

/* Live indicator */
.iv-live-dot {
  display: inline-flex;
  align-items: center;
  gap: var(--iv-space-2);
  font-family: var(--iv-font-sans);
  font-size: 11px;
  font-weight: var(--iv-w-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--iv-live);
}
.iv-live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--iv-live);
  box-shadow: 0 0 0 0 rgba(224, 50, 26, 0.5);
  animation: iv-pulse 2s var(--iv-ease-inout) infinite;
}
@keyframes iv-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224, 50, 26, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(224, 50, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 50, 26, 0); }
}

/* Logomark wrapper — uses the brand gradient */
.iv-logomark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--iv-gradient);
  color: var(--iv-paper);
}

/* Editorial divider — middle dot separator */
.iv-meta-sep {
  display: inline-block;
  margin: 0 var(--iv-space-2);
  color: var(--iv-ink-faint);
}

/* Selection */
::selection {
  background: var(--iv-glow-strong);
  color: var(--iv-orange-deep);
}

/* ---- Hebrew / RTL ---------------------------------------------------------
   Hebrew glyphs break with tight negative tracking, and Instrument Serif has
   no Hebrew italic, so reset both. The Latin "Reco" wordmark keeps its tracking.
*/
html[lang="he"] * { letter-spacing: normal !important; }
html[lang="he"] .reco-brand { letter-spacing: -0.04em !important; }
html[lang="he"] em { font-style: normal; font-family: var(--iv-font-sans); font-weight: 700; }
html[lang="he"] .ob-back svg,
html[lang="he"] .ll-step-arrow svg { transform: scaleX(-1); }

/* ---- Voucher card ---- */
.reco-vt { transition: transform .25s var(--iv-ease-out); }
.reco-vt.clickable { cursor: pointer; }
.reco-vt.clickable:hover { transform: translateY(-3px); }
.reco-vt.clickable:focus-visible { outline: 3px solid var(--reco-navy); outline-offset: 3px; }
@media (max-width: 640px) { .reco-vt-reward { font-size: 26px !important; } }

/* ── issuer flow: wrapped gift, spinner, opening */
@keyframes reco-spin { to { transform: rotate(360deg); } }
.reco-spin { animation: reco-spin 0.9s linear infinite; }
@keyframes reco-gift-jump {
  0%, 52%, 100% { transform: translateY(0) scale(1, 1); }
  58% { transform: translateY(0) scale(1.05, .93); }
  70% { transform: translateY(-46px) scale(.97, 1.05); }
  82% { transform: translateY(0) scale(1.05, .93); }
  90% { transform: translateY(-6px) scale(.99, 1.02); }
  95% { transform: translateY(0) scale(1.01, .99); }
}
@keyframes reco-bow-wiggle { 0%, 50%, 100% { transform: rotate(0) scale(1); } 62% { transform: rotate(-12deg) scale(1.06); } 76% { transform: rotate(10deg) scale(1.06); } 88% { transform: rotate(-5deg); } }
.reco-gift { --gift-ease: cubic-bezier(.6, 0, .2, 1); }
.reco-gift:not(.open) { animation: reco-gift-jump 2s ease-in-out infinite; transform-origin: 50% 100%; }
.reco-gift-card { transform: scale(.95); transition: transform .8s var(--gift-ease) 1s; }
.reco-gift:not(.open) .reco-gift-card { overflow: hidden; border-radius: 20px; }
.reco-gift.open .reco-gift-card { transform: scale(1); }
.reco-gift-half { direction: ltr; position: absolute; top: 0; width: 50%; overflow: hidden; z-index: 2; box-shadow: 0 14px 34px rgba(16,36,63,0.16);
                  transition: transform .9s var(--gift-ease) .6s, opacity .5s ease 1s; }
.reco-gift-half.l { left: 0; border-radius: 20px 0 0 20px; transform-origin: 0 100%; }
.reco-gift-half.r { right: 0; border-radius: 0 20px 20px 0; transform-origin: 100% 100%; }
.reco-gift.open .reco-gift-half.l { transform: translateX(-125%) rotate(-10deg); opacity: 0; }
.reco-gift.open .reco-gift-half.r { transform: translateX(125%) rotate(10deg); opacity: 0; }
.reco-gift-bow { position: absolute; left: 0; right: 0; top: -26px; z-index: 4; display: flex; justify-content: center; pointer-events: none;
                 filter: drop-shadow(0 4px 6px rgba(16,36,63,0.18)); transition: transform .5s ease .1s, opacity .4s ease .1s; }
.reco-gift-tag { position: absolute; left: 0; right: 0; top: 50%; z-index: 3; display: flex; justify-content: center; pointer-events: none; transform: translateY(-50%); transition: opacity .3s ease; }
.reco-gift-tag span { max-width: 78%; padding: 12px 22px; border-radius: 99px; background: #fff; color: var(--reco-navy); font-size: 30px; font-weight: 700; line-height: 1.15;
                      text-align: center; box-shadow: 0 6px 16px rgba(16,36,63,0.18); }
.reco-gift.open .reco-gift-tag { opacity: 0; }
.reco-gift-bow svg { display: block; transform-origin: 50% 78%; }
.reco-gift:not(.open) .reco-gift-bow svg { animation: reco-bow-wiggle 2s ease-in-out infinite; }
.reco-gift.open .reco-gift-bow { transform: translateY(-40px) scale(.6) rotate(-10deg); opacity: 0; }
