/* ================================================================
   Calcular Porcentaje — Editorial Calculator
   Aesthetic: Argentine print-magazine × Swiss math typography
   ================================================================ */

:root {
  /* Palette */
  --ink: #0A0A0A;
  --ink-soft: #1C1C1C;
  --paper: #F5F1EA;
  --paper-warm: #EDE6D6;
  --bone: #E8E2D2;
  --pampero: #3B5BFF;       /* electric Argentine sky-blue */
  --pampero-soft: #6B83FF;
  --mustard: #D4A24C;        /* warm secondary accent */
  --rojo: #C8451A;           /* alert / negative variation */
  --verde: #2D7A3F;          /* positive variation */
  --line: #1C1C1C1A;

  /* Type */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --r-card: 4px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Subtle grain over everything */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

::selection { background: var(--pampero); color: var(--paper); }

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

/* ====================== HEADER ====================== */
.site-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px var(--gutter) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  border-radius: 50%;
  font-variation-settings: "SOFT" 100;
}

.brand-text em {
  font-style: italic;
  color: var(--pampero);
  font-variation-settings: "SOFT" 50;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-nav a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.site-nav a::after {
  content: ""; position: absolute;
  left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--ink);
  transition: width 0.3s ease;
}
.site-nav a:hover { color: var(--pampero); }
.site-nav a:hover::after { width: 100%; background: var(--pampero); }

/* ====================== HERO ====================== */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 100px) var(--gutter) 60px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  animation: fadeUp 0.8s 0.1s both;
}
.hero-meta .dot { font-size: 18px; line-height: 1; opacity: 0.5; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(62px, 14vw, 200px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-top: 12px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  position: relative;
  z-index: 2;
}

.hero-line-1 {
  display: block;
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
  animation: fadeUp 1s 0.2s both;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

.hero-line-2 {
  display: block;
  font-weight: 600;
  letter-spacing: -0.05em;
  margin-left: clamp(20px, 6vw, 80px);
  animation: fadeUp 1s 0.35s both;
}

.hero-period { color: var(--pampero); }

.hero-lede {
  max-width: 580px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
  margin-top: 28px;
  color: var(--ink-soft);
  animation: fadeUp 1s 0.5s both;
}
.hero-lede em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--pampero);
  font-weight: 600;
  font-size: 1.1em;
}

/* The big "%" decorative element */
.hero-percent {
  position: absolute;
  top: 8%;
  right: clamp(-20px, 4vw, 40px);
  font-family: var(--font-display);
  font-size: clamp(280px, 38vw, 540px);
  font-weight: 200;
  font-style: italic;
  line-height: 1;
  color: var(--pampero);
  opacity: 0.08;
  z-index: 1;
  user-select: none;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  animation: percentFloat 12s ease-in-out infinite, fadeIn 1.5s 0.3s both;
}

@keyframes percentFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

.hero-stats {
  display: flex;
  gap: clamp(28px, 5vw, 64px);
  margin-top: 48px;
  border-top: 1px solid var(--ink);
  padding-top: 24px;
  animation: fadeUp 1s 0.7s both;
}

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-num small { font-size: 0.6em; opacity: 0.6; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* ====================== CALCULATOR ====================== */
.calc {
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px var(--gutter) 100px;
  position: relative;
}

.calc-header { margin-bottom: 32px; }

.calc-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

.calc-sub {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.calc-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-card);
  padding: clamp(24px, 4vw, 48px);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(10,10,10,0.25),
    0 0 0 1px var(--ink);
}

/* subtle decorative gradient on card */
.calc-card::before {
  content: "";
  position: absolute;
  top: -150px; right: -150px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--pampero) 0%, transparent 70%);
  opacity: 0.18;
  pointer-events: none;
}

/* Mode tabs */
.modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  position: relative;
  z-index: 2;
}

.mode {
  background: transparent;
  border: 1px solid rgba(245, 241, 234, 0.18);
  color: var(--paper);
  padding: 12px 16px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.mode-num {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.55;
  letter-spacing: 0.04em;
}

.mode:hover {
  border-color: rgba(245, 241, 234, 0.4);
  background: rgba(245, 241, 234, 0.04);
}

.mode.active {
  background: var(--pampero);
  border-color: var(--pampero);
  color: var(--paper);
}
.mode.active .mode-num { opacity: 0.7; }

/* Mode panels */
.mode-panel {
  display: none;
  position: relative;
  z-index: 2;
  animation: panelIn 0.4s ease;
}
.mode-panel.active { display: block; }

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

.panel-q {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 400;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 100, "SOFT" 50;
}
.panel-q em {
  font-style: italic;
  color: var(--mustard);
  font-weight: 500;
}

/* Inputs */
.inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
}

