/* ============================================================
   RECORD SISTEMI TECNOLOGICI / ODINO — shared design system
   Deep blue-purple dark, General Sans display, Geist body,
   liquid glass, looping hero video.
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* core palette (HSL from spec) */
  --bg: hsl(260 87% 3%);
  --bg-2: hsl(260 60% 5%);
  --fg: hsl(40 6% 95%);
  --hero-sub: hsl(40 6% 82%);
  --muted: hsl(40 6% 62%);
  --faint: hsl(40 6% 95% / 0.5);
  --line: hsl(40 6% 95% / 0.12);
  --line-strong: hsl(40 6% 95% / 0.22);

  /* surfaces */
  --surface: hsl(258 50% 8% / 0.55);
  --surface-2: hsl(258 45% 11% / 0.6);

  /* brand gradient (indigo -> purple -> amber) */
  --g-indigo: #6366f1;
  --g-purple: #a855f7;
  --g-amber: #fcd34d;
  --grad: linear-gradient(110deg, var(--g-indigo), var(--g-purple) 52%, var(--g-amber));
  --grad-rev: linear-gradient(to left, var(--g-indigo), var(--g-purple), var(--g-amber));

  /* odino product accents (from the real dashboard) */
  --odino-cyan: #3fc8ec;
  --odino-amber: #f3c623;
  --odino-red: #ff4d57;
  --odino-purple: #8b6cff;

  --font-body: 'Geist', system-ui, -apple-system, sans-serif;
  --font-display: 'General Sans', 'Geist', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  --maxw: 1240px;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--g-purple); color: #fff; }

a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* page-level grain + ambient glows ------------------------------------ */
.page-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.page-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 80% -5%, hsl(258 80% 18% / 0.45), transparent 70%),
    radial-gradient(50% 45% at 10% 105%, hsl(38 80% 30% / 0.10), transparent 70%);
}
.page-bg::after { /* subtle grain */
  content: ""; position: absolute; inset: 0; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   LIQUID GLASS
   ============================================================ */
.liquid-glass {
  background: rgba(255, 255, 255, 0.012);
  background-blend-mode: luminosity;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.10);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 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;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { position: relative; z-index: 1; padding: clamp(72px, 11vw, 150px) 0; }
.section--tight { padding: clamp(48px, 7vw, 90px) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--line-strong);
}
.eyebrow--dot::before {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--g-purple); box-shadow: 0 0 14px var(--g-purple);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 20px 0 0;
  text-wrap: balance;
}
.section-title em { font-style: normal; color: var(--muted); }
.section-lead {
  color: var(--hero-sub); font-size: clamp(16px, 1.5vw, 19px);
  max-width: 52ch; margin-top: 20px; line-height: 1.65;
}

.grad-text {
  background-image: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  border-radius: 999px; padding: 14px 26px;
  border: none; transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn .ico { width: 17px; height: 17px; transition: transform .25s; }

.btn-glass { color: var(--fg); }
.btn-glass:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -16px rgba(0,0,0,.8), inset 0 1px 1px rgba(255,255,255,.16); }
.btn-glass:hover .ico { transform: translateX(3px); }

.btn-solid {
  background: var(--fg); color: hsl(260 60% 6%);
  font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(255,255,255,.4);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -14px rgba(255,255,255,.5); }
.btn-solid:hover .ico { transform: translateX(3px); }

.btn-grad {
  color: #fff; font-weight: 600; position: relative;
  background: var(--grad); background-size: 160% 160%;
  box-shadow: 0 12px 40px -14px var(--g-purple);
  animation: gradShift 7s ease infinite;
}
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -14px var(--g-purple); }
.btn-grad:hover .ico { transform: translateX(3px); }
@keyframes gradShift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

.btn-lg { padding: 17px 30px; font-size: 16px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .35s, backdrop-filter .35s, box-shadow .35s, padding .35s;
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px;
  transition: padding .35s;
}
.nav.scrolled { background: hsl(260 70% 3% / 0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); }
.nav.scrolled .nav-inner { padding-top: 13px; padding-bottom: 13px; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.brand-name small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 9.5px; letter-spacing: 0.26em; color: var(--muted); margin-top: -2px; }

.nav-center { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: hsl(40 6% 95% / 0.82); font-size: 14.5px; font-weight: 450;
  padding: 9px 14px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--fg); background: hsl(40 6% 95% / 0.06); }
.nav-link .chev { width: 14px; height: 14px; opacity: .6; transition: transform .2s; }
.nav-link:hover .chev { transform: translateY(1px); }

.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cta { padding: 10px 18px; font-size: 14px; }

.nav-burger { display: none; width: 42px; height: 42px; border-radius: 12px; align-items: center; justify-content: center; color: var(--fg); }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: ""; display: block; width: 18px; height: 1.6px; background: currentColor; border-radius: 2px; position: relative; transition: transform .3s, opacity .3s;
}
.nav-burger span::before { position: absolute; top: -6px; }
.nav-burger span::after { position: absolute; top: 6px; }
body.menu-open .nav-burger span { background: transparent; }
body.menu-open .nav-burger span::before { transform: translateY(6px) rotate(45deg); }
body.menu-open .nav-burger span::after { transform: translateY(-6px) rotate(-45deg); }

