/* TrackFit — BroTech. צבעי TrackFit (client/src/App.css, mobile-rn/src/theme/colors.ts).
   עיצוב בהשראת דפי המוצרים של Apple: הרבה מרווח, כותרות ענקיות, כרטיסים שקטים.
   ברירת מחדל: כהה. מצב בהיר נגזר מאותה משפחת צבעים. */

:root {
  --bg: #0f0f14;
  --surface: #1a1a24;
  --surface-2: #22222e;
  --header-bg: rgba(15, 15, 20, 0.72);
  --text: #e8e8f0;
  --text-muted: #9898a8;
  --line: #2a2a3a;
  --accent: #f94d4d;
  --accent-strong: #d63434;
  --accent-hover: #ff6262;
  --focus: #f94d4d;
  --status-live: #6fd08c;
  --status-live-bg: rgba(111, 208, 140, 0.12);
  --glow: rgba(249, 77, 77, 0.24);
  --radius: 28px;
  --max: 1080px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f5f8;
  --surface: #ffffff;
  --surface-2: #ececf2;
  --header-bg: rgba(245, 245, 248, 0.78);
  --text: #1b1d26;
  --text-muted: #5a5f6e;
  --line: #e4e6ec;
  --accent: #d63434;
  --accent-strong: #b82c2c;
  --accent-hover: #b82c2c;
  --focus: #d63434;
  --status-live: #1f7a43;
  --status-live-bg: rgba(31, 122, 67, 0.12);
  --glow: rgba(214, 52, 52, 0.12);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Heebo", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.47;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  background: var(--accent-strong);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header: שקוף עם טשטוש, כמו בתפריט העליון של אפל ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 52px;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  gap: 26px;
  font-size: 0.82rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--text);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.site-nav a:hover {
  opacity: 1;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.lang-toggle {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.theme-toggle:hover,
.lang-toggle:hover {
  background: var(--line);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-soon {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: default;
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.92rem;
}

/* ---------- Hero ---------- */

main {
  display: block;
}

.hero {
  position: relative;
  text-align: center;
  padding: clamp(64px, 11vw, 120px) 22px clamp(56px, 8vw, 96px);
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 90%;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-title {
  direction: ltr;
  margin: 0;
  font-size: clamp(4.4rem, 15vw, 9.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--text) 55%, transparent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dot {
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
}

.lead {
  max-width: 30ch;
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

/* ---------- Device mockup ---------- */

.device {
  position: relative;
  width: 260px;
  aspect-ratio: 9 / 19.5;
  margin-inline: auto;
  padding: 10px;
  border-radius: 46px;
  background: #0b0b10;
  box-shadow:
    inset 0 0 0 2px #2a2a36,
    0 50px 90px -40px color-mix(in srgb, var(--accent) 55%, transparent),
    0 22px 44px -22px rgba(0, 0, 0, 0.6);
}

.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 36px;
  background: linear-gradient(165deg, var(--accent) 0%, #1a1a24 62%, #0f0f14 100%);
  display: grid;
  place-items: center;
}

.device-screen > span {
  color: rgba(255, 255, 255, 0.92);
  font-size: 7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
}

.device-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stage {
  position: relative;
  margin-top: clamp(48px, 8vw, 80px);
}

/* טבעות דקות מאחורי המכשיר, כמו תאורת במה. */
.hero-stage::before,
.hero-stage::after {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid var(--line);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

.hero-stage::before {
  width: min(560px, 120vw);
  aspect-ratio: 1;
}

.hero-stage::after {
  width: min(780px, 150vw);
  aspect-ratio: 1;
  opacity: 0.5;
}

.hero-stage .device {
  animation: float 8s ease-in-out infinite;
  box-shadow:
    inset 0 0 0 2px #2a2a36,
    inset 0 0 40px rgba(255, 255, 255, 0.04),
    0 60px 100px -40px color-mix(in srgb, var(--accent) 60%, transparent),
    0 24px 48px -24px rgba(0, 0, 0, 0.7);
}

.hero-stage .device-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.14) 50%, transparent 65%);
  pointer-events: none;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* ---------- Sections ---------- */

.features,
.availability,
.about {
  max-width: var(--max);
  margin: clamp(96px, 14vw, 160px) auto 0;
  padding: 0 22px;
}

.section-head {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 60px);
}

.features h2,
.availability h2,
.about h2,
.contact h2 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

/* ---------- Tiles: כרטיסים שקטים בגריד, כמו בעמודי המוצר של Apple ---------- */

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 44px;
  min-height: 230px;
  padding: clamp(28px, 4vw, 40px);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: rise 0.7s ease both;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.3s ease;
}

.tile:hover {
  transform: translateY(-3px);
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.tile-icon svg {
  width: 26px;
  height: 26px;
}

.tile-text {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

/* ---------- Product house: כרטיסי המוצרים ---------- */

.products-home {
  max-width: var(--max);
  margin: clamp(96px, 14vw, 160px) auto 0;
  padding: 0 22px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(28px, 4vw, 40px);
  min-height: 420px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  animation: rise 0.7s ease both;
}

.product-card-name {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.product-card-desc {
  margin: 0;
  max-width: 34ch;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.5;
}

.product-card-device {
  position: absolute;
  inset-inline-end: -40px;
  bottom: -60px;
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  opacity: 0.35;
  pointer-events: none;
}

.product-card-device span {
  color: #fff;
  font-size: 9rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  opacity: 0.9;
}

.product-card .btn {
  margin-top: auto;
  position: relative;
}

.product-card-next {
  background: transparent;
  border: 1px dashed var(--line);
  animation-delay: 120ms;
}

.product-card-next .product-card-name {
  color: var(--text-muted);
}

/* ---------- Availability ---------- */

.avail-list {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.avail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.avail-item:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-2px);
}

.avail-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.avail-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.avail-status {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-live {
  color: var(--status-live);
  background: var(--status-live-bg);
}

.status-soon {
  color: var(--text-muted);
  background: var(--surface-2);
}

/* ---------- About / Contact ---------- */

.about {
  text-align: center;
}

.about p:not(.eyebrow) {
  max-width: 56ch;
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1.55;
}

.contact {
  max-width: var(--max);
  margin: 120px auto 0;
  padding: 0 22px;
  text-align: center;
}

.contact[hidden] {
  display: none;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(96px, 14vw, 160px);
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 22px 44px;
}

.site-footer p {
  margin: 0;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- Motion ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Phones ---------- */

@media (max-width: 520px) {
  .site-nav {
    display: none;
  }

  .device {
    width: 220px;
  }

  .avail-item {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .avail-info {
    justify-content: center;
  }

  .avail-item .btn {
    width: 100%;
  }
}
