/* MA Estudio — estilos base
   Sistema visual tomado del prototipo Wix: azul #0057FF, lima #D6FE3D, gris #F5F5F5
   Tipografías: Questrial (texto), Syne (títulos de ficha), Sora (wordmark) */

:root {
  --blue: #0057ff;
  --blue-ink: #0046cc;
  --lime: #d6fe3d;
  --soft: #f5f5f5;
  --white: #ffffff;
  --ink: #0b0b0f;
  --line: rgba(0, 87, 255, .35);
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 3.2vw, 46px);
  --max: 1440px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --f-text: "Questrial", system-ui, sans-serif;
  --f-display: "Syne", "Questrial", sans-serif;
  --f-mark: "Sora", "Questrial", sans-serif;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-text);
  color: var(--blue);
  background: var(--white);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: clamp(16px, 1.6vw, 24px); margin: 0 0 .4em; }
.arrow { display: inline-block; transition: transform .5s var(--ease); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 16px 0 auto; z-index: 50;
  transition: transform .6s var(--ease);
}
.site-header.is-hidden { transform: translateY(-140%); }
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--soft); border-radius: var(--radius-sm);
  padding: 14px 22px 14px 26px; margin: 0 var(--gutter);
  max-width: calc(var(--max) - 2 * var(--gutter));
  transition: box-shadow .4s var(--ease), background .4s;
}
@media (min-width: 1440px) { .site-header .bar { margin: 0 auto; } }
.site-header.is-scrolled .bar { box-shadow: 0 10px 40px rgba(0, 40, 120, .12); background: rgba(245, 245, 245, .92); backdrop-filter: blur(10px); }
.logo { display: block; width: 72px; color: var(--blue); }
.logo svg { width: 100%; height: auto; display: block; }
.nav { display: flex; gap: clamp(20px, 3.4vw, 50px); font-size: 15px; }
.nav a { position: relative; padding: 4px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { opacity: .55; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--blue); color: var(--white); border-radius: 999px;
  padding: 9px 18px; font-size: 15px; position: relative; overflow: hidden;
  transition: transform .4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: translateY(101%); transition: transform .5s var(--ease); border-radius: inherit;
}
.btn > * , .btn { z-index: 0; }
.btn span { position: relative; z-index: 1; }
.btn:hover::before { transform: translateY(0); }
.btn--lg { padding: 14px 28px; font-size: 17px; min-width: 260px; }

.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 16px; height: 1.5px; background: currentColor; margin: 0 auto; position: relative; transition: transform .4s var(--ease);
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -5px; } .menu-toggle span::after { top: 5px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav, .site-header .bar > .btn { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .site-header .bar { padding: 10px 10px 10px 20px; }
  .logo { width: 58px; }
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: var(--blue); color: #fff;
  display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 120px var(--gutter) 40px;
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); pointer-events: none;
}
.menu-open .mobile-menu { clip-path: inset(0 0 0 0); pointer-events: auto; }
.mobile-menu a { font-size: clamp(40px, 12vw, 64px); line-height: 1.05; }
.mobile-menu .small { margin-top: 32px; font-size: 16px; opacity: .85; }

/* ---------- Hero home ---------- */
.hero { padding: clamp(150px, 20vw, 260px) 0 clamp(40px, 5vw, 64px); }
.hero h1 {
  font-weight: 400; margin: 0; letter-spacing: -.02em;
  font-size: clamp(48px, 7.6vw, 118px); line-height: 1.1;
}
.hero .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.hero .to-work { font-size: clamp(20px, 2.4vw, 34px); display: inline-flex; gap: 14px; align-items: center; }
.hero .to-work:hover .arrow { transform: translateY(6px); }

