/* ===========================================================================
   TOMATO · wearetomato.com — site styles (Phase 01)
   Editorial, slow, hairline. Inspired by giga.ai · omaivillas · casewell.
   =========================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--offwhite);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }
::selection { background: var(--forest); color: var(--offwhite); }

/* ----- container ---------------------------------------------------------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 48px; }
.wrap-narrow { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.wrap-text { max-width: 720px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 767px) {
  .wrap, .wrap-narrow { padding: 0 24px; }
}

/* ----- section padding presets ------------------------------------------- */
.pad-compact   { padding-top: 96px;  padding-bottom: 96px;  }
.pad-standard  { padding-top: 128px; padding-bottom: 128px; }
.pad-editorial { padding-top: 192px; padding-bottom: 192px; }
.pad-hero      { padding-top: 240px; padding-bottom: 96px;  }
@media (max-width: 767px) {
  .pad-compact   { padding-top: 64px;  padding-bottom: 64px;  }
  .pad-standard  { padding-top: 80px;  padding-bottom: 80px;  }
  .pad-editorial { padding-top: 120px; padding-bottom: 120px; }
  .pad-hero      { padding-top: 160px; padding-bottom: 80px;  }
}

/* ----- header / nav ------------------------------------------------------ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 80px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  transition: background 400ms var(--ease-serene),
              color 400ms var(--ease-serene),
              border-color 400ms var(--ease-serene),
              transform 400ms var(--ease-serene);
  border-bottom: 1px solid transparent;
  color: var(--offwhite);
}
.site-header.is-scrolled, .site-header.scrolled {
  background: rgba(249, 248, 246, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom-color: rgba(48, 62, 43, 0.08);
  color: var(--forest);
}
.site-header.hidden { transform: translateY(-100%); }
.site-header.solid { background: var(--offwhite); color: var(--forest); border-bottom-color: rgba(48,62,43,0.08); }
@media (max-width: 1023px) {
  .site-header { height: 64px; padding: 0 24px; }
}

.brand-mark { display: inline-flex; align-items: center; gap: 14px; }
.brand-mark .brand-iso { width: 28px; height: 28px; display: block; }
.brand-mark .brand-word { height: 16px; width: auto; display: block; }
/* light header (over hero) → invert SVG to white */
.site-header:not(.is-scrolled):not(.solid) .brand-mark .brand-iso,
.site-header:not(.is-scrolled):not(.solid) .brand-mark .brand-word,
.brand-mark.on-dark .brand-iso,
.brand-mark.on-dark .brand-word { filter: invert(1) brightness(2); }
.site-footer .footer-logo { height: 28px; width: auto; display: block; filter: invert(1) brightness(2); margin-bottom: 4px; }

.primary-nav { display: flex; gap: 36px; }
.primary-nav a {
  font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.16em; position: relative; padding: 6px 0;
  color: inherit; opacity: 0.65;
  transition: opacity 250ms ease, font-weight 0ms;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: currentColor; transition: right 350ms var(--ease-serene);
}
.primary-nav a:hover { opacity: 1; }
.primary-nav a:hover::after { right: 0; }
.primary-nav a.active { opacity: 1; font-weight: 700; letter-spacing: 0.14em; }
.primary-nav a.active::after { right: 0; }

.cta-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.16em; padding: 12px 22px;
  border: 1px solid currentColor; color: inherit;
  transition: background 200ms, color 200ms;
}
.cta-ghost:hover { background: var(--offwhite); color: var(--forest); border-color: var(--offwhite); }
.site-header.is-scrolled .cta-ghost:hover, .site-header.scrolled .cta-ghost:hover { background: var(--forest); color: var(--offwhite); border-color: var(--forest); }

.menu-toggle { display: none; }
@media (max-width: 1023px) {
  .primary-nav, .cta-ghost.desktop { display: none; }
  .menu-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 11px; min-width: 44px; min-height: 44px; box-sizing: border-box; }
  .menu-toggle span { display: block; width: 22px; height: 1px; background: currentColor; }
}

