:root {
  --ink: 9 14 28;
  --bone: 240 240 245;
  --cream: 210 215 228;
  --gold: 110 144 255;
  --gold-dim: 78 110 220;
  --graphite: 115 122 145;
  --hairline: 25 32 50;
  --panel-hover: 16 22 40;
  --grain-blend: overlay;
  --grain-opacity: 0.04;
}

html.palette-noir {
  --ink: 10 10 10;
  --bone: 245 242 236;
  --cream: 237 233 224;
  --gold: 200 168 75;
  --gold-dim: 168 136 59;
  --graphite: 107 103 96;
  --hairline: 26 26 26;
  --panel-hover: 20 20 20;
  --grain-blend: overlay;
  --grain-opacity: 0.035;
}

html.palette-cobalto {
  --ink: 9 14 28;
  --bone: 240 240 245;
  --cream: 210 215 228;
  --gold: 110 144 255;
  --gold-dim: 78 110 220;
  --graphite: 115 122 145;
  --hairline: 25 32 50;
  --panel-hover: 16 22 40;
  --grain-blend: overlay;
  --grain-opacity: 0.04;
}

html.palette-hueso {
  --ink: 247 244 236;
  --bone: 14 18 28;
  --cream: 42 48 60;
  --gold: 37 91 196;
  --gold-dim: 24 64 148;
  --graphite: 117 113 103;
  --hairline: 220 214 201;
  --panel-hover: 236 231 220;
  --grain-blend: multiply;
  --grain-opacity: 0.045;
}

html.palette-cal {
  --ink: 250 249 245;
  --bone: 15 17 16;
  --cream: 55 58 53;
  --gold: 20 184 166;
  --gold-dim: 12 132 120;
  --graphite: 121 124 118;
  --hairline: 224 225 220;
  --panel-hover: 238 240 235;
  --grain-blend: multiply;
  --grain-opacity: 0.035;
}

html.palette-niebla {
  --ink: 240 243 246;
  --bone: 9 19 34;
  --cream: 45 58 74;
  --gold: 0 108 180;
  --gold-dim: 0 76 132;
  --graphite: 103 116 130;
  --hairline: 211 218 225;
  --panel-hover: 228 233 238;
  --grain-blend: multiply;
  --grain-opacity: 0.04;
}

html.palette-marfil {
  --ink: 244 238 226;
  --bone: 18 17 15;
  --cream: 58 51 42;
  --gold: 170 102 42;
  --gold-dim: 126 73 28;
  --graphite: 119 107 92;
  --hairline: 218 207 188;
  --panel-hover: 233 226 212;
  --grain-blend: multiply;
  --grain-opacity: 0.055;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: rgb(var(--ink));
  color: rgb(var(--bone));
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: var(--grain-blend);
}

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

main, nav, footer { position: relative; z-index: 2; }

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 24px clamp(24px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid transparent;
  transition: background 240ms ease, border-color 240ms ease;
}

.site-nav.is-scrolled {
  background: rgb(var(--ink) / 0.82);
  border-color: rgb(var(--hairline));
  backdrop-filter: blur(14px);
}

.brand {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  color: rgb(var(--bone));
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
}

.nav-link {
  color: rgb(var(--graphite));
  transition: color 180ms ease;
}

.nav-link:hover { color: rgb(var(--bone)); }

.button-outline {
  border: 1px solid rgb(var(--graphite));
  padding: 10px 16px;
  color: rgb(var(--bone));
  transition: border-color 180ms ease, color 180ms ease;
}

.button-outline:hover {
  color: rgb(var(--gold));
  border-color: rgb(var(--gold));
}

.lang-switch {
  display: flex;
  border: 1px solid rgb(var(--hairline));
}

.lang-switch a {
  padding: 8px 12px;
  color: rgb(var(--graphite));
}

.lang-switch a[aria-current="true"] {
  color: rgb(var(--bone));
  background: rgb(var(--bone) / 0.06);
}

