/* ======================================================================
   AyU Construcciones — styles.css
   Editorial Corporate Architectural — adapted from Archetype 01 with
   institutional navy palette for premium construction segment.
   ====================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Palette — Architectural neutral with restrained brand accent.
     Carbón sobre crema. Verde de marca solo en kickers y subrayados.
     Rojo de marca vive ÚNICAMENTE dentro del logo (no aparece aquí). */
  --bg:           #f5f1ea;          /* warm ivory off-white — base editorial */
  --bg-2:         #ece7dc;          /* sand */
  --bg-3:         #dfd9cb;          /* deeper sand for contrast strips */
  --paper:        #ffffff;
  --ink:          #1a1a1a;          /* deep charcoal — architectural, NOT navy */
  --ink-soft:     #2d2d2d;          /* softer charcoal for body */
  --ink-mute:     #6b6b66;          /* concrete gray (cool) for metadata */
  --ink-mute-2:   #a8a8a3;          /* lighter concrete */
  /* Italic emphasis = charcoal (italic IS the emphasis, no need to colorize) */
  --accent:       #1a1a1a;          /* italic emphasis stays charcoal */
  --accent-deep:  #000000;
  /* Brand colors — USE QUIRÚRGICAMENTE. Only in:
     kickers, large stat units, value-card initials, manifesto numbers,
     button accents. Never in body text or italic emphasis. */
  --gold:         #16A832;          /* brand institutional green */
  --gold-deep:    #128528;          /* hover state */
  --brand-red:    #E20A1B;          /* lives ONLY inside the logo, never on the page */
  --line:         rgba(26,26,26,0.10);
  --line-strong:  rgba(26,26,26,0.20);
  --shadow-soft:  0 10px 40px rgba(26,26,26,0.08);
  --shadow-deep:  0 30px 80px rgba(26,26,26,0.18);

  /* Easings */
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);

  /* Spacing */
  --nav-h:        72px;
  --content-max:  1240px;
  --content-pad:  clamp(1.25rem, 4vw, 3rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Typography ---------- */
.font-display { font-family: "Fraunces", "Times New Roman", Georgia, serif; }
.font-body    { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }

h1, h2, h3, h4 {
  font-family: "Fraunces", "Times New Roman", Georgia, serif;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
h1 em, h2 em, h3 em {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-weight: 400;
  color: var(--accent);
}

.kicker {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.kicker.gold { color: var(--gold); }

p { color: var(--ink-soft); }
p strong { color: var(--ink); font-weight: 600; }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad);
}
.section { padding-block: clamp(4rem, 8vw, 7rem); position: relative; }
.section.tight { padding-block: clamp(3rem, 5vw, 4.5rem); }
.section.dark { background: var(--ink); color: var(--bg); }
.section.dark h1, .section.dark h2, .section.dark h3 { color: var(--bg); }
.section.dark h1 em, .section.dark h2 em, .section.dark h3 em { color: var(--gold); }
.section.dark p { color: rgba(245,241,234,0.75); }
.section.dark .kicker { color: var(--gold); }

.hairline { border: 0; border-top: 1px solid var(--line); margin-block: 0; }

/* ---------- Splash loader ---------- */
.splash {
  position: fixed; inset: 0;
  background: var(--ink);
  z-index: 100;
  display: grid;
  place-items: center;
  /* Safety: hide automatically at 4.5s even if JS fails */
  animation: splashSafety 0.01s 4.5s forwards;
  transition: opacity 0.6s var(--ease-out), clip-path 0.8s var(--ease-out);
}
.splash.is-out {
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
}
.splash-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.splash-mark img {
  width: clamp(120px, 18vw, 180px);
  height: auto;
  display: block;
  animation: splashPulse 2.4s ease-in-out infinite;
}
.splash-mark::after {
  content: "";
  width: 60px; height: 1px;
  background: var(--gold);
  animation: splashLine 1.4s ease-out infinite;
  transform-origin: left;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
@keyframes splashSafety {
  to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
}
@keyframes splashLine {
  0%   { transform: scaleX(0); transform-origin: left; }
  50%  { transform: scaleX(1); transform-origin: left; }
  51%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out), backdrop-filter 0.35s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(245,241,234,0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  height: 44px;
  transition: opacity 0.25s var(--ease-out);
  flex-shrink: 1;
  min-width: 0;
  max-width: calc(100vw - 130px);   /* leave room for burger + breathing space */
}
.nav-logo:hover { opacity: 0.85; }
.nav-logo img {
  height: 100%;
  width: auto;
  display: block;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  /* Subtle shadow so the brand color block reads as deliberate, not flat sticker */
  filter: drop-shadow(0 2px 6px rgba(26,26,26,0.06));
}
@media (max-width: 900px) {
  .nav-logo { height: 32px; max-width: calc(100vw - 110px); }
}
@media (max-width: 480px) {
  .nav-logo { height: 28px; max-width: calc(100vw - 90px); }
}
@media (max-width: 380px) {
  .nav-logo { height: 26px; }
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 450;
  position: relative;
  padding-block: 0.25rem;
  transition: color 0.2s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
/* Specificity higher than .nav-links a so it actually wins */
.nav-links a.nav-cta {
  background: var(--ink);
  color: var(--bg);
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.nav-links a.nav-cta:hover {
  background: var(--gold);   /* brand green on hover — subtle brand moment */
  color: var(--ink);
  transform: translateY(-1px);
}
.nav-links a.nav-cta::after { display: none !important; }
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.nav-burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.nav.is-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-burger { display: flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 2.5rem var(--content-pad);
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    border-top: 1px solid var(--line);
    overflow-y: auto;
  }
  .nav.is-open .nav-links { transform: translateX(0); }
  .nav-links a { font-size: 1.4rem; font-family: "Fraunces", serif; }
  /* CTA en menú móvil — usar misma especificidad para que el override funcione */
  .nav-links a.nav-cta {
    font-size: 1.05rem;
    padding: 0.95rem 1.6rem;
    font-family: "Inter", sans-serif;
    margin-top: 0.5rem;
    align-self: stretch;
    text-align: center;
    justify-content: center;
    display: inline-flex;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: var(--accent); transform: translateY(-2px); }
.btn .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: -2;
  filter: saturate(0.95) contrast(1.05);
  transform: scale(1.05);
  transition: transform 1.4s var(--ease-out);
}
.hero.is-loaded .hero-bg { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,25,41,0.05) 0%, rgba(10,25,41,0.35) 55%, rgba(10,25,41,0.78) 100%);
  z-index: -1;
}
.hero-content {
  position: relative;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad);
  color: var(--bg);
  width: 100%;
}
.hero-content .kicker { color: rgba(245,241,234,0.85); margin-bottom: 1.5rem; }
.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--bg);
  max-width: 18ch;
  margin-bottom: 1.5rem;
}
.hero-title em { color: var(--gold); font-style: italic; font-variation-settings: "SOFT" 100; }
.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  max-width: 56ch;
  color: rgba(245,241,234,0.92);
  margin-bottom: 2.2rem;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.hero-actions .btn-primary {
  background: var(--bg);
  color: var(--ink);
}
.hero-actions .btn-primary:hover { background: var(--gold); color: var(--bg); }
.hero-actions .btn-ghost {
  border-color: rgba(245,241,234,0.6);
  color: var(--bg);
}
.hero-actions .btn-ghost:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* Page hero (smaller) */
.page-hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.page-hero .wrap { position: relative; }
.page-hero .kicker { margin-bottom: 1rem; }
.page-hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  max-width: 22ch;
  margin-bottom: 1.3rem;
}
.page-hero p {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  max-width: 58ch;
  color: var(--ink-soft);
}

