/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0A0A0A;
  --fg: #FFFFFF;
  --fg-muted: #6B6B6B;
  --fg-dim: #3A3A3A;
  --border: #1F1F1F;

  --font-head: 'Archivo', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --max-w: 1200px;
  --nav-h: 64px;
  --section-pad: clamp(80px, 12vw, 160px);
  --gutter: clamp(24px, 5vw, 80px);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.nav-contact {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 200ms ease;
  cursor: pointer;
}

.nav-contact:hover {
  color: var(--fg);
}

.nav-contact:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ─── Shared Section Layout ─────────────────────────────────────── */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter);
}

.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 56px;
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter);
  width: 100%;
}

.hero-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 40px;
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(42px, 7vw, 100px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 40px;
  max-width: 14ch;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 300;
  color: var(--fg-muted);
  max-width: 48ch;
  line-height: 1.7;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: var(--gutter);
  font-size: 14px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  animation: nudge 2.4s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-hint { animation: none; }
}

/* ─── Portfolio ─────────────────────────────────────────────────── */
.portfolio {
  border-bottom: 1px solid var(--border);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.portfolio-item {
  padding: 40px 32px 40px 0;
  border-right: 1px solid var(--border);
}

.portfolio-item:last-child {
  border-right: none;
}

.portfolio-name {
  font-family: var(--font-head);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 16px;
  line-height: 1.1;
}

.portfolio-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 28ch;
}

@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 36px 0;
  }

  .portfolio-item:nth-child(odd) {
    padding-right: 32px;
    border-right: 1px solid var(--border);
  }

  .portfolio-item:last-child {
    border-bottom: none;
  }
}

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

  .portfolio-item,
  .portfolio-item:nth-child(odd) {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 32px 0;
  }

  .portfolio-item:last-child {
    border-bottom: none;
  }
}

/* ─── System ────────────────────────────────────────────────────── */
.system {
  border-bottom: 1px solid var(--border);
}

.system-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.system-step {
  display: flex;
  align-items: baseline;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: background 200ms ease;
}

.system-step:last-child {
  border-bottom: none;
}

.system-num {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--fg-dim);
  min-width: 32px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.system-text {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.1;
}

.system-step--repeat .system-num {
  font-size: 18px;
  color: var(--fg-muted);
}

.system-step--repeat .system-text {
  color: var(--fg-muted);
}

@media (max-width: 520px) {
  .system-step {
    gap: 20px;
  }
}

/* ─── Contact ───────────────────────────────────────────────────── */
.contact-inner {
  display: flex;
  flex-direction: column;
}

.contact-cta {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 300;
  color: var(--fg-muted);
  margin-bottom: 24px;
}

.contact-email {
  font-family: var(--font-head);
  font-size: clamp(24px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  display: inline-block;
  transition: opacity 200ms ease;
}

.contact-email:hover {
  opacity: 0.6;
}

.contact-email:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 6px;
  border-radius: 2px;
}

/* ─── Footer ────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
}

.footer-mark {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}
