/* Groupfox — Light editorial, elevated */

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/schibsted-grotesk-v7-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/schibsted-grotesk-v7-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/schibsted-grotesk-v7-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/schibsted-grotesk-v7-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/schibsted-grotesk-v7-latin-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/spline-sans-mono-v13-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/spline-sans-mono-v13-latin-500.woff2') format('woff2');
}

:root {
  --bg: #FAF9F6;
  --ink: #1B1916;
  --muted: #55524C;
  --faint: #8A867E;
  --fainter: #B0ACA4;
  --line: #E4E1DB;
  --line-dashed: #C9C5BD;
  --footer-bg: #F2F0EB;
  --accent: #C56A1A;
  --accent-bright: #D97E2E;
  --accent-deep: #B85F14;
  --card-ink: #FAF9F6;
  --card-bg: #1B1916;
  --card-muted: #B8B4AC;
  --pad-x: clamp(20px, 4.5vw, 64px);
  --mono: 'Spline Sans Mono', ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.mono { font-family: var(--mono); }

/* ---------- atmosphere ---------- */

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(3) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 1.5%); }
  66% { transform: translate(1.5%, -2%); }
  100% { transform: translate(0, 0); }
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 10000;
}

/* custom cursor (fine pointers only) */
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
  }
  .cursor-dot, .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    translate: -50% -50%;
  }
  .cursor-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
  }
  .cursor-ring {
    width: 34px;
    height: 34px;
    border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
    transition: width .28s var(--ease-out), height .28s var(--ease-out),
                border-color .28s, background-color .28s;
  }
  body.cursor-active .cursor-ring {
    width: 56px;
    height: 56px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-color: var(--accent);
  }
}

.kicker {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.kicker--accent { color: var(--accent); }
.kicker-dash {
  display: inline-block;
  width: 34px;
  height: 2px;
  background: var(--accent);
  margin-right: 14px;
  vertical-align: middle;
  transform-origin: left center;
  animation: dash-in 0.9s var(--ease-out) both;
}
@keyframes dash-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: padding .35s var(--ease-out), box-shadow .35s;
  animation: fade-down 0.8s var(--ease-out) both;
}
.site-header.is-stuck {
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: 0 1px 30px rgba(27, 25, 22, 0.07);
}
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: none; }
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform .5s var(--ease-out), border-radius .5s;
}
.brand:hover .brand-mark { transform: rotate(135deg); border-radius: 50%; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: 0.02em; }

.site-nav {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
/* roll-over link: duplicate label slides in from below */
.site-nav a { position: relative; overflow: hidden; display: inline-block; }
.site-nav a span {
  display: inline-block;
  transition: transform .4s var(--ease-out);
}
.site-nav a span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  color: var(--accent);
}
.site-nav a:hover span { transform: translateY(-100%); }