/* ---------- Stats / Cifras ---------- */
.stats {
  background: var(--bg);
  border-block: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: 0;
}
.stat {
  background: var(--bg);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stat-value {
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-value .unit {
  font-size: 0.45em;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--gold);
  margin-left: 0.2em;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--ink-mute);
  line-height: 1.4;
  max-width: 22ch;
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ---------- Manifesto / Editorial blocks ---------- */
.manifesto {
  background: var(--bg);
}
.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.manifesto-num {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--gold);
  line-height: 1;
}
.manifesto-body h2 {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  margin-bottom: 1.5rem;
  max-width: 22ch;
}
.manifesto-body p + p { margin-top: 1.2rem; }
.manifesto-body p {
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  max-width: 58ch;
  line-height: 1.7;
}
@media (max-width: 800px) {
  .manifesto-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Services ---------- */
.services-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.services-head h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 16ch;
}
.services-head p {
  max-width: 38ch;
  color: var(--ink-mute);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
}
@media (hover: hover) {
  .service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
    border-color: var(--line-strong);
  }
}
.service-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.service-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out), filter 0.5s var(--ease-out);
  filter: saturate(0.92);
}
.service-card:hover .service-card-media img { transform: scale(1.06); filter: saturate(1.08); }
.service-card-body {
  padding: 1.4rem 1.5rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.service-card h3 {
  font-size: 1.25rem;
  line-height: 1.2;
}
.service-card p {
  font-size: 0.92rem;
  color: var(--ink-mute);
  line-height: 1.55;
}
@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.projects-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.projects-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 16ch; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}
.project-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  display: block;
  background: var(--ink);
  isolation: isolate;
  transition: transform 0.5s var(--ease-out);
}
.project-card.featured  { grid-column: span 8; aspect-ratio: 16/10; }
.project-card.standard  { grid-column: span 4; aspect-ratio: 4/5; }
.project-card.half      { grid-column: span 6; aspect-ratio: 16/10; }
.project-card-media {
  position: absolute; inset: 0;
  overflow: hidden;
}
.project-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter 0.5s var(--ease-out);
  filter: saturate(0.94) brightness(0.92);
}
@media (hover: hover) {
  .project-card:hover .project-card-media img { transform: scale(1.06); filter: saturate(1.06) brightness(1); }
  .project-card:hover { transform: translateY(-4px); }
}
.project-card-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,25,41,0) 0%, rgba(10,25,41,0.15) 50%, rgba(10,25,41,0.85) 100%);
  z-index: 1;
}
.project-card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.6rem 1.75rem 1.75rem;
  z-index: 2;
  color: var(--bg);
}
.project-card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  background: rgba(245,241,234,0.12);
  border: 1px solid rgba(245,241,234,0.2);
  border-radius: 999px;
  margin-bottom: 0.8rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.project-card-status.diseno { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.project-card-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.project-card-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.05;
  color: var(--bg);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.project-card-meta {
  font-size: 0.85rem;
  color: rgba(245,241,234,0.78);
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
}
.project-card-meta::before { content: ""; width: 18px; height: 1px; background: rgba(245,241,234,0.5); }
@media (max-width: 900px) {
  .project-card.featured, .project-card.standard, .project-card.half { grid-column: 1 / -1; aspect-ratio: 16/10; }
}

/* Single project detail (proyectos.html) */
.project-detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.project-detail:nth-child(even) { direction: rtl; }
.project-detail:nth-child(even) > * { direction: ltr; }
.project-detail-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
}
.project-detail-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.project-detail:hover .project-detail-media img { transform: scale(1.03); }
.project-detail-body .kicker { margin-bottom: 1rem; }
.project-detail-body h3 {
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  margin-bottom: 1rem;
  max-width: 18ch;
}
.project-detail-body p { font-size: 1rem; max-width: 50ch; margin-bottom: 1.5rem; }
.project-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.project-detail-meta dt {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.25rem;
}
.project-detail-meta dd {
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  color: var(--ink);
}
@media (max-width: 900px) {
  .project-detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-detail:nth-child(even) { direction: ltr; }
}