/* mobile overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--graphite); color: var(--offwhite);
  display: flex; flex-direction: column;
  padding: 24px; opacity: 0; pointer-events: none;
  transition: opacity 400ms var(--ease-serene);
}
.mobile-menu.open, .mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu .top { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu .links { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 32px; }
.mobile-menu .links a { display: block; }
.mobile-menu .links .big { font-size: 40px; font-weight: 300; letter-spacing: -0.02em; line-height: 1; }
.mobile-menu .links .small {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: rgba(249,248,246,0.55); margin-top: 6px;
}
.close-x { font-size: 24px; line-height: 1; padding: 10px; min-width: 44px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; color: inherit; }

/* ----- type utilities ---------------------------------------------------- */
.serif-italic { font-style: italic; font-weight: 300; }
.script {
  font-family: var(--font-script); font-weight: 400; letter-spacing: 0;
}
.eyebrow-row { display: inline-flex; align-items: center; gap: 12px; }
.eyebrow-row .num {
  font-size: 11px; letter-spacing: 0.18em; font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.eyebrow-row .bar { width: 28px; height: 1px; background: currentColor; opacity: 0.6; }
.eyebrow-row .label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500;
}

/* ----- hero -------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: flex-end;
  padding: 0 48px 80px;
  color: var(--offwhite);
  overflow: hidden;
}
.hero .bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
  animation: heroBreath 18s var(--ease-serene) infinite alternate;
}
@keyframes heroBreath {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(26,26,26,0.38) 0%, rgba(26,26,26,0.08) 40%, rgba(26,26,26,0.55) 100%);
}
.hero .inner { position: relative; z-index: 2; width: 100%; max-width: 1440px; margin: 0 auto; }
.hero h1 {
  color: var(--offwhite); font-weight: 300; letter-spacing: -0.03em;
  font-size: 68px; line-height: 0.96;
  max-width: 14ch; margin: 24px 0 0;
}
.hero h1 em { font-style: italic; font-weight: 300; }
.hero .sub {
  margin-top: 40px; max-width: 38ch;
  font-size: 17px; line-height: 1.5; color: rgba(249,248,246,0.85);
}
.hero .meta-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-top: 64px; flex-wrap: wrap;
}
.hero .scroll-cue {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.hero .scroll-cue .line {
  width: 1px; height: 56px; background: rgba(249,248,246,0.4);
  position: relative; overflow: hidden;
}
.hero .scroll-cue .line::after {
  content: ""; position: absolute; left: 0; right: 0; height: 16px;
  background: var(--offwhite); animation: scrollLine 2.4s var(--ease-serene) infinite;
}
@keyframes scrollLine {
  from { top: -16px; }
  to   { top: 56px; }
}
.hero .scroll-cue .lbl {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(249,248,246,0.6);
}

/* ----- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.18em; padding: 18px 28px;
  border: 1px solid currentColor; cursor: pointer;
  transition: transform 200ms var(--ease-serene),
              background 200ms, color 200ms, border-color 200ms;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--forest); color: var(--offwhite); border-color: var(--forest); }
.btn-primary:hover { background: var(--slate); border-color: var(--slate); }
.btn-secondary { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-secondary:hover { background: var(--sand); }
.btn-invert { background: var(--offwhite); color: var(--forest); border-color: var(--offwhite); }
.btn-invert:hover { background: var(--sand); border-color: var(--sand); }
.btn-ghost-light {
  background: transparent; color: var(--offwhite); border-color: var(--offwhite);
}
.btn-ghost-light:hover { background: var(--offwhite); color: var(--forest); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.18em; padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  transition: gap 300ms var(--ease-serene);
}
.link-arrow:hover { gap: 16px; }

/* ----- generic editorial blocks ----------------------------------------- */
.section-eyebrow {
  display: flex; align-items: center; gap: 16px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--slate); font-weight: 500;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--sand);
  margin-bottom: 40px;
}
.section-eyebrow .num { color: var(--forest); }

.editorial-h {
  font-weight: 300; letter-spacing: -0.025em;
  font-size: 68px; line-height: 1.04;
  color: var(--forest); max-width: 18ch;
}
.editorial-h em { font-style: italic; font-weight: 300; }

