/* ============================================================
   NOAH — Creative Director portfolio
   Dark, minimal, typographic. No images.
   Type: SF Pro Display (system).  Theme: black + dark green.
   ============================================================ */

:root {
  --bg: #070a08;
  --bg-2: #0d1310;
  --bg-3: #121a15;

  --text: #eef2ee;
  --muted: rgba(238, 242, 238, 0.52);
  --muted-2: rgba(238, 242, 238, 0.36);

  --line: rgba(238, 242, 238, 0.12);
  --line-strong: rgba(238, 242, 238, 0.26);

  /* One accent, used sparingly — deep green. */
  --accent: #2f9e63;
  --accent-hover: #46bd7a;

  --font: -apple-system, "SF Pro Display", "SF Pro Text", BlinkMacSystemFont,
    "Helvetica Neue", Helvetica, Arial, sans-serif;

  --maxw: 1360px;
  --pad: clamp(20px, 5vw, 72px);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #06120b; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ============================================================
   INTRO WIPE  (pure-CSS; never permanently blocks content)
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: intro-out 1.15s var(--ease) 0.9s forwards;
}
.intro-mark {
  font-size: clamp(1.5rem, 7vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  opacity: 0;
  animation: intro-mark 0.9s var(--ease) 0.1s forwards;
}
@keyframes intro-mark {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes intro-out {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ============================================================
   NAV
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
#site-header.scrolled {
  background: rgba(7, 10, 8, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-links { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.28s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: 90px;
}
.hero-glow {
  position: absolute;
  left: 50%; top: 38%;
  width: 80vmin; height: 80vmin;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(47, 158, 99, 0.18), transparent 62%);
  filter: blur(30px);
  z-index: 0;
  animation: glow-drift 14s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  0%   { transform: translate(-54%, -52%) scale(1); }
  100% { transform: translate(-46%, -46%) scale(1.12); }
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(56px, 10vh, 120px);
}
.hero-title {
  font-weight: 800;
  font-size: clamp(4.5rem, 20vw, 15rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin-bottom: 30px;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line-inner { display: inline-block; will-change: transform; }
.lede {
  font-size: clamp(1.05rem, 2.1vw, 1.5rem);
  font-weight: 400;
  color: rgba(238, 242, 238, 0.82);
  max-width: 40ch;
  letter-spacing: -0.01em;
}
.lede .hl { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.scroll-cue {
  position: absolute;
  bottom: 26px; right: var(--pad);
  z-index: 2;
  width: 1px; height: 40px;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--accent), transparent);
  animation: cue 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue { 0%, 100% { transform: scaleY(0.4); opacity: 0.5; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 15px 32px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn:hover { opacity: 0.86; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { opacity: 1; border-color: var(--text); background: rgba(238, 242, 238, 0.06); }

/* ============================================================
   SECTION SHELL
   ============================================================ */
section { position: relative; }
.section-pad { padding-top: clamp(84px, 13vh, 168px); padding-bottom: clamp(84px, 13vh, 168px); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2 {
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.section-head p { color: var(--muted); max-width: 34ch; font-size: 15px; }

/* ---------- ABOUT ---------- */
.about { max-width: 1000px; }
.about h2 {
  font-weight: 600;
  font-size: clamp(1.9rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.about h2 em { font-style: normal; color: var(--accent); }
.about p {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  max-width: 64ch;
  margin-top: 30px;
}

/* ============================================================
   VENTURES  (editorial rows)
   ============================================================ */
.ventures { border-top: 1px solid var(--line-strong); }
.venture {
  display: grid;
  grid-template-columns: 56px 1fr 40px;
  gap: clamp(14px, 3vw, 44px);
  align-items: start;
  padding: clamp(30px, 4vw, 52px) 4px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.45s var(--ease);
}
.venture::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease);
}
.venture:hover { padding-left: 22px; }
.venture:hover::before { transform: scaleY(1); }
.v-num {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-2);
  padding-top: 0.6em;
  font-variant-numeric: tabular-nums;
}
.v-body h3 {
  font-size: clamp(1.9rem, 5.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.v-body h3 .accent { color: var(--accent); }
.v-body p {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  max-width: 56ch;
  margin-top: 16px;
}
.v-body .handle {
  display: inline-block;
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted-2);
  transition: color 0.25s ease;
}
.venture:hover .handle { color: var(--accent); }
.v-arrow {
  color: var(--muted-2);
  padding-top: 0.4em;
  transition: color 0.3s ease, transform 0.4s var(--ease);
}
.v-arrow svg { width: 26px; height: 26px; }
.venture:hover .v-arrow { color: var(--text); transform: translate(4px, -4px); }

/* ============================================================
   SERVICES / WHAT I DO  (editorial list)
   ============================================================ */
.services { border-top: 1px solid var(--line-strong); }
.service {
  display: grid;
  grid-template-columns: 46px minmax(0, 0.8fr) minmax(0, 1.3fr);
  gap: clamp(14px, 3vw, 48px);
  align-items: baseline;
  padding: clamp(26px, 3.4vw, 40px) 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.service:hover { padding-left: 16px; }
.service .num { font-size: 15px; font-weight: 500; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.service h3 {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.service p { color: var(--muted); font-size: clamp(0.95rem, 1.4vw, 1.06rem); max-width: 50ch; }
@media (max-width: 720px) {
  .service { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .service:hover { padding-left: 0; }
  .service .num { margin-bottom: 2px; }
  .service p { margin-top: 4px; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }
.contact-lead h2 {
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin: 0 0 32px;
}
.contact-lead .mail {
  font-size: clamp(1.15rem, 3vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: border-color 0.3s ease, color 0.3s ease;
  display: inline-block;
  word-break: break-word;
}
.contact-lead .mail:hover { border-color: var(--accent); }
.contact-loc { color: var(--muted); margin-top: 26px; font-size: 15px; }

.contact-social { display: flex; flex-direction: column; }
.social-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  border-top: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease);
}
.social-row:last-child { border-bottom: 1px solid var(--line); }
.social-row:hover { padding-left: 12px; }
.s-ico { color: var(--muted); line-height: 0; transition: color 0.25s ease; }
.s-ico svg { width: 20px; height: 20px; }
.social-row:hover .s-ico { color: var(--accent); }
.s-handle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer { border-top: 1px solid var(--line); padding: 44px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner .logo { font-size: 16px; }
.footer-inner .copy { color: var(--muted-2); font-size: 13px; letter-spacing: -0.01em; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color 0.25s ease; }
.footer-links a:hover { color: var(--text); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
/* Scroll reveals — only hidden when JS is on (avoids blank page if JS fails) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Hero load animations */
.js .reveal-load { opacity: 0; transform: translateY(16px); animation: rise 0.9s var(--ease) var(--d, 0s) forwards; }
.js .hero-title .line-inner { transform: translateY(105%); animation: line-up 1s var(--ease) var(--d, 0s) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes line-up { to { transform: translateY(0); } }

/* ============================================================
   GRAIN + VIGNETTE OVERLAY
   ============================================================ */
.fx-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
}
.fx-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.fx-overlay::after {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: screen;
}

/* ============================================================
   HAMBURGER / MOBILE DROPDOWN NAV
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  margin-right: -8px;
  background: none; border: none; cursor: pointer;
  z-index: 120;
}
.nav-toggle span {
  display: block; height: 2px; width: 24px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.25s ease;
}
#site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
#site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  #site-header.nav-open {
    background: rgba(7, 10, 8, 0.98);
    backdrop-filter: saturate(140%) blur(16px);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    border-bottom: 1px solid var(--line);
  }
  .nav-links {
    position: fixed;
    top: 70px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(7, 10, 8, 0.98);
    backdrop-filter: saturate(140%) blur(16px);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    padding: 4px var(--pad) 22px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
  }
  #site-header.nav-open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    padding: 18px 2px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a::after { display: none; }

  /* Ventures stack on mobile */
  .venture { grid-template-columns: 1fr; gap: 4px; padding: 30px 0; }
  .venture:hover { padding-left: 0; }
  .venture::before { display: none; }
  .v-num { padding-top: 0; margin-bottom: 6px; }
  .v-arrow { display: none; }
}

@media (max-width: 600px) {
  :root { --pad: 20px; }
  .nav { height: 62px; }
  .nav-links { top: 62px; }
  .logo { font-size: 17px; }

  .section-pad { padding-top: 72px; padding-bottom: 72px; }

  .hero { min-height: 92svh; padding-top: 80px; }
  .hero-content { padding-bottom: 44px; }
  .hero-title { font-size: clamp(4rem, 26vw, 7rem); }
  .lede { font-size: 1.08rem; max-width: 30ch; }
  .hero-cta { gap: 12px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .scroll-cue { display: none; }

  .section-head { margin-bottom: 30px; }
  .section-head p { font-size: 14px; }

  .contact-lead h2 { margin: 0 0 26px; }

  footer { padding: 34px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
}

/* Touch devices: neutralize hover-only motion */
@media (hover: none) {
  .venture:hover { padding-left: 0; }
  .venture:hover::before { transform: scaleY(0); }
  .service:hover { padding-left: 0; }
  .social-row:hover { padding-left: 4px; }
}

/* ============================================================
   MOTION PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .intro { display: none; }
  .js .reveal, .js .reveal-load { opacity: 1 !important; transform: none !important; }
  .js .hero-title .line-inner { transform: none !important; }
  .marquee-track { animation: none !important; }
  .hero-glow { animation: none !important; }
}