.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group-wide { grid-column: 1 / -1; }

.input-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.6;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: rgba(245, 241, 234, 0.06);
  border: 1px solid rgba(245, 241, 234, 0.15);
  border-radius: 4px;
  transition: all 0.2s ease;
  padding: 0 16px;
}

.input-wrap:focus-within {
  border-color: var(--pampero-soft);
  background: rgba(59, 91, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(59, 91, 255, 0.15);
}

.input-wrap .prefix,
.input-wrap .suffix {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  opacity: 0.5;
  font-weight: 400;
}
.input-wrap .prefix { margin-right: 4px; }
.input-wrap .suffix { margin-left: 4px; }

.input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--paper);
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  width: 100%;
  outline: none;
}
.input-wrap input::placeholder { color: rgba(245, 241, 234, 0.3); }
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap input[type=number] { -moz-appearance: textfield; }

.op {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  font-weight: 300;
  color: var(--mustard);
  display: grid;
  place-items: center;
  padding-bottom: 14px;
  user-select: none;
}

/* IVA controls */
.iva-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 24px;
}

.iva-rates, .iva-direction {
  display: flex;
  gap: 6px;
  background: rgba(245, 241, 234, 0.05);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(245, 241, 234, 0.1);
}

.iva-rates label, .iva-direction label {
  position: relative;
  cursor: pointer;
}
.iva-rates input, .iva-direction input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.iva-rates label span, .iva-direction label span {
  display: block;
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: all 0.2s;
}
.iva-rates input:checked + span,
.iva-direction input:checked + span {
  background: var(--pampero);
  color: var(--paper);
}

/* Actions */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--mustard);
  color: var(--ink);
  border: none;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(212, 162, 76, 0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(245, 241, 234, 0.2);
  padding: 16px 24px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-ghost:hover {
  border-color: rgba(245, 241, 234, 0.5);
  background: rgba(245, 241, 234, 0.04);
}

/* Result */
.result {
  margin-top: 32px;
  padding: 28px;
  background: rgba(245, 241, 234, 0.04);
  border: 1px solid rgba(245, 241, 234, 0.12);
  border-radius: var(--r-card);
  border-left: 3px solid var(--mustard);
  animation: resultIn 0.5s ease both;
}

@keyframes resultIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.result-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 8px;
}

.result-value {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--mustard);
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.result-value.positive { color: #7BD088; }
.result-value.negative { color: #FF6B47; }

.result-formula {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  opacity: 0.85;
  padding: 10px 14px;
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
  display: inline-block;
}

.result-steps, .result-breakdown {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.7;
}
.result-steps strong, .result-breakdown strong {
  color: var(--paper);
  font-weight: 600;
}

.result-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}
.result-breakdown div { display: flex; justify-content: space-between; gap: 12px; }
.result-breakdown span:first-child { opacity: 0.6; }

/* ====================== GUIDE ====================== */
.guide {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(60px, 9vw, 120px) 0;
  position: relative;
}

.guide::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(245,241,234,0.1), transparent);
}

.guide-head {
  max-width: var(--container);
  margin: 0 auto 48px;
  padding: 0 var(--gutter);
}

.guide-head .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
  display: inline-block;
  margin-bottom: 16px;
}

.guide-head h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  max-width: 800px;
}
.guide-head h2 em { color: var(--pampero); font-style: italic; }

.guide-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1px;
  background: rgba(245, 241, 234, 0.1);
  border: 1px solid rgba(245, 241, 234, 0.1);
  border-radius: var(--r-card);
  overflow: hidden;
}

.card-formula {
  background: var(--ink);
  padding: 36px 32px;
  position: relative;
  transition: background 0.3s;
}
.card-formula:hover { background: var(--ink-soft); }

.card-num {
  position: absolute;
  top: 28px;
  right: 32px;
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
  font-weight: 300;
  color: var(--mustard);
  opacity: 0.7;
}

.card-formula h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  padding-right: 40px;
}

.formula {
  margin: 14px 0 16px;
  padding: 12px 14px;
  background: rgba(59, 91, 255, 0.12);
  border-left: 2px solid var(--pampero);
  border-radius: 0 4px 4px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  display: block;
}
.formula code { color: var(--pampero-soft); font-weight: 500; }

.card-formula p {
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.85;
  margin-bottom: 8px;
}
.card-formula .example {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.7;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(245, 241, 234, 0.15);
}
.card-formula .example strong {
  color: var(--mustard);
  font-weight: 600;
}

/* ====================== HUB (sub-pages grid) ====================== */
.hub {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 120px) var(--gutter) 60px;
}

