/* ── Fonts ─────────────────────────────────────────── */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --bg: #FFFFFF;
  --ink: #0A0A0A;
  --ink-2: #1A1A1A;
  --gray-1: #5C5C5C;
  --gray-2: #8A8A8A;
  --line: #E6E6E6;
  --surface: #F5F5F5;
  --surface-2: #EDEDED;
  --section-gap: 96px;
  --container: 1120px;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease-productive: cubic-bezier(0.2, 0, 0.38, 0.9);
  --ease-expressive: cubic-bezier(0.4, 0.14, 0.3, 1);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html:not(.lenis) { scroll-behavior: smooth; }

body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink-2);
  line-height: 1.6;
  font-size: 1.0625rem;
}

/* ── Utilities ─────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

h1, h2, h3 { text-wrap: balance; color: var(--ink); }
p { text-wrap: pretty; }

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-2);
  margin-bottom: 1.25rem;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  min-height: 48px;
  padding: 0 1.25rem;
  font-weight: 400;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 150ms var(--ease-productive), border-color 150ms var(--ease-productive), transform 100ms ease-out;
}
.btn:not(.btn-small)::after {
  content: "\2192";
  font-family: var(--font-mono);
  transition: transform 240ms var(--ease-productive);
}
.btn:not(.btn-small):hover::after { transform: translateX(4px); }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn-small { min-height: 40px; padding: 0 1.1rem; font-size: 0.85rem; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── Nav ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--gray-1);
  transition: color 150ms ease-out;
  padding: 0.5rem 0;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a.btn-primary { color: #fff; padding: 0 1.1rem; }
.nav-links a.btn-primary:hover { color: #fff; }

/* ── Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 10rem 2rem 8rem;
  max-width: var(--container);
  margin: 0 auto;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 60% at calc(50% + var(--gx, 0px)) calc(30% + var(--gy, 0px)), black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at calc(50% + var(--gx, 0px)) calc(30% + var(--gy, 0px)), black 20%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-headline {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
}

.hero-sub {
  margin-top: 1.75rem;
  font-size: 1.15rem;
  color: var(--gray-1);
  line-height: 1.7;
  max-width: 560px;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* ── Marquee ───────────────────────────────────────── */
.marquee {
  overflow: clip;
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-2);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Sections ──────────────────────────────────────── */
.section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.section-intro {
  max-width: 44rem;
  margin-bottom: 3rem;
  font-size: 1.15rem;
  color: var(--gray-1);
  line-height: 1.7;
}

.section-surface {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ── Product grid ──────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  perspective: 1200px;
}

.product-card {
  display: block;
  position: relative;
  background: var(--bg);
  padding: 2rem;
  text-decoration: none;
  transition: background-color 200ms var(--ease-productive);
}

.product-card:hover {
  background: var(--surface);
  z-index: 1;
}

.product-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.product-card p {
  font-size: 0.95rem;
  color: var(--gray-1);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.product-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--gray-2);
}

/* ── Packages ──────────────────────────────────────── */
.packages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.package { background: var(--bg); padding: 2.5rem 2rem; }

.package h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.package p {
  font-size: 0.95rem;
  color: var(--gray-1);
  line-height: 1.65;
}

.package a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gray-2);
  text-underline-offset: 0.18em;
}
.package a:hover { text-decoration-color: var(--ink); }

.package-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--gray-2);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Pictograms: IBM Carbon, Apache-2.0 */
.pictogram {
  display: block;
  width: 64px;
  height: 64px;
  color: var(--ink);
  margin-bottom: 2.25rem;
  transition: transform 320ms var(--ease-productive);
}
.package:hover .pictogram { transform: translateY(-4px); }

/* ── Philosophy ────────────────────────────────────── */
.philosophy {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.philosophy-item {
  border-top: 1px solid var(--ink);
  padding-top: 1.75rem;
}
.philosophy-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--gray-2);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.philosophy-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.philosophy-item p {
  font-size: 0.95rem;
  color: var(--gray-1);
  line-height: 1.7;
}

/* ── CTA band ──────────────────────────────────────── */
.cta-band {
  background: var(--surface);
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 600;
  max-width: 22ch;
  margin: 0 auto 2rem;
}

/* ── Page / contact hero ───────────────────────────── */
.page-header {
  padding-top: clamp(5rem, 9vw, 8rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.page-header h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
}

.page-lead {
  max-width: 44rem;
  margin-top: 1.25rem;
  font-size: 1.15rem;
  color: var(--gray-1);
  line-height: 1.7;
}

.about-block { max-width: 44rem; margin-top: 2.5rem; }
.about-block p { color: var(--gray-1); line-height: 1.75; }
.about-block h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.about-caps {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-2);
  letter-spacing: 0.04em;
  margin-top: 2.5rem;
}

.contact-hero {
  padding-top: clamp(6rem, 12vw, 10rem);
  padding-bottom: clamp(5rem, 10vw, 8rem);
}
.contact-hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
}
.contact-hero .page-lead { margin-bottom: 2.5rem; }
.contact-note {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--gray-2);
}

/* ── Footer ────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--gray-1);
}

.footer-email {
  text-decoration: none;
  color: var(--gray-1);
  transition: color 150ms ease-out;
}
.footer-email:hover { color: var(--ink); }

.footer-location { color: var(--gray-2); }

.footer-links {
  display: inline-flex;
  gap: 1rem;
}
.footer-links a {
  color: var(--gray-1);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }

/* ── Legal pages ───────────────────────────────────── */
.legal-page {
  padding-bottom: var(--section-gap);
}

.legal-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.legal-hero-content {
  position: relative;
  padding-top: clamp(4.5rem, 9vw, 7.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.legal-hero .section-label {
  margin-bottom: 1.5rem;
}

.legal-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  font-weight: 400;
  line-height: 1;
}

.legal-effective {
  margin-top: 1.5rem;
  color: var(--gray-1);
  font-size: 0.85rem;
  font-weight: 600;
}

.legal-intro {
  max-width: 39rem;
  margin-top: 1rem;
  color: var(--gray-1);
  font-size: 1.05rem;
  line-height: 1.75;
}

.legal-prose {
  max-width: 52rem;
  padding-top: clamp(3.5rem, 8vw, 6rem);
}

.legal-prose section + section {
  margin-top: 3.5rem;
}

.legal-prose h2 {
  color: var(--ink);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.legal-prose p {
  max-width: 70ch;
  color: var(--gray-1);
  font-size: 1rem;
  line-height: 1.8;
}

.legal-prose p + p {
  margin-top: 1rem;
}

.legal-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.legal-prose a {
  color: var(--ink);
  text-decoration-color: var(--gray-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 150ms ease-out, text-decoration-color 150ms ease-out;
}

.legal-prose a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

/* ── Motion ────────────────────────────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 180ms ease-out both; }
::view-transition-new(root) { animation: vt-in 240ms ease-out both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }


/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --section-gap: 64px;
  }

  .packages {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 6rem 1.5rem 5rem;
  }

  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Lenis ─────────────────────────────────────────── */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}
