/* ─────────────────────────────────────────────────────────────────────
   Xtended Techs — corporate home
   Aesthetic: Hebrew-first "dark editorial". Calm deep-slate, elegant
   Hebrew serif display (Frank Ruhl Libre) + Assistant body, single cyan
   accent (#0891b2 brand). RTL-native. No terminal cues.
   CSP: all styles external; fonts from Google only; images same-origin;
   atmosphere via CSS gradients (no data-URIs).
   ────────────────────────────────────────────────────────────────────── */

:root {
  --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: 144px;

  --fs-xs: .78rem; --fs-sm: .9rem; --fs-md: 1.0625rem; --fs-lg: 1.25rem;
  --fs-xl: 1.6rem; --fs-2xl: 2.1rem; --fs-3xl: 2.9rem; --fs-4xl: clamp(2.6rem, 6.5vw, 4.6rem);

  --serif: "Frank Ruhl Libre", "Heebo", Georgia, serif;
  --sans:  "Assistant", "Heebo", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html, html[data-theme="dark"] {
  --bg:        #13151B;
  --bg-soft:   #181B22;
  --surface:   #1F232D;
  --surface-2: #262B37;
  --ink:       #EEF0F6;
  --muted:     #AEB4C6;
  --faint:     #767C90;
  --line:      rgba(255,255,255,.09);
  --line-soft: rgba(255,255,255,.055);
  --accent:    #2BC4DE;
  --accent-2:  #14A4BE;
  --accent-ink:#04222A;
  --accent-soft: rgba(43,196,222,.13);
  --glow: radial-gradient(60% 50% at 78% 0%, rgba(43,196,222,.14), transparent 70%);
}
html[data-theme="light"] {
  --bg:        #FBFAF7;
  --bg-soft:   #F4F2EC;
  --surface:   #FFFFFF;
  --surface-2: #F2F1EB;
  --ink:       #15171B;
  --muted:     #4C5163;
  --faint:     #7B8093;
  --line:      rgba(20,22,28,.12);
  --line-soft: rgba(20,22,28,.07);
  --accent:    #0E7C90;
  --accent-2:  #0A6172;
  --accent-ink:#FFFFFF;
  --accent-soft: rgba(14,124,144,.10);
  --glow: radial-gradient(60% 50% at 78% 0%, rgba(14,124,144,.10), transparent 70%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image: var(--glow);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; transition: color .18s var(--ease); }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); font-size: .9em; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-5); }
