/* =========================================================
   JREINA Interiors — hoja de estilos
   ========================================================= */
:root {
  --bg: #f7f5f3;
  --fg: #1c1a17;
  --muted: #66615b; /* contraste 5,6:1 sobre el fondo (WCAG AA) */
  --border: #e3e0dc;
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --pad-x: 1.5rem;
}
@media (min-width: 768px) { :root { --pad-x: 3rem; } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
body.no-scroll { overflow: hidden; }

/* ---------- Utilidades ---------- */
.center { text-align: center; }
.mb-6 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.pt-4 { padding-top: 1rem; }
@media (min-width: 768px) { .mb-6 { margin-bottom: 1.5rem; } }

.ratio-1-1, .ratio-3-4, .ratio-4-3, .ratio-4-5, .ratio-16-9 { width: 100%; object-fit: cover; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-16-9 { aspect-ratio: 16 / 9; }

.container-4xl { max-width: 56rem; margin-inline: auto; }
.container-3xl { max-width: 48rem; margin-inline: auto; }
.container-3xl-left { max-width: 48rem; }
.container-2xl { max-width: 42rem; }

/* ---------- Tipografía ---------- */
.label {
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-weight: 400;
  font-family: var(--font-body);
  color: var(--muted);
}
.label--sm { letter-spacing: .2em; margin-bottom: .5rem; }
.label--head { margin-bottom: 1rem; }
.label--lg { margin-bottom: 2rem; }
.label--xl { margin-bottom: 3rem; }
.label--info { margin-bottom: .5rem; }
.label--modal { margin-bottom: .75rem; }
@media (min-width: 768px) { .label--xl { margin-bottom: 4rem; } }

.meta { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }

.page-title, .display-xl, .display-lg, .display-md {
  font-family: var(--font-heading);
  font-weight: 300;
  letter-spacing: .025em;
}
.page-title { font-size: 2.25rem; line-height: 1.1; max-width: 48rem; }
.display-xl { font-size: 1.875rem; line-height: 1.25; }
.display-lg { font-size: 1.875rem; line-height: 1.2; }
.display-md { font-size: 1.875rem; line-height: 1.2; }
@media (min-width: 768px) {
  .page-title { font-size: 3.75rem; line-height: 1; }
  .display-xl { font-size: 3rem; }
  .display-lg { font-size: 3rem; line-height: 1; }
  .display-md { font-size: 2.25rem; line-height: 1.1; }
}
@media (min-width: 1024px) {
  .page-title { font-size: 4.5rem; }
  .display-xl { font-size: 3.75rem; }
}

.lead, .body-text {
  font-size: .875rem;
  font-weight: 300;
  line-height: 1.625;
  color: var(--muted);
}
.lead { margin: 2rem auto 0; max-width: 42rem; }
@media (min-width: 768px) {
  .lead { font-size: 1rem; margin-top: 3rem; }
  .body-text { font-size: 1rem; }
}
.small-text { font-size: .75rem; font-weight: 300; line-height: 1.625; color: var(--muted); }
@media (min-width: 768px) { .small-text { font-size: .875rem; } }

/* ---------- Botones / enlaces ---------- */
.link-underline {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  border-bottom: 1px solid var(--fg); padding-bottom: .25rem;
  transition: opacity .3s;
}
.link-underline:hover { opacity: .6; }
.btn-outline {
  display: inline-block;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  border: 1px solid var(--fg); padding: 1rem 2.5rem;
  transition: background-color .5s, color .5s;
}
.btn-outline:hover { background: var(--fg); color: var(--bg); }
.btn-solid {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fg); color: var(--bg);
  font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  padding: 1.25rem 2.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  transition: background-color .5s, opacity .3s;
}
.btn-solid:hover { background: rgba(28,26,23,.9); }
.btn-solid:disabled { opacity: .5; pointer-events: none; }

/* ---------- Navegación ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background-color .5s, box-shadow .5s;
}
.site-nav.is-scrolled { background: rgba(247,245,243,.7); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem var(--pad-x); }
.nav-logo img { height: 5rem; width: auto; mix-blend-mode: multiply; }
@media (min-width: 768px) { .nav-logo img { height: 6rem; } }

.nav-links { display: none; align-items: center; gap: 2.5rem; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-link {
  font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); transition: color .3s;
}
.nav-link:hover, .nav-link.is-active { color: var(--fg); }
.nav-link.is-active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

.lang-switch { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }
.lang-btn { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: .25rem; transition: color .3s; }
.lang-btn:hover, .lang-btn.is-active { color: var(--fg); }
.lang-btn.is-active { text-decoration: underline; text-underline-offset: 4px; }
.lang-sep { font-size: 10px; color: var(--muted); }
.mobile-menu .lang-btn, .mobile-menu .lang-sep { color: #cfcac4; }
.mobile-menu .lang-btn.is-active { color: var(--bg); }

.menu-toggle { display: block; }
@media (min-width: 768px) { .menu-toggle { display: none; } }

.mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  background: var(--fg); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu[hidden], .project-modal[hidden] { display: none; }
.mobile-close { position: absolute; top: 1.5rem; right: 1.5rem; color: var(--bg); }
.mobile-links { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.mobile-link, .mobile-lang {
  opacity: 0; transform: translateY(20px);
  transition: opacity .4s, transform .4s; transition-delay: calc(var(--i) * .08s);
}
.mobile-link { font-family: var(--font-heading); font-size: 1.875rem; letter-spacing: .1em; text-transform: uppercase; }
.mobile-menu.is-open .mobile-link, .mobile-menu.is-open .mobile-lang { opacity: 1; transform: none; }
.mobile-lang .lang-switch { margin: 1rem 0 0; gap: 1rem; }
.mobile-lang .lang-btn { font-size: 13px; }

/* ---------- Animaciones ---------- */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.25,.1,.25,1), transform .9s cubic-bezier(.25,.1,.25,1); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.anim-in { opacity: 0; transform: var(--from); animation: animIn 1.2s cubic-bezier(.25,.1,.25,1) var(--d, 0s) forwards; }
@keyframes animIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .anim-in { opacity: 1; transform: none; transition: none; animation: none; }
}