/* split text reveal */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.split.is-in .w > span { transform: none; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: var(--soft); aspect-ratio: auto; min-height: 260px; isolation: isolate;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.tile:hover img { transform: scale(1.045); }
.tile .tag {
  position: absolute; left: 18px; bottom: 18px; z-index: 2;
  background: var(--white); color: var(--blue); border-radius: 999px; padding: 7px 14px; font-size: 14px;
  transform: translateY(14px); opacity: 0; transition: transform .5s var(--ease), opacity .4s;
}
.tile:hover .tag, .tile:focus-visible .tag { transform: none; opacity: 1; }
.t-a { grid-column: span 4; height: clamp(300px, 35vw, 500px); }
.t-b { grid-column: span 8; height: clamp(300px, 35vw, 500px); }
.t-c { grid-column: span 8; height: clamp(300px, 35vw, 500px); }
.t-d { grid-column: span 4; height: clamp(300px, 35vw, 500px); }
.t-e { grid-column: span 12; height: clamp(300px, 38vw, 540px); }
.t-f { grid-column: span 4; height: clamp(300px, 35vw, 500px); }
.t-g { grid-column: span 8; height: clamp(300px, 35vw, 500px); }
.tile.contain img { object-fit: contain; padding: 4%; }
@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr; }
  .bento > * { grid-column: auto !important; height: 72vw !important; min-height: 0; }
  .tile .tag { opacity: 1; transform: none; }
}

/* ---------- Big statement / process ---------- */
.section { padding: clamp(80px, 11vw, 160px) 0; }
.statement { font-size: clamp(32px, 5vw, 76px); line-height: 1.1; letter-spacing: -.015em; margin: 0; max-width: 18ch; }
.statement .muted { opacity: .35; transition: opacity .3s; }

.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(40px, 6vw, 80px); }
.step {
  border: 1px solid var(--blue); border-radius: var(--radius); padding: 30px 32px 34px; min-height: 280px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  transition: background .6s var(--ease), color .6s var(--ease), border-color .6s;
}
.step .n { font-size: 15px; }
.step h3 { font-weight: 400; font-size: clamp(28px, 3vw, 40px); margin: 0 0 14px; }
.step p { margin: 0; font-size: 16px; max-width: 34ch; }
.step:hover, .step.is-active { background: var(--lime); border-color: var(--lime); color: var(--ink); }
@media (max-width: 860px) { .process { grid-template-columns: 1fr; } .step { min-height: 0; } }

/* ---------- Marquee ---------- */
.marquee { background: var(--blue); color: #fff; overflow: hidden; padding: 38px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: clamp(48px, 7vw, 110px); padding-right: clamp(48px, 7vw, 110px); }
.marquee img { height: 34px; width: auto; max-width: 150px; object-fit: contain; opacity: .95; transition: opacity .3s, transform .4s var(--ease); }
.marquee img:hover { opacity: 1; transform: scale(1.08); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.contact h2 { font-weight: 400; font-size: clamp(44px, 5.4vw, 80px); line-height: 1.04; margin: 0; letter-spacing: -.015em; }
.contact .lead { font-size: 18px; margin: 0 0 14px; }
.contact-data { margin-top: 48px; font-size: 15px; line-height: 1.7; }
.contact-data a:hover { text-decoration: underline; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 34px; }
.field { position: relative; display: flex; flex-direction: column; gap: 10px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); border: 0; border-bottom: 1px solid var(--blue); background: transparent;
  padding: 8px 0; border-radius: 0; outline: none; transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 80px; }
.field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.field:focus-within::after { transform: scaleX(1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; border: 1px solid var(--blue); border-radius: 999px; padding: 7px 14px; font-size: 14px; cursor: pointer;
  transition: background .3s, color .3s;
}
.chip input:checked + span { background: var(--blue); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.form-msg { font-size: 14px; }
.form.is-sent { opacity: .4; pointer-events: none; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue); color: #fff; padding: 56px 0 30px; overflow: hidden; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.foot-cols h4 { font-weight: 400; font-size: 18px; margin: 0 0 18px; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.9; }
.foot-cols a { position: relative; }
.foot-cols a:hover { text-decoration: underline; }
.wordmark-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: clamp(80px, 12vw, 180px); }
.wordmark {
  font-family: var(--f-mark); font-weight: 700; letter-spacing: -.035em; line-height: .78;
  font-size: clamp(64px, 15.5vw, 238px); margin: 0; white-space: nowrap;
}
.wordmark .ch { display: inline-block; transform: translateY(40%); opacity: 0; transition: transform 1s var(--ease), opacity .8s; }
.wordmark.is-in .ch { transform: none; opacity: 1; }
.copy { font-size: 13px; white-space: nowrap; padding-bottom: 6px; }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr 1fr; } .wordmark-row { flex-direction: column; align-items: flex-start; } }