/* Mobile scaling for unified type scale (anclado al home: 68/68/60) */
@media (max-width: 767px) {
  .hero h1     { font-size: 44px; }
  .editorial-h { font-size: 40px; }
  .pull-center { font-size: 40px; }
}

.body-l { font-size: 19px; line-height: 1.6; color: var(--ink); }
.body  { font-size: 17px; line-height: 1.65; color: var(--ink); }

/* ----- pillar grid ------------------------------------------------------- */
.pillars {
  display: grid; gap: 64px;
  grid-template-columns: repeat(3, 1fr);
}
.pillar { border-top: 1px solid var(--sand); padding-top: 32px; }
.pillar .num {
  font-size: 11px; letter-spacing: 0.22em; color: var(--slate);
  font-weight: 500; text-transform: uppercase;
}
.pillar h3 {
  font-weight: 300; letter-spacing: -0.015em;
  font-size: 32px; line-height: 1.1; margin: 16px 0 12px; color: var(--forest);
  max-width: 14ch;
}
.pillar h3 em { font-style: italic; font-weight: 300; }
.pillar .lead {
  font-size: 14px; color: var(--slate); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 20px;
}
.pillar p { font-size: 15px; color: var(--slate); line-height: 1.6; }
@media (max-width: 1023px) { .pillars { grid-template-columns: 1fr; gap: 48px; } }

/* ----- project grid alt -------------------------------------------------- */
.project-grid { display: grid; gap: 64px 32px; }
.row-2-1 { grid-template-columns: 2fr 1fr; }
.row-1-2 { grid-template-columns: 1fr 2fr; }
.row-3   { grid-template-columns: repeat(3, 1fr); }
.project-card { display: block; cursor: pointer; }
.project-card .img-wrap {
  aspect-ratio: 3/4; overflow: hidden; position: relative;
  background: var(--stone-100);
}
.project-card.wide .img-wrap { aspect-ratio: 4/3; }
.project-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 800ms var(--ease-serene);
}
.project-card .img-wrap::after {
  content: ""; position: absolute; inset: 0;
  background: var(--forest); opacity: 0;
  transition: opacity 400ms var(--ease-serene);
}
.project-card:hover .img-wrap img { transform: scale(1.04); }
.project-card:hover .img-wrap::after { opacity: 0.08; }
.project-card .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 24px; gap: 16px;
}
.project-card .typology {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.project-card .yr {
  font-size: 11px; letter-spacing: 0.18em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.project-card h3 {
  font-weight: 300; font-size: 28px; line-height: 1.15; margin: 8px 0 6px;
  color: var(--forest); letter-spacing: -0.015em;
}
.project-card h3 em { font-style: italic; }
.project-card .loc {
  font-size: 13px; color: var(--muted); letter-spacing: 0.04em;
}
@media (max-width: 1023px) {
  .row-2-1, .row-1-2, .row-3 { grid-template-columns: 1fr; }
}

/* ----- placeholder image -------------------------------------------------- */
.ph {
  position: relative; overflow: hidden; background: var(--stone-100);
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(48,62,43,0.04) 0,
      rgba(48,62,43,0.04) 1px,
      transparent 1px,
      transparent 14px);
}
.ph::after {
  content: attr(data-label);
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate); opacity: 0.55;
  white-space: nowrap;
}

/* ----- split layouts ----------------------------------------------------- */
.split { display: grid; gap: 80px; align-items: center; }
.split.s-50 { grid-template-columns: 1fr 1fr; }
.split.s-40-60 { grid-template-columns: 4fr 6fr; }
.split.s-60-40 { grid-template-columns: 6fr 4fr; }
@media (max-width: 1023px) {
  .split, .split.s-50, .split.s-40-60, .split.s-60-40 { grid-template-columns: 1fr; gap: 48px; }
}

/* ----- pull quote -------------------------------------------------------- */
.pull-center {
  text-align: center;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.15;
  color: var(--forest);
  max-width: 18ch; margin: 0 auto;
}
.surface-forest .pull-center,
.surface-graphite .pull-center { color: var(--offwhite); }

