/* src/styles.css */

:root {
  --bg: #0b0a08;
  --bg-soft: #141210;
  --fg: #ece6da;
  --fg-dim: #8d877c;
  --accent: #c4602f;
  --rule: rgba(236, 230, 218, 0.1);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --gutter: clamp(20px, 4vw, 64px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

/* ── Grain overlay ──────────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 30px) var(--gutter);
  mix-blend-mode: difference;
}

.nav__mark {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.01em;
}

.nav__links {
  display: none;
  gap: clamp(20px, 3vw, 40px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@media (min-width: 860px) {
  .nav__links {
    display: flex;
  }
}

.nav__links a {
  opacity: 0.75;
  transition: opacity 0.25s ease;
}
.nav__links a:hover {
  opacity: 1;
}

.nav__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.nav__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero__canvas--ready {
  opacity: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(11, 10, 8, 0.55) 78%),
    linear-gradient(to bottom, rgba(11, 10, 8, 0.65) 0%, transparent 22%, transparent 70%, rgba(11, 10, 8, 0.85) 100%);
}

.hero__topbar,
.hero__core,
.hero__bottom {
  position: relative;
  z-index: 2;
}

.hero__topbar {
  display: flex;
  justify-content: space-between;
  padding: clamp(72px, 10vh, 110px) var(--gutter) 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
}

.hero__topbar span:nth-child(2) {
  display: none;
}

@media (min-width: 640px) {
  .hero__topbar span:nth-child(2) {
    display: inline;
  }
}

.hero__core {
  padding: 0 var(--gutter);
  flex: 1;
  display: flex;
  align-items: center;
}

.hero__eyebrow {
  position: absolute;
  top: -28px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--fg-dim);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(54px, 9.6vw, 160px);
  line-height: 0.96;
  letter-spacing: -0.018em;
  max-width: 14ch;
  position: relative;
}

.hero__line {
  display: block;
}

.hero__line--italic {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.hero__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter) clamp(36px, 6vh, 64px);
  gap: 24px;
}

.hero__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  max-width: 28ch;
  display: none;
}

@media (min-width: 760px) {
  .hero__caption {
    display: block;
  }
}

.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.hero__scroll-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--fg-dim), transparent);
  animation: scrollcue 2.2s ease-in-out infinite;
}

@keyframes scrollcue {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

.hero__signoff {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  text-align: right;
}

/* ── Page stack ──────────────────────────────────────────────────────── */
.page-stack {
  position: relative;
  z-index: 2;
  background: var(--bg);
  border-top: 1px solid var(--rule);
}

.section {
  padding: clamp(96px, 14vh, 200px) 0;
  border-bottom: 1px solid var(--rule);
}

.section__inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.section__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 78px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 18ch;
  margin-bottom: 56px;
}

.section__columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 920px;
}

@media (min-width: 760px) {
  .section__columns {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
}

.section__body {
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.78;
}

/* ── Lists (services / works / steps) ───────────────────────────────── */
.list__row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
  transition: padding-left 0.3s ease, background 0.3s ease;
}

.list__row:last-child {
  border-bottom: 1px solid var(--rule);
}

.list__row:hover {
  padding-left: 16px;
  background: rgba(255, 255, 255, 0.015);
}

.list__index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-dim);
  padding-top: 4px;
}

.list__name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  margin-bottom: 8px;
}

.list__desc {
  display: block;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.7;
  max-width: 56ch;
}

@media (min-width: 760px) {
  .list__row {
    grid-template-columns: 56px 280px 1fr;
    align-items: baseline;
  }
  .list__name {
    margin-bottom: 0;
  }
}

/* ── Contact ─────────────────────────────────────────────────────────── */
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 56px);
  margin-bottom: 80px;
  transition: color 0.3s ease;
}

.contact__email:hover {
  color: var(--accent);
}

.contact__arrow {
  font-size: 0.6em;
  transition: transform 0.3s ease;
}

.contact__email:hover .contact__arrow {
  transform: translate(4px, -4px);
}

.contact__columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 760px;
}

@media (min-width: 640px) {
  .contact__columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 12px;
}

.contact__col p:not(.contact__label) {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.78;
}

.contact__col a {
  opacity: 0.78;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.contact__col a:hover {
  color: var(--accent);
  opacity: 1;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 40px var(--gutter) 56px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
}

@media (min-width: 640px) {
  .footer {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .nav__dot,
  .hero__scroll-line {
    animation: none;
  }
  .hero__canvas {
    transition: none;
  }
}

/* ── Focus visibility ────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 4px;
}
