/* ============================================================================
   SYBER — 2026 3D redesign layer. Loaded AFTER styles.css so it overrides the
   base rules: dark WebGL hero stage (scene.js paints #webgl), aurora glow,
   animated gradient text, glassmorphism, glow buttons, 3D card tilt, scroll
   motion. Degrades: no WebGL / reduced-motion → aurora + gradient show through.
   ============================================================================ */
:root {
  --ink-0: #060b16; --ink-1: #0a1424; --ink-2: #0f1e33;
  --glass: rgba(255, 255, 255, 0.06); --glass-border: rgba(255, 255, 255, 0.14);
  --font-display: "Sora", "Manrope", system-ui, sans-serif;
}

/* ---------- HERO STAGE ---------- */
.hero {
  position: relative; isolation: isolate;
  background: radial-gradient(120% 120% at 70% -10%, #103b3a 0%, #0a1a2f 45%, #060b16 100%);
  color: #fff; overflow: hidden; border-radius: 0 0 40px 40px;
  min-height: min(92vh, 900px); display: flex; align-items: center;
  padding-top: clamp(96px, 14vh, 160px);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#webgl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; }
#webgl.scene-ready { opacity: 1; }
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite; }
.aurora-1 { width: 46vw; height: 46vw; left: -6vw; top: -8vw; background: radial-gradient(circle, #14b8a6, transparent 68%); }
.aurora-2 { width: 40vw; height: 40vw; right: -8vw; top: 6vw; background: radial-gradient(circle, #6366f1, transparent 66%); animation-delay: -7s; }
.aurora-3 { width: 34vw; height: 34vw; left: 30vw; bottom: -14vw; background: radial-gradient(circle, #0ea5e9, transparent 66%); animation-delay: -13s; }
@keyframes drift { 0%,100% { transform: translate3d(0,0,0) scale(1); } 33% { transform: translate3d(4vw,3vw,0) scale(1.12); } 66% { transform: translate3d(-3vw,1vw,0) scale(0.94); } }
.grid-veil {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 78%);
  opacity: 0.6;
}
.hero-inner { position: relative; z-index: 2; max-width: 1180px; width: 100%; }

/* Deterministic contrast: a soft dark scrim behind the copy column so white text stays AA even
   where a bright aurora drifts under it. */
.hero-copy { position: relative; }
.hero-copy::before {
  content: ""; position: absolute; inset: -6% -8% -6% -10%; z-index: -1;
  background: radial-gradient(80% 90% at 30% 40%, rgba(6,11,22,0.55), rgba(6,11,22,0) 72%);
  pointer-events: none;
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.18); backdrop-filter: blur(8px); text-transform: none; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); } 70% { box-shadow: 0 0 0 12px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero h1 { font-family: var(--font-display); font-size: clamp(38px, 6.2vw, 74px); line-height: 1.03; letter-spacing: -0.03em; text-shadow: 0 2px 40px rgba(0,0,0,0.35); }
/* Solid readable colour by default; only go transparent where clip-to-text is supported, so the
   headline word can never vanish on engines/print/forced-colors paths that lack it. */
.grad-text { color: #5eead4; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad-text {
    background: linear-gradient(100deg, #5eead4, #38bdf8 40%, #a5b4fc 75%, #5eead4);
    background-size: 220% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: sheen 6s linear infinite;
  }
}
@keyframes sheen { to { background-position: 220% center; } }
.hero .lead { color: rgba(255,255,255,0.82); font-size: clamp(16px, 2vw, 20px); }

/* ---------- BUTTONS ---------- */
.button { font-weight: 700; letter-spacing: -0.01em; }
.button.light { background: #fff; color: var(--ink-1); box-shadow: 0 10px 30px rgba(94,234,212,0.25), 0 0 0 1px rgba(255,255,255,0.4) inset; }
.button.light:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(94,234,212,0.4); }
.button.ghost { border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.04); backdrop-filter: blur(6px); }
.button.primary { background: linear-gradient(120deg, #14b8a6, #0f766e); box-shadow: 0 12px 30px rgba(15,118,110,0.4); position: relative; overflow: hidden; }
.button.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.6s ease; }
.button.primary:hover::after { transform: translateX(120%); }

/* ---------- HERO STATS + MOCKUPS ---------- */
.hero-stats div { background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(10px); transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease; }
.hero-stats div:hover { transform: translateY(-4px); border-color: rgba(94,234,212,0.5); box-shadow: 0 16px 40px rgba(0,0,0,0.3); }
.hero-stats strong { font-family: var(--font-display); color: #5eead4; }
.hero-visual { perspective: 1200px; }
.mock-desktop { background: rgba(11,20,36,0.72); border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(16px); box-shadow: 0 40px 90px rgba(0,0,0,0.55); transform-style: preserve-3d; }
.mock-phone { background: rgba(11,20,36,0.82); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(18px); box-shadow: 0 30px 70px rgba(0,0,0,0.5); }
.hero::after { content: ""; position: absolute; left: 50%; bottom: 22px; z-index: 3; width: 22px; height: 34px; margin-left: -11px; border: 2px solid rgba(255,255,255,0.4); border-radius: 12px; background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)) no-repeat center 6px / 3px 6px; animation: scrollcue 1.8s ease-in-out infinite; opacity: 0.7; }
@keyframes scrollcue { 0%,100% { background-position-y: 6px; } 50% { background-position-y: 14px; } }

/* ---------- SECTIONS + CARDS ---------- */
.section { position: relative; }
.section h2 { font-family: var(--font-display); letter-spacing: -0.02em; }
.doru-section { background: radial-gradient(80% 60% at 15% 0%, rgba(20,184,166,0.08), transparent 60%), radial-gradient(70% 60% at 100% 30%, rgba(99,102,241,0.08), transparent 60%); border-radius: 40px; max-width: 1168px; margin-inline: auto; }
.product-card, .feature, .step-card, .price-card, .download-card, .doru-panel, .contact-card { transition: transform 0.4s cubic-bezier(.2,.7,.2,1), box-shadow 0.4s ease, border-color 0.4s ease; will-change: transform; }
.product-card { position: relative; overflow: hidden; }
.product-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(130deg, rgba(20,184,166,0.7), rgba(99,102,241,0.5), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s ease; }
.product-card:hover::before { opacity: 1; }
.product-card:hover, .feature:hover, .step-card:hover, .price-card:hover, .download-card:hover { transform: translateY(-6px); box-shadow: 0 26px 60px rgba(15,23,42,0.16); }
.feature .chip, .product-card .chip { transition: transform 0.4s cubic-bezier(.2,.7,.2,1), box-shadow 0.4s ease; }
.feature:hover .chip, .product-card:hover .chip { transform: translateY(-2px) rotate(-6deg) scale(1.06); box-shadow: 0 12px 24px rgba(15,118,110,0.28); }
.step-num, .price-value { font-family: var(--font-display); }
.price-card.featured { position: relative; transform: translateY(-6px); animation: featuredGlow 5s ease-in-out infinite; }
.price-card.featured::after { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; z-index: -1; background: linear-gradient(120deg, #14b8a6, #6366f1, #0ea5e9, #14b8a6); background-size: 220% 220%; animation: borderflow 7s ease-in-out infinite; }
@keyframes featuredGlow {
  0%, 100% { box-shadow: 0 24px 58px rgba(15,118,110,0.20), 0 0 0 rgba(20,184,166,0); }
  50%      { box-shadow: 0 34px 82px rgba(15,118,110,0.30), 0 0 36px rgba(20,184,166,0.22); }
}
@keyframes borderflow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(28px) scale(0.985); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- MARQUEE ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(90deg, var(--teal-soft), #fff, var(--indigo-soft)); padding: 16px 0; margin: 8px 0; }
.marquee-track { display: inline-flex; gap: 48px; white-space: nowrap; animation: marquee 30s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--teal-dark); display: inline-flex; align-items: center; gap: 12px; }
.marquee span::before { content: "\25C6"; color: var(--teal); font-size: 10px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- KEYBOARD FOCUS (WCAG 2.4.7) ---------- */
:focus-visible { outline: 3px solid #5eead4; outline-offset: 2px; border-radius: 8px; }
.hero :focus-visible, .contacts :focus-visible { outline-color: #ffffff; }

/* ---------- MOTION SAFETY ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora, .grad-text, .pulse-dot, .price-card.featured, .price-card.featured::after, .marquee-track, .hero::after,
  .button.primary::after { animation: none !important; }
  /* the base file neutralises .reveal, but this layer re-declares it — restore the safe state */
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  #webgl { display: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) { .hero { min-height: auto; padding-top: clamp(88px, 12vh, 120px); } .hero::after { display: none; } }

/* On phones drop the heavy compositing entirely: no WebGL, static single aurora, and no
   backdrop-filter blurs (they stack and thrash weak GPUs). The gradient hero still looks rich. */
@media (max-width: 760px) {
  #webgl { display: none !important; }
  .aurora { animation: none; filter: blur(50px); opacity: 0.42; }
  .aurora-3 { display: none; }
  .doru-section { border-radius: 28px; }
  .mock-desktop, .mock-phone, .hero-stats div, .hero-eyebrow, .button.ghost {
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  .product-card, .feature, .step-card, .price-card, .download-card { will-change: auto; }
}
