/* ohNext — light, professional */
:root {
  --bg: #F6F6FA;
  --bg-soft: #EEEEF4;
  --surface: #FFFFFF;
  --border: #DCDDE6;
  --border-strong: #C6C8D4;
  --text: #0B1220;
  --text-muted: #475569;
  --text-dim: #7A8299;

  /* International Klein Blue */
  --klein: #002FA7;
  --klein-hover: #001F87;
  --klein-bright: #1240D2;
  --klein-soft: rgba(0, 47, 167, 0.08);

  --grad-primary: linear-gradient(135deg, #002FA7 0%, #1240D2 100%);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, 0.05), 0 12px 32px -12px rgba(15, 23, 42, 0.10);

  --radius: 12px;
  --radius-lg: 16px;
  --max: 1120px;
  --pad-x: clamp(1.25rem, 4vw, 2rem);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  position: relative;
}

/* Cursor halo — follows pointer, subtle Klein-blue wash */
.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%),
      rgba(0, 47, 167, 0.12),
      rgba(18, 64, 210, 0.06) 35%,
      transparent 55%);
  transition: background 0.1s linear;
  mix-blend-mode: multiply;
}
@media (prefers-reduced-motion: reduce) {
  .spotlight { display: none; }
}

.nav, main, .footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 252, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.02rem;
  color: var(--text);
}
.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--grad-primary);
  position: relative;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  background: var(--surface);
}

.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--text); }

@media (max-width: 640px) {
  .nav__links { gap: 1.25rem; }
  .nav__links a { font-size: 0.88rem; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--klein);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--klein-hover); box-shadow: var(--shadow); }
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--border-strong); background: var(--bg-soft); }
.btn__arrow { display: inline-block; transition: transform 0.18s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: clamp(4.5rem, 12vh, 8rem) 0 clamp(4rem, 10vh, 6.5rem);
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 55% at 50% -5%, rgba(0, 47, 167, 0.14), transparent 70%),
    radial-gradient(40% 45% at 50% 0%, rgba(18, 64, 210, 0.10), transparent 70%);
}
.hero__ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 0%, transparent 70%);
  opacity: 0.6;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

h1.hero__title {
  font-size: clamp(2.25rem, 5.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--text);
}
.hero__title em {
  font-style: normal;
  color: var(--text-muted);
  font-weight: 500;
}

.hero__sub {
  font-size: clamp(1.02rem, 1.8vw, 1.17rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- SECTIONS ---------- */
.section {
  padding: clamp(4rem, 9vh, 6rem) 0;
}
.section + .section { border-top: 1px solid var(--border); }

.section__head {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}
.section__kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--klein);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.section__title {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 0.7rem;
  color: var(--text);
}
.section__sub {
  color: var(--text-muted);
  margin: 0;
  font-size: 1rem;
}

/* ---------- VALUES ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.value {
  position: relative;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.value::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--cx, -200px) var(--cy, -200px),
      rgba(0, 47, 167, 0.14), rgba(18, 64, 210, 0.06) 35%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}
.value > * { position: relative; z-index: 1; }
.value:hover {
  border-color: var(--klein);
  box-shadow: 0 1px 3px rgba(0, 47, 167, 0.08), 0 10px 28px -10px rgba(0, 47, 167, 0.28);
  transform: translateY(-2px);
}
.value:hover::before { opacity: 1; }
.value__num {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  color: var(--klein);
  margin-bottom: 1rem;
  font-weight: 600;
}
.value__title {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--text);
}
.value__desc { color: var(--text-muted); font-size: 0.93rem; margin: 0; }

/* ---------- PRODUCTS ---------- */
.products { display: grid; gap: 1rem; }
.product {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.product::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(480px circle at var(--cx, -200px) var(--cy, -200px),
      rgba(0, 47, 167, 0.12), rgba(18, 64, 210, 0.05) 35%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.product > * { position: relative; z-index: 1; }
.product:hover {
  border-color: var(--klein);
  box-shadow: 0 2px 6px rgba(0, 47, 167, 0.08), 0 14px 36px -12px rgba(0, 47, 167, 0.25);
}
.product:hover::before { opacity: 1; }
.product__body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}
.product__logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.product__desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 580px;
  margin: 0;
}
.product__cta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (max-width: 640px) {
  .product { grid-template-columns: 1fr; padding: 1.5rem; }
  .product__cta { width: 100%; }
  .product__cta .btn { flex: 1; }
}

/* ---------- ABOUT ---------- */
.about { max-width: 680px; margin: 0 auto; text-align: center; }
.about .section__title { margin-bottom: 1.25rem; }
.about p {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 0.9rem;
}
.about p + p { font-size: 0.98rem; color: var(--text-muted); }

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-soft);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 2rem;
}
.footer__col h4 {
  color: var(--text);
  font-size: 0.8rem;
  margin: 0 0 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer__col a { transition: color 0.2s ease; }
.footer__col a:hover { color: var(--klein); }
.footer__about {
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  max-width: 280px;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
}
@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col:first-child { grid-column: 1 / -1; }
}

/* ---------- LEGAL ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 4rem 0 5rem; }
.legal h1 {
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.legal .legal__meta { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 3rem; }
.legal h2 {
  font-size: 1.2rem;
  margin: 2.5rem 0 0.75rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
.legal p, .legal li { color: var(--text-muted); line-height: 1.7; }
.legal a { color: var(--klein); }
.legal a:hover { color: var(--klein-hover); }
.legal ul { padding-left: 1.25rem; }
.legal .back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
  transition: color 0.2s ease;
}
.legal .back:hover { color: var(--text); }

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

::selection { background: var(--klein-soft); color: var(--text); }

/* ---------- BACK TO TOP ---------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--klein);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  box-shadow:
    0 6px 18px -4px rgba(0, 47, 167, 0.45),
    0 2px 6px rgba(0, 47, 167, 0.20);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1.2), background 0.2s ease, box-shadow 0.25s ease;
  animation: floaty 4.5s ease-in-out infinite;
}
.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top:hover {
  background: var(--klein-hover);
  box-shadow:
    0 10px 26px -4px rgba(0, 47, 167, 0.55),
    0 3px 10px rgba(0, 47, 167, 0.25);
}
.to-top:hover svg { transform: translateY(-2px); }
.to-top:active { transform: translateY(1px) scale(0.97); animation: none; }
.to-top svg { transition: transform 0.2s ease; }
.to-top:focus-visible {
  outline: 2px solid var(--klein);
  outline-offset: 3px;
}

/* Klein-blue ring pulse */
.to-top::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--klein);
  opacity: 0;
  animation: ringPulse 2.4s ease-out infinite;
}
@keyframes ringPulse {
  0% { opacity: 0.6; transform: scale(0.95); }
  100% { opacity: 0; transform: scale(1.35); }
}
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

@media (prefers-reduced-motion: reduce) {
  .to-top, .to-top::before { animation: none; }
  .to-top { transition: opacity 0.2s ease; }
}
