/* ─── Fonts (self-hosted variable fonts, latin subset) ───────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --bg-base:       #000000;
  --bg-elevated:   #0A0A0A;
  --surface:       rgba(20, 20, 22, 0.6);
  --surface-hover: rgba(28, 28, 30, 0.75);
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text-primary:  #F5F5F7;
  --text-secondary:#A1A1A6;
  --text-tertiary: #6E6E73;
  --mint:          #A8E6A1;
  --coral:         #FF453A;
  --amber:         #FF9F0A;
  --shadow-card:   0 8px 32px rgba(0,0,0,0.3);
  --shadow-elevated:0 16px 48px rgba(0,0,0,0.4);
  --ease-expo:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
.display-xl  { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.08; }
.display-lg  { font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.1;  }
.display-md  { font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2;  }
.heading-lg  { font-size: 1.75rem; font-weight: 400; letter-spacing: -0.01em; line-height: 1.3; }
.heading-md  { font-size: 1.15rem; font-weight: 400; letter-spacing: 0;      line-height: 1.3; }
.body-lg     { font-size: 1.1rem;  font-weight: 400; line-height: 1.65; color: var(--text-secondary); }
.caption     { font-size: 0.8rem;  letter-spacing: 0.025em; color: var(--text-tertiary); }
.section-label { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 12px; }

.data-xl {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1;
}
.data-md {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.mono { font-family: 'JetBrains Mono', monospace; }

/* ─── Glass card ─────────────────────────────────────────────────────────── */
.glass {
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  transition: border-color 200ms ease-out, background 200ms ease-out, box-shadow 200ms ease-out;
}
.glass:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
  padding: 13px 22px;
}
.btn-primary {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.btn-primary:hover { background: rgba(255,255,255,0.13); border-color: rgba(255,255,255,0.22); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover { background: rgba(255,255,255,0.04); border-color: var(--border-strong); color: var(--text-primary); }

.btn-mint {
  background: rgba(168, 230, 161, 0.08);
  border: 1px solid rgba(168, 230, 161, 0.25);
  color: var(--mint);
  width: 100%;
  justify-content: center;
  padding: 15px 22px;
  font-size: 0.9rem;
}
.btn-mint:hover { background: rgba(168, 230, 161, 0.14); border-color: rgba(168, 230, 161, 0.45); }

/* ─── Mint dot / pulse ───────────────────────────────────────────────────── */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-mint   { background: var(--mint);  animation: pulse-mint 2s ease-in-out infinite; }
.dot-amber  { background: var(--amber); }
.dot-gray   { background: var(--text-tertiary); }

@keyframes pulse-mint {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0   rgba(168,230,161,0.5); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 5px rgba(168,230,161,0); }
}

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(168,230,161,0.07);
  border: 1px solid rgba(168,230,161,0.18);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--mint);
}

/* ─── Form inputs ────────────────────────────────────────────────────────── */
.field {
  width: 100%;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 18px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 150ms ease;
}
.field::placeholder { color: var(--text-tertiary); }
.field:focus        { border-color: var(--border-strong); }
textarea.field      { resize: none; line-height: 1.6; }

/* Budget pills */
.budget-pill {
  padding: 8px 15px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: all 150ms ease;
}
.budget-pill:hover, .budget-pill.active {
  background: rgba(168,230,161,0.09);
  border-color: rgba(168,230,161,0.3);
  color: var(--mint);
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms var(--ease-expo), transform 600ms var(--ease-expo);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.d80  { transition-delay:  80ms; }
.d160 { transition-delay: 160ms; }
.d240 { transition-delay: 240ms; }
.d320 { transition-delay: 320ms; }
.d400 { transition-delay: 400ms; }

/* ─── Navigation ─────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 150ms;
}
.nav-links a:hover { color: var(--text-primary); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 0 32px;
  overflow: hidden;
}
#hero-canvas, .hero-media {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: var(--bg-base);
}
.hero-media { object-fit: cover; }
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding-top: 100px;
}

/* ─── Section layout ─────────────────────────────────────────────────────── */
.section {
  padding: 112px 32px;
  background: rgba(0, 0, 0, 0.35);
}
.section-alt { background: rgba(10, 10, 10, 0.42); }
.inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* ─── Bento grid (live dashboard) ────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.col-2 { grid-column: span 2; }

/* ─── Process grid ───────────────────────────────────────────────────────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.phase-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 4.5rem;
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgba(255,255,255,0.06);
}

/* ─── Work mosaic ────────────────────────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.work-card {
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
}
.work-img {
  height: 220px;
  position: relative;
  overflow: hidden;
}
.work-img-inner {
  position: absolute;
  inset: 0;
  transition: transform 400ms var(--ease-expo);
}
.work-card:hover .work-img-inner { transform: scale(1.03); }

/* ─── Contact grid ───────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

/* ─── Icon wrapper ───────────────────────────────────────────────────────── */
.icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Sparkline ──────────────────────────────────────────────────────────── */
.sparkline { overflow: visible; }

/* ─── Row util ───────────────────────────────────────────────────────────── */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }

/* ─── Inner project row ──────────────────────────────────────────────────── */
.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  transition: border-color 150ms ease, background 150ms ease;
}
.project-row:hover { background: rgba(255,255,255,0.04); border-color: var(--border-strong); }

.project-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(168,230,161,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Divider ────────────────────────────────────────────────────────────── */
.vdivider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
#footer {
  padding: 36px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── Touch / tap ────────────────────────────────────────────────────────── */
a, button { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }

/* ─── Hamburger ──────────────────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 8px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 200ms ease, opacity 200ms ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #nav { padding: 16px 20px; }
  .section { padding: 80px 20px; }
  #hero { padding: 0 20px; }
  #footer { padding: 28px 20px; }

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 57px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5, 5, 5, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 16px 24px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-links a:last-child { border-bottom: none; }

  .bento { grid-template-columns: 1fr 1fr; }
  .bento .col-2 { grid-column: span 2; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .work-grid .col-2 { grid-column: span 2; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .bento .col-2 { grid-column: span 1; }
  .bento > div { padding: 24px 20px !important; }
  .process-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .work-grid .col-2 { grid-column: span 1; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; }
  .hero-stats .vdivider { display: none; }
  .hero-stats .data-md { font-size: 1.1rem; }
  .hero-stats > div { padding: 0 12px; border-right: 1px solid var(--border); }
  .hero-stats > div:first-child { padding-left: 0; }
  .hero-stats > div:last-child { border-right: none; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .form-two-col { grid-template-columns: 1fr !important; }
  #footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .project-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .project-row > div:last-child { text-align: left !important; }
}

/* ─── Inline SVG icons (sprite: assets/img/icons.svg) ───────────────────── */
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Skip link (keyboard users) ─────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ─── Honeypot (spam trap — must stay visually hidden) ───────────────────── */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up { opacity: 1; transform: none; }
}
