/* ===== DESIGN SYSTEM ===== */
:root {
  --bg: #09090b;
  --bg-subtle: #111114;
  --surface: #18181b;
  --surface-hover: #1f1f23;
  --ink: #fafafa;
  --ink-secondary: #a1a1aa;
  --muted: #71717a;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --accent: #ffd000;
  --accent-dim: #c9a400;
  --accent-glow: rgba(255, 208, 0, 0.15);
  --accent-glow-strong: rgba(255, 208, 0, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  top: -30%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: -20%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ===== TOPBAR / NAVIGATION ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 2.5rem;
  background: rgba(9, 9, 11, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  transition: padding var(--transition-fast), background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.topbar.scrolled {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  background: rgba(9, 9, 11, 0.92);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px var(--accent-glow));
  transition: filter var(--transition-fast);
}

.brand:hover .brand-mark {
  filter: drop-shadow(0 0 14px var(--accent-glow-strong));
}

.brand-name {
  font-family: "Sora", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  text-transform: lowercase;
  line-height: 1;
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-smooth), left var(--transition-smooth);
  border-radius: 1px;
}

.main-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 60%;
  left: 20%;
}

.main-nav a.active {
  color: var(--accent);
}

.nav-cta {
  text-decoration: none;
  color: var(--bg);
  background: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  border: none;
  transition: background var(--transition-fast), box-shadow var(--transition-fast),
    transform var(--transition-fast);
  box-shadow: 0 0 16px var(--accent-glow);
}

.nav-cta:hover {
  background: #ffe54d;
  box-shadow: 0 0 28px var(--accent-glow-strong);
  transform: translateY(-1px);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
}

/* ===== HERO SECTION ===== */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
  padding-top: 4rem; /* offset for fixed navbar */
  position: relative;
}