.quote-rule {
  border-left: 1px solid var(--forest);
  padding: 8px 0 8px 32px;
  max-width: 720px;
}
.quote-rule .q {
  font-style: italic; font-weight: 300;
  font-size: clamp(22px, 2.4vw, 32px); line-height: 1.35;
  color: var(--forest);
}
.quote-rule .by {
  display: block; margin-top: 24px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}

/* ----- footer ------------------------------------------------------------ */
.site-footer {
  background: var(--graphite); color: var(--offwhite);
  padding: 96px 48px 32px;
}
.site-footer .top {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 48px;
  padding-bottom: 80px; border-bottom: 1px solid rgba(249,248,246,0.12);
}
.site-footer .col h4 {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(249,248,246,0.55); font-weight: 500; margin: 0 0 24px;
}
.site-footer .col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer .col a:hover { color: var(--sand); }
.site-footer .lockup .word { font-size: 36px; font-weight: 300; letter-spacing: -0.02em; }
.site-footer .lockup .tag {
  font-family: var(--font-script); font-size: 24px; line-height: 1; margin-top: 4px;
  color: rgba(249,248,246,0.85);
}
.site-footer .addresses { margin-top: 40px; display: flex; flex-direction: column; gap: 24px; }
.site-footer .addresses .addr { font-size: 13px; line-height: 1.6; color: rgba(249,248,246,0.7); }
.site-footer .addresses .addr strong { display: block; font-weight: 500; color: var(--offwhite); margin-bottom: 4px; letter-spacing: 0.04em; }
.site-footer .news input {
  background: transparent; border: 0; border-bottom: 1px solid rgba(249,248,246,0.3);
  color: var(--offwhite); padding: 12px 0; width: 100%; font-size: 14px;
  font-family: inherit; outline: none;
}
.site-footer .news input:focus { border-bottom-color: var(--offwhite); }
.site-footer .news button {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--offwhite); margin-top: 16px; padding: 0;
  border-bottom: 1px solid var(--offwhite); padding-bottom: 4px;
}
.site-footer .desc { font-size: 13px; line-height: 1.6; color: rgba(249,248,246,0.7); margin-bottom: 24px; }
.site-footer .bottom {
  max-width: 1440px; margin: 32px auto 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 11px; color: rgba(249,248,246,0.6); letter-spacing: 0.12em; text-transform: uppercase;
}
.site-footer .bottom a:hover { color: var(--sand); }
.site-footer .massive {
  margin: 96px auto 48px; max-width: 1440px;
  font-size: clamp(80px, 16vw, 240px);
  font-weight: 300; line-height: 0.85; letter-spacing: -0.04em;
  color: rgba(249,248,246,0.06);
  user-select: none; pointer-events: none;
}
@media (max-width: 1023px) {
  .site-footer { padding: 64px 24px 24px; }
  .site-footer .top { grid-template-columns: 1fr 1fr; gap: 40px; padding-bottom: 48px; }
  .site-footer .lockup, .site-footer .news { grid-column: span 2; }
}

/* ----- floating CTA mobile ----------------------------------------------- */
.floating-cta { display: none; }
@media (max-width: 1023px) {
  .floating-cta {
    position: fixed; bottom: 24px; left: 16px; right: 16px; z-index: 40;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    height: 56px; background: var(--forest); color: var(--offwhite);
    font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500;
    text-decoration: none;
    opacity: 0; transform: translateY(16px);
    transition: opacity 300ms ease, transform 300ms ease;
    pointer-events: none;
  }
  .floating-cta.visible {
    opacity: 1; transform: translateY(0);
    pointer-events: auto;
  }
}

/* ----- atmospheric strip ------------------------------------------------- */
.strip-img {
  width: 100%; aspect-ratio: 21/9; background-size: cover; background-position: center;
  background-color: var(--stone-100);
}

