@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0D141C;
  --bg-raised: #121C27;
  --ink: #E7EDF2;
  --muted: #8C9BAA;
  --rule: #1F2C39;
  --teal: #52B9A9;
  --amber: #E4B45E;
  --gutter: clamp(20px, 5vw, 64px);
  --measure: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 20;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 20, 28, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.mark {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--teal);
}
.mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--amber);
}
.site-nav ul {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color .2s;
}
.site-nav a:hover { color: var(--ink); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 860px);
  display: flex;
  align-items: center;
  padding: clamp(72px, 12vw, 140px) 0;
  margin-top: -73px; /* slide under the sticky header */
}
.hero .wrap { width: 100%; }
.network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(100deg, rgba(0,0,0,.35) 10%, #000 55%), linear-gradient(to bottom, #000 70%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(100deg, rgba(0,0,0,.35) 10%, #000 55%), linear-gradient(to bottom, #000 70%, transparent);
  mask-composite: intersect;
}
.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}
.hero .w { display: inline-block; }
.lede {
  margin: 32px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 36px 0 0;
}

.btn {
  display: inline-block;
  padding: 11px 18px;
  background: var(--teal);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color .2s, transform .2s var(--ease);
}
a.btn:hover, .visit:hover .btn { background: #6BCBBC; }
a.btn:active, .visit:active .btn { transform: translateY(1px); }
.text-link {
  color: var(--ink);
  font-size: 0.9375rem;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule);
}
.text-link:hover { text-decoration-color: var(--amber); }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head {
  display: grid;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.section-head h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-head p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* Portfolio */
.projects { margin: 40px 0 0; padding: 0; list-style: none; }
.project {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0 calc(var(--gutter) * -0.5);
  padding: 32px calc(var(--gutter) * 0.5) 36px;
  border-top: 1px solid var(--rule);
  border-radius: 10px;
  /* pointer spotlight; --mx/--my set by main.js */
  background: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(82, 185, 169, .09), transparent 70%);
}
.project:first-child { border-top-color: transparent; }
.project h3 {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.375rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.project .area { margin: 6px 0 0; color: var(--teal); font-size: 0.9375rem; }
.project .body { display: grid; gap: 16px; align-content: start; }
.project .desc { margin: 0; max-width: 34em; color: #C4CFD9; }
.visit {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  text-decoration: none;
  justify-self: start;
}
.visit .domain {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  transition: color .2s;
}
.visit:hover .domain { color: var(--ink); text-decoration-color: var(--amber); }

/* About + contact */
.about-body {
  margin: 40px 0 0;
  max-width: 34em;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.about-body p { margin: 0 0 0.9em; }
.about-body p:last-child { margin-bottom: 0; }
.about-body .founder {
  margin-top: 1.6em;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0;
}
.about-body .founder a { color: var(--ink); text-underline-offset: 3px; }
.about-body .hero-links { margin-top: 28px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .wrap {
  display: grid;
  gap: 20px;
  padding-top: 32px;
  padding-bottom: 40px;
}
.site-footer .name { margin: 0; color: var(--ink); font-weight: 700; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { text-underline-offset: 3px; text-decoration-color: var(--rule); }
.site-footer a:hover { color: var(--ink); text-decoration-color: currentColor; }
.site-footer .legal { margin: 0; }
.site-footer small { font-size: inherit; }

@media (min-width: 760px) {
  .section-head { grid-template-columns: 1fr 2fr; column-gap: 48px; align-items: baseline; }
  .project { grid-template-columns: 1fr 2fr; gap: 14px 48px; padding-top: 40px; padding-bottom: 44px; }
  .about-body { margin-left: calc((100% - 48px) / 3 + 48px); max-width: 30em; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: baseline; }
  .site-footer .legal { grid-column: 1 / -1; }
}

/* Entrance choreography: only with JS, only without reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .js .site-header { animation: fade .8s var(--ease) both; }
  .js .hero .w {
    opacity: 0;
    transform: translateY(0.45em) rotate(2deg);
    filter: blur(6px);
    animation: rise .9s var(--ease) forwards;
    animation-delay: calc(var(--i) * 80ms + 350ms);
  }
  .js .lede { opacity: 0; animation: rise .9s var(--ease) 1s forwards; }
  .js .hero-links { opacity: 0; animation: rise .9s var(--ease) 1.15s forwards; }
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
  }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .project.reveal:nth-child(2) { transition-delay: .08s; }
  .js .project.reveal:nth-child(3) { transition-delay: .16s; }
  .js .project.reveal:nth-child(4) { transition-delay: .24s; }
}
@keyframes rise {
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes fade {
  from { opacity: 0; }
}

@media (max-width: 759px) {
  .network { opacity: .5; }
}

/* Contact form */
.contact-form { display: grid; gap: 18px; margin-top: 28px; letter-spacing: 0; }
.contact-form[hidden] { display: none; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9375rem; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(82, 185, 169, .2);
}
.field [aria-invalid="true"] { border-color: #E07A6B; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
button.btn { border: 0; cursor: pointer; font-family: inherit; }
button.btn:hover { background: #6BCBBC; }
button.btn:disabled { opacity: .6; cursor: progress; }
.form-status { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.form-status.ok { color: var(--teal); }
.form-status.err { color: #E9A093; }

/* Product marks */
.logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
}
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo-pad img { width: 78%; height: 78%; }
.logo-dark { background: #05080B; box-shadow: 0 0 0 1px var(--rule); }
@media (max-width: 759px) {
  .logo { width: 52px; height: 52px; border-radius: 13px; margin-bottom: 14px; }
}
