:root {
  --bg: #F7F5F0;
  --cobalt: #1B365D;
  --ivory: #F7F5F0;
  --mist: #EAEFF4;
  --ink: #141C24;
  --muted: #556270;
  --line: #D8DEE6;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --top: 64px;
  --bot: 44px;
  --ease: 200ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { line-height: 1.5; }
p { text-align: left; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

.app { display: flex; flex-direction: column; min-height: 100vh; }

/* Topbar */
.topbar { height: var(--top); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1.5rem, 3vw, 3rem); border-bottom: 1px solid var(--line); background: var(--bg); }
.logo { font-family: var(--serif); font-size: 1.9rem; letter-spacing: .06em; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: .4rem; }
.nav__btn { padding: .55rem 1.1rem; font-size: .88rem; font-weight: 500; color: var(--muted); border-radius: 999px; transition: background var(--ease), color var(--ease); white-space: nowrap; }
.nav__btn span { font-size: .72rem; opacity: .65; margin-right: .2rem; }
.nav__btn:hover { background: var(--mist); color: var(--ink); }
.nav__btn.is-active { background: var(--cobalt); color: var(--ivory); }

/* Shared */
.stage { flex: 1; min-height: 0; }
.view { height: 100%; }
.view.is-active { animation: in .3s ease; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .14em; color: var(--muted); margin-bottom: 1.25rem; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 42ch; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.04; letter-spacing: -.01em; }
h1 em, h2 em, h3 em { font-style: italic; }

.btn { display: inline-block; padding: .95rem 1.8rem; font-size: .92rem; font-weight: 600; border-radius: 999px; border: 1px solid transparent; transition: background var(--ease), color var(--ease), transform var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn--light { background: var(--ivory); color: var(--cobalt); }
.btn--light:hover { background: #fff; }
.btn--dark { background: var(--cobalt); color: var(--ivory); }
.btn--dark:hover { background: #12274a; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; height: 100%; }
.hero__text { background: var(--cobalt); color: var(--ivory); padding: clamp(2rem, 6vw, 6rem); display: flex; flex-direction: column; justify-content: center; gap: 1.75rem; align-items: flex-start; }
.hero__text .eyebrow { color: rgba(247,245,240,.7); margin: 0; }
.hero__text h1 { font-size: clamp(2.8rem, 5.2vw, 5.2rem); max-width: 13ch; }
.hero__text .lead { color: rgba(247,245,240,.82); }
.hero__media { overflow: hidden; background: var(--mist); }

/* Cases */
.cases { display: flex; flex-direction: column; height: 100%; }
.strip { display: flex; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity; border-bottom: 1px solid var(--line); background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.strip__btn { flex: 0 0 auto; scroll-snap-align: start; padding: 1.1rem 1.6rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; color: var(--muted); border-bottom: 3px solid transparent; transition: color var(--ease), background var(--ease); white-space: nowrap; }
.strip__btn:hover { color: var(--ink); background: var(--mist); }
.strip__btn.is-active { background: var(--cobalt); color: var(--ivory); }
.case { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.1fr .9fr; }
.case__media { overflow: hidden; background: var(--mist); }
.case__media img { transition: opacity .25s ease; }
.case__info { padding: clamp(2rem, 5vw, 5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; background: var(--bg); }
.case__top { display: flex; flex-direction: column; gap: 1.25rem; }
.tag { align-self: flex-start; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .4rem .85rem; background: var(--mist); color: var(--cobalt); border-radius: 999px; }
.case__info h3 { font-size: clamp(2.4rem, 4vw, 4rem); }
.impact { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2vw, 1.9rem); color: var(--cobalt); line-height: 1.2; }
.label { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }
.summary { color: var(--muted); max-width: 44ch; }

/* Services */
.services { height: 100%; display: grid; grid-template-columns: .8fr 1.2fr; }
.services h2 { line-height: 1.08; font-size: clamp(2.4rem, 4.2vw, 4.2rem); padding: clamp(2rem, 5vw, 5rem); background: var(--mist); display: flex; align-items: center; max-width: none; }
.acc { display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(1.5rem, 4vw, 4rem); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__item:first-child { border-top: 1px solid var(--line); }
.acc__head { width: 100%; display: flex; align-items: center; gap: 1.25rem; padding: 1.7rem 0; text-align: left; }
.acc__num { font-size: .85rem; font-weight: 600; color: var(--muted); min-width: 2.2rem; }
.acc__name { flex: 1; font-family: var(--serif); font-size: clamp(1.4rem, 2.1vw, 2rem); line-height: 1.15; transition: color var(--ease); }
.acc__head:hover .acc__name, .is-open .acc__name { color: var(--cobalt); }
.acc__icon { position: relative; width: 14px; height: 14px; flex: none; }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; background: var(--cobalt); left: 0; top: 6px; width: 14px; height: 2px; transition: transform var(--ease); }
.acc__icon::after { transform: rotate(90deg); }
.is-open .acc__icon::after { transform: rotate(0); }
.acc__panel { padding: 0 0 1.8rem 3.45rem; display: flex; flex-direction: column; gap: 1.1rem; }
.acc__panel p.acc__long { color: var(--ink); font-size: .92rem; max-width: 52ch; }
.acc__panel p { color: var(--muted); max-width: 46ch; }
.acc__panel ul { display: flex; flex-wrap: wrap; gap: .5rem; }
.acc__panel li { font-size: .82rem; font-weight: 500; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--mist); color: var(--cobalt); }

/* Contact */
.contact { height: 100%; display: grid; grid-template-columns: .8fr 1.2fr; }
.contact__side { background: var(--cobalt); color: var(--ivory); padding: clamp(2rem, 5vw, 5rem); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.contact__side .eyebrow { color: rgba(247,245,240,.7); margin: 0; }
.contact__side h2 { font-size: clamp(2.4rem, 4vw, 4rem); }
.contact__side .lead { color: rgba(247,245,240,.82); }
.contact__body { padding: clamp(1.5rem, 3vw, 3.5rem) clamp(1.5rem, 4vw, 4.5rem); display: flex; flex-direction: column; justify-content: center; }
form { display: flex; flex-direction: column; gap: 1.05rem; max-width: 640px; }
fieldset { border: 0; }
legend, label { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .6rem 1.1rem; font-size: .86rem; font-weight: 500; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); transition: all var(--ease); }
.chip:hover { border-color: var(--cobalt); }
.chip.is-on { background: var(--cobalt); color: var(--ivory); border-color: var(--cobalt); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field input, .field textarea { width: 100%; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; transition: border-color var(--ease); }
.field textarea { resize: none; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); }
.field .bad { border-color: #B3402F; }
.err { display: block; min-height: 1rem; margin-top: .25rem; font-size: .76rem; color: #B3402F; }
.done { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.done h3 { font-size: clamp(2.2rem, 3.5vw, 3.4rem); }
.done em { color: var(--cobalt); }

/* Footer */
.footer { height: var(--bot); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1.5rem, 3vw, 3rem); border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); background: var(--bg); }
.footer a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.footer a:hover { color: var(--cobalt); }

/* Desktop: 100vh sin scroll largo */
@media (min-width: 900px) {
  html, body { height: 100vh; overflow: hidden; }
  .app { height: 100vh; overflow: hidden; }
  .stage { overflow: hidden; }
  .acc__panel { padding-right: 1rem; }
}

/* Móvil: altura fluida, compacto estilo app */
@media (max-width: 899px) {
  html, body { min-height: 100vh; overflow-y: auto; }
  .app { min-height: 100vh; }
  .topbar { height: auto; flex-direction: row; flex-wrap: wrap; gap: .3rem .5rem; padding: .45rem .75rem; align-items: center; position: sticky; top: 0; z-index: 10; }
  .logo { font-size: 1.3rem; }
  .nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: .2rem; width: 100%; }
  .nav__btn { padding: .4rem .1rem; font-size: .74rem; text-align: center; }
  .nav__btn span { display: none; }
  .hero, .case, .services, .contact { grid-template-columns: 1fr; height: auto; }
  .hero__text { padding: 1.5rem 1.25rem; gap: 1rem; }
  .hero__text h1 { font-size: 2.4rem; }
  .hero__media { height: 220px; }
  .case__media { height: 220px; }
  .strip__btn { padding: .7rem 1.1rem; }
  .case__info { padding: 1.25rem; gap: 1rem; }
  .case__top { gap: .7rem; }
  .case__info h3 { font-size: 2.2rem; }
  .services h2 { padding: 1.25rem; font-size: 2.2rem; }
  .acc { padding: .5rem 1.25rem 1.25rem; }
  .acc__head { padding: 1rem 0; }
  .acc__panel { padding: 0 0 1rem; gap: .7rem; }
  .contact__side { padding: 1.5rem 1.25rem; gap: .8rem; }
  .contact__side h2 { font-size: 2.2rem; }
  .contact__body { padding: 1.25rem; }
  form { gap: .6rem; }
  .row { grid-template-columns: 1fr; gap: .6rem; }
  legend, label { margin-bottom: .3rem; }
  .field input, .field textarea { padding: .6rem .85rem; }
  .err { min-height: .6rem; margin-top: .1rem; }
  .footer { height: auto; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .55rem 1rem; }
}
