/* Renzo Portfolio — Joey® DS reskin */

@font-face {
  font-family: "Google Sans";
  src: url("fonts/GoogleSans-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans";
  src: url("fonts/GoogleSans-Italic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --font: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #ffffff;
  --bg-elev: #f6f6f6;
  --bg-input: #ececec;
  --fg: #000000;
  --fg-2: #6b6b6b;
  --fg-3: #a8a8a8;
  --border: #ececec;
  --border-strong: #d6d6d6;
  --pill-bg: #000000;
  --pill-fg: #ffffff;
  --pill-on-bg: #ffffff;
  --pill-on-fg: #000000;
  --cta-bg: #000000;
  --cta-fg: #ffffff;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #0a0a0a;
  --bg-input: #141414;
  --fg: #ffffff;
  --fg-2: #8a8a8a;
  --fg-3: #5a5a5a;
  --border: #141414;
  --border-strong: #1f1f1f;
  --pill-bg: #141414;
  --pill-fg: #ffffff;
  --pill-on-bg: #ffffff;
  --pill-on-fg: #000000;
  --cta-bg: #ffffff;
  --cta-fg: #000000;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 220ms cubic-bezier(.2,.7,.2,1), color 220ms cubic-bezier(.2,.7,.2,1);
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='28' viewBox='0 0 24 28'><path d='M2 2 L2 22 L7.5 17 L11 24.5 L13.5 23.4 L10 16 L17 16 Z' fill='%23000' stroke='%23ffffff' stroke-width='1.4' stroke-linejoin='round'/></svg>") 2 2, auto;
}

/* ---------- Simulated viewport ---------- */
body.sim-viewport {
  background: #0a0a0a;
}
body.sim-viewport #root {
  max-width: var(--sim-vw, 100%);
  margin: 24px auto;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
  min-height: calc(100vh - 48px);
  transition: max-width 320ms cubic-bezier(.2,.7,.2,1);
}
body.sim-viewport .site-header {
  position: relative;
  top: auto;
}

a, button, [role="button"], .project-card, .pill-nav a, .menu-btn, .theme-toggle, .email-pill, .pill-btn, .icon-btn, .faq-row, .wordmark {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='28' viewBox='0 0 24 28'><path d='M2 2 L2 22 L7.5 17 L11 24.5 L13.5 23.4 L10 16 L17 16 Z' fill='%23000' stroke='%23ffffff' stroke-width='1.4' stroke-linejoin='round'/></svg>") 2 2, pointer;
}

input.pill-input, textarea.pill-input {
  cursor: text;
}

/* ---------- Grid-paper background ---------- */
body {
  --grid-size: 48px;
  --grid-line: rgba(0, 0, 0, 0.025);
  --grid-line-hover: rgba(0, 0, 0, 0.13);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right,  var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: 0 0;
  transition:
    background-color 220ms cubic-bezier(.2,.7,.2,1),
    background-image 220ms cubic-bezier(.2,.7,.2,1);
}
body::before {
  /* hover-darkening overlay tracking the cursor */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right,  var(--grid-line-hover) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-hover) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: 0 0;
  -webkit-mask-image: radial-gradient(circle 220px at var(--mx, -200px) var(--my, -200px), #000 0%, rgba(0,0,0,0.55) 45%, transparent 75%);
  mask-image: radial-gradient(circle 220px at var(--mx, -200px) var(--my, -200px), #000 0%, rgba(0,0,0,0.55) 45%, transparent 75%);
  transition: opacity 220ms;
}
[data-theme="dark"] body,
body[data-theme="dark"] {
  --grid-line: rgba(255, 255, 255, 0.025);
  --grid-line-hover: rgba(255, 255, 255, 0.14);
}

#root, main, .site-header, .footer {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 900px) {
  .container { padding: 0 28px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
}
body[data-sim="tablet"] .container { padding: 0 28px; }
body[data-sim="mobile"] .container { padding: 0 20px; }

/* ---------- Header (logo + nav centered together, actions right — Joey DS) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px 40px 16px;
  transition: background 220ms cubic-bezier(.2,.7,.2,1);
}
.site-header > .header-center {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.site-header > .header-actions {
  grid-column: 3;
  justify-self: end;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  user-select: none;
  cursor: pointer;
}
.wordmark-img {
  height: 22px;
  width: auto;
  display: block;
  transition: filter 220ms cubic-bezier(.2,.7,.2,1);
}
[data-theme="dark"] .wordmark-img { filter: invert(1); }

/* ---------- Pill nav (Joey DS) ---------- */
.pill-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--pill-bg);
  border-radius: 999px;
  padding: 6px;
}
.pill-nav a {
  background: none;
  border: none;
  line-height: normal; /* these were <button>s; keep their height now that they are links */
  color: var(--pill-fg);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 150ms cubic-bezier(.2,.7,.2,1), color 150ms cubic-bezier(.2,.7,.2,1);
}
.pill-nav a:hover { background: rgba(255,255,255,0.08); }
.pill-nav a.on { background: var(--pill-on-bg); color: var(--pill-on-fg); }
.pill-nav a.on:hover { background: var(--pill-on-bg); }
.nav-badge {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--pill-on-bg);
  color: var(--pill-on-fg);
  font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.pill-nav a.on .nav-badge {
  background: var(--pill-on-fg);
  color: var(--pill-on-bg);
}

@media (max-width: 720px) {
  .pill-nav { display: none; }
}

/* Mobile hamburger */
.menu-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--pill-bg);
  color: var(--pill-fg);
  border: none;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn svg { width: 16px; height: 16px; }

@media (max-width: 720px) {
  .site-header { padding: 20px 20px; }
  .top-nav { display: none; }
  .menu-btn { display: inline-flex; }
}

/* Mobile menu sheet */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  transform: translateY(-100%);
  transition: transform 280ms cubic-bezier(.2,.7,.2,1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu nav {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-menu nav a {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg-2);
}
.mobile-menu nav a.on { color: var(--fg); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 14px;
  transition: transform 120ms, background 150ms;
}
.theme-toggle:active { transform: scale(.96); }

/* ---------- Type ---------- */
.display-xl {
  font-weight: 700;
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}
.display-lg {
  font-weight: 700;
  font-size: clamp(64px, 9vw, 128px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin: 0;
}
h2.section { font-weight: 700; font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h3.section { font-weight: 700; font-size: 22px; letter-spacing: -0.005em; margin: 0; }
.eyebrow { font-size: 13px; font-weight: 600; }
.muted { color: var(--fg-2); }
.body { color: var(--fg-2); font-size: 14px; line-height: 1.55; margin: 0; }

/* ---------- Pill button ---------- */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  border: none;
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 150ms, transform 120ms;
}
.pill-btn:hover { opacity: 0.92; }
.pill-btn:active { transform: scale(.985); }
.pill-btn.ghost {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.pill-btn.sm { height: 44px; padding: 0 20px; font-size: 13px; }

/* ---------- Email pill ---------- */
.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: opacity 150ms, transform 120ms;
}
.email-pill:hover { opacity: 0.92; }
.email-pill:active { transform: scale(.985); }
.email-pill .arr {
  display: inline-flex;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  align-items: center; justify-content: center;
  font-size: 11px;
}
[data-theme="dark"] .email-pill .arr { background: rgba(0,0,0,0.15); }

/* ---------- Pill input ---------- */
.pill-input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--bg-input);
  color: var(--fg);
  border: none;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: background 150ms;
}
.pill-input::placeholder { color: var(--fg-3); }
.pill-input:focus { outline: 2px solid var(--fg); outline-offset: 2px; }
.pill-textarea {
  height: 140px;
  padding: 18px 24px;
  border-radius: 24px;
  resize: none;
  font-family: var(--font);
}

/* ---------- Section ---------- */
.section-y    { padding-block: 96px; }
.section-y-sm { padding-block: 56px; }

/* ---------- Projects header row ---------- */
.projects-header {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}
.projects-header h1 {
  font-weight: 700;
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0;
}
.projects-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 460px;
  padding-top: 14px;
}
@media (max-width: 720px) {
  .projects-header { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
  .projects-header p { padding-top: 0; }
}

/* ---------- Project tile ---------- */
.project-card { cursor: pointer; display: block; }
.project-cover {
  width: auto; height: 90%; max-width: 92%;
  object-fit: contain; align-self: center; display: block;
}
.project-tile {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1.05 / 1;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.project-card:hover .project-tile {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px rgba(0,0,0,.18);
}
.project-meta {
  margin-top: 16px;
}
.project-meta .name {
  font-weight: 600;
  font-size: 16px;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.project-meta .tag {
  font-size: 13px;
  color: var(--fg-2);
  margin-top: 2px;
}

/* ---------- Phone mockup inside tile (placeholder art) ---------- */
.phone-frame {
  width: 56%;
  aspect-ratio: 9 / 18.5;
  background: #fff;
  border-radius: 28px;
  position: relative;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.06) inset,
    0 30px 50px -20px rgba(0,0,0,0.35),
    0 0 0 6px rgba(0,0,0,0.85);
  overflow: hidden;
  margin-bottom: -10%;
}
.phone-frame::before {
  /* notch */
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 18px;
  background: #0a0a0a;
  border-radius: 999px;
  z-index: 3;
}
.phone-frame .screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Vertical landscape mock (BepsaMap-style) ---------- */
.poster-frame {
  width: 64%;
  aspect-ratio: 9 / 14;
  background: #fff;
  border-radius: 12px;
  position: relative;
  box-shadow:
    0 24px 50px -16px rgba(0,0,0,0.28),
    0 1px 0 rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: -6%;
}

/* ---------- Testimonial block ---------- */
.testimonial {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  align-items: end;
}
.testimonial blockquote {
  margin: 0;
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--fg);
  max-width: 560px;
}
.testimonial .who {
  padding-bottom: 6px;
}
.testimonial .who .name {
  font-weight: 600;
  font-size: 14px;
}
.testimonial .who .role {
  font-size: 13px;
  color: var(--fg-2);
  margin-top: 2px;
}
@media (max-width: 720px) {
  .testimonial { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Stat ---------- */
.stat-num {
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.025em;
}
.stat-num sup { font-size: 0.45em; vertical-align: super; }

/* ---------- FAQ ---------- */
.faq {
  background: var(--bg-elev);
  border-radius: 20px;
  padding: 6px 22px;
}
.faq-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding: 22px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border-strong);
  transition: opacity 150ms;
}
.faq-row:last-child { border-bottom: none; }
.faq-row .q { font-weight: 500; font-size: 15px; flex: 1; }
.faq-row .plus { font-size: 22px; line-height: 1; transition: transform 220ms cubic-bezier(.2,.7,.2,1); }
.faq-row.open .plus { transform: rotate(45deg); }
.faq-row .a {
  display: none;
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
  flex-basis: 100%;
  margin-top: 8px;
}
.faq-row.open { flex-wrap: wrap; }
.faq-row.open .a { display: block; }

/* ---------- Big CTA ---------- */
.cta-block {
  text-align: center;
  padding: 72px 0 96px;
}
.cta-block h2 {
  font-weight: 700;
  font-size: clamp(80px, 14vw, 200px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  margin: 0 0 40px 0;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--fg-2);
  padding: 24px 40px 36px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer .links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer .icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elev);
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--fg);
  cursor: pointer;
  border: 1px solid var(--border-strong);
  transition: background 150ms, transform 120ms;
}
.footer .icon-btn:hover { background: var(--border); }
.footer .icon-btn:active { transform: scale(.94); }
.footer .icon-btn svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .footer { padding: 24px 28px 32px; }
}
@media (max-width: 640px) {
  .footer { padding: 20px 20px 28px; flex-direction: column; align-items: flex-start; gap: 16px; }
}
body[data-sim="tablet"] .footer { padding: 24px 28px 32px; }
body[data-sim="mobile"] .footer { padding: 20px 20px 28px; flex-direction: column; align-items: flex-start; gap: 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: #000;
  color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 100;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 24px 48px -12px rgba(0,0,0,.3);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Page transitions ---------- */
.page {
  animation: page-in 320ms cubic-bezier(.2,.7,.2,1);
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll-reveal ----------
   Only hidden when JS runs (index.html adds .js to <html>): without JS the prerendered
   page has to stay readable. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }

/* ---------- Refined project card hover ---------- */
.project-card { transition: transform 480ms cubic-bezier(.2,.7,.2,1); }
.project-card .project-tile {
  transition:
    transform 600ms cubic-bezier(.2,.7,.2,1),
    box-shadow 600ms cubic-bezier(.2,.7,.2,1);
}
.project-card .project-tile > * {
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.project-card:hover .project-tile {
  box-shadow: 0 32px 60px -24px rgba(0,0,0,.22);
}
.project-card:hover .project-tile > * {
  transform: translateY(-6px) scale(1.025);
}
.project-card .project-meta .name {
  transition: transform 380ms cubic-bezier(.2,.7,.2,1);
  display: inline-block;
}
.project-card:hover .project-meta .name {
  transform: translateX(4px);
}
.project-card .project-meta .name::after {
  content: "  →";
  opacity: 0;
  transition: opacity 320ms cubic-bezier(.2,.7,.2,1), transform 320ms cubic-bezier(.2,.7,.2,1);
  transform: translateX(-4px);
  display: inline-block;
}
.project-card:hover .project-meta .name::after {
  opacity: 0.4;
  transform: translateX(0);
}

/* Coming soon placeholder cards */
.project-card--soon { cursor: default; }
.project-tile--soon {
  background: rgba(127,127,127,.07);
  border: 1.5px dashed rgba(127,127,127,.30);
  align-items: center;
}
.soon-badge {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg-2); padding: 8px 15px; border-radius: 999px;
  background: rgba(127,127,127,.10); border: 1px solid rgba(127,127,127,.22);
}
.project-card--soon .project-meta .name { color: var(--fg-2); }
.project-card--soon:hover .project-tile { transform: none; box-shadow: none; }
.project-card--soon:hover .project-tile > * { transform: none; }
.project-card--soon:hover .project-meta .name { transform: none; }
.project-card--soon .project-meta .name::after { content: ""; }

/* ---------- Animated nav underline pulse ---------- */
.pill-nav a { position: relative; }
.pill-nav a::after {
  content: "";
  position: absolute;
  inset: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 220ms cubic-bezier(.2,.7,.2,1), transform 220ms cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.pill-nav a:not(.on):hover::after { opacity: 1; transform: scale(1); }

/* ---------- "More →" link arrow ---------- */
a[data-arrow] { display: inline-flex; align-items: center; gap: 4px; }
a[data-arrow] .arrow {
  display: inline-block;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
a[data-arrow]:hover .arrow { transform: translateX(4px); }

/* ---------- Email pill — gentle press + arrow nudge ---------- */
.email-pill { position: relative; overflow: hidden; }
.email-pill .arr {
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.email-pill:hover .arr {
  transform: translate(2px, -2px);
}

/* ---------- Pill button — micro-magnet feel ---------- */
.pill-btn {
  position: relative;
}
.pill-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity 220ms cubic-bezier(.2,.7,.2,1);
}
.pill-btn:hover::before { opacity: 1; }
.pill-btn.ghost::before { background: rgba(0,0,0,0.04); }
[data-theme="dark"] .pill-btn.ghost::before { background: rgba(255,255,255,0.06); }

/* ---------- Big "Let's talk!" — subtle breathing ---------- */
.cta-block h2 {
  transition: letter-spacing 600ms cubic-bezier(.2,.7,.2,1);
}
.cta-block:hover h2 {
  letter-spacing: -0.045em;
}

/* ---------- Wordmark hover (image — gentle dim) ---------- */
.wordmark-img { transition: filter 220ms cubic-bezier(.2,.7,.2,1), opacity 220ms cubic-bezier(.2,.7,.2,1); }
.wordmark:hover .wordmark-img { opacity: 0.78; }

/* ---------- Footer icons — gentle lift ---------- */
.footer .icon-btn {
  transition: background 220ms cubic-bezier(.2,.7,.2,1),
              transform 220ms cubic-bezier(.2,.7,.2,1),
              color 220ms cubic-bezier(.2,.7,.2,1);
}
.footer .icon-btn:hover { transform: translateY(-2px); background: var(--fg); color: var(--bg); }

/* ---------- Form inputs — focus expand ---------- */
.pill-input {
  transition:
    background 220ms cubic-bezier(.2,.7,.2,1),
    transform 220ms cubic-bezier(.2,.7,.2,1),
    box-shadow 220ms cubic-bezier(.2,.7,.2,1);
}
.pill-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--fg);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Layout helpers ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 64px; }
@media (min-width: 900px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }}

/* ============================================================
   Responsive overrides — apply on real narrow viewports AND
   when simulating tablet/mobile via the Tweaks panel
   ============================================================ */

/* TABLET — ≤900px or sim=tablet */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .display-xl { font-size: clamp(48px, 8vw, 88px) !important; }
  h2.section { font-size: clamp(32px, 5.6vw, 48px) !important; }
  .cta-block h2 { font-size: clamp(64px, 13vw, 140px) !important; }
  .cta-block { padding: 48px 0 64px !important; }
  .section-y { padding-block: 64px !important; }
  .section-y-sm { padding-block: 40px !important; }
}
body[data-sim="tablet"] .container { padding: 0 24px; }
body[data-sim="tablet"] .display-xl { font-size: clamp(48px, 8vw, 88px); }
body[data-sim="tablet"] h2.section { font-size: clamp(32px, 5.6vw, 48px); }
body[data-sim="tablet"] .cta-block h2 { font-size: clamp(64px, 13vw, 140px); }
body[data-sim="tablet"] .cta-block { padding: 48px 0 64px; }
body[data-sim="tablet"] .section-y { padding-block: 64px; }
body[data-sim="tablet"] .section-y-sm { padding-block: 40px; }
body[data-sim="tablet"] .grid-2,
body[data-sim="tablet"] .grid-3 { grid-template-columns: 1fr 1fr; }
body[data-sim="tablet"] .pill-nav { display: inline-flex; }
body[data-sim="tablet"] .menu-btn { display: none; }
body[data-sim="tablet"] .site-header { padding: 18px 24px 14px; }

/* MOBILE — ≤640px or sim=mobile */
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .display-xl { font-size: clamp(40px, 11vw, 64px) !important; line-height: 0.98; }
  h2.section { font-size: clamp(28px, 8vw, 40px) !important; }
  h3.section { font-size: 18px !important; }
  .cta-block h2 { font-size: clamp(48px, 18vw, 96px) !important; line-height: 0.95; }
  .cta-block { padding: 32px 0 48px !important; }
  .section-y { padding-block: 48px !important; }
  .section-y-sm { padding-block: 32px !important; }
  .body { font-size: 15px; }
  .stat-num { font-size: clamp(48px, 18vw, 88px) !important; }
  .grid-2, .grid-3 { gap: 20px !important; }
}
body[data-sim="mobile"] .container { padding: 0 20px; }
body[data-sim="mobile"] .display-xl { font-size: clamp(40px, 11vw, 64px); line-height: 0.98; }
body[data-sim="mobile"] h2.section { font-size: clamp(28px, 8vw, 40px); }
body[data-sim="mobile"] h3.section { font-size: 18px; }
body[data-sim="mobile"] .cta-block h2 { font-size: clamp(48px, 18vw, 96px); line-height: 0.95; }
body[data-sim="mobile"] .cta-block { padding: 32px 0 48px; }
body[data-sim="mobile"] .section-y { padding-block: 48px; }
body[data-sim="mobile"] .section-y-sm { padding-block: 32px; }
body[data-sim="mobile"] .body { font-size: 15px; }
body[data-sim="mobile"] .stat-num { font-size: clamp(48px, 18vw, 88px); }
body[data-sim="mobile"] .grid-2,
body[data-sim="mobile"] .grid-3 { grid-template-columns: 1fr; gap: 20px; }
body[data-sim="mobile"] .pill-nav { display: none; }
body[data-sim="mobile"] .menu-btn { display: inline-flex; }
body[data-sim="mobile"] .site-header { padding: 16px 20px; grid-template-columns: 1fr auto; }
body[data-sim="mobile"] .site-header > .header-center { grid-column: 1; align-items: flex-start; gap: 0; }
body[data-sim="mobile"] .site-header > .header-actions { grid-column: 2; align-self: center; }
body[data-sim="mobile"] .footer { padding: 32px 20px; }

/* ---------- Stacked detail screens for case study ---------- */
.case-cover {
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center; justify-content: center;
}

/* ============================================================
   COOPEXSANJO — full case study (web rebuild of the deck)
   Brand tokens from the design-system slide.
   ============================================================ */
.cx {
  --cx-blue: #3D5FA0;
  --cx-blue-light: #9BCBEB;
  --cx-gold: #DCD594;
  --cx-gray: #5F625F;
  --cx-heading: var(--fg);
  --cx-panel: #F1F4F9;
  --cx-card: #ffffff;
  --cx-card-bd: #e7ecf3;
  --cx-bad: #C0492F;
  --cx-good: #2F8C52;
}
[data-theme="dark"] .cx {
  --cx-heading: var(--fg);
  --cx-panel: #0e1014;
  --cx-card: #0a0a0a;
  --cx-card-bd: #1c1f24;
  --cx-bad: #e2745c;
  --cx-good: #5cc483;
}

.cx-wrap { position: relative; overflow: hidden; }

/* Decorative labyrinth corner (from the deck) */
.cx-corner {
  position: absolute; width: 150px; height: 150px;
  color: var(--cx-blue-light); opacity: .55;
  pointer-events: none; z-index: 0;
}
.cx-corner svg { width: 100%; height: 100%; display: block; }
.cx-corner--tr { top: 0; right: 0; }
.cx-corner--tl { top: 0; left: 0; transform: scaleX(-1); }
.cx-corner--br { bottom: 0; right: 0; transform: scaleY(-1); }
.cx-corner--bl { bottom: 0; left: 0; transform: scale(-1, -1); }

/* Hero */
.cx-hero { padding-top: 8px; position: relative; z-index: 1; }
.cx-hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: 22px;
}
@media (max-width: 880px) { .cx-hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.cx-kick {
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cx-heading);
}
.cx-title {
  font-weight: 800; letter-spacing: -.035em; line-height: .95;
  margin: 8px 0 0; font-size: clamp(38px, 5vw, 72px);
}
.cx-tags {
  margin: 18px 0 0; font-size: clamp(15px, 1.9vw, 21px);
  font-weight: 700; letter-spacing: -.01em; color: var(--cx-heading);
}
.cx-sub {
  margin: 18px 0 0; max-width: 540px;
  font-size: clamp(16px, 2vw, 19px); line-height: 1.55; color: var(--fg-2);
}
.cx-meta { display: flex; flex-wrap: wrap; gap: 22px 36px; margin-top: 28px; }
.cx-meta .k {
  display: block; font-size: 12px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--fg-3);
}
.cx-meta .v { display: block; font-size: 14.5px; font-weight: 600; margin-top: 5px; color: var(--fg); }
.cx-hero-media {
  position: relative; display: flex; justify-content: center; align-items: center; min-height: 0;
}
.cx-hero-media img {
  width: auto; height: auto; max-width: 100%;
  max-height: clamp(380px, 48vw, 560px); display: block;
}
@media (max-width: 880px) { .cx-hero-media img { max-width: 82%; max-height: 460px; } }
/* Landscape hero (COOPEXSANJO) — enlarge & bleed toward the right edge */
@media (min-width: 881px) {
  .cx-hero-grid.cx-hero-bleed { grid-template-columns: 0.78fr 1.22fr; }
  .cx-hero-bleed .cx-hero-media { justify-content: flex-end; }
  .cx-hero-bleed .cx-hero-media img {
    max-width: none; max-height: none;
    width: calc(100% + 32px); margin-right: -32px;
  }
}

/* Sections — editorial numbered headers */
.cx-sec { position: relative; padding-top: clamp(44px, 6vw, 80px); z-index: 1; }
.cx-sec-head { display: block; border-top: 1px solid var(--cx-card-bd, var(--border-strong, rgba(0,0,0,.12))); padding-top: 20px; }
.cx-sec-num {
  display: block; font-size: 13px; font-weight: 600; letter-spacing: .06em;
  color: var(--fg-3); margin: 0 0 10px;
}
.cx-sec-title {
  font-weight: 800; color: var(--cx-heading); margin: 0;
  font-size: clamp(24px, 3vw, 36px); letter-spacing: -.02em;
}
.cx-lead {
  margin: 18px 0 0; max-width: 780px;
  font-size: clamp(16px, 1.7vw, 18px); line-height: 1.55; color: var(--fg);
}

.cx-panel {
  background: var(--cx-panel); border-radius: 24px;
  padding: clamp(28px, 4vw, 48px); margin-top: 36px; position: relative; overflow: hidden;
}
.cx-split { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .cx-split { grid-template-columns: 1fr; gap: 36px; } }

.cx-subhead { color: var(--cx-heading); font-weight: 700; font-size: 22px; margin: 0 0 22px; }
.cx-prob { margin-bottom: 22px; }
.cx-prob:last-child { margin-bottom: 0; }
.cx-prob h4 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--fg); }
.cx-prob p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--fg-2); }

/* Card grids */
.cx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 32px; }
.cx-cards--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .cx-cards, .cx-cards--2 { grid-template-columns: 1fr; } }
.cx-card {
  background: var(--cx-card); border: 1px solid var(--cx-card-bd);
  border-radius: 18px; padding: 26px;
}
.cx-card .ic { width: 38px; height: 38px; color: var(--cx-blue); margin-bottom: 16px; }
.cx-card h4 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.cx-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg-2); }

/* Persona */
.cx-persona {
  background: var(--cx-card); border: 1px solid var(--cx-card-bd);
  border-radius: 20px; padding: clamp(24px, 3vw, 36px);
}
.cx-persona .ph { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.cx-persona .avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(160deg, var(--cx-blue), #1F3D85);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; flex: 0 0 auto;
}
.cx-persona .ph .nm { font-weight: 700; font-size: 18px; }
.cx-persona .ph .sub { font-size: 13px; color: var(--fg-2); margin-top: 2px; }
.cx-persona blockquote {
  margin: 0 0 20px; border-left: 3px solid var(--cx-blue-light);
  padding-left: 14px; font-style: italic; color: var(--fg);
  font-size: 16px; line-height: 1.5;
}
.cx-prow { margin-top: 16px; }
.cx-prow .lbl { font-weight: 700; font-size: 14px; color: var(--fg); }
.cx-prow p { margin: 5px 0 0; font-size: 14px; color: var(--fg-2); line-height: 1.5; }

/* Before / After flow */
.cx-flow { margin-top: 44px; }
.cx-flow-title {
  text-align: center; color: var(--cx-heading); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin-bottom: 22px;
}
.cx-beforeafter { display: grid; grid-template-columns: 1fr; gap: 20px; }
.cx-ba { background: var(--cx-panel); border-radius: 20px; padding: 26px; }
.cx-ba .tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cx-ba .tag.bad { color: var(--cx-bad); }
.cx-ba .tag.good { color: var(--cx-good); }
.cx-ba h5 { margin: 6px 0 0; font-size: 16px; font-weight: 700; }
.cx-ba .stage { display: flex; gap: 14px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.cx-ba p { font-size: 13.5px; color: var(--fg-2); line-height: 1.55; margin: 8px 0 0; }

/* Design system — palette */
.cx-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
@media (max-width: 760px) { .cx-swatches { grid-template-columns: repeat(2, 1fr); } }
.cx-swatch .chip { height: 100px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07); }
.cx-swatch .nm { margin-top: 12px; font-weight: 600; font-size: 14px; }
.cx-swatch .hx { font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* Design system — type specimen */
.cx-type { margin-top: 40px; }
.cx-type .specimen { font-family: "Poppins", var(--font); }
.cx-type .big { font-weight: 700; font-size: clamp(56px, 9vw, 110px); letter-spacing: -.02em; line-height: 1; }
.cx-type .scale { display: flex; gap: 28px; flex-wrap: wrap; align-items: baseline; margin-top: 18px; }
.cx-type .scale span { color: var(--fg-2); }

/* Gallery */
.cx-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px; margin-top: 34px; justify-items: center;
}

/* Real screenshot card (506x1008 export) */
.cx-shot {
  width: 230px; max-width: 100%; aspect-ratio: 506 / 1008;
  flex: 0 0 auto; scroll-snap-align: start;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.cx-shot:hover { transform: translateY(-6px); }
.cx-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Flow showcase block */
.cx-flowblock { margin-top: 44px; }
.cx-flowblock .hd { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cx-flowblock h3 { margin: 0; font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; color: var(--fg); letter-spacing: -.02em; }
.cx-flowblock .cnt { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--cx-heading); white-space: nowrap; }
.cx-flowblock p.desc { margin: 8px 0 0; max-width: 720px; font-size: 14.5px; line-height: 1.55; color: var(--fg-2); }
.cx-flowrow {
  display: flex; gap: 18px; margin-top: 20px;
  overflow-x: auto; padding-bottom: 14px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--cx-card-bd) transparent;
}
.cx-flowrow::-webkit-scrollbar { height: 8px; }
.cx-flowrow::-webkit-scrollbar-track { background: transparent; }
.cx-flowrow::-webkit-scrollbar-thumb { background: var(--cx-card-bd); border-radius: 4px; }

/* Featured "ahora" screens row (centered, wraps) */
.cx-shots-center { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.cx-shots-center .cx-shot { width: 196px; }

/* Natural-aspect shot (for old screens with their own ratio) */
.cx-shot--auto { aspect-ratio: auto; }
.cx-shot--auto img { height: auto; object-fit: contain; }

/* Height-based scroll row — aligns screens of different resolutions/ratios */
.cx-shotrow {
  display: flex; gap: 14px; margin-top: 16px;
  overflow-x: auto; padding-bottom: 10px; align-items: flex-start;
  scrollbar-width: thin; scrollbar-color: var(--cx-card-bd) transparent;
}
.cx-shotrow::-webkit-scrollbar { height: 8px; }
.cx-shotrow::-webkit-scrollbar-thumb { background: var(--cx-card-bd); border-radius: 4px; }
.cx-shotrow .cx-shot { width: auto; aspect-ratio: auto; flex: 0 0 auto; }
.cx-shotrow .cx-shot img { height: clamp(220px, 30vw, 300px); width: auto; object-fit: contain; display: block; }

/* "Así se veía antes" strip — slightly desaturated to read as legacy */
.cx-oldstrip .cx-shot img { filter: saturate(.92); }

/* Note / asset request */
.cx-note {
  margin-top: 28px; border: 1px dashed var(--cx-card-bd); border-radius: 16px;
  padding: 18px 22px; background: var(--cx-panel);
  font-size: 13.5px; color: var(--fg-2); line-height: 1.55;
}
.cx-note b { color: var(--fg); }

/* Phone mock */
.cx-phone {
  width: 220px; max-width: 100%; aspect-ratio: 9 / 19.5;
  background: #0a0a0a; border-radius: 34px; padding: 7px;
  position: relative; flex: 0 0 auto;
}
.cx-phone__scr {
  width: 100%; height: 100%; border-radius: 28px; overflow: hidden;
  background: #fff; position: relative; display: flex; flex-direction: column;
}
.cx-phone__notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 36%; height: 20px; background: #0a0a0a; border-radius: 0 0 12px 12px; z-index: 6;
}

/* Closing */
.cx-closing { text-align: center; padding-block: clamp(64px, 10vw, 120px); position: relative; z-index: 1; }
.cx-closing h2 {
  color: var(--cx-heading); font-weight: 700;
  font-size: clamp(36px, 6vw, 64px); letter-spacing: -.02em; margin: 0;
}
.cx-closing p { margin: 16px auto 0; max-width: 560px; color: var(--fg-2); font-size: 16px; line-height: 1.55; }
/* ---------- BepsaMap case extras ---------- */
.bm-wide { width: 100%; border-radius: 16px; display: block; margin-top: 14px; }
.bm-quote { font-size: 18px; line-height: 1.5; color: var(--fg); font-style: italic;
  margin: 10px 0 0; border-left: 3px solid var(--cx-blue); padding-left: 16px; }
.bm-quote-by { font-size: 13px; color: var(--fg-2); margin-top: 12px; font-weight: 600; }
.bm-ph { display: flex; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--cx-card-bd); border-radius: 16px; color: var(--fg-2);
  font-size: 12px; padding: 12px; background: rgba(0,0,0,.015); box-sizing: border-box; }
.bm-ph span { opacity: .75; font-family: ui-monospace, monospace; }
.bm-ph--shot { flex: 0 0 auto; width: 150px; height: clamp(220px, 30vw, 300px); }
.bm-ph--wide { width: 100%; min-height: 240px; margin-top: 14px; }
.bm-ph--hero { width: 100%; min-height: clamp(280px, 40vw, 520px); }

.cx-socials { display: flex; gap: 16px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.cx-social {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; background: var(--cx-panel);
  font-weight: 600; font-size: 14px; color: var(--fg);
}
.cx-back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px;
  font-size: 14px; font-weight: 500; color: var(--fg-2); cursor: pointer;
}
.cx-back:hover { color: var(--fg); }

/* ---------- Accessibility: focus, skip link, FAQ button, touch targets ---------- */
:where(a, button, [role="link"], [tabindex]):focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}
.project-card:focus-visible { outline: none; }
.project-card:focus-visible .project-tile {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}
.wordmark { color: inherit; text-decoration: none; border-radius: 8px; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 1000;
  padding: 13px 18px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

.faq-row { flex-wrap: wrap; cursor: default; padding: 0; }
.faq-row .a { margin-top: -8px; padding-bottom: 22px; }
.faq-q {
  display: flex; flex: 1 1 100%;
  justify-content: space-between; align-items: center; gap: 12px;
  margin: 0; padding: 22px 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer; border-radius: 6px;
}

/* Touch targets ≥ 44px on touch-sized screens */
@media (max-width: 720px) {
  .theme-toggle, .menu-btn { width: 44px; height: 44px; }
  .footer .icon-btn { width: 44px; height: 44px; }
  .footer .icon-btn svg { width: 16px; height: 16px; }
}
body[data-sim="mobile"] .theme-toggle,
body[data-sim="mobile"] .menu-btn,
body[data-sim="mobile"] .footer .icon-btn { width: 44px; height: 44px; }

/* ---------- Page changes (View Transitions): quick fade out, soft rise in ---------- */
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out 160ms cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 340ms cubic-bezier(0, 0, 0.38, 0.9) both; }
::view-transition-group(site-header) { animation: none; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
