:root {
  color-scheme: dark;
  --bg: #020202;
  --text: #f4f4f0;
  --muted: rgba(244, 244, 240, 0.62);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #c3372f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::selection {
  background: var(--accent);
  color: white;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.grain,
.grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grain {
  z-index: 2;
  opacity: 0.13;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18), transparent 1px),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.12), transparent 1px);
  background-size: 4px 4px, 7px 7px;
  mix-blend-mode: overlay;
}

.grid {
  z-index: 1;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 22vw 100%, 100% 28vh;
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 85%, transparent 100%);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 76px);
  mix-blend-mode: difference;
}

.brand,
nav a,
.project-card,
.cta {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  gap: 0.34em;
  align-items: baseline;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand sup {
  font-size: 0.58rem;
  color: var(--muted);
}

nav {
  display: flex;
  gap: clamp(16px, 3vw, 42px);
  font-size: 0.84rem;
  font-weight: 700;
}

nav a {
  position: relative;
  overflow: hidden;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 280ms ease;
}

nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

main {
  position: relative;
  z-index: 3;
}

.panel {
  min-height: 100vh;
  padding: clamp(96px, 14vh, 160px) clamp(20px, 7vw, 112px);
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 1000px;
}

.eyebrow,
.section-label {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  text-wrap: balance;
}

h1 {
  max-width: 980px;
  font-size: clamp(4.4rem, 13vw, 13rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
}

h1 span {
  display: block;
  color: var(--accent);
  text-shadow: 0 0 42px rgba(195, 55, 47, 0.45);
}

.intro {
  max-width: 560px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  line-height: 1.5;
}

.scroll-hint {
  width: max-content;
  margin-top: 58px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--muted);
  font-size: 0.8rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: center;
  padding-top: 18vh;
  padding-bottom: 18vh;
}

.section-label {
  grid-column: 1 / -1;
}

.project-card {
  min-height: 36vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-right: 0;
  padding: 28px;
  background: rgba(5, 5, 6, 0.34);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  transition: background 240ms ease, color 240ms ease, transform 240ms ease;
}

.project-card:last-child {
  border-right: 1px solid var(--line);
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.94);
  color: #070707;
  transform: translateY(-10px);
}

.project-card span {
  color: var(--muted);
  font-weight: 800;
}

.project-card strong {
  max-width: 12ch;
  font-size: clamp(1.3rem, 2.4vw, 2.5rem);
  line-height: 0.98;
}

.project-card em {
  max-width: 22ch;
  color: currentColor;
  opacity: 0.66;
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.35;
}

.statement {
  display: grid;
  align-content: center;
  justify-items: end;
}

.statement > * {
  width: min(620px, 100%);
}

.statement h2,
.closing h2 {
  font-size: clamp(2.6rem, 6vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.statement p:not(.eyebrow) {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.35rem);
  line-height: 1.55;
}

.closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.closing h2 {
  max-width: 880px;
}

.cta {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(160px, 18vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: white;
  color: black;
  font-weight: 800;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.cta:hover {
  transform: scale(1.05) rotate(-4deg);
  box-shadow: 0 0 80px rgba(255, 255, 255, 0.24);
}

.progress {
  position: fixed;
  left: clamp(20px, 5vw, 76px);
  right: clamp(20px, 5vw, 76px);
  bottom: 22px;
  z-index: 6;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(195, 55, 47, 0.9);
}

.load-error {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 42px;
  z-index: 20;
  border: 1px solid rgba(195, 55, 47, 0.55);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(12, 0, 0, 0.9);
  color: #fff;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    gap: 20px;
  }

  nav {
    gap: 14px;
    font-size: 0.76rem;
  }

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

  .project-card,
  .project-card:last-child {
    min-height: 180px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .project-card:last-child {
    border-bottom: 1px solid var(--line);
  }

  .closing {
    align-items: flex-start;
    flex-direction: column;
  }
}