.header-cta {
  position: relative;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 22px;
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  white-space: nowrap;
  transition: background-color .35s var(--ease-out), border-color .35s, color .35s;
}
.header-cta .cta-label { display: block; transition: transform .4s var(--ease-out), opacity .4s; }
.header-cta .cta-label--alt {
  position: absolute;
  inset: 10px 22px;
  transform: translateY(130%);
  opacity: 0;
}
.header-cta:hover {
  background: var(--ink);
  color: var(--bg);
}
.header-cta:hover .cta-label:not(.cta-label--alt) { transform: translateY(-130%); opacity: 0; }
.header-cta:hover .cta-label--alt { transform: none; opacity: 1; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(80px, 9vw, 130px) var(--pad-x) clamp(60px, 7vw, 100px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-bgword {
  position: absolute;
  top: 4%;
  right: -2%;
  font-weight: 800;
  font-size: clamp(120px, 22vw, 330px);
  letter-spacing: -0.04em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  will-change: transform;
}
.hero-kicker { margin-bottom: 30px; animation: fade-up 0.9s 0.15s var(--ease-out) both; }

.hero-title {
  margin: 0;
  font-size: clamp(46px, 7.2vw, 96px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  max-width: 1100px;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.accent-dot { color: var(--accent); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-title .line-inner {
  display: inline-block;
  transform: translateY(115%);
  animation: line-up 1s var(--ease-out) forwards;
}
.hero-title .line:nth-child(1) .line-inner { animation-delay: .1s; }
.hero-title .line:nth-child(2) .line-inner { animation-delay: .22s; }
.hero-title .line:nth-child(3) .line-inner { animation-delay: .34s; }
@keyframes line-up { to { transform: none; } }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: 42px;
  animation: fade-up 0.9s 0.5s var(--ease-out) both;
}
.lede {
  margin: 0;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 640px;
  text-wrap: pretty;
}
.scroll-hint {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--fainter);
  white-space: nowrap;
}
.scroll-arrow { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.hero-media {
  margin-top: clamp(40px, 4.5vw, 64px);
  height: clamp(240px, 34vw, 480px);
  animation: media-reveal 1.2s 0.55s var(--ease-out) both;
}
@keyframes media-reveal {
  from { opacity: 0; transform: translateY(40px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.hero-media svg, .product-media svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

/* hero svg life */
.svg-ring { transform-origin: 1040px 140px; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.svg-float-a { animation: float-a 9s ease-in-out infinite; }
@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.svg-float-b { animation: float-b 7s 1s ease-in-out infinite; }
@keyframes float-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
.svg-draw {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw 1.6s 1s var(--ease-out) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.svg-pulse { animation: pulse 2.4s ease-in-out infinite; transform-origin: 1200px 240px; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.7); }
}
.svg-blink rect:first-child { animation: blink 3s steps(1) infinite; }
@keyframes blink {
  0%, 60%, 100% { fill: #B85F14; }
  30% { fill: #C9C5BD; }
}

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  transform: rotate(-1.2deg) scale(1.02);
  margin: -1px 0;
  border-block: 1px solid var(--ink);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  padding: 16px 0;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  animation: marquee 26s linear infinite;
}
.marquee-track .dot { color: var(--accent-bright); font-size: 11px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% / 3)); } }

/* ---------- sections ---------- */

.section-side { position: relative; }
.section-num {
  font-weight: 800;
  font-size: clamp(90px, 11vw, 170px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-dashed);
  user-select: none;
  margin-bottom: 26px;
  transition: -webkit-text-stroke-color .6s;
}
section:hover .section-num { -webkit-text-stroke-color: var(--accent-bright); }
.section-num--center { margin-inline: auto; }

.about {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: clamp(32px, 4.5vw, 64px);
  padding: clamp(70px, 7.5vw, 110px) var(--pad-x);
  border-bottom: 1px solid var(--line);
}

/* word-by-word scroll highlight */
.statement {
  margin: 0;
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 900px;
}
.statement .w {
  color: var(--line-dashed);
  transition: color .35s ease;
}
.statement .w.lit { color: var(--ink); }
.statement .w.lit.hl { color: var(--accent); }

.stats {
  display: flex;
  gap: clamp(36px, 4.5vw, 64px);
  margin-top: clamp(40px, 4.5vw, 64px);
  flex-wrap: wrap;
}
.stat { border-top: 2px solid var(--ink); padding-top: 18px; min-width: 130px; }
.stat-value {
  font-size: clamp(38px, 3.4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-value .mark { color: var(--accent); }
.stat-label { font-size: 15px; color: var(--faint); margin-top: 6px; }

/* ---------- products ---------- */

.products {
  padding: clamp(70px, 7.5vw, 110px) var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.products .section-side { margin-bottom: 48px; }
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.product-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  color: var(--card-ink);
  padding: clamp(28px, 3.4vw, 48px);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 340px;
  transition: transform .5s var(--ease-out), box-shadow .5s;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(27, 25, 22, 0.22);
}
.product-card .glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(217, 126, 46, 0.16), transparent 65%);
}
.product-card:hover .glow { opacity: 1; }
.product-card-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.product-name { font-size: clamp(26px, 2.4vw, 34px); font-weight: 700; letter-spacing: -0.01em; }
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  color: var(--accent-bright);
  border-radius: 100px;
  white-space: nowrap;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  animation: live-ping 1.8s ease-in-out infinite;
}
@keyframes live-ping {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 126, 46, 0.55); }
  55% { box-shadow: 0 0 0 7px rgba(217, 126, 46, 0); }
}
.product-card p {
  position: relative;
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--card-muted);
  max-width: 480px;
  text-wrap: pretty;
}
.product-link {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-bright);
}
.product-link .arrow { display: inline-block; transition: transform .35s var(--ease-out); }
.product-link:hover .arrow { transform: translateX(7px); }
.product-side { display: grid; grid-template-rows: 1fr auto; gap: 24px; }
.product-media {
  min-height: 220px;
  overflow: hidden;
  border-radius: 6px;
}
.product-media svg { transition: transform .8s var(--ease-out); }
.product-media:hover svg { transform: scale(1.04); }

