:root {
  --bg: #0a0907;
  --bg-elevated: #121009;
  --bg-card: #15130c;
  --ink: #f4ede0;
  --ink-dim: #8b8275;
  --ink-faint: #3d3a32;
  --gold: #c9a86a;
  --gold-bright: #e6c887;
  --gold-deep: #8a6f3d;
  --hairline: rgba(201, 168, 106, 0.15);
  --hairline-strong: rgba(201, 168, 106, 0.3);
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --grain-opacity: 0.025;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: var(--grain-opacity, 0.025);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.premium-ease *,
body.premium-ease *::before,
body.premium-ease *::after {
  transition-timing-function: var(--ease-premium) !important;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ REVEAL-ON-SCROLL ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease-premium),
              transform 0.9s var(--ease-premium),
              filter 0.9s var(--ease-premium);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ============ NAV ============ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 32px;
  backdrop-filter: blur(20px);
  background: rgba(10, 9, 7, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

nav.scrolled { border-bottom-color: var(--hairline); }

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 26px;
  height: 26px;
  background: url('logo-mark.png') center/contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(201, 168, 106, 0.35));
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 8px 24px rgba(201, 168, 106, 0.2);
}

.btn-primary:hover {
  background: var(--gold-bright);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 12px 32px rgba(201, 168, 106, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ HERO ============ */
.hero {
  padding: 180px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(201, 168, 106, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 32px;
  max-width: 14ch;
  animation: fadeUp 0.9s ease-out 0.1s both;
}

h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 300;
}

.hero-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 52ch;
  margin-bottom: 48px;
  animation: fadeUp 0.9s ease-out 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 14px;
  align-items: center;
  animation: fadeUp 0.9s ease-out 0.3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Word stagger reveal */
body.hero-stagger h1 { animation: none; }
body.hero-stagger h1 .word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  animation: wordReveal 0.9s var(--ease-premium) forwards;
}
@keyframes wordReveal { to { opacity: 1; transform: translateY(0); filter: blur(0); } }

/* ============ TRUSTED BY ============ */
.trusted {
  padding: 64px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-top: 80px;
}

.trusted-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 32px;
}

.trusted-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: center;
}

.trusted-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--ink);
  transition: all 0.3s ease;
  background: rgba(18, 16, 9, 0.4);
}

.trusted-item:hover {
  border-color: var(--hairline-strong);
  background: rgba(201, 168, 106, 0.04);
}

.trusted-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold);
}

/* ============ STATS ============ */
.stats {
  border-bottom: 1px solid var(--hairline);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  text-align: center;
}

.stats-grid > div { justify-self: center; }

.stat-num {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.4;
}

/* ============ MANIFESTO (PINNED) ============ */
.manifesto-wrap {
  position: relative;
  height: 220vh;
}

.manifesto {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.manifesto-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.manifesto-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.manifesto-text {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 24ch;
}

.manifesto-text .word {
  color: var(--ink-faint);
  transition: color 0.5s var(--ease-premium), filter 0.5s var(--ease-premium);
  display: inline;
  filter: blur(4px);
}

.manifesto-text .word.lit {
  color: var(--ink);
  filter: blur(0);
}
.manifesto-text .word.gold { color: var(--gold); }

/* Manifesto rail */
.manifesto-rail {
  position: absolute;
  top: 50%;
  left: 32px;
  transform: translateY(-50%);
  width: 1px;
  height: 220px;
  background: var(--hairline);
}

.manifesto-rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(201, 168, 106, 0.5);
  height: 0%;
  transition: height 0.15s linear;
}

/* ============ PROCESS TIMELINE ============ */
.process {
  padding: 120px 0;
  border-top: 1px solid var(--hairline);
}

.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  margin-top: 80px;
}

.process-track::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
  opacity: 0.5;
}

.process-step {
  position: relative;
  padding: 0 24px;
  transition: transform 0.5s var(--ease-premium);
}

.process-step:hover { transform: translateY(-4px); }

.process-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.process-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  transition: box-shadow 0.4s var(--ease-premium);
}

.process-step:hover .process-dot::after {
  box-shadow: 0 0 18px var(--gold), 0 0 0 6px rgba(201, 168, 106, 0.08);
}

