/* ==========================================================================
   OxWag — homepage styles
   Design language: "engineering drawing" — hairline structure, ruled grids,
   cobalt accents, one dark panel. No JavaScript, no framework.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --paper: #fbfbf9;
  --surface: #ffffff;
  --ink: #171a1f;
  --ink-2: #4b5058;
  --ink-3: #6f747c;
  --line: #e6e5e0;
  --line-2: #d8d7d1;
  --cobalt: #1d46c1;
  --cobalt-deep: #16368f;
  --cobalt-tint: #eef2fb;
  --cobalt-line: #d7dff4;
  --panel: #14161b;
  --panel-2: #101216;
  --panel-ink: #f4f4f1;
  --panel-ink-2: #9ba1ac;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-card: 0 1px 2px rgba(23, 26, 31, 0.04), 0 8px 24px -12px rgba(23, 26, 31, 0.1);
  --shadow-card-hover: 0 2px 4px rgba(23, 26, 31, 0.05), 0 16px 40px -16px rgba(23, 26, 31, 0.16);
  --font-sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--cobalt);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--cobalt-deep);
}

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout primitives ---------- */
.container {
  max-width: 1128px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.section {
  padding-block: clamp(72px, 9vw, 120px);
  scroll-margin-top: 76px;
}

.hero {
  scroll-margin-top: 76px;
}

/* standalone icon sizes */
.ic {
  width: 18px;
  height: 18px;
  flex: none;
}

.ic-xs {
  width: 13px;
  height: 13px;
  flex: none;
}

.svc-ic {
  width: 27px;
  height: 27px;
}

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

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.55rem);
}

.section-head .sub {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.0625rem;
  max-width: 560px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 600;
  font-size: 0.9685rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 1px 2px rgba(22, 54, 143, 0.25);
}