/* ----- alternating method blocks ---------------------------------------- */
.method-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: center; padding: 96px 0;
  border-top: 1px solid var(--sand);
}
.method-block.reverse > .img-side { order: 2; }
.method-block .img-side .ph,
.method-block .img-side img { aspect-ratio: 4/5; width: 100%; object-fit: cover; }
.method-block .num-large {
  font-size: clamp(80px, 9vw, 140px); font-weight: 300;
  color: var(--forest); letter-spacing: -0.04em; line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.method-block .num-large em { font-style: italic; font-weight: 300; opacity: 0.6; }
.method-block h3 {
  font-size: clamp(36px, 4vw, 56px); font-weight: 300;
  letter-spacing: -0.02em; color: var(--forest); margin: 24px 0 32px;
  line-height: 1.05;
}
.method-block h3 em { font-style: italic; font-weight: 300; }
.method-block p { color: var(--slate); max-width: 46ch; }
.method-block ul {
  list-style: none; margin: 32px 0 0; padding: 0;
  border-top: 1px solid var(--sand);
}
.method-block ul li {
  padding: 14px 0; border-bottom: 1px solid var(--sand);
  font-size: 14px; color: var(--slate); display: flex; gap: 16px;
}
.method-block ul li::before { content: "—"; color: var(--muted); }
@media (max-width: 1023px) {
  .method-block { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .method-block.reverse > .img-side { order: 0; }
}

/* ----- form -------------------------------------------------------------- */
.form-grid { display: flex; flex-direction: column; gap: 32px; max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.field input, .field select, .field textarea {
  background: transparent; border: 0; border-bottom: 1px solid var(--slate);
  padding: 12px 0; font-size: 16px; color: var(--ink);
  font-family: inherit; outline: none; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--forest); border-bottom-width: 2px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field .check { display: flex; gap: 12px; align-items: flex-start; }
.field .check input { width: 18px; height: 18px; accent-color: var(--forest); flex: 0 0 18px; }

/* ----- generic surfaces — DS distribution: 60% offwhite, 25% gray, 10% forest, 5% terracotta */
.surface-sand     { background: var(--sand); color: var(--ink); }
.surface-stone-50 { background: var(--stone-50); color: var(--ink); }
.surface-stone-100{ background: var(--stone-100); color: var(--ink); }
.surface-moss     { background: var(--moss); color: var(--offwhite); }
.surface-moss h1, .surface-moss h2, .surface-moss h3 { color: var(--offwhite); }
.surface-moss .pull-center { color: var(--offwhite); }
.surface-moss .section-eyebrow { color: rgba(249,248,246,0.75); border-bottom-color: rgba(249,248,246,0.18); }
.surface-moss .section-eyebrow .num { color: var(--offwhite); }
.surface-forest   { background: var(--forest); color: var(--offwhite); }
.surface-graphite { background: var(--graphite); color: var(--offwhite); }
.surface-terracotta { background: var(--terracotta); color: var(--offwhite); }
.surface-terracotta h1, .surface-terracotta h2, .surface-terracotta h3 { color: var(--offwhite); }
.surface-terracotta .pull-center { color: var(--offwhite); }
.surface-forest h1, .surface-forest h2, .surface-forest h3,
.surface-graphite h1, .surface-graphite h2, .surface-graphite h3 { color: var(--offwhite); }
.surface-forest .section-eyebrow,
.surface-graphite .section-eyebrow { color: rgba(249,248,246,0.6); border-bottom-color: rgba(249,248,246,0.18); }

/* ----- entry animations -------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-serene), transform 700ms var(--ease-serene); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .bg { animation: none; }
}

/* ----- filter bar -------------------------------------------------------- */
.filter-bar {
  background: var(--offwhite); border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}
.filter-bar .row {
  max-width: 1440px; margin: 0 auto; padding: 16px 48px;
  display: flex; gap: 32px; flex-wrap: wrap; align-items: center;
}
.filter-bar button {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 500; color: var(--slate);
  padding: 14px 0; min-height: 44px; display: inline-flex; align-items: center;
  border-bottom: 1px solid transparent;
}
.filter-bar button.active { color: var(--forest); border-bottom-color: var(--forest); }
@media (max-width: 1023px) {
  .filter-bar .row { padding: 12px 24px; gap: 20px; overflow-x: auto; flex-wrap: nowrap; }
}

/* ----- filtered projects: flat grid when a category is active ------------- */
#projectsGrid.is-filtered {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
#projectsGrid.is-filtered .project-grid {
  display: contents;          /* dissolve row wrappers so cards become direct grid items */
}
#projectsGrid.is-filtered .project-card {
  transition-delay: 0ms !important;   /* remove stagger delay when re-flowing */
}
@media (max-width: 767px) {
  #projectsGrid.is-filtered { grid-template-columns: 1fr; }
}

/* ----- diff table --------------------------------------------------------- */
.diff {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--sand);
}
.diff .col {
  padding: 32px 32px;
  border-bottom: 1px solid var(--sand);
}
.diff .col + .col { border-left: 1px solid var(--sand); }
.diff .head { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 24px; }
.diff .col.tomato { background: var(--sand); }
.diff .col.tomato .head { color: var(--forest); }
.diff .col p { margin: 0; font-size: 17px; color: var(--ink); }
@media (max-width: 1023px) { .diff { grid-template-columns: 1fr; } .diff .col + .col { border-left: 0; } }