/* ---------- Marquee ---------- */
.marquee {
  background: var(--ink);
  color: var(--bg);
  padding-block: 1.4rem;
  overflow: hidden;
  border-block: 1px solid var(--accent);
}
.marquee-track {
  display: flex;
  gap: 4rem;
  white-space: nowrap;
  animation: marqueeRun 40s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: 0.04em;
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 4rem;
}
.marquee-item em { color: var(--gold); font-style: italic; font-variation-settings: "SOFT" 100; }
.marquee-item::after {
  content: "✦";
  font-size: 0.65em;
  color: var(--gold);
  margin-left: 4rem;
}
@keyframes marqueeRun {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Blog cards ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.blog-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
@media (hover: hover) {
  .blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
}
.blog-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.blog-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.blog-card:hover .blog-card-media img { transform: scale(1.06); }
.blog-card-body {
  padding: 1.5rem 1.5rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.blog-card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.blog-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-mute); align-self: center; }
.blog-card h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.blog-card p { font-size: 0.93rem; color: var(--ink-mute); line-height: 1.55; }
.blog-card-arrow {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
}
.blog-card-arrow .arrow { transition: transform 0.3s var(--ease-out); }
.blog-card:hover .blog-card-arrow .arrow { transform: translateX(4px); }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; } }