/* gauge animation when revealed */
.gauge-arc {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  transition: stroke-dashoffset 1.4s 0.3s var(--ease-out);
}
.gauge-needle {
  transform-origin: 230px 220px;
  transform: rotate(-52deg);
  transition: transform 1.4s 0.3s var(--ease-out);
}
.bar { transform: scaleX(0); transform-origin: 440px 0; transition: transform 1s var(--ease-out); }
.bar-1 { transition-delay: .5s; }
.bar-2 { transition-delay: .65s; }
.bar-3 { transition-delay: .8s; }
.product-media.is-visible .gauge-arc { stroke-dashoffset: 0; }
.product-media.is-visible .gauge-needle { transform: rotate(0deg); }
.product-media.is-visible .bar { transform: scaleX(1); }

.more-slot {
  border: 1.5px dashed var(--line-dashed);
  border-radius: 6px;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: border-color .4s;
}
.more-slot:hover { border-color: var(--accent-bright); }
.more-slot .title { font-size: 18px; font-weight: 600; color: var(--faint); }
.more-slot .note { font-size: 14px; color: var(--fainter); }
.typing-dots span {
  animation: dot-blink 1.4s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot-blink { 0%, 60%, 100% { opacity: 0.2; } 30% { opacity: 1; } }

/* ---------- contact ---------- */

.contact {
  padding: clamp(80px, 9vw, 130px) var(--pad-x);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.contact .kicker { margin-bottom: 28px; }
.contact-mail {
  position: relative;
  display: inline-block;
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-all;
  transition: color .35s;
}
.contact-mail:hover { color: var(--accent); }
.mail-underline {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform .5s var(--ease-out);
}
.contact-mail:hover .mail-underline {
  animation: underline-swipe .6s var(--ease-out);
}
@keyframes underline-swipe {
  0% { transform: scaleX(1); transform-origin: right center; }
  49% { transform: scaleX(0); transform-origin: right center; }
  50% { transform: scaleX(0); transform-origin: left center; }
  100% { transform: scaleX(1); transform-origin: left center; }
}

/* ---------- footer ---------- */

.site-footer {
  padding: 48px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  background: var(--footer-bg);
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 10px;
}
.footer-legal { font-size: 14px; color: var(--faint); line-height: 1.7; }
.footer-copy { font-size: 13px; color: var(--faint); letter-spacing: 0.08em; }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 0; }
  .section-num { font-size: clamp(70px, 16vw, 120px); }
}
@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; }
  .header-cta { display: none; }
  .hero-row { flex-direction: column; align-items: flex-start; }
  .hero-bgword { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .statement .w { color: var(--ink); }
  .hero-title .line-inner { transform: none; }
  .marquee-track { animation: none; }
  .cursor { display: none !important; }
}
