/* Layout: fixed WebGL sky (whitehole-sky.js) behind a left-aligned hero; the white hole sits right
   (top on phones) and drifts up on scroll. Sections float over the sky as frosted-glass cards. */
:root {
  --void: #000308;
  --panel: rgba(7, 18, 40, 0.62);
  --glass-a: rgba(9, 23, 52, 0.5);
  --glass-b: rgba(5, 14, 34, 0.62);
  --line: rgba(66, 134, 255, 0.22);
  --text: rgba(245, 241, 232, 0.95);
  --muted: rgba(180, 203, 235, 0.74);
  --muted-2: rgba(158, 182, 219, 0.6);
  --blue: #2f86ff;
  --blue-soft: #86bcff;
  --btn-a: #1b4c98;
  --btn-b: #12356e;
  --glow-a: rgba(0, 187, 255, 0.33);
  --glow-b: rgba(0, 187, 255, 0.66);
  --glow-c: #90c9e5;
  --radius: 14px;
  --header-height: 62px;
  --font-brand: "Orbitron", "Eurostile", "Segoe UI", sans-serif;
  --font-head: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Space Grotesk", "Inter", "Segoe UI", sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--void);
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  height: auto;
}

img.blueish {
  filter: hue-rotate(-140deg) saturate(1.15) contrast(1.1);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Darkens the sky behind the hero copy (left on desktop, bottom on phones) */
.scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 3, 8, 0.72) 0%, rgba(0, 3, 8, 0.35) 38%, transparent 60%);
}

.container {
  width: min(1080px, 100%);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ====== Header (appears once the hero logo scrolls away) ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(2, 8, 20, 0.66);
  border-bottom: 1px solid rgba(80, 140, 230, 0.18);
}

.site-header.header-managed {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.site-header.header-managed.header-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand img {
  display: block;
  height: 20px;
  width: auto;
}

.nav {
  display: flex;
  gap: 22px;
  font-family: var(--font-brand);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a:hover {
  color: var(--blue-soft);
}

#top {
  margin-top: calc(var(--header-height) * -1 - 1px);
}

/* ====== Hero ====== */
.hero {
  min-height: min(86svh, 820px);
  display: flex;
  align-items: center;
  padding-block: 88px 64px;
}

.hero-copy {
  max-width: 540px;
}

.hero-brand {
  margin: 0 0 18px;
}

.hero-brand img {
  display: block;
  width: min(420px, 82vw);
  filter: drop-shadow(0 0 18px rgba(69, 161, 255, 0.35));
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  text-wrap: balance;
}

.lead {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.55;
  font-size: 17px;
  font-weight: 300;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.btn {
  border: 1px solid rgba(125, 177, 255, 0.25);
  border-radius: 7px;
  min-height: 50px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 17px/1 var(--font-body);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  border-color: rgba(100, 166, 255, 0.08);
  box-shadow: 0 10px 28px rgba(10, 34, 76, 0.52);
}

.btn-primary:hover {
  border-color: rgba(150, 200, 255, 0.5);
  box-shadow: 0 10px 34px rgba(47, 134, 255, 0.35);
}

.btn-ghost {
  background: rgba(7, 17, 36, 0.78);
}

.btn-ghost:hover {
  border-color: rgba(96, 160, 255, 0.55);
}

.hint {
  margin-top: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-brand);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hint i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-soft);
  box-shadow: 0 0 10px var(--blue);
  animation: blip 2.4s infinite;
}

@keyframes blip {
  50% {
    opacity: 0.3;
  }
}

/* ====== Sections ====== */
.section {
  padding-block: 56px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-brand);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue-soft);
}

.section-head h2::after {
  content: "";
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, rgba(134, 188, 255, 0.5), transparent);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card {
  position: relative;
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--glass-a), var(--glass-b));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 15px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

/* Approach */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: baseline;
  padding: 16px 18px;
}

.step h3 {
  margin: 0 0 4px;
}

.step p {
  grid-column: 2;
}

.step-num {
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue-soft);
}

.divider-quote {
  margin: 28px 0 0;
  max-width: 40ch;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: rgba(213, 231, 255, 0.92);
  text-wrap: balance;
}

/* Work */
.project-shot {
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid rgba(60, 100, 160, 0.2);
  background: rgba(10, 20, 36, 0.6);
  overflow: hidden;
}

.project-shot img {
  display: block;
  width: 100%;
}

/* Philosophy */
.philo {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.philo strong {
  font-weight: 500;
  color: var(--text);
}

/* Contact */
.contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.contact-card::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 15%;
  bottom: -2px;
  height: 5px;
  background: radial-gradient(closest-side, var(--glow-c), var(--glow-b), var(--glow-a), transparent 72%);
}

.contact-label {
  margin-bottom: 8px;
  font-family: var(--font-brand);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.contact-link {
  font-size: 16px;
  color: rgba(220, 237, 255, 0.94);
  overflow-wrap: anywhere;
}

.contact-link:hover {
  color: var(--blue-soft);
}

.footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid rgba(84, 138, 220, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13px;
}

.footer-dot {
  opacity: 0.5;
}

/* Phones and portrait screens: the white hole moves to the top, copy sits below it */
@media (max-width: 760px),
(max-aspect-ratio: 1/1) {
  .scrim {
    background: linear-gradient(180deg, transparent 0%, transparent 30%, rgba(0, 3, 8, 0.55) 52%, rgba(0, 3, 8, 0.7) 100%);
  }

  .hero {
    align-items: flex-end;
    min-height: min(92svh, 860px);
    padding-top: 38svh;
  }
}

@media (max-width: 520px) {
  .nav {
    gap: 14px;
    letter-spacing: 0.16em;
  }

  .cta-row .btn {
    flex: 1 1 140px;
  }
}

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

  .hint i {
    animation: none;
  }
}