/* Article (long-form on blog.html) */
.article {
  padding-block: clamp(3rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.article:last-child { border-bottom: 0; }
.article-kicker {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  align-items: center;
}
.article-kicker .accent { color: var(--gold); font-weight: 600; }
.article-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.article-grid > .article-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.article-grid > .article-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.article-body h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 1.3rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.article-body h3 {
  font-size: 1.35rem;
  margin-top: 2.2rem;
  margin-bottom: 0.6rem;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--accent);
}
.article-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.1rem;
  max-width: 60ch;
}
.article-body p:first-of-type::first-letter {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-size: 4rem;
  float: left;
  line-height: 0.9;
  padding: 0.3rem 0.6rem 0 0;
  color: var(--gold);
}
.article-body ul {
  margin-bottom: 1.2rem;
  padding-left: 0;
  max-width: 60ch;
}
.article-body ul li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.article-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 500;
}
.article-pull {
  margin: 2.4rem 0;
  padding: 1.5rem 1.8rem;
  border-left: 3px solid var(--gold);
  background: var(--bg-2);
  border-radius: 0 4px 4px 0;
}
.article-pull p {
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
  max-width: none;
}
@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; }
  .article-grid > .article-media { position: static; aspect-ratio: 16/10; }
}

/* ---------- Values ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.value-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2rem 1.5rem;
  border-radius: 4px;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
@media (hover: hover) {
  .value-card:hover { border-color: var(--accent); transform: translateY(-4px); }
}
.value-card .letter {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-size: 3rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}
.value-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.005em;
}
.value-card p { font-size: 0.88rem; color: var(--ink-mute); line-height: 1.55; }
@media (max-width: 1100px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .values-grid { grid-template-columns: 1fr; } }

/* ---------- Mission / Vision split ---------- */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.mv-card {
  padding: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}
.mv-card .kicker { color: var(--gold); margin-bottom: 1rem; }
.mv-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--accent);
}
.mv-card p { font-size: 1.05rem; line-height: 1.65; }
@media (max-width: 800px) { .mv-grid { grid-template-columns: 1fr; } }

/* ---------- CTA block ---------- */
.cta {
  background: var(--ink);
  color: var(--bg);
  border-radius: 0;
}
.cta .wrap { padding-block: clamp(4rem, 7vw, 6rem); }
.cta-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.cta-head h2 {
  color: var(--bg);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  margin-bottom: 1.5rem;
  max-width: 18ch;
}
.cta-head h2 em { color: var(--gold); }
.cta-head p { color: rgba(245,241,234,0.75); font-size: 1.05rem; max-width: 38ch; margin-bottom: 2rem; }
.cta-channels { display: flex; flex-direction: column; gap: 0.85rem; }
.cta-channel {
  display: flex; align-items: center; gap: 0.85rem;
  font-size: 0.95rem;
  color: rgba(245,241,234,0.85);
  transition: color 0.25s var(--ease-out);
}
.cta-channel:hover { color: var(--gold); }
.cta-channel .icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid rgba(245,241,234,0.25);
  border-radius: 50%;
  font-size: 1rem;
}

/* ---------- Form ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-field label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,241,234,0.7);
  font-weight: 500;
}
.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(245,241,234,0.05);
  border: 1px solid rgba(245,241,234,0.2);
  color: var(--bg);
  padding: 0.85rem 1rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(245,241,234,0.4); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(245,241,234,0.08);
}
.form-field textarea { min-height: 110px; resize: vertical; }

/* --- Math captcha field --- */
.captcha-field {
  background: rgba(0,0,0,0.04);
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  padding: 0.9rem 1rem 1rem;
}
.captcha-field label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
}
.captcha-field .captcha-q {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}
.captcha-field .captcha-q strong {
  font-weight: 600;
  color: var(--gold);
  font-variation-settings: normal;
  margin-inline: 0.05em;
}
.captcha-field input {
  max-width: 160px;
  text-align: center;
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
}
/* Dark CTA section: invert colors */
.section.dark .captcha-field,
.cta .captcha-field {
  background: rgba(245,241,234,0.04);
  border-color: rgba(245,241,234,0.25);
}
.section.dark .captcha-field .captcha-q,
.cta .captcha-field .captcha-q {
  color: var(--bg);
}