.hero {
  min-height: 100vh;
  padding: 160px clamp(24px, 5vw, 64px) 120px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.spotlight {
  position: absolute;
  width: 900px;
  height: 900px;
  right: -260px;
  top: -280px;
  z-index: 0;
  background: radial-gradient(circle, rgb(var(--gold) / 0.11), rgb(var(--gold) / 0.04) 35%, transparent 64%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-network {
  position: absolute;
  right: clamp(-40px, -2vw, 0px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(320px, 38vw, 560px);
  height: clamp(320px, 38vw, 560px);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  animation: heroNetworkIn 1.4s ease 0.2s forwards;
}

@keyframes heroNetworkIn {
  to { opacity: 1; }
}

@media (max-width: 900px) {
  .hero-network { display: none; }
}

.hero-inner { max-width: 1120px; position: relative; z-index: 1; }

.hero-eyebrow {
  margin: 0 0 40px;
  color: rgb(var(--graphite));
  max-width: 55ch;
}

.hero-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--gold));
  margin-right: 10px;
  vertical-align: middle;
  animation: heroPulse 2.4s ease-in-out infinite;
}

.hero-meta {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  margin-top: 40px;
  color: rgb(var(--graphite));
}

.hero-meta span {
  opacity: 0;
  transform: translateY(8px);
  animation: heroFadeUp 0.5s ease forwards;
}

.hero-meta span:nth-child(1) { animation-delay: 0.1s; }
.hero-meta span:nth-child(2) { animation-delay: 0.25s; }
.hero-meta span:nth-child(3) { animation-delay: 0.4s; }

@keyframes heroPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-dot { animation: none; }
  .hero-meta span {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero-char {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero-scroll-line { animation: none; opacity: 0.4; }
  .hero-network { animation: none; opacity: 0.85; }
}

.eyebrow {
  display: block;
  color: rgb(var(--gold));
  margin-bottom: 48px;
}

.hero h1,
.section-title,
.closing-title {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: rgb(var(--bone));
}

.hero h1 {
  max-width: 1120px;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: 1.06;
}

.hero-assemble {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  color: rgb(var(--gold));
  perspective: 600px;
}

.hero-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px) rotateX(-70deg);
  transform-origin: 50% 100%;
  animation: charAssemble 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes charAssemble {
  to { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgb(var(--graphite));
  font-size: 0.62rem;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: rgb(var(--gold));
  animation: scrollPulse 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

.hero em,
.section-title em,
.closing-title em {
  color: rgb(var(--gold));
  font-style: italic;
  font-weight: 400;
}

.hero-copy {
  max-width: 700px;
  margin: 36px 0 0;
  color: rgb(var(--graphite));
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 40px;
}

.text-link {
  color: rgb(var(--bone));
  display: inline-block;
  transition: color 180ms ease, transform 200ms ease, letter-spacing 220ms ease;
}

.text-link:hover { color: rgb(var(--gold)); }

.hero-actions .text-link:hover {
  transform: translateY(-1px);
  letter-spacing: 0.02em;
}

.section {
  padding: clamp(88px, 12vw, 160px) clamp(24px, 5vw, 64px);
}

.section-narrow {
  max-width: 1200px;
  margin: 0 auto;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.04;
}

.body-large {
  margin: 0 0 28px;
  color: rgb(var(--cream));
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  line-height: 1.72;
}

.body-quote {
  margin: 32px 0 0;
  color: rgb(var(--bone));
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-style: italic;
  line-height: 1.42;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgb(var(--hairline));
  background: rgb(var(--hairline));
  gap: 1px;
}

.card {
  background: rgb(var(--ink));
  padding: clamp(28px, 4vw, 48px);
  min-height: 360px;
}

.card:hover { background: rgb(var(--panel-hover)); }

.card h3 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-style: italic;
  font-weight: 400;
  margin: 48px 0 18px;
}

.card p,
.muted {
  color: rgb(var(--graphite));
  line-height: 1.65;
}

.meta {
  margin-top: 48px;
  display: grid;
  gap: 12px;
}

.meta-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  color: rgb(var(--graphite));
}

.meta-row span:last-child { color: rgb(var(--cream)); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid rgb(var(--hairline));
}

.stat {
  padding: 48px 24px;
  text-align: center;
  border-right: 1px solid rgb(var(--hairline));
}

.stat:last-child { border-right: 0; }

.stat strong {
  display: block;
  color: rgb(var(--gold));
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(5rem, 10vw, 10rem);
  font-weight: 400;
  line-height: 0.9;
}

.industry-grid,
.faq-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgb(var(--hairline));
  border: 1px solid rgb(var(--hairline));
}

.industry-card,
.faq-card,
.blog-card {
  background: rgb(var(--ink));
  padding: 28px;
}

.industry-card h3,
.faq-card h3,
.blog-card h3 {
  margin: 0 0 14px;
  color: rgb(var(--bone));
  font-family: Fraunces, Georgia, serif;
  font-weight: 400;
  font-size: 1.6rem;
}

.process-step {
  display: grid;
  grid-template-columns: 120px minmax(0, 320px) minmax(0, 1fr);
  gap: 32px;
  padding: 56px 0;
  border-top: 1px solid rgb(var(--hairline));
}

.step-number {
  color: rgb(var(--graphite) / 0.45);
  font-family: Fraunces, Georgia, serif;
  font-size: 5rem;
  font-style: italic;
  line-height: 0.9;
}

.closing {
  text-align: center;
  padding: clamp(120px, 16vw, 220px) clamp(24px, 5vw, 64px);
}

.closing-title {
  max-width: 1000px;
  margin: 0 auto;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.98;
}

.closing p {
  max-width: 700px;
  margin: 36px auto 0;
  color: rgb(var(--graphite));
  line-height: 1.7;
}

.site-footer {
  padding: 64px clamp(24px, 5vw, 64px);
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}

.footer-links {
  display: grid;
  gap: 14px;
  justify-content: start;
}

.footer-contact {
  text-align: right;
  display: grid;
  gap: 14px;
}

.footer-bottom {
  max-width: 1400px;
  margin: 64px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgb(var(--hairline));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgb(var(--graphite));
}

.tweaks-toggle,
.tweaks-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.tweaks-toggle {
  display: none;
  border: 1px solid rgb(var(--hairline));
  background: rgb(var(--ink) / 0.9);
  color: rgb(var(--graphite));
  padding: 12px 16px;
  cursor: pointer;
}

html[data-tweaks="true"] .tweaks-toggle { display: block; }

.tweaks-panel {
  display: none;
  width: min(340px, calc(100vw - 32px));
  background: rgb(var(--ink) / 0.96);
  border: 1px solid rgb(var(--hairline));
  color: rgb(var(--bone));
}

.tweaks-panel.is-open { display: block; }

.tweaks-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgb(var(--hairline));
  display: flex;
  justify-content: space-between;
}

.tweaks-body { padding: 18px; }

.palette-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.palette-button {
  background: transparent;
  border: 1px solid rgb(var(--hairline));
  color: rgb(var(--bone));
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.swatches { display: flex; height: 28px; margin-bottom: 8px; }
.swatches span { flex: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .site-nav { align-items: flex-start; }
  .section-grid,
  .cards-3,
  .stats,
  .industry-grid,
  .faq-grid,
  .blog-grid,
  .footer-grid,
  .process-step {
    grid-template-columns: 1fr;
  }
  .stat { border-right: 0; border-bottom: 1px solid rgb(var(--hairline)); }
  .footer-contact { text-align: left; }
  .footer-bottom { flex-direction: column; }
}