.btn-primary:hover {
  background: var(--cobalt-deep);
  color: #fff;
  transform: translateY(-1px);
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-quiet:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.btn-panel {
  background: var(--cobalt);
  color: #fff;
}

.btn-panel:hover {
  background: #2a5ae0;
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 249, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-rows {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-block: 14px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.015em;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark svg {
  width: 27px;
  height: 27px;
  flex: none;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav-wrap {
  display: flex;
  align-items: center;
}

.primary-nav a {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 550;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.primary-nav a:hover {
  color: var(--ink);
  background: var(--cobalt-tint);
}

.header-cta {
  padding: 10px 20px;
}

@media (max-width: 899px) {
  .header-rows {
    padding-bottom: 0;
  }

  .primary-nav-wrap {
    order: 3;
    width: 100%;
    margin-inline: calc(clamp(20px, 5vw, 48px) * -1);
    padding-inline: clamp(20px, 5vw, 48px);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .primary-nav-wrap::-webkit-scrollbar {
    display: none;
  }

  .primary-nav {
    padding-block: 10px;
    width: max-content;
  }
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(56px, 8vw, 104px) clamp(64px, 8vw, 104px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.55rem, 5.4vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.045;
}

.hero .lede {
  margin-top: 22px;
  font-size: clamp(1.075rem, 1.5vw, 1.2rem);
  color: var(--ink-2);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-note {
  margin-top: 26px;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.hero-visual {
  position: relative;
}

.hero-visual svg {
  width: 100%;
  height: auto;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  justify-content: center;
  margin-top: 18px;
  font-size: 0.855rem;
  color: var(--ink-3);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.sw {
  width: 22px;
  height: 0;
  border-top: 2px solid #e3e4dd;
  border-radius: 2px;
}

.sw-live {
  border-top: 2.5px solid #bccbf0;
}

/* constellation first-load choreography (off by default, see below) */
.constellation .c-line {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: c-draw 0.8s cubic-bezier(0.25, 0.6, 0.3, 1) forwards;
}

.constellation .c-node {
  opacity: 0;
  animation: c-fade 0.5s ease forwards;
}

.constellation .c-center {
  opacity: 0;
  animation: c-fade 0.55s ease 0.05s forwards;
}

.constellation .c-line:nth-of-type(1) { animation-delay: 0.18s; }
.constellation .c-line:nth-of-type(2) { animation-delay: 0.26s; }
.constellation .c-line:nth-of-type(3) { animation-delay: 0.34s; }
.constellation .c-line:nth-of-type(4) { animation-delay: 0.42s; }
.constellation .c-line:nth-of-type(5) { animation-delay: 0.50s; }
.constellation .c-line:nth-of-type(6) { animation-delay: 0.58s; }
.constellation .c-line:nth-of-type(7) { animation-delay: 0.66s; }
.constellation .c-line:nth-of-type(8) { animation-delay: 0.74s; }

.constellation .c-node { animation-delay: 0.72s; }
.constellation .c-node:nth-of-type(1) { animation-delay: 0.62s; }

@keyframes c-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes c-fade {
  to { opacity: 1; }
}

/* ---------- milestones ---------- */
.milestones-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.milestone {
  padding: clamp(28px, 4vw, 44px) clamp(18px, 3vw, 36px);
}

.milestone + .milestone {
  border-left: 1px solid var(--line);
}

.milestone .value {
  font-size: clamp(2.6rem, 4.6vw, 3.7rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.milestone .label {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 0.98rem;
}

/* ---------- products ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 3vw, 34px);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--cobalt-line);
  transform: translateY(-2px);
}

.product-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.product-icon {
  width: 84px;
  height: 84px;
  border-radius: 21px;
  flex: none;
  box-shadow: 0 1px 2px rgba(23, 26, 31, 0.12);
}

.product-name {
  font-size: 1.42rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.product-category {
  margin-top: 3px;
  color: var(--cobalt);
  font-weight: 600;
  font-size: 0.885rem;
}

.product-desc {
  color: var(--ink-2);
  font-size: 1rem;
  flex-grow: 1;
}

.product-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 11px 20px 11px 15px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.play-badge:hover {
  background: #000;
  color: #fff;
  transform: translateY(-1px);
}

.product-site {
  font-weight: 600;
  font-size: 0.935rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-site svg {
  width: 13px;
  height: 13px;
}

/* in development strip */
.dev-strip {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--cobalt-tint);
  padding: 22px clamp(20px, 3vw, 30px);
}

.dev-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cobalt-deep);
  white-space: nowrap;
}

.dev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  position: relative;
}

.dev-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--cobalt);
  opacity: 0;
  animation: dev-ping 2.4s ease-out infinite;
}

@keyframes dev-ping {
  0% { transform: scale(0.4); opacity: 0.8; }
  70% { transform: scale(1); opacity: 0; }
  100% { opacity: 0; }
}

.dev-message {
  color: var(--ink-2);
  font-size: 0.99rem;
  max-width: 56ch;
}

/* ---------- services matrix ---------- */
.services-matrix {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
}

.service-cell {
  background: var(--paper);
  padding: clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background-color 0.15s ease;
}

.service-cell:hover {
  background: var(--cobalt-tint);
}

.service-cell svg {
  width: 27px;
  height: 27px;
  color: var(--cobalt);
}

.service-cell h3 {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.service-cell p {
  color: var(--ink-2);
  font-size: 0.955rem;
  line-height: 1.58;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
}

.about-grid h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.55rem);
}

.about-body {
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 1.075rem;
}

.about-sign {
  margin-top: 26px;
  color: var(--ink-3);
  font-size: 0.92rem;
}

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.principles li {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px 28px;
  padding-block: 19px;
  border-bottom: 1px solid var(--line);
}

.principles .p-title {
  font-weight: 650;
  font-size: 1.01rem;
  letter-spacing: -0.01em;
}

.principles .p-desc {
  color: var(--ink-2);
  font-size: 0.945rem;
  line-height: 1.55;
}

/* ---------- final CTA ---------- */
.cta-panel {
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: clamp(18px, 2.5vw, 24px);
  padding: clamp(44px, 6vw, 76px) clamp(24px, 5vw, 72px);
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 32px 64px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.cta-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cobalt);
}

.cta-panel h2 {
  color: var(--panel-ink);
  font-size: clamp(1.95rem, 3.6vw, 2.7rem);
}

.cta-panel .sub {
  margin-top: 14px;
  color: var(--panel-ink-2);
  font-size: 1.06rem;
  max-width: 34em;
}

.cta-panel .mail-line {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--panel-ink-2);
}

.cta-panel .mail-line a {
  color: #a9c0f5;
}

.cta-action {
  display: flex;
  justify-content: flex-start;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--panel-2);
  color: var(--panel-ink-2);
  padding-block: clamp(44px, 5vw, 60px) 32px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 64px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand .wordmark {
  color: var(--panel-ink);
  font-size: 1.22rem;
}

.footer-desc {
  margin-top: 14px;
  max-width: 40ch;
  font-size: 0.935rem;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: var(--panel-ink-2);
  font-size: 0.94rem;
  font-weight: 550;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--panel-ink);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(244, 244, 241, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 0.855rem;
}

/* ---------- responsive ---------- */
@media (max-width: 999px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 560px;
  }

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

  .cta-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 719px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .services-matrix {
    grid-template-columns: 1fr;
  }

  .milestones-row {
    grid-template-columns: 1fr;
  }

  .milestone + .milestone {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .principles li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .product-icon {
    width: 68px;
    height: 68px;
    border-radius: 17px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .constellation .c-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .constellation .c-node,
  .constellation .c-center {
    animation: none;
    opacity: 1;
  }

  .dev-dot::after {
    animation: none;
  }

  .btn,
  .product-card,
  .play-badge {
    transition: none;
  }
}