.form button[type="submit"] {
  align-self: flex-start;
  margin-top: 0.5rem;
  background: var(--gold);
  color: var(--ink);
  border: 0;
  padding: 1rem 1.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.form button[type="submit"]:hover { background: var(--bg); transform: translateY(-2px); }
.form-msg {
  font-size: 0.88rem;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  display: none;
}
.form-msg.is-visible { display: block; }
.form-msg.ok { background: rgba(176,138,78,0.15); color: var(--gold); border: 1px solid var(--gold); }
.form-msg.err { background: rgba(220,80,80,0.15); color: #ff9b9b; border: 1px solid rgba(220,80,80,0.4); }

.cta-light .form input,
.cta-light .form select,
.cta-light .form textarea {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.cta-light .form input::placeholder,
.cta-light .form textarea::placeholder { color: var(--ink-mute); }
.cta-light .form input:focus,
.cta-light .form select:focus,
.cta-light .form textarea:focus { border-color: var(--accent); background: var(--paper); }
.cta-light .form-field label { color: var(--ink-mute); }
.cta-light .form button[type="submit"] { background: var(--ink); color: var(--bg); }
.cta-light .form button[type="submit"]:hover { background: var(--accent); }

@media (max-width: 800px) {
  .cta-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg);
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-block: 3rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}
.footer-brand .nav-logo { height: 56px; margin-bottom: 1.2rem; display: inline-flex; }
.footer-brand p { font-size: 0.9rem; color: var(--ink-mute); max-width: 32ch; line-height: 1.6; }
.footer h5 {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer li { margin-bottom: 0.55rem; }
.footer li a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease-out);
}
.footer li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--ink-mute);
}
.footer-bottom .social {
  display: flex;
  gap: 0.75rem;
}
.footer-bottom .social a {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}
.footer-bottom .social a:hover { color: var(--bg); background: var(--ink); border-color: var(--ink); }
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 40;
  width: 56px; height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(37,211,102,0.5); }
.whatsapp-float svg { width: 28px; height: 28px; }
.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  z-index: -1;
  animation: waPulse 2.4s ease-out infinite;
}
@keyframes waPulse {
  0%   { opacity: 0.45; transform: scale(1); }
  100% { opacity: 0;    transform: scale(1.6); }
}

/* ---------- Custom cursor (desktop only, opt-in) ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 30px; height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out), width 0.3s, height 0.3s, background 0.3s;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
}
.cursor.is-ready { opacity: 1; }
.cursor.is-hover {
  width: 60px; height: 60px;
  background: var(--bg);
  border-color: var(--bg);
}
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }

/* Defensive: elements with both .reveal and data-split must stay visible
   (gotcha A.4.5) */
.reveal[data-split] {
  opacity: 1;
  transform: none;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-side .kicker { margin-bottom: 1rem; }
.contact-side h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 1.5rem;
  max-width: 18ch;
}
.contact-side p { font-size: 1rem; margin-bottom: 2rem; max-width: 42ch; }
.contact-channels { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }
.contact-channel {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.contact-channel:last-child { border-bottom: 1px solid var(--line); }
.contact-channel .icon {
  width: 38px; height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.contact-channel .label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.contact-channel a, .contact-channel span {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  display: inline-block;
  padding-block: 0.4rem;
  min-height: 44px;
  line-height: 1.5;
}
.contact-channel a { transition: color 0.2s var(--ease-out); }
.contact-channel a:hover { color: var(--gold); }
.contact-map {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 4px;
  filter: grayscale(0.2);
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Project filter chips ---------- */
.filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.filter button {
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.filter button:hover { border-color: var(--ink); }
.filter button.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ---------- Reduce motion (only intrusive effects) ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-duration: 90s; }
  .whatsapp-float::before { animation: none; }
  .splash-mark::after { animation: none; }
  .hero-bg { transition: none; transform: scale(1); }
}

/* ---------- Tiny utility ---------- */
.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;
}