.skip-link { position: absolute; inset-inline-start: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: var(--space-3) var(--space-4); z-index: 100; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.skip-link:focus { inset-inline-start: var(--space-4); }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line-soft); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.wordmark { display: inline-flex; align-items: baseline; gap: .4ch; font-family: var(--serif); }
.wordmark-text { font-weight: 800; font-size: 1.32rem; letter-spacing: -.02em; }
.wordmark-sub { font-family: var(--sans); font-weight: 600; font-size: .72rem; letter-spacing: .22em; color: var(--accent); text-transform: uppercase; }
.header-tools { display: flex; align-items: center; gap: var(--space-3); }
.lang-switcher { display: inline-flex; align-items: center; gap: .35ch; font-family: var(--sans); font-size: var(--fs-sm); color: var(--faint); }
.lang-switcher button { background: none; border: 0; color: var(--faint); font: inherit; cursor: pointer; padding: 4px 6px; border-radius: 6px; transition: color .15s, background .15s; }
.lang-switcher button[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.lang-switcher button:hover { color: var(--accent); }
.lang-divider { color: var(--line); }
.theme-toggle { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 50%; cursor: pointer; transition: color .15s, border-color .15s, transform .15s; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-12deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-moon { display: none; } html[data-theme="dark"] .icon-sun { display: none; } html[data-theme="dark"] .icon-moon { display: block; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .55ch; font-family: var(--sans); font-weight: 700; font-size: var(--fs-md); padding: 13px 24px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; transition: transform .16s var(--ease), background .16s, box-shadow .16s, color .16s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 28px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-arrow { transition: transform .18s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(-4px); }
.link-arrow { color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; gap: .4ch; }
.link-arrow:hover { gap: .8ch; }

/* ── Eyebrow / section heads (NO mono, NO numbers) ──────────────── */
.eyebrow { font-family: var(--sans); font-weight: 700; font-size: var(--fs-sm); letter-spacing: .04em; color: var(--accent); margin-bottom: var(--space-3); display: inline-flex; align-items: center; gap: .6ch; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); display: inline-block; border-radius: 2px; }
.section { padding-block: var(--space-9); border-top: 1px solid var(--line-soft); }
.section-soft { background: var(--bg-soft); }
.section-title { font-size: var(--fs-3xl); max-width: 16ch; }
.section-head { margin-bottom: var(--space-7); }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { padding-block: clamp(var(--space-9), 13vh, var(--space-10)) var(--space-9); }
.hero-eyebrow { font-family: var(--sans); font-weight: 600; font-size: var(--fs-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.hero-title { font-size: var(--fs-4xl); max-width: 16ch; margin-block: var(--space-5) var(--space-5); }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: var(--fs-lg); color: var(--muted); max-width: 54ch; margin-bottom: var(--space-7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.hero-trust { margin-top: var(--space-7); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); color: var(--faint); font-size: var(--fs-sm); }
.hero-trust span { display: inline-flex; align-items: center; gap: .5ch; }
.hero-trust span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Products ───────────────────────────────────────────────────── */
.products-grid { display: grid; gap: var(--space-5); }
.product-card { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-7); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-7); transition: border-color .2s, transform .2s; }
.product-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.product-kicker { font-family: var(--sans); font-weight: 600; font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.product-name { font-size: var(--fs-2xl); margin-block: var(--space-2) var(--space-3); }
.product-name .mark { color: var(--accent); }
.product-tagline { color: var(--muted); margin-bottom: var(--space-5); }
.product-features { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-6); }
.product-features li { display: flex; gap: .7ch; align-items: flex-start; color: var(--muted); font-size: var(--fs-sm); }
.product-features li::before { content: "✓"; color: var(--accent); font-weight: 800; }
.product-shot { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.product-shot img { width: 100%; height: auto; }
.product-shot figcaption { padding: var(--space-3) var(--space-4); font-size: var(--fs-xs); color: var(--faint); border-top: 1px solid var(--line-soft); }
.more-note { color: var(--faint); font-size: var(--fs-sm); margin-top: var(--space-6); }

/* ── Principles ─────────────────────────────────────────────────── */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.principle { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: var(--space-6); }
.principle h3 { font-size: var(--fs-xl); margin-bottom: var(--space-3); }
.principle p { color: var(--muted); font-size: var(--fs-sm); }

/* ── Contact ────────────────────────────────────────────────────── */
.contact-lead { font-size: var(--fs-lg); color: var(--muted); max-width: 52ch; margin-bottom: var(--space-5); }
.contact-mail { font-family: var(--serif); font-size: var(--fs-2xl); color: var(--accent); font-weight: 700; }
.contact-mail:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact-note { color: var(--faint); font-size: var(--fs-sm); margin-top: var(--space-4); }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line-soft); padding-block: var(--space-7); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.footer-mark { font-family: var(--serif); font-weight: 800; letter-spacing: -.01em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-5); font-size: var(--fs-sm); color: var(--muted); }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { color: var(--faint); font-size: var(--fs-sm); }

/* ── Reveal animations ──────────────────────────────────────────────
   Content is ALWAYS visible by default. Animation is progressive
   enhancement only: hero fades in on load (time-based, always safe);
   below-fold elements use scroll-driven reveal ONLY where supported,
   so unsupported browsers simply show everything. */
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero .reveal { opacity: 0; animation: reveal .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * .07s); }
  @supports (animation-timeline: view()) {
    .section .reveal { opacity: 0; animation: reveal .7s var(--ease) forwards; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .product-card { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .section { padding-block: var(--space-8); }
}