/* ----- map placeholder --------------------------------------------------- */
.map-ph {
  width: 100%; aspect-ratio: 21/6;
  background:
    radial-gradient(circle at 30% 50%, rgba(109,40,31,0.85) 0 5px, transparent 6px),
    radial-gradient(circle at 70% 50%, rgba(109,40,31,0.85) 0 5px, transparent 6px),
    repeating-linear-gradient(0deg, rgba(48,62,43,0.06) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, rgba(48,62,43,0.06) 0 1px, transparent 1px 80px),
    var(--stone-50);
  position: relative;
}
.map-ph .pin-lbl {
  position: absolute; transform: translate(-50%, -130%);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink);
}
.map-ph .pin-lbl.l { top: 50%; left: 30%; }
.map-ph .pin-lbl.r { top: 50%; left: 70%; }

/* ----- generic text columns --------------------------------------------- */
.cols-2 { columns: 2; column-gap: 64px; }
@media (max-width: 1023px) { .cols-2 { columns: 1; } }

/* ----- tiny progress (page) --------------------------------------------- */
.page-progress {
  position: fixed; left: 0; top: 0; height: 2px; background: var(--forest);
  z-index: 100; width: 0%; transition: width 60ms linear;
}

/* ----- page transitions ------------------------------------------------- */
#routeMount {
  transition: opacity 400ms var(--ease-serene);
}

/* ----- skip link (a11y) ------------------------------------------------- */
.skip-link:focus {
  position: fixed !important;
  left: 16px !important;
  top: 16px !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  z-index: 9999 !important;
}

/* ----- focus-visible (a11y) ---------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ----- contrast fix for muted text -------------------------------------- */
/* Bump muted text to pass WCAG AA for small text (4.5:1) */
.caption, .small { color: #636363; }

/* ----- responsive fixes for template grids ------------------------------ */
/* Contacto: form + aside layout */
@media (max-width: 1023px) {
  #routeMount [style*="grid-template-columns: 6fr 4fr"] {
    grid-template-columns: 1fr !important;
    gap: 64px !important;
  }
}

/* Método transparencia / Estudio team / Lab grid: 3-col and 2-col grids */
@media (max-width: 767px) {
  #routeMount [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  #routeMount [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  #routeMount [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* Lab photo grid: make it single-column on mobile */
@media (max-width: 767px) {
  #routeMount [style*="grid-template-columns: repeat(12, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  #routeMount [style*="grid-template-columns: repeat(12, 1fr)"] > div {
    grid-column: span 1 !important;
  }
}

/* Estudio hero — smaller text on mobile */
@media (max-width: 767px) {
  #routeMount [style*="font-size: 68px"] {
    font-size: 40px !important;
  }
}

/* Ficha detail bar — stack vertically on mobile */
@media (max-width: 767px) {
  .ficha-meta {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
}

/* ----- smooth scroll for hash links -------------------------------------- */
html { scroll-behavior: smooth; }

/* ----- content-visibility for off-screen performance -------------------- */
/* ----- Accesibilidad: tap targets en móvil (WCAG 2.5.x) ------------------ */
@media (max-width: 1023px) {
  .social-links a,
  .site-footer .bottom a { display: inline-block; padding: 8px 0; }
  .site-footer .col ul li a { display: inline-block; padding: 4px 0; }
}