.hero-copy {
  padding: 6rem 4rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 1.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

h1 {
  margin: 0 0 1.6rem;
  max-width: 14ch;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.2rem, 3.6vw, 4.2rem);
  line-height: 1.04;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #d4d4d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  max-width: 50ch;
  margin-bottom: 2.4rem;
  color: var(--ink-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.9rem 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-solid:hover {
  background: #ffe54d;
  box-shadow: 0 0 36px var(--accent-glow-strong);
  transform: translateY(-2px);
}

.btn-outline {
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn-dark:hover {
  background: #e4e4e7;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* Hero Cloud / Tag cloud */
.hero-cloud {
  background: var(--bg-subtle);
  position: relative;
  padding: 3rem 2.5rem;
  display: grid;
  align-content: center;
  gap: 0.15rem;
  text-transform: uppercase;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  overflow: hidden;
}

.hero-cloud::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 208, 0, 0.04) 60%,
    rgba(255, 208, 0, 0.08) 100%
  );
  pointer-events: none;
}

.hero-cloud span {
  font-size: clamp(2rem, 4.5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.06);
  transition: color 0.6s ease;
}

.hero-cloud span:hover {
  color: rgba(255, 255, 255, 0.15);
}

.hero-cloud strong {
  margin-top: 0.8rem;
  color: var(--accent);
  font-size: clamp(2.2rem, 5.2vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-shadow: 0 0 60px var(--accent-glow-strong);
  position: relative;
  z-index: 1;
}

/* ===== SERVICE STRIP ===== */
.service-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.service-tile {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 2rem 1.3rem 2.4rem;
  position: relative;
  overflow: hidden;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.service-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-smooth);
}

.service-tile:hover {
  background: var(--surface-hover);
}

.service-tile:hover::before {
  transform: scaleX(1);
}

.service-tile:last-child {
  border-right: none;
}

.service-tile h2 {
  margin: 0 0 0.8rem;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
}

.service-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Service icon numbers */
.service-tile .service-num {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(255, 208, 0, 0.08);
  line-height: 1;
  margin-bottom: 1rem;
  transition: color var(--transition-fast);
}

.service-tile:hover .service-num {
  color: rgba(255, 208, 0, 0.18);
}

/* ===== METHOD SECTION ===== */
.method {
  padding: 6rem 2.5rem;
  position: relative;
  z-index: 1;
}

.cases {
  padding: 6rem 2.5rem;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head h3 {
  margin: 0;
  max-width: 26ch;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.7rem, 2.8vw, 2.8rem);
  line-height: 1.14;
  font-weight: 700;
  background: linear-gradient(135deg, #fafafa 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.steps li {
  background: var(--surface);
  padding: 1.8rem 1.5rem;
  display: grid;
  gap: 0.8rem;
  transition: background var(--transition-fast);
  position: relative;
}

.steps li::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.steps li:hover {
  background: var(--surface-hover);
}

.steps li:hover::after {
  opacity: 0.5;
}

.steps span {
  font-family: "Sora", sans-serif;
  color: var(--accent-dim);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  opacity: 0.6;
}

.steps h4 {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== CASES / SUCCESS STORIES ===== */
.cases {
  background: var(--bg-subtle);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.case-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.case-visual {
  background: linear-gradient(135deg, var(--accent) 0%, #f0b800 100%);
  border: 1px solid rgba(255, 208, 0, 0.3);
  border-radius: var(--radius-md);
  min-height: 240px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px var(--accent-glow), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.case-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.15) 100%);
  pointer-events: none;
}

.chart-box {
  width: 72%;
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.chart-box span {
  flex: 1;
  background: var(--bg);
  border-radius: 3px 3px 0 0;
  transition: height var(--transition-spring);
}

.chart-box span:nth-child(1) { height: 25%; }
.chart-box span:nth-child(2) { height: 35%; }
.chart-box span:nth-child(3) { height: 48%; }
.chart-box span:nth-child(4) { height: 62%; }
.chart-box span:nth-child(5) { height: 76%; }
.chart-box span:nth-child(6) { height: 92%; }

.case-copy p {
  margin-top: 0;
  color: var(--ink-secondary);
  line-height: 1.7;
}

.case-copy ul {
  margin: 1.2rem 0 0;
  padding-left: 0;
  list-style: none;
}

.case-copy li {
  margin-bottom: 0.7rem;
  padding-left: 1.6rem;
  position: relative;
  color: var(--ink-secondary);
}

.case-copy li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== CTA BAND ===== */
.cta-band {
  padding: 5.5rem 2.5rem;
  background: linear-gradient(135deg, #1a1500 0%, #2a1f00 30%, var(--bg-subtle) 100%);
  border-top: 1px solid var(--accent-dim);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  top: -60%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.cta-band h3 {
  margin: 0 0 0.9rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.9rem, 3.2vw, 3.2rem);
  text-transform: uppercase;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.cta-band p {
  margin: 0 0 1.6rem;
  max-width: 55ch;
  color: var(--ink-secondary);
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.cta-band .btn {
  position: relative;
  z-index: 1;
}

/* ===== FOOTER ===== */
footer {
  background: var(--surface);
  padding: 4rem 2.5rem 1.5rem;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

footer h4 {
  margin: 0 0 1rem;
  font-family: "Sora", sans-serif;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}

footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

footer li,
footer p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.35rem 0;
  line-height: 1.6;
}

footer li {
  padding-left: 0;
  transition: color var(--transition-fast);
}

footer li:hover {
  color: var(--ink-secondary);
}

.footer-bottom {
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.on {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in service strip */
.service-strip .reveal:nth-child(1) { transition-delay: 0ms; }
.service-strip .reveal:nth-child(2) { transition-delay: 60ms; }
.service-strip .reveal:nth-child(3) { transition-delay: 120ms; }
.service-strip .reveal:nth-child(4) { transition-delay: 180ms; }
.service-strip .reveal:nth-child(5) { transition-delay: 240ms; }

/* ===== GRAIN TEXTURE OVERLAY ===== */
main::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.4;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 208, 0, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 208, 0, 0.35);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: auto 1fr;
    padding: 0.9rem 1.5rem;
  }

  .nav-cta {
    display: none;
  }

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

  .hero-copy {
    padding: 7rem 2.5rem 3rem;
  }

  .hero-cloud {
    min-height: 260px;
  }

  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .topbar {
    padding: 0.7rem 1rem;
  }

  .main-nav {
    gap: 0;
  }

  .main-nav a {
    font-size: 0.7rem;
    padding: 0.45rem 0.5rem;
  }

  .hero-copy {
    padding: 6rem 1.2rem 2.5rem;
  }

  .method,
  .cases,
  .cta-band,
  footer {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .service-strip {
    grid-template-columns: 1fr;
  }

  .service-tile {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

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

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

  .case-grid {
    gap: 1.5rem;
  }
}

/* ===== SELECTION ===== */
::selection {
  background: var(--accent);
  color: var(--bg);
}