/* ---------- Page titles ---------- */
.page-head { padding: clamp(150px, 17vw, 230px) 0 clamp(36px, 5vw, 60px); }
.page-head h1 {
  font-weight: 400; margin: 0; font-size: clamp(56px, 8vw, 120px); line-height: 1; letter-spacing: -.02em;
  display: flex; align-items: center; gap: .3em;
}
.page-head h1 svg { width: .45em; height: auto; }

/* ---------- Work list ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; }
.filters button {
  border: 1px solid var(--blue); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--blue);
  transition: background .3s, color .3s;
}
.filters button[aria-pressed="true"], .filters button:hover { background: var(--blue); color: #fff; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px 44px; }
.card { display: block; }
.card .media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 13; background: var(--soft); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .media img { transform: scale(1.05); }
.card h3 { font-weight: 400; font-size: clamp(22px, 2vw, 28px); margin: 22px 0 6px; }
.card .meta { font-size: 14px; opacity: .8; }
.card.is-hidden { display: none; }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; gap: 44px; } }

/* custom cursor */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none;
  width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%;
  background: var(--lime); color: var(--ink); display: grid; place-items: center; font-size: 15px;
  transform: translate3d(-200px, -200px, 0) scale(0); transition: scale .35s var(--ease);
}
.cursor.is-on { scale: 1; }
.cursor .lbl { scale: 1; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- Project single ---------- */
.p-hero { background: var(--blue); color: #fff; padding: clamp(170px, 20vw, 300px) 0 clamp(40px, 5vw, 70px); }
.p-hero h1 {
  font-family: var(--f-display); font-weight: 400; margin: 0; letter-spacing: -.03em;
  font-size: clamp(56px, 10.5vw, 160px); line-height: .95;
}
.p-body { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 100px); padding: clamp(60px, 8vw, 110px) 0 60px; }
.p-aside { position: sticky; top: 130px; align-self: start; font-size: 15px; line-height: 1.6; }
.p-aside dl { margin: 0; display: grid; gap: 26px; }
.p-aside dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; margin-bottom: 4px; }
.p-aside dd { margin: 0; }
.p-aside .desc { margin-top: 34px; max-width: 46ch; }
.p-main h2 { font-weight: 400; font-size: clamp(40px, 4.6vw, 68px); margin: 0 0 18px; line-height: 1; }
.p-main .block + .block { margin-top: clamp(50px, 7vw, 90px); }
.p-main p, .p-main li { font-size: 16px; max-width: 64ch; }
.p-main ul { padding-left: 1.1em; }
.gallery { display: grid; gap: 40px; margin-top: clamp(60px, 8vw, 110px); }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.gallery img { width: 100%; height: auto; }
.pending { border: 1px dashed var(--blue); border-radius: 10px; padding: 14px 16px; background: rgba(0, 87, 255, .04); }
.pending b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.p-nav { border-top: 1px solid var(--blue); display: flex; justify-content: space-between; gap: 20px; padding: 26px 0 0; margin-top: 70px; }
.p-nav a { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.p-nav a strong { font-weight: 400; font-size: clamp(26px, 3vw, 44px); }
.p-nav a:last-child { text-align: right; align-items: flex-end; }
.p-nav a:hover strong { text-decoration: underline; text-underline-offset: 6px; }
@media (max-width: 860px) { .p-body { grid-template-columns: 1fr; } .p-aside { position: static; } }

/* ---------- About ---------- */
.about-intro .split { font-size: clamp(28px, 3.6vw, 54px); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .7em; max-width: 26ch; }
.label { display: inline-flex; gap: 10px; align-items: center; font-size: 17px; }
.split-row { display: grid; grid-template-columns: 2fr 10fr; gap: 30px; }
@media (max-width: 860px) { .split-row { grid-template-columns: 1fr; } }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.member { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--soft); }
.member .ph { position: relative; aspect-ratio: 3 / 4; }
.member .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
.member .ph img + img { opacity: 0; }
.member:hover .ph img + img { opacity: 1; }
.member:hover .ph img { transform: scale(1.03); }
.member .info { background: var(--blue); color: #fff; padding: 18px 22px; border-radius: var(--radius-sm); margin-top: -12px; position: relative; font-size: 17px; line-height: 1.45; }
.member .info a { text-decoration: underline; }
.member.placeholder .ph { display: grid; place-items: center; color: var(--blue); }
@media (max-width: 860px) { .team { grid-template-columns: 1fr; } }

.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--blue); }
.service { border-bottom: 1px solid var(--blue); }
.service button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  padding: 30px 0; text-align: left; color: var(--blue);
}
.service h3 { font-weight: 400; font-size: clamp(26px, 3vw, 42px); margin: 0; transition: transform .5s var(--ease); }
.service button:hover h3 { transform: translateX(10px); }
.service .plus { width: 34px; height: 34px; border: 1px solid var(--blue); border-radius: 50%; position: relative; transition: transform .5s var(--ease), background .3s; }
.service .plus::before, .service .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1px; background: currentColor; translate: -50% -50%; }
.service .plus::after { rotate: 90deg; }
.service.is-open .plus { transform: rotate(45deg); background: var(--blue); color: #fff; }
.service .panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.service.is-open .panel { grid-template-rows: 1fr; }
.service .panel > div { overflow: hidden; }
.service .panel-in { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 0 0 34px; font-size: 16px; }
.service .panel-in ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.service .panel-in li { border: 1px solid var(--blue); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
@media (max-width: 760px) { .service .panel-in { grid-template-columns: 1fr; } }

.cook { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cook .box { border: 1px solid var(--blue); border-radius: var(--radius); padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 340px; }
.cook .box h2 { font-weight: 400; font-size: clamp(38px, 4vw, 60px); line-height: 1.02; margin: 0; }
.cook .box p { font-size: 18px; margin: 0; max-width: 42ch; }
.cook .media { border-radius: var(--radius); overflow: hidden; grid-row: span 2; background: var(--soft); min-height: 420px; }
.cook .media img { width: 100%; height: 100%; object-fit: cover; }
.slider { background: var(--lime); color: var(--ink); border-radius: var(--radius); padding: clamp(28px, 3vw, 40px); min-height: 300px; display: flex; flex-direction: column; gap: 30px; }
.slider .top { display: flex; justify-content: space-between; align-items: center; }
.slider h3 { font-weight: 400; font-size: clamp(30px, 3vw, 44px); margin: 0; }
.slider .ctrls { display: flex; gap: 8px; }
.slider .ctrls button { width: 36px; height: 36px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; transition: background .3s, color .3s; }
.slider .ctrls button:hover { background: var(--ink); color: var(--lime); }
.slider .count { font-size: 14px; }
.slider .slides { position: relative; flex: 1; }
.slider .slide { position: absolute; inset: 0; opacity: 0; transform: translateY(12px); transition: opacity .5s, transform .6s var(--ease); font-size: 16px; line-height: 1.6; max-width: 54ch; margin: 0; }
.slider .slide.is-active { opacity: 1; transform: none; position: relative; }
@media (max-width: 860px) { .cook { grid-template-columns: 1fr; } .cook .media { grid-row: auto; min-height: 300px; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-img { clip-path: inset(12% 0 0 0 round var(--radius)); transition: clip-path 1.3s var(--ease); }
.reveal-img.is-in { clip-path: inset(0 0 0 0 round var(--radius)); }

/* ---------- Floating CTA ---------- */
.float-cta {
  position: fixed; right: var(--gutter); bottom: 24px; z-index: 40;
  transform: translateY(160%); transition: transform .6s var(--ease);
}
.float-cta.is-on { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .split .w > span, .wordmark .ch { opacity: 1 !important; transform: none !important; }
  .reveal-img { clip-path: none !important; }
}
