/* ARS Agencia Cultural — base build
   palette: ink-sun (ink blue + sunflower) · typography: condensed-display
   motion: gentle-fade-reveal · layout: image-hero-overlay
   signature: expandable-index (initiatives) · background: plain-signature-color-reveal */

:root {
  --bg: #ffffff;
  --surface: #f4f6fa;
  --surface-2: #e9eef7;
  --ink: #1d3557;
  --ink-soft: #41546f;
  --accent: #ffb703;
  --accent-ink: #1d3557;
  --secondary: #457b9d;
  --line: #d7dfeb;
  --hero-text: #ffffff;
  --shadow: 0 1px 2px rgb(29 53 87 / 0.06), 0 12px 32px -18px rgb(29 53 87 / 0.35);
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(64px, 9vw, 120px);
  --radius: 14px;
}

html[data-theme="dark"] {
  --bg: #0e1725;
  --surface: #14202f;
  --surface-2: #1a2839;
  --ink: #eaf0f8;
  --ink-soft: #b3c2d6;
  --accent: #ffc233;
  --accent-ink: #14202f;
  --secondary: #8fc0dd;
  --line: #26374b;
  --hero-text: #ffffff;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 16px 40px -20px rgb(0 0 0 / 0.8);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: 0.02em; }
p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--secondary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.eyebrow {
  font-family: 'Barlow', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 0.9em;
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding-block: 10px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand-mark {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 2px 9px 0;
  line-height: 1.25;
  border-radius: 3px;
}
.brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.nav {
  display: flex;
  gap: clamp(12px, 2vw, 26px);
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.theme-toggle:hover { border-color: var(--secondary); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: min(82vh, 760px);
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgb(8 18 32 / 0.92) 0%, rgb(8 18 32 / 0.72) 42%, rgb(8 18 32 / 0.35) 75%, rgb(8 18 32 / 0.5) 100%);
}
.hero-inner {
  position: relative;
  padding-block: clamp(56px, 9vw, 110px);
  color: var(--hero-text);
}
.hero .eyebrow { color: #ffd166; }
.hero h1 {
  color: #fff;
  max-width: 18ch;
  margin-bottom: 0.4em;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.35);
}
.hero-lede {
  color: #e6edf6;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 58ch;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: color-mix(in srgb, var(--accent) 84%, #000); color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.55); }
.btn-ghost:hover { background: rgb(255 255 255 / 0.14); color: #fff; border-color: #fff; }

/* ---------- STATS ---------- */
.stats {
  background: var(--ink);
  color: #eef3fa;
  padding-block: clamp(28px, 4vw, 44px);
}
html[data-theme="dark"] .stats { background: var(--surface-2); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.stat-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1;
  color: var(--accent);
  margin: 0 0 6px;
}
.stat-label {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #cfdcec;
  margin: 0;
  max-width: 30ch;
}
html[data-theme="dark"] .stat-label { color: var(--ink-soft); }

/* ---------- SECTIONS ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--surface); }
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-lede { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- SPLIT ---------- */
.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.split-text p { color: var(--ink-soft); }
.split-figure { margin: 0; }
.split-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.split-figure figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 10px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

/* ---------- CARDS ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow);
  transition: transform 200ms ease, border-color 200ms ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--secondary); }
.card-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--secondary);
  margin: 0 0 14px;
}
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- INICIATIVAS ---------- */
.initiatives { display: grid; gap: clamp(32px, 5vw, 64px); }
.initiative {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.initiative-reverse .initiative-media { order: 2; }
.initiative-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.initiative-reverse .initiative-media img { aspect-ratio: 4 / 5; }
.tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 16px;
}
.initiative-body p { color: var(--ink-soft); }
.initiative-body h3 { margin-bottom: 0.45em; }
.meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 18px;
}

/* ---------- TERRITORIOS ---------- */
.territories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 36px);
  margin-bottom: clamp(40px, 6vw, 72px);
}
.territory {
  border-top: 3px solid var(--accent);
  padding-top: 18px;
}
.territory p { color: var(--ink-soft); font-size: 0.98rem; }

.pullquote {
  border-left: 6px solid var(--accent);
  padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 36px);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}
.pullquote p {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0;
  max-width: 40ch;
}

/* ---------- STEPS ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(20px, 3vw, 36px);
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 14px;
  left: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--secondary);
  line-height: 1;
}
.steps h3 { margin-bottom: 0.4em; }
.steps p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- COLABORAR ---------- */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 2.6vw, 30px);
}
.collab {
  background: var(--bg);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px);
  border-left: 4px solid var(--secondary);
  box-shadow: var(--shadow);
}
.collab h3 { font-size: 1.2rem; margin-bottom: 0.45em; }
.collab p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- CONTACTO ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact-text p { color: var(--ink-soft); }
.contact-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
  font-size: 0.97rem;
}
.contact-list li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.contact-label {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  padding-top: 3px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 48px;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--secondary);
}
.contact-form .btn { justify-self: start; }
.form-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  max-width: none;
}

/* ---------- PLACEHOLDERS ---------- */
.ph {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  border-bottom: 1px dashed var(--secondary);
  padding: 0 3px;
  border-radius: 2px;
  font-style: italic;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--ink);
  color: #dbe5f1;
  padding-block: clamp(40px, 6vw, 64px) clamp(56px, 7vw, 72px);
}
html[data-theme="dark"] .site-footer { background: #0a121d; border-top: 1px solid var(--line); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px clamp(24px, 4vw, 64px);
  align-items: start;
}
.footer-mark {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 6px;
  line-height: 1;
}
.footer-tag { font-size: 0.92rem; color: #b9c9dc; margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a {
  color: #dbe5f1;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 6px 0;
}
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.footer-note {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: #9fb2c8;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 0.14);
  max-width: none;
}
.attribution {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.75rem;
  color: #a9bccf;
  max-width: none;
}
.attribution a { color: #c9d8e8; text-decoration: underline; }
.attribution a:hover { color: #fff; }

/* ---------- MOTION ---------- */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes revealFromLeft {
  from { background-size: 0% 100%; }
  to { background-size: 100% 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .section-head,
    .card,
    .initiative,
    .territory,
    .steps li,
    .collab,
    .split-text,
    .split-figure {
      animation: fadeRise 420ms cubic-bezier(.2, .7, .1, 1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
  }
}

/* signature: signature color reveal behind the first h2 of the page */
.section-head h2 {
  display: inline;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 0.28em;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    #nosotros .split-text h2 {
      background-size: 0% 0.28em;
      animation: revealFromLeft 900ms cubic-bezier(.2, .7, .1, 1) both;
      animation-timeline: view();
      animation-range: entry 10% cover 35%;
    }
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .split,
  .initiative,
  .contact-wrap {
    grid-template-columns: 1fr;
  }
  .initiative-reverse .initiative-media { order: 0; }
  .initiative-reverse .initiative-media img { aspect-ratio: 4 / 3; }
  .split-figure img { aspect-ratio: 16 / 10; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .brand-name { display: none; }
  .hero { min-height: 74vh; }
  .hero-inner { padding-block: 48px 56px; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .contact-label { padding-top: 0; }
}

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