/* =============================================================
   PORTA — Estudio creativo
   styles.css — hoja única, organizada por secciones
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
@property --mesh-x { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --mesh-y { syntax: "<percentage>"; inherits: false; initial-value: 50%; }

:root {
  --bg:          #ffffff;
  --ink:         #111111;
  --ink-soft:    #2a2a2a;
  --ink-mute:    #767676;
  --ink-faint:   #a8a8a8;

  --accent:      #d80f16;
  --accent-dark: #a80c11;

  --line:        rgba(17,17,17,0.10);
  --line-strong: rgba(17,17,17,0.18);
  --gray-50:     #fafafa;
  --gray-100:    #f3f3f3;
  --gray-200:    #e9e9e9;

  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --container-max: 1400px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(4.5rem, 10vw, 9rem);
  --nav-h: 84px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; }
ul, ol { list-style: none; padding: 0; }
input, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #fff; }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .7rem 1.1rem; background: var(--ink); color: #fff;
  border-radius: 4px; font-weight: 500; transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
}

.section { padding-block: var(--section-pad); }
.section-tight { padding-block: clamp(3rem, 6vw, 5rem); }

.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;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  flex: none;
}

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

.tag {
  display: inline-block; padding: .35rem .8rem; border: 1px solid var(--line-strong);
  border-radius: 100px; font-size: .74rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-mute);
}
.tag-concept { color: var(--accent); border-color: var(--accent); }

/* =============================================================
   4. Typography
   ============================================================= */
.display-1 {
  font-size: clamp(2.4rem, 5.8vw, 5.6rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.03em;
  max-width: 20ch;
}
.eyebrow + .display-1 { margin-top: .8rem; }
.display-2 {
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.025em;
}
.display-3 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -.02em;
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--ink-mute);
  font-weight: 400;
  line-height: 1.55;
  max-width: 42ch;
}
.body-l { font-size: 1.15rem; line-height: 1.7; color: var(--ink-mute); max-width: 58ch; }
.num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: -.01em;
}

/* =============================================================
   5. Components
   ============================================================= */

/* --- Icon mark (the ONLY logo) --- */
.icon-mark { width: 28px; height: auto; flex: none; }
.icon-mark.icon-lg { width: clamp(64px, 9vw, 120px); }

/* --- Nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), backdrop-filter .4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.nav-logo { display: flex; align-items: center; }
.nav-links {
  display: none;
  align-items: center; gap: clamp(1.4rem, 2.6vw, 2.6rem);
}
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link {
  position: relative; padding: .3rem 0;
  font-size: .92rem; font-weight: 500; letter-spacing: .01em;
  color: var(--ink-soft);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-link.is-active { color: var(--accent); }

.nav-cta {
  display: none;
}
@media (min-width: 960px) {
  .nav-cta {
    display: inline-flex; align-items: center;
    padding: .6rem 1.3rem;
    border: 1px solid var(--ink);
    border-radius: 100px;
    font-size: .86rem; font-weight: 600;
    transition: background-color .35s var(--ease-out), color .35s var(--ease-out);
  }
  .nav-cta:hover { background: var(--ink); color: #fff; }
}

.nav-burger {
  display: inline-flex; flex-direction: column; gap: 5px; padding: .5rem;
  z-index: 110;
}
@media (min-width: 960px) { .nav-burger { display: none; } }
.nav-burger span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease-out), opacity .35s var(--ease-out); }
.nav-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 95;
  background: var(--bg);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .65s var(--ease-soft);
}
.nav-mobile[data-open="true"] { clip-path: inset(0); }
.nav-mobile-links { display: flex; flex-direction: column; gap: 1.4rem; text-align: center; }
.nav-mobile-links a { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1rem 1.9rem;
  border-radius: 100px;
  font-size: .95rem; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft), background-color .4s var(--ease-out), color .4s var(--ease-out);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -12px rgba(17,17,17,.35); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -12px rgba(216,15,22,.45); }
.btn-outline { border: 1px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline-light { border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }
.btn-text {
  position: relative; padding: 0; font-weight: 600;
}
.btn-text::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(1); transform-origin: left;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* magnetic wrapper */
.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner { display: inline-flex; align-items: center; justify-content: center; gap: inherit; will-change: transform; }