/* ---------- Grid 12 columnas ---------- */
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; }
.grid-12 > * { grid-column: span 12; }
@media (min-width: 768px) {
  .grid-12 { gap: 3rem; }
  .grid-12 > .col-4 { grid-column: span 4; }
  .grid-12 > .col-5 { grid-column: span 5; }
  .grid-12 > .col-6 { grid-column: span 6; }
  .grid-12 > .start-2 { grid-column: 2 / span 5; }
  .grid-12 > .start-7.col-5 { grid-column: 7 / span 5; }
  .grid-12 > .start-7.col-6 { grid-column: 7 / span 6; }
  .grid-12 > .start-8 { grid-column: 8 / span 5; }
  .grid-12--contact { gap: 4rem; }
}
.grid-12--contact { gap: 3rem; }
.flex-center-col { display: flex; flex-direction: column; justify-content: center; }
.flex-center { display: flex; align-items: center; }
.order-1 { order: 1; } .order-2 { order: 2; }
@media (min-width: 768px) { .order-1 { order: 2; } .order-2 { order: 1; } }

/* ---------- Secciones ---------- */
.page-head { padding: 7rem var(--pad-x) 3rem; display: flex; align-items: flex-end; }
@media (min-width: 768px) { .page-head { padding-top: 8rem; } }
body[data-page="proyectos"] .page-head { padding-bottom: 2.5rem; }

.section-pad { padding: 0 var(--pad-x) 6rem; }
@media (min-width: 768px) { .section-pad { padding-bottom: 10rem; } .section-pad--sm { padding-bottom: 8rem; } }

/* Hero */
.hero { min-height: 100vh; position: relative; display: flex; align-items: center; overflow: hidden; }
.hero-grid {
  width: 100%; min-height: 100vh;
  padding: 6rem var(--pad-x) 3rem;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; align-items: center;
}
.hero-a { grid-column: 1 / span 5; grid-row: 1; align-self: start; margin-top: 6rem; }
.hero-b { grid-column: 1 / span 12; grid-row: 2; }
.hero-c { grid-column: 6 / span 7; grid-row: 1; align-self: end; margin-bottom: 3rem; }
@media (min-width: 768px) {
  .hero-grid { padding: 0 var(--pad-x); gap: 1.5rem; }
  .hero-a { grid-column: 1 / span 3; margin-top: 8rem; }
  .hero-b { grid-column: 4 / span 5; grid-row: 1; }
  .hero-c { grid-column: 10 / span 3; margin-bottom: 6rem; }
}

.philosophy { padding: 6rem var(--pad-x); }
@media (min-width: 768px) { .philosophy { padding-block: 10rem; } }

.selected { padding: 0 var(--pad-x) 6rem; }
@media (min-width: 768px) { .selected { padding-bottom: 10rem; } }
.home-projects { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.home-projects > * { grid-column: span 12; }
.hp-3 { margin-top: 2rem; }
@media (min-width: 768px) {
  .home-projects { gap: 2rem; }
  .hp-1 { grid-column: 1 / span 7; }
  .hp-2 { grid-column: 9 / span 4; margin-top: 6rem; }
  .hp-3 { grid-column: 2 / span 5; margin-top: 4rem; }
}
.see-all { margin-top: 4rem; }
@media (min-width: 768px) { .see-all { margin-top: 6rem; } }

.cta { padding: 6rem var(--pad-x); border-top: 1px solid var(--border); }
@media (min-width: 768px) { .cta { padding-block: 10rem; } .cta--services { padding-block: 8rem; } }
.cta-text { font-size: .875rem; font-weight: 300; color: var(--muted); margin: 1.5rem 0 2.5rem; }

/* Tarjetas */
.card { display: block; width: 100%; text-align: left; }
.card-media { display: block; overflow: hidden; }
.zoom { transition: transform .7s; }
.card:hover .zoom { transform: scale(1.05); }
.card-body { display: block; margin-top: 1rem; }
@media (min-width: 768px) { .card-body { margin-top: 1.5rem; } }
.card-body--split { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card-title { display: block; font-family: var(--font-heading); font-size: 1.25rem; font-weight: 400; letter-spacing: .05em; line-height: 1.4; }
@media (min-width: 768px) { .card-title { font-size: 1.5rem; } }
.meta--type { letter-spacing: .15em; display: none; margin: 0; text-align: right; }
@media (min-width: 768px) { .meta--type { display: block; } }

.projects-grid { display: grid; grid-template-columns: 1fr; column-gap: 2rem; row-gap: 4rem; }
@media (min-width: 768px) { .projects-grid { grid-template-columns: 1fr 1fr; } }

/* Estudio */
.swap-img { position: relative; overflow: hidden; }
.swap-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s; }
.swap-img .swap-b { opacity: 0; }
.swap-img:hover .swap-a { opacity: 0; }
.swap-img:hover .swap-b { opacity: 1; }
.quote { border-left: 2px solid rgba(28,26,23,.3); padding-left: 1.5rem; }
.quote p { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 300; font-style: italic; line-height: 1.625; letter-spacing: .025em; color: #3e3a35; }
@media (min-width: 768px) { .quote p { font-size: 1.25rem; } }
.value { margin-bottom: 2rem; }
.value-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 400; letter-spacing: .05em; margin-bottom: .5rem; }
@media (min-width: 768px) { .value-title { font-size: 1.5rem; } }

/* Servicios */
.service { border-top: 1px solid var(--border); padding: 3rem 0; display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .service { padding: 4rem 0; flex-direction: row; align-items: flex-start; gap: 4rem; } }
.service-num { font-size: 10px; letter-spacing: .3em; color: var(--muted); }
.service-body { flex: 1; }
.service-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 400; letter-spacing: .05em; margin-bottom: 1rem; transition: transform .5s; }
.service:hover .service-title { transform: translateX(.5rem); }
@media (min-width: 768px) { .service-title { font-size: 1.875rem; } }
.service-text { font-size: .875rem; font-weight: 300; color: var(--muted); line-height: 1.625; max-width: 36rem; }
.rule { border-top: 1px solid var(--border); }
.step { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; }
.step-num { font-size: 10px; letter-spacing: .1em; color: var(--muted); margin-top: .25rem; width: 2rem; flex-shrink: 0; }
.step-title { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 400; letter-spacing: .05em; margin-bottom: .25rem; }
.step-text { font-size: .75rem; font-weight: 300; color: var(--muted); line-height: 1.625; }

