/* SecureSystems Landing — design tokens & shared styles */

:root {
  --bg: #081834;
  --bg-2: #0d2042;
  --bg-3: #13284f;
  --bg-4: #1d3868;
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.7);
  --ink-mute: rgba(255, 255, 255, 0.5);
  --ink-faint: rgba(255, 255, 255, 0.32);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #c9a96a; /* warm gold accent for editorial signal */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-blur: 16px;
  --glass-blur-strong: 50px;
  --radius: 9999px;

  --font-heading: "Instrument Serif", "EB Garamond", Georgia, serif;
  --font-body: "Barlow", system-ui, -apple-system, sans-serif;
  --font-arabic: "Cairo", "Barlow", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: var(--font-arabic);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* -------- Liquid Glass -------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  background-blend-mode: luminosity;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.glass-strong {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
  border: 1px solid var(--line-strong);
  box-shadow:
    4px 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -1px 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.glass::before,
.glass-strong::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.15) 25%,
    rgba(255, 255, 255, 0) 45%,
    rgba(255, 255, 255, 0) 55%,
    rgba(255, 255, 255, 0.15) 75%,
    rgba(255, 255, 255, 0.5) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* -------- Typography -------- */
.h-display {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.86;
  color: var(--ink);
}
html[dir="rtl"] .h-display { font-style: normal; }

.h-section {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.92;
}
html[dir="rtl"] .h-section { font-style: normal; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.body-text {
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-soft);
}
html[dir="rtl"] .body-text { font-family: var(--font-arabic); font-weight: 400; }

/* -------- Pills / chips -------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: visible;
}
.pill.glass, .pill.glass-strong { overflow: visible; }
.pill.glass::before, .pill.glass-strong::before { border-radius: 9999px; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  padding-inline-end: 16px;
  border-radius: 9999px;
  white-space: nowrap;
  overflow: visible !important;
}
.tag-pill::before { border-radius: 9999px; }
.stat-value { white-space: nowrap; }

.pill-badge {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: var(--bg-2);
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  border: 0;
  min-height: 48px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 160ms ease, background 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: var(--bg-2); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 14px 18px;
}

/* -------- Cinematic placeholder (CSS-only video stand-in) -------- */
.cinematic {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.cinematic::before {
  /* base atmospheric gradient */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 70% 20%, rgba(201, 169, 106, 0.18), transparent 60%),
    radial-gradient(140% 80% at 20% 80%, rgba(29, 56, 104, 0.55), transparent 60%),
    linear-gradient(180deg, #0a1d3e 0%, #081834 45%, #050f24 100%);
}
.cinematic::after {
  /* film grain */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
  animation: grain 1.6s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -1%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(2%, -2%); }
  100% { transform: translate(0, 0); }
}

/* skyline silhouette */
.skyline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.skyline svg { position: absolute; bottom: 0; left: 0; width: 100%; height: 60%; }

/* horizon glow */
.horizon {
  position: absolute;
  left: 0; right: 0;
  bottom: 28%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201,169,106,0.55), rgba(255,255,255,0.5), rgba(201,169,106,0.55), transparent);
  filter: blur(1.5px);
  opacity: 0.7;
}

/* placeholder note */
.placeholder-note {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(8, 24, 52, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 10px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.placeholder-note .dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: #c9a96a;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(201,169,106,0.8);
}

/* -------- Section fades -------- */
.fade-top {
  position: absolute; left: 0; right: 0; top: 0; height: 200px;
  background: linear-gradient(to bottom, var(--bg), transparent);
  pointer-events: none;
  z-index: 2;
}
.fade-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: 280px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
  z-index: 2;
}

/* -------- Layout -------- */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
}

.section {
  position: relative;
  padding: clamp(80px, 10vw, 160px) 0;
}

/* -------- RTL helpers -------- */
html[dir="rtl"] .mirror-x { transform: scaleX(-1); }

/* keep latin numerics (phone) LTR inside RTL */
.ltr-inline {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

/* -------- Animations -------- */
@keyframes blurIn {
  0% { filter: blur(12px); opacity: 0; transform: translateY(20px); }
  100% { filter: blur(0); opacity: 1; transform: translateY(0); }
}
.blur-in { animation: blurIn 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,169,106,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(201,169,106,0); }
}
.pulse-dot { animation: pulseDot 2.4s ease-out infinite; }

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .blur-in, .pulse-dot, .cinematic::after { animation: none; }
}

