/* ─────────────────────────────────────────────────────────────
   TAP · CORE STYLESHEET
   Single Source of Truth for design tokens, navbar, and
   page-to-page View Transitions across all pages.
   ───────────────────────────────────────────────────────────── */

/* ============= 1. CROSS-DOCUMENT VIEW TRANSITIONS ============= */
/* Enables smooth fade/morph between pages in supporting browsers
   (Chrome 126+, Edge 126+, Safari 18+). Graceful fallback below. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: taty-page-out 220ms cubic-bezier(.4, 0, .2, 1) both;
}
::view-transition-new(root) {
  animation: taty-page-in 280ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes taty-page-out {
  to { opacity: 0; transform: translateY(-6px); }
}
@keyframes taty-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* The navbar morphs in place instead of fading — feels app-like */
.taty-nav { view-transition-name: taty-nav; }
.taty-nav .logo { view-transition-name: taty-logo; }

/* Fallback fade-in for browsers without View Transitions */
@media (prefers-reduced-motion: no-preference) {
  @supports not (view-transition-name: root) {
    body { animation: taty-page-in 320ms cubic-bezier(.2, .8, .2, 1) both; }
  }
}

/* ============= 2. SHARED DESIGN TOKENS ============= */
/* These tokens are the contract between all pages.
   DO NOT redefine in page-level <style>. Extend with --xxx in
   page styles only when adding page-specific accents. */
:root {
  /* Surface */
  --bg:           #04090a;
  --bg-1:         #08141a;
  --bg-2:         #0d2026;

  /* Ink */
  --ink:          #e8f2ed;
  --ink-dim:      #9fb8b0;
  --ink-mute:     #5e7872;

  /* Jungle (atmospheric backgrounds) */
  --jungle-deep:  #0a1f1c;
  --jungle:       #13332e;
  --jungle-mid:   #1c4a40;
  --leaf:         #3a7a68;

  /* Neon Pop accents */
  --pink:         #ff3ea0;
  --pink-hot:     #ff7ec4;
  --magenta:      #e63b9c;
  --neon:         #3ee08a;
  --neon-hot:     #7af5b0;
  --acid:         #c9ff3a;

  /* Status */
  --red:          #ff5577;
  --red-hot:      #ff8aa4;
  --crimson:      #c9304a;
  --gold:         #e9c372;

  /* Lines */
  --line:         rgba(255, 62, 160, 0.28);
  --line-soft:    rgba(255, 255, 255, 0.06);

  /* Type — distinctive pop-art display + clean Hebrew sans */
  --font-body:    "Heebo", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", "Heebo", serif;
  --font-pop:     "Permanent Marker", "Heebo", cursive;
  --font-stencil: "Monoton", "Heebo", display;
  --font-mono:    "Space Grotesk", ui-monospace, monospace;
}

/* ============= 3. UNIFIED NAVBAR ============= */
/* Single canonical structure — injected by taty-nav.js.
   The active page is determined automatically from
   data-active on the root element. */
.taty-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: linear-gradient(180deg,
    rgba(4, 9, 10, 0.88) 0%,
    rgba(4, 9, 10, 0.72) 100%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-body);
}

.taty-nav .logo {
  font-family: var(--font-stencil);
  font-size: 22px;
  letter-spacing: .08em;
  color: var(--ink);
  user-select: none;
}
.taty-nav .logo .dot {
  color: var(--pink);
  text-shadow: 0 0 14px var(--pink);
}
.taty-nav .logo a {
  color: inherit;
  text-decoration: none;
}

.taty-nav .links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
}
.taty-nav .links a {
  color: #cfe8dd;
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: color .18s ease;
}
.taty-nav .links a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  transition: width .25s cubic-bezier(.2, .8, .2, 1);
}
.taty-nav .links a:hover { color: var(--ink); }
.taty-nav .links a:hover::after { width: 100%; }
.taty-nav .links a.active {
  color: var(--ink);
}
.taty-nav .links a.active::after {
  width: 100%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}

.taty-nav .right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.taty-nav .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.taty-nav .icon-btn:hover {
  background: rgba(255, 62, 160, 0.08);
  border-color: var(--line);
  color: var(--pink-hot);
}
.taty-nav .icon-btn .cart-dot {
  position: absolute;
  top: 8px;
  inset-inline-end: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}

.taty-nav .portal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--pink);
  border-radius: 999px;
  color: var(--pink-hot);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.taty-nav .portal:hover {
  background: var(--pink);
  color: #0a0a0a;
  box-shadow: 0 0 24px rgba(255, 62, 160, 0.5);
}

/* ============= 4. UTILITIES ============= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Respect motion preferences globally */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