.hub-head { margin-bottom: 48px; max-width: 800px; }
.hub-head .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  display: inline-block;
  margin-bottom: 16px;
}
.hub-head h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.hub-head h2 em {
  font-style: italic;
  color: var(--pampero);
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.hub-lede {
  margin-top: 16px;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 600px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--r-card);
  overflow: hidden;
}

.hub-card {
  background: var(--paper);
  padding: 32px 28px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
  transition: background 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.hub-card:hover {
  background: var(--ink);
  color: var(--paper);
}

.hub-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.55;
  margin-bottom: 12px;
}

.hub-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-variation-settings: "opsz" 100, "SOFT" 50;
}

.hub-card p {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.78;
  margin-top: 4px;
  flex: 1;
}

.hub-keyword {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.55;
  padding-top: 14px;
  border-top: 1px dashed currentColor;
  margin-top: 14px;
}

.hub-arrow {
  position: absolute;
  top: 28px;
  right: 28px;
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  font-weight: 300;
  color: var(--pampero);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
}

.hub-card:hover .hub-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--mustard);
}

/* Featured cards (priority pages) get a subtle highlight */
.hub-featured {
  background: var(--paper-warm);
}
.hub-featured .hub-num {
  color: var(--pampero);
  opacity: 1;
  font-weight: 500;
}
.hub-featured::before {
  content: "Destacada";
  position: absolute;
  top: 32px;
  right: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--pampero);
  color: var(--paper);
  padding: 3px 8px;
  border-radius: 999px;
  transition: opacity 0.3s ease;
}
.hub-featured:hover::before { opacity: 0; }

/* Guide card (the editorial one) gets a different visual treatment */
.hub-guide {
  background: var(--ink);
  color: var(--paper);
}
.hub-guide .hub-num {
  color: var(--mustard);
  font-family: var(--font-display);
  font-size: 18px;
  opacity: 1;
}
.hub-guide:hover {
  background: var(--pampero);
  color: var(--paper);
}
.hub-guide:hover .hub-num { color: var(--paper); }
.hub-guide:hover .hub-arrow { color: var(--paper); }

/* ====================== FAQ ====================== */
.faq {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 120px) var(--gutter);
}

.faq-head { margin-bottom: 48px; }
.faq-head .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  display: inline-block;
  margin-bottom: 16px;
}
.faq-head h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  max-width: 700px;
}

.faq-list { border-top: 1px solid var(--ink); }

details {
  border-bottom: 1px solid var(--ink);
  padding: 20px 0;
  cursor: pointer;
  position: relative;
}

details summary {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  list-style: none;
  padding-right: 50px;
  position: relative;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  color: var(--pampero);
  transition: transform 0.3s ease;
  line-height: 1;
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

details summary:hover { color: var(--pampero); }

details p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 750px;
}
details p code {
  background: var(--bone);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* ====================== FOOTER ====================== */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px var(--gutter) 32px;
  margin-top: 0;
}

.foot-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(245, 241, 234, 0.1);
}

.foot-brand { display: flex; flex-direction: column; gap: 20px; max-width: 320px; }
.brand-mark.big {
  width: 56px; height: 56px;
  font-size: 30px;
}
.foot-brand p { opacity: 0.7; font-size: 15px; line-height: 1.6; }

.foot-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 16px;
  font-weight: 500;
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a {
  font-size: 15px;
  opacity: 0.9;
  transition: color 0.2s, opacity 0.2s;
}
.foot-col a:hover { color: var(--pampero-soft); opacity: 1; }

.foot-bottom {
  max-width: var(--container);
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.55;
  letter-spacing: 0.02em;
}

/* ====================== ANIMATIONS ====================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 0.08; }
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 760px) {
  .site-nav { display: none; }

  .hero { padding-top: 40px; padding-bottom: 40px; }
  .hero-line-2 { margin-left: 12px; }

  .inputs {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .op {
    grid-row: auto;
    padding: 0;
    font-size: 22px;
    text-align: center;
    justify-self: center;
  }

  .iva-controls { gap: 12px; flex-direction: column; align-items: flex-start; }

  .calc-card { padding: 24px 18px; }

  .modes { gap: 6px; }
  .mode { padding: 10px 14px; font-size: 13px; }
  .mode-name { display: inline; }

  .foot-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .result-breakdown { grid-template-columns: 1fr; }

  .hero-percent { font-size: 60vw; right: -10%; opacity: 0.06; }

  details summary { font-size: 17px; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .stat-num { font-size: 30px; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--pampero);
  outline-offset: 3px;
  border-radius: 4px;
}