/* mobile drawer */
.nav-drawer {
  position: fixed; inset: 0; z-index: 49;
  background: hsl(260 80% 3% / 0.96); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 90px 28px 40px;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
body.menu-open .nav-drawer { opacity: 1; pointer-events: auto; }
.nav-drawer a { font-family: var(--font-display); font-size: 30px; font-weight: 500; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--fg); }
.nav-drawer .drawer-cta { margin-top: 24px; border: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column;
  overflow: visible;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
}
.hero-media::after { /* keep text legible, no heavy gradient on the video itself */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 35%, transparent 38%, hsl(260 87% 3% / 0.55) 100%);
}
.hero-blur {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(984px, 92vw); height: 527px; max-height: 62vh;
  opacity: 0.9; background: hsl(260 60% 4%); filter: blur(82px);
  pointer-events: none; z-index: 1;
}

.hero-divider {
  position: relative; z-index: 10; margin-top: 3px; height: 1px;
  background: linear-gradient(to right, transparent, hsl(40 6% 95% / 0.20), transparent);
}

.hero-body {
  position: relative; z-index: 10;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 28px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--hero-sub);
  padding: 8px 16px; border-radius: 999px; margin-bottom: 30px;
}
.hero-tag .pulse { width: 7px; height: 7px; border-radius: 50%; background: #38e07b; box-shadow: 0 0 0 0 rgba(56,224,123,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(56,224,123,.5)} 70%{box-shadow:0 0 0 8px rgba(56,224,123,0)} 100%{box-shadow:0 0 0 0 rgba(56,224,123,0)} }

.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(64px, 14vw, 200px);
  line-height: 0.98; letter-spacing: -0.024em;
  text-wrap: balance;
}
.hero-title .ln { display: block; }
.hero-sub {
  color: var(--hero-sub); font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6; max-width: 30rem; margin: 22px auto 0; opacity: 0.85;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }

.scroll-cue {
  position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 8px;
}
.scroll-cue .bar { width: 1px; height: 34px; background: linear-gradient(var(--line-strong), transparent); position: relative; overflow: hidden; }
.scroll-cue .bar::after { content: ""; position: absolute; top: -34px; left: 0; width: 1px; height: 34px; background: linear-gradient(transparent, var(--fg)); animation: scrollLine 2.2s ease-in-out infinite; }
@keyframes scrollLine { 0%{transform:translateY(0)} 100%{transform:translateY(68px)} }

/* hero entrance — VISIBLE BY DEFAULT (robust to frozen timelines / print / no-JS).
   The hidden start-state applies only when JS has marked the page ready AND
   motion is allowed. The fade itself is driven by setInterval in site.js
   (writing inline styles), NOT by CSS transitions/animations, because those
   ride the document timeline which can be frozen in some hosts. The .shown
   class is the guaranteed visible end-state. */
.hero [data-anim] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  html.anim-ready .hero [data-anim]:not(.shown) { opacity: 0; transform: translateY(22px); }
}

/* ============================================================
   LOGO MARQUEE
   ============================================================ */
.marquee-block { position: relative; z-index: 10; padding-bottom: 40px; }
.marquee-inner { max-width: 1024px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 48px; }
.marquee-label { color: hsl(40 6% 95% / 0.5); font-size: 13.5px; line-height: 1.35; flex: none; max-width: 150px; }
.marquee-mask { flex: 1; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 64px; width: max-content; animation: marquee 24s linear infinite; }
.marquee-block:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.m-logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.m-logo .ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--fg); font-family: var(--font-display); }
.m-logo .nm { font-size: 16px; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; }

/* ============================================================
   GENERIC CARDS / PANELS
   ============================================================ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{transition-delay:.08s} .reveal[data-d="2"]{transition-delay:.16s}
.reveal[data-d="3"]{transition-delay:.24s} .reveal[data-d="4"]{transition-delay:.32s}
.reveal[data-d="5"]{transition-delay:.4s}

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 38px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 5vw, 62px); line-height: 1; letter-spacing: -0.03em; }
.stat .lbl { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* feature grid */
.grid { display: grid; gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, background .35s;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-strong); background: var(--surface-2); }
.card-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 20px; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.card p { color: var(--hero-sub); font-size: 15px; line-height: 1.6; margin-top: 10px; opacity: .85; }
.card ul { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.card li { display: flex; gap: 10px; font-size: 14px; color: var(--hero-sub); }
.card li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 5px; background: hsl(258 60% 50% / 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 11px; background-repeat: no-repeat; background-position: center; }

.badge-new { position: absolute; top: 20px; right: 20px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--g-amber); border: 1px solid hsl(45 90% 60% / .3); background: hsl(45 90% 50% / .08); padding: 4px 9px; border-radius: 999px; }

/* footer */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 70px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 18px; font-weight: 500; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer a { color: var(--hero-sub); font-size: 14.5px; opacity: .85; transition: opacity .2s, color .2s; }
.footer a:hover { opacity: 1; color: var(--fg); }
.footer-lead { color: var(--hero-sub); font-size: 14.5px; max-width: 34ch; margin-top: 16px; opacity: .8; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-center { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .marquee-inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .marquee-label { max-width: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 320px; }
  .hero-actions .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero-video { opacity: .5 !important; }
}