@keyframes dotPing {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.reveal.in .process-dot::after { animation: dotPing 0.7s var(--ease-premium) both; }

.process-week {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.process-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.process-desc {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.55;
  max-width: 28ch;
}

/* ============ SERVICES ============ */
.services {
  padding: 120px 0;
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 80px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
}

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 16ch;
}

.section-title em { font-style: italic; color: var(--gold); }

.section-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: right;
}

.service {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  padding: 64px 0;
  border-top: 1px solid var(--hairline);
  align-items: start;
}

.service:last-of-type { border-bottom: 1px solid var(--hairline); }

.service-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.service-name {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.service-tag {
  font-size: 14px;
  color: var(--ink-dim);
  font-style: italic;
}

.service-content > div { margin-bottom: 28px; }
.service-content > div:last-child { margin-bottom: 0; }

.service-row-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.service-row-text {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
}

.service-row-text.dim { color: var(--ink-dim); }

/* ============ N8N-STYLE WORKFLOW VIZ ============ */
.workflow {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}

.workflow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

.workflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--hairline);
}

.workflow-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workflow-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workflow-status .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.workflow svg { display: block; width: 100%; height: auto; }

/* ============ FAQ ============ */
.faq-section {
  padding: 120px 0;
  border-top: 1px solid var(--hairline);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  border-top: 1px solid var(--hairline);
  transition: background 0.4s var(--ease-premium), border-color 0.3s ease;
}

.faq-item:last-child { border-bottom: 1px solid var(--hairline); }

.faq-item.open { border-color: var(--hairline-strong); }

.faq-item:hover {
  background: linear-gradient(90deg, transparent 0%, rgba(201, 168, 106, 0.03) 50%, transparent 100%);
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
  text-align: left;
  padding: 28px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  transition: color 0.3s var(--ease-premium), padding 0.4s var(--ease-premium);
}

.faq-q:hover { color: var(--gold); }

.faq-item.open .faq-q {
  padding-left: 14px;
  color: var(--gold);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.faq-item.open .faq-icon {
  background: var(--gold);
  color: var(--bg);
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-premium);
}

.faq-a-inner {
  padding: 0 0 28px 0;
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.6;
  max-width: 70ch;
}

/* ============ FOOTER CTA ============ */
.footer-cta {
  padding: 160px 0;
  text-align: center;
  border-top: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}

.footer-cta::before {
  content: '';
  position: absolute;
  bottom: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(201, 168, 106, 0.1) 0%, transparent 60%);
  pointer-events: none;
  animation: footerBreathe 8s ease-in-out infinite;
}

@keyframes footerBreathe {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

.footer-cta h2 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  position: relative;
}

.footer-cta h2 em {
  font-style: italic;
  color: var(--gold);
  display: inline-block;
}

.footer-cta-em {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 50%, var(--gold) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.reveal.in .footer-cta-em {
  animation: emShine 2s var(--ease-premium) 0.4s;
}

@keyframes emShine {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

.footer-cta p {
  font-size: 18px;
  color: var(--ink-dim);
  margin-bottom: 40px;
  position: relative;
}

.footer-cta .btn { position: relative; }

/* ============ SITE FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 80px 0 40px;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: start;
  padding-bottom: 64px;
}

.site-footer-col {
  text-align: right;
  justify-self: end;
}

.site-footer-brand {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.site-footer-col h4 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 28px;
}

.site-footer-col a,
.site-footer-col p {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.site-footer-col a:hover { color: var(--gold); }

.site-footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-dim);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .manifesto-rail { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  nav { padding: 16px 20px; }
  .hero { padding: 140px 0 80px; }
  .stats-grid { grid-template-columns: 1fr; gap: 32px; }
  .trusted-grid { grid-template-columns: repeat(2, 1fr); }
  .service { grid-template-columns: 1fr; gap: 32px; }
  .section-header { flex-direction: column; align-items: start; gap: 16px; }
  .section-meta { text-align: left; }
  .manifesto-wrap { height: 180vh; }
  .faq-q { font-size: 18px; }
  .process-track { grid-template-columns: 1fr; gap: 40px; }
  .process-track::before { display: none; }
  .site-footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .site-footer-col { text-align: left; justify-self: start; }
  nav .btn-primary { padding: 8px 14px; font-size: 13px; gap: 6px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  nav { padding: 14px 16px; }
  .logo { font-size: 15px; gap: 8px; }
  .logo-mark { width: 22px; height: 22px; }
  nav .btn-primary { padding: 7px 12px; font-size: 12px; }
  nav .btn-primary .arrow { display: none; }
}