/* -------- Marquee -------- */
.marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: scrollMarquee 40s linear infinite;
}

/* -------- Tables / divider list -------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* -------- Focus -------- */
:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------- Scrollbar -------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }


/* ════════════════════════════════════════════════════════════════
   MOBILE STYLES — < 760px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {

  /* Containers tighten up */
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }

  /* Display titles scale way down */
  .h-display { font-size: clamp(2.6rem, 12vw, 4rem) !important; line-height: 1 !important; }
  .h-section { font-size: clamp(1.9rem, 8vw, 2.6rem) !important; line-height: 1.05 !important; }

  /* Body text stays readable */
  .body-text { font-size: 15px !important; line-height: 1.55 !important; }

  /* Hero specific */
  .hero-cta-row { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .hero-cta-row > * { width: 100% !important; justify-content: center !important; }
  .hero-partners { gap: 24px !important; flex-wrap: wrap !important; }
  .hero-partners-label { font-size: 12px !important; }
  .hero-sectors-row { font-size: 1.4rem !important; gap: 28px !important; flex-wrap: wrap !important; }

  /* Universal: collapse 2/3/4-column inline grids to a single column */
  [data-mobile-stack="1"] { display: flex !important; flex-direction: column !important; gap: 16px !important; }
  [data-mobile-stack="2"] { grid-template-columns: 1fr 1fr !important; }

  /* Pricing: stack tiers, remove vertical lift */
  [data-mobile-stack="pricing"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding-top: 36px !important;
  }
  [data-mobile-stack="pricing"] > div { transform: none !important; }

  /* Chess (capabilities) rows stack */
  [data-mobile-stack="chess"] { grid-template-columns: 1fr !important; gap: 24px !important; }
  [data-mobile-stack="chess-flip"] { grid-template-areas: "media" "text" !important; grid-template-columns: 1fr !important; }

  /* Footer collapses to one column */
  [data-mobile-stack="footer"] { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* FAQ: stack title and accordion */
  [data-mobile-stack="faq"] { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* Process: 2x2 grid instead of 4 across */
  [data-mobile-stack="process"] { grid-template-columns: 1fr 1fr !important; }

  /* Buttons: keep nowrap but allow wrapping rows of buttons */
  .btn { padding: 10px 18px !important; font-size: 13px !important; }

  /* Cards: less aggressive padding on phone */
  .glass[style*="padding: 32"], .glass-strong[style*="padding: 32"],
  .glass[style*="padding: 36"], .glass-strong[style*="padding: 36"] {
    padding: 24px !important;
  }

  /* Tag pills smaller */
  .tag-pill { font-size: 12px !important; }
  .pill { font-size: 12px !important; }

  /* Nav: shrink logo + wordmark, keep contact + lang */
  nav { top: 12px !important; padding: 0 16px !important; gap: 8px !important; }
  nav img[alt="SecureSystems"] { width: 38px !important; height: 38px !important; }
  nav span[style*="font-heading"] { font-size: 17px !important; }

  /* Stats / cta rows */
  [data-mobile-stack="cta-row"] { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }

  /* MOST POPULAR badge: tighter */
  [data-popular-badge] { font-size: 10px !important; padding: 6px 14px !important; letter-spacing: 0.16em !important; }
}

@media (max-width: 420px) {
  .h-display { font-size: 2.4rem !important; }
  .container { padding: 0 16px; }
}


/* -------- Slot badge (numbered media placeholder) -------- */
.slot-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  background: rgba(8, 24, 52, 0.7);
  border: 1px solid rgba(201, 169, 106, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  max-width: calc(100% - 40px);
}
.slot-badge-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a1d3e;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.slot-badge-prompt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}
@media (max-width: 760px) {
  .slot-badge { top: 12px; left: 12px; padding: 6px 12px 6px 6px; gap: 8px; }
  .slot-badge-num { width: 24px; height: 24px; font-size: 11px; }
  .slot-badge-prompt { font-size: 10px; max-width: 200px; }
}


/* PRODUCTION: hide media slot badges until videos are wired in */
.slot-badge { display: none !important; }
.placeholder-note { display: none !important; }