/* Contacto */
.info-list > * + * { margin-top: 2rem; }
.info-link { font-size: .875rem; transition: opacity .3s; }
.info-link:hover { opacity: .6; }
.info-muted { font-size: .875rem; color: var(--muted); }
.info-social { display: flex; gap: 1.5rem; }
.contact-form > * + * { margin-top: 2rem; }
.field label { display: block; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.field input, .field textarea {
  display: block; width: 100%;
  background: transparent; border: 0; border-bottom: 1px solid #8c8780; /* 3:1 contraste de componentes */ border-radius: 0;
  padding: .75rem 0; font: inherit; font-size: .875rem; color: var(--fg);
  outline: none; transition: border-color .3s; resize: none;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--fg); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .75rem; color: var(--muted); }
.field-error { font-size: .75rem; color: #a3281b; margin-top: .5rem; }
.field-error:empty { display: none; }
.field.has-error input, .field.has-error textarea { border-bottom-color: #a3281b; }

/* Modal de proyecto */
.project-modal {
  position: fixed; inset: 0; z-index: 200; background: var(--bg); overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.project-modal.is-open { opacity: 1; visibility: visible; }
.modal-bar {
  position: sticky; top: 0; z-index: 10; background: var(--bg);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--pad-x); border-bottom: 1px solid var(--border);
}
.modal-back { display: flex; align-items: center; gap: .5rem; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); transition: color .3s; }
.modal-x { color: var(--muted); transition: color .3s; }
.modal-x svg { width: 20px; height: 20px; }
.modal-back:hover, .modal-x:hover { color: var(--fg); }
.modal-content { padding: 3rem var(--pad-x); }
@media (min-width: 768px) { .modal-content { padding-block: 4rem; } }
.modal-head { margin-bottom: 3rem; }
@media (min-width: 768px) { .modal-head { margin-bottom: 4rem; } }
.modal-title-row { display: flex; flex-direction: column; gap: .5rem; }
.modal-title-row .meta { margin: 0; }
.meta--plain { margin-top: 0; }
@media (min-width: 768px) { .modal-title-row { flex-direction: row; align-items: baseline; justify-content: space-between; } }
.modal-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .modal-gallery { gap: 1.5rem; margin-bottom: 4rem; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { padding: 3rem var(--pad-x); }
@media (min-width: 768px) { .footer-inner { padding-block: 4rem; } }
.footer-top { display: flex; flex-direction: column; gap: 3rem; justify-content: space-between; align-items: flex-start; }
@media (min-width: 768px) { .footer-top { flex-direction: row; } }
.footer-logo { height: 5rem; width: auto; }
.footer-col { display: flex; flex-direction: column; gap: .75rem; }
.footer-col .label { margin-bottom: .5rem; }
.footer-link, .footer-text { font-size: .75rem; letter-spacing: .05em; color: var(--muted); transition: color .3s; }
.footer-link:hover { color: var(--fg); }
.footer-kit { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.footer-kit img { width: 100%; max-width: 48rem; }
.footer-bottom { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 1rem; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }
.footer-copy { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.footer-social { display: flex; gap: 1.5rem; }
.footer-social a { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); transition: color .3s; }
.footer-social a:hover { color: var(--fg); }

/* Toast */
.toast {
  position: fixed; z-index: 300; right: 1rem; bottom: 1rem; left: 1rem;
  max-width: 420px; margin-left: auto;
  background: var(--bg); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding: 1.25rem 1.5rem;
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .4s, transform .4s;
}
.toast.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.toast-title { font-size: .875rem; font-weight: 500; }
.toast-desc { font-size: .875rem; color: var(--muted); margin-top: .25rem; }

/* ---------- Accesibilidad ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--fg); color: var(--bg); padding: .75rem 1.25rem;
  font-size: .8125rem; letter-spacing: .05em;
}
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.mobile-menu :focus-visible { outline-color: var(--bg); }
h1, h2, h3 { font-weight: inherit; }