/* --- Cursor (simple dot) --- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9998;
  pointer-events: none; display: none;
  opacity: 0; transition: opacity .3s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

.cursor-dot {
  position: fixed; top: 0; left: 0; width: 8px; height: 8px; margin: -4px;
  background: var(--ink); border-radius: 50%; pointer-events: none; will-change: transform;
  transition: width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), background-color .3s var(--ease-out);
}
.cursor.is-interactive .cursor-dot { width: 15px; height: 15px; margin: -7.5px; background: var(--accent); }
.cursor.is-on-dark .cursor-dot { background: var(--accent); }
.cursor.is-panning .cursor-dot { width: 24px; height: 24px; margin: -12px; opacity: .45; }

/* Drag-to-scroll: block text selection while actively panning */
.is-panning, .is-panning * { user-select: none !important; }

/* --- Splash loader (icon only, double safety net) --- */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: auto;
  transition: opacity .8s var(--ease-out), clip-path 1s var(--ease-soft);
  animation: splashSafety .01s 4.5s forwards;
}
.splash-mark { width: clamp(56px, 8vw, 88px); animation: splashPulse 1.1s var(--ease-soft) infinite alternate; }
@keyframes splashPulse { from { transform: scale(1); opacity: .85; } to { transform: scale(1.08); opacity: 1; } }
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }

/* --- Footer --- */
.footer { padding-block: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 4vw, 2.5rem); border-top: 1px solid var(--line); }
.footer-top {
  display: flex; flex-direction: column; gap: 2.5rem;
}
@media (min-width: 720px) {
  .footer-top { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
.footer-brand { display: flex; align-items: center; gap: .9rem; }
.footer-brand-name { font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.footer-cols { display: flex; flex-wrap: wrap; gap: clamp(2.5rem, 6vw, 5rem); }
.footer-col h4 { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; font-size: .95rem; color: var(--ink-soft); margin-bottom: .5rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .82rem; color: var(--ink-faint);
}

/* --- Cards --- */
.project-card { display: block; position: relative; width: 100%; text-align: left; }
.project-card-media {
  position: relative; overflow: hidden; border-radius: 2px;
  aspect-ratio: 4 / 5; background: var(--gray-100);
}
.project-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease-soft);
}
.project-card:hover .project-card-media img { transform: scale(1.055); }
.project-card-cover {
  width: 100%; height: 100%;
  display: flex; align-items: flex-end; padding: 1.6rem;
  background: var(--ink);
}
.project-card-cover.cover-accent { background: var(--accent); }
.project-card-cover span {
  font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; color: #fff; line-height: 1.02;
}
.project-card-meta {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 1.1rem; gap: 1rem;
}
.project-card-name { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.project-card-cat { font-size: .84rem; color: var(--ink-mute); }

/* --- Lightbox gallery --- */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease-out);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(17,17,17,.95); }
.lightbox-stage {
  position: relative; z-index: 2; max-width: min(92vw, 1100px);
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  padding-inline: clamp(3.5rem, 8vw, 6rem);
}
.lightbox-media {
  max-width: 100%; display: flex; align-items: center; justify-content: center;
  transform: scale(.96); opacity: 0; transition: transform .5s var(--ease-soft), opacity .4s var(--ease-soft);
}
.lightbox.is-open .lightbox-media { transform: scale(1); opacity: 1; }
.lightbox-media img, .lightbox-media video { max-width: 100%; max-height: 72vh; width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.lightbox-media .cover-slide {
  width: min(78vw, 520px); aspect-ratio: 4/5; display: flex; align-items: center; justify-content: center; border-radius: 2px;
}
.lightbox-media .cover-slide.ink { background: var(--ink); }
.lightbox-media .cover-slide.accent { background: var(--accent); }
.lightbox-media .cover-slide span { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; text-align: center; padding: 2rem; }
.lightbox-caption { display: flex; gap: .6rem; align-items: baseline; font-size: .9rem; color: rgba(255,255,255,.6); }
.lightbox-caption span:first-child { color: #fff; font-weight: 600; font-size: 1rem; }
.lightbox-close {
  position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); z-index: 3;
  width: 44px; height: 44px; display: grid; place-items: center; color: #fff; font-size: 1.1rem;
  border-radius: 50%; transition: background-color .3s var(--ease-out);
}
.lightbox-close:hover { background: rgba(255,255,255,.12); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 52px; height: 52px; display: grid; place-items: center;
  color: #fff; font-size: 1.4rem; border-radius: 50%;
  transition: background-color .3s var(--ease-out), opacity .3s;
}
.lightbox-nav:hover { background: rgba(255,255,255,.12); }
.lightbox-nav[disabled] { opacity: .2; pointer-events: none; }
.lightbox-prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox-next { right: clamp(.5rem, 2vw, 1.5rem); }
[data-gallery] { cursor: pointer; }

/* --- Service row --- */
.service-row {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  align-items: center;
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 960px) {
  .service-row { grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
  .service-row:nth-child(even) .service-row-media { order: 2; }
  .service-row-text { grid-column: span 5; }
  .service-row:nth-child(even) .service-row-text { grid-column: 8 / span 5; }
  .service-row-media { grid-column: span 7; }
  .service-row:nth-child(even) .service-row-media { grid-column: 1 / span 7; }
}
.service-row-media {
  aspect-ratio: 16/10; overflow: hidden; border-radius: 2px; background: var(--gray-100);
}
.service-row-media img { width: 100%; height: 100%; object-fit: cover; }
.service-row-num { font-size: .85rem; color: var(--accent); font-weight: 700; margin-bottom: .8rem; }

/* --- Process steps --- */
.process {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
@media (min-width: 720px) { .process { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.process-step { position: relative; padding-top: 2rem; border-top: 1px solid var(--line-strong); }
.process-step-num { font-size: .85rem; font-weight: 700; color: var(--accent); letter-spacing: .05em; }
.process-step h3 { font-size: 1.4rem; margin-top: .6rem; }
.process-step p { margin-top: .6rem; color: var(--ink-mute); font-size: .95rem; }

/* --- Forms --- */
.field { position: relative; margin-bottom: 1.6rem; }
.field label {
  display: block; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .6rem;
}
.field input, .field textarea {
  width: 100%; padding: 1rem 0; border: 0; border-bottom: 1px solid var(--line-strong);
  background: transparent; font-size: 1.15rem; color: var(--ink);
  transition: border-color .3s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }

.contact-form { position: relative; }
.contact-form form.is-sent .form-fields { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.form-fields { transition: opacity .5s var(--ease-out), transform .5s var(--ease-soft); }
.contact-success {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .7s var(--ease-out) .1s, transform .7s var(--ease-soft) .1s;
  background: var(--ink); color: #fff;
  padding: clamp(2rem, 5vw, 3rem); border-radius: 4px;
}
.contact-success .lede { color: rgba(255,255,255,.7); }
.contact-success.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.submit-btn { position: relative; }
.submit-spinner {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none;
}
.is-sending .submit-label { opacity: 0; }
.is-sending .submit-spinner { opacity: 1; }
.submit-spinner::after {
  content: ""; width: 16px; height: 16px; border: 1.5px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%; animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.contact-form-error {
  display: none; margin-top: 1rem; color: var(--accent); font-size: .9rem;
}
.contact-form-error.is-visible { display: block; }
.contact-form-error a { color: inherit; text-decoration: underline; }

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Hero (home) --- */
.hero {
  position: relative;
  min-height: 100svh; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--nav-h);
  overflow: clip;
}
.hero-icon-deco {
  position: absolute; top: 50%; right: clamp(-4rem, -2vw, 2rem); transform: translateY(-50%);
  width: clamp(220px, 32vw, 480px);
  opacity: .9; z-index: -1; will-change: transform;
}
@media (max-width: 719px) {
  /* decorative only — hidden on mobile so it can never sit over the hero copy */
  .hero-icon-deco { display: none; }
  /* without the icon there's nothing to balance a full-screen height on mobile —
     size the hero to its content instead of forcing 100vh centering */
  .hero { min-height: auto; justify-content: flex-start; }
}
.hero-inner { position: relative; padding-block: clamp(3rem, 8vw, 5rem); }
@media (max-width: 719px) { .hero-inner { padding-block: 1.25rem 2rem; } }
.hero-kicker { margin-bottom: 1.6rem; }
.hero-title { margin-bottom: 1.8rem; }
.hero-title em { color: var(--accent); font-style: normal; }
.hero-foot { display: flex; flex-direction: column; gap: 2rem; margin-top: 2.2rem; }
@media (min-width: 720px) { .hero-foot { flex-direction: row; align-items: flex-end; justify-content: space-between; } }

/* --- Hero cover photo (full-bleed, brand-red tint) --- */
.hero-cover { position: relative; overflow: clip; aspect-ratio: 16/9; }
@media (max-width: 719px) { .hero-cover { aspect-ratio: 4/5; } }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }

/* --- Page hero (interior pages) --- */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.page-hero .lede { margin-top: 1.4rem; }

/* --- Manifesto / intro two-col --- */
.manifesto {
  display: grid; grid-template-columns: 1fr; gap: 1.6rem;
}
@media (min-width: 960px) {
  .manifesto { grid-template-columns: repeat(12, 1fr); gap: 2rem; align-items: start; }
  .manifesto-num { grid-column: span 3; }
  .manifesto-text { grid-column: 5 / span 8; }
}
.manifesto-num { font-size: clamp(3rem, 6vw, 5rem); font-weight: 700; color: var(--gray-200); line-height: .8; }

/* --- Projects grid --- */
.projects-grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem) 2rem;
}
@media (min-width: 720px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .projects-grid.grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .projects-grid.grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Home "Proyectos destacados" on mobile: one swipeable row, 2 cards visible at a time */
@media (max-width: 719px) {
  .projects-grid.grid-3 {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: .5rem;
    scrollbar-width: none;
  }
  .projects-grid.grid-3::-webkit-scrollbar { display: none; }
  .projects-grid.grid-3 > * {
    flex: 0 0 calc(50% - .5rem);
    min-width: 0;
    scroll-snap-align: start;
  }
}

/* --- CTA final --- */
.cta-final {
  position: relative; overflow: clip;
  background: var(--ink); color: #fff;
  padding-block: clamp(4rem, 10vw, 8rem);
  border-radius: 4px;
}
.cta-final .lede { color: rgba(255,255,255,.65); }
.cta-final-icon {
  position: absolute; right: clamp(-2rem, 2vw, 3rem); top: 50%; transform: translateY(-50%);
  width: clamp(140px, 18vw, 260px); opacity: .95; z-index: 0;
}
.cta-final > .container { position: relative; z-index: 1; max-width: 640px; margin-left: var(--gutter); margin-right: auto; }
@media (max-width: 719px) {
  /* decorative only — hidden on mobile so it can never sit over the CTA copy */
  .cta-final-icon { display: none; }
}

/* --- Case study --- */
.case-hero-media {
  width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 2px; background: var(--gray-100);
  margin-top: clamp(2rem, 5vw, 3rem);
}
.case-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.case-hero-media.cover-type { display: flex; align-items: center; justify-content: center; background: var(--ink); }
.case-hero-media.cover-type.cover-accent { background: var(--accent); }
.case-hero-media.cover-type span { color: #fff; font-size: clamp(2rem, 6vw, 4.5rem); font-weight: 700; text-align: center; padding: 2rem; }

.case-meta-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.4rem;
}
@media (min-width: 720px) { .case-meta-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem; } }
.case-meta-block h3 {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .9rem;
}
.case-meta-block p { color: var(--ink-mute); font-size: 1.05rem; line-height: 1.7; }

.case-gallery { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
@media (min-width: 720px) { .case-gallery { grid-template-columns: repeat(2, 1fr); } }
.case-gallery img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 2px; }

.next-project {
  display: flex; flex-direction: column; gap: .6rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.next-project .eyebrow { margin-bottom: .4rem; }

.occasions {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
@media (min-width: 720px) { .occasions { gap: 1.2rem; } }

.occasion-item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.1rem;
  padding: clamp(1.6rem, 3vw, 2.2rem) 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color .35s var(--ease-out), transform .4s var(--ease-soft), box-shadow .4s var(--ease-soft);
}
.occasion-item:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -20px rgba(17,17,17,.25);
}
.occasion-icon-wrap {
  width: 58px; height: 58px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-50);
  transition: background-color .35s var(--ease-out);
}
.occasion-item:hover .occasion-icon-wrap { background: var(--accent); }
.occasion-icon { width: 26px; height: 26px; color: var(--accent); transition: color .35s var(--ease-out); }
.occasion-item:hover .occasion-icon { color: #fff; }
.occasion-label { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }

/* Custom page: "Para qué ocasión" + "Packaging" side by side on desktop */
.custom-split { display: flex; flex-direction: column; gap: 3rem; }
@media (min-width: 960px) {
  .custom-split { flex-direction: row; align-items: flex-start; gap: 4rem; }
  .custom-split-col { flex: 1; min-width: 0; }
}

/* --- Estudio page --- */
.founder-hero { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .founder-hero { grid-template-columns: 7fr 5fr; gap: 3rem; } }
.founder-photo { aspect-ratio: 4/5; overflow: hidden; border-radius: 2px; background: var(--gray-100); }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }

.story-block { max-width: 62ch; margin-inline: auto; }
.story-block p { margin-bottom: 1.5rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-soft); line-height: 1.65; }
.story-block p.mute { color: var(--ink-mute); }

.values-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 720px) { .values-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; } }
.value-item { padding-top: 1.6rem; border-top: 1px solid var(--line-strong); }
.value-item h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.value-item p { color: var(--ink-mute); }

.color-panel {
  background: var(--ink); color: #fff; border-radius: 4px;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  text-align: center;
}
.color-panel.accent { background: var(--accent); }

/* --- Contact links row --- */
.contact-links { display: flex; flex-direction: column; gap: 1.6rem; }
.contact-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-block: 1.2rem; border-bottom: 1px solid var(--line);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 600;
}
.contact-link .arrow { color: var(--accent); }

/* =============================================================
   7. Effects
   ============================================================= */

/* Universal scroll reveal */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal][data-split] { opacity: 1; transform: none; } /* defensive: split-text handles its own reveal */

/* Split text reveal */
.split-word, .split-char { display: inline-block; will-change: transform, opacity; }

/* stagger delays for grouped reveal children */
[data-reveal-group] > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* Parallax helper */
[data-parallax] { will-change: transform; }

/* =============================================================
   8. Responsive helpers
   ============================================================= */
.hide-mobile { display: none; }
@media (min-width: 720px) { .hide-mobile { display: revert; } }
.hide-desktop { display: revert; }
@media (min-width: 720px) { .hide-desktop { display: none; } }

/* =============================================================
   9. Reduced motion — only genuinely intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .splash-mark { animation: none; }
  .hero-icon-deco { transition: none !important; }
}
