/* ===========================================================
   MO2 — Estudio de Arquitectura (Constanza Ibañez)
   Sistema de diseño: fondos blancos, texto negro, celeste en detalles
   =========================================================== */

:root {
  --arena-50:    #FFFFFF;  /* fondo principal: blanco */
  --arena-100:   #F3F6F9;  /* fondo alterno: blanco azulado muy sutil */
  --concreto-200:#E3E4F2;  /* azul MO2 muy claro (placeholders, hovers) */
  --concreto-300:#B4B7DC;  /* azul MO2 medio */
  --concreto-400:#7A7FB8;  /* azul MO2 más saturado, uso puntual */
  --grafito-500: #53585E;  /* gris oscuro, texto secundario */
  --grafito-600: #33373C;
  --grafito-700: #1E2124;
  --grafito-900: #0E0F11;  /* negro para texto y elementos fuertes */
  --bronce-500:  #3B4084;  /* azul MO2 (del logo) — acento principal */
  --bronce-600:  #2A2D63;  /* azul MO2 oscuro — hover */

  --bg:        var(--arena-50);
  --bg-alt:    var(--arena-100);
  --surface:   #FFFFFF;
  --ink:       var(--grafito-900);
  --ink-soft:  var(--grafito-500);
  --line:      rgba(14, 15, 17, 0.12);
  --accent:    var(--bronce-500);
  --accent-ink:#FFFFFF;

  --font-display: "Bricolage Grotesque", "Outfit", sans-serif;
  --font-body:    "Outfit", sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 96px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, .ph { display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

section, .site-footer {
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: var(--header-h);
}

/* ---------- Cursor adaptativo (celeste como detalle) ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease);
  will-change: transform;
}
.cursor.is-link {
  width: 56px; height: 56px;
  background: var(--ink);
}
.cursor.is-link::after {
  content: "Ver";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #FFFFFF;
  font-family: var(--font-body);
  opacity: 0;
  transition: opacity .2s ease;
}
.cursor.is-link.is-view::after { content: "Ver"; opacity: 1; }
@media (hover: none), (max-width: 860px) {
  .cursor { display: none; }
}

/* ---------- Placeholders de imagen ---------- */
.ph {
  position: relative;
  width: 100%; height: 100%;
  background:
    linear-gradient(135deg, rgba(59,64,132,0.08) 25%, transparent 25%) 0 0/24px 24px,
    linear-gradient(315deg, rgba(59,64,132,0.08) 25%, transparent 25%) 0 0/24px 24px,
    linear-gradient(135deg, var(--concreto-200), var(--arena-100));
  background-color: var(--concreto-200);
  overflow: hidden;
}
.ph img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}
.ph.is-loaded img { display: block; }
.ph.is-loaded::before,
.ph.is-loaded::after { display: none; }
.ph::before {
  content: attr(data-label);
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--grafito-600);
  text-align: center;
  width: 80%;
  opacity: .7;
}
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(14,15,17,.08);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================== HEADER =========================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), padding .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  padding-top: 14px; padding-bottom: 14px;
  box-shadow: 0 8px 24px rgba(14,15,17,.05);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand img { height: 52px; width: 52px; border-radius: 8px; display: block; }
.main-nav {
  display: flex;
  gap: 36px;
  font-size: 14px;
  letter-spacing: .02em;
}
.main-nav a { opacity: .75; transition: opacity .2s, color .2s; }
.main-nav a:hover { opacity: 1; color: var(--accent); }
.nav-cta {
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}
.nav-toggle span {
  height: 1.5px;
  background: currentColor;
  width: 100%;
}
.mobile-nav {
  position: fixed;
  top: 0; right: -100%;
  width: min(80vw, 340px);
  height: 100%;
  background: #FFFFFF;
  color: var(--ink);
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 100px 40px;
  font-size: 22px;
  font-family: var(--font-display);
  box-shadow: -12px 0 40px rgba(14,15,17,.1);
  transition: right .4s var(--ease);
}
.mobile-nav a:hover { color: var(--accent); }
.mobile-nav.is-open { right: 0; }

@media (max-width: 860px) {
  .main-nav, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* =========================== HERO (fotos a los costados) =========================== */
.hero {
  background: var(--bg);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 120px var(--gutter) 60px;
}
.hero-logo-large {
  width: clamp(200px, 20vw, 300px);
  height: auto;
  margin-bottom: 4px;
}
@media (max-width: 960px) {
  .hero-logo-large { width: clamp(160px, 34vw, 220px); }
}
.hero-tagline {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 420px;
}
.hero-signature {
  font-size: 13px;
  letter-spacing: .05em;
  color: var(--grafito-500);
  padding-top: 6px;
  border-top: 1px solid var(--line);
  max-width: 240px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.hero-cta:hover { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }

.hero-photos {
  position: relative;
  overflow: hidden;
  height: 100%;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide .ph {
  width: 100%; height: 100%;
  background: var(--bg);
}
.hero-slide .ph img { object-fit: contain; }
.hero-slide.is-active .ph {
  animation: heroZoom 7s var(--ease) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.1); }
  to   { transform: scale(1); }
}
.hero-dots {
  position: absolute;
  left: 24px; bottom: 24px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 22px; height: 3px;
  background: rgba(14,15,17,.2);
  transition: background .3s ease;
}
.hero-dots button.is-active { background: var(--accent); }

@media (max-width: 960px) {
  .hero-inner { display: flex; flex-direction: column; grid-template-columns: none; min-height: 100vh; }
  .hero-copy { padding: 96px var(--gutter) 20px; gap: 16px; flex: 0 0 auto; }
  .hero-photos { flex: 1 1 auto; min-height: 280px; height: auto; }
}

/* =========================== SECTION HEAD =========================== */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 0 var(--gutter);
  margin-bottom: 36px;
}
.section-num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: .04em;
}
.section-head h2 {
  font-size: clamp(32px, 4vw, 48px);
}

/* =========================== GALERÍA =========================== */
.obras { padding: 90px 0 100px; }

.filters {
  display: flex;
  gap: 10px;
  padding: 0 var(--gutter);
  margin-bottom: 36px;
}
.filter-pill {
  font-size: 13px;
  letter-spacing: .03em;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.filter-pill:hover { border-color: var(--accent); color: var(--ink); }
.filter-pill.is-active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: 4px;
  padding: 0 var(--gutter);
}
.gallery-item {
  position: relative;
  grid-column: span 2;
  grid-row: span 1;
  overflow: hidden;
  cursor: none;
}
.gallery-item.is-large { grid-column: span 2; grid-row: span 2; }
.gallery-item.is-wide  { grid-column: span 4; grid-row: span 2; }
.gallery-item.is-hidden { display: none; }

.gallery-img { width: 100%; height: 100%; transition: transform .7s var(--ease); }
.gallery-item:hover .gallery-img { transform: scale(1.05); }

.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #FFFFFF;
  background: linear-gradient(0deg, rgba(14,15,17,.78) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }
.gallery-caption span { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.gallery-caption small { font-size: 12px; opacity: .85; letter-spacing: .03em; color: var(--concreto-300); }

@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-item, .gallery-item.is-large, .gallery-item.is-wide { grid-column: span 2; grid-row: span 1; }
  .gallery-caption { opacity: 1; transform: none; }
}

/* =========================== ESTUDIO / SOBRE MO2 =========================== */
.estudio {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 0;
  min-height: 640px;
}
.estudio-text {
  padding: 60px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  background: var(--bg-alt);
}
.estudio-text h2 { font-size: clamp(26px, 3.4vw, 42px); }
.estudio-text > p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); max-width: 480px; }
.estudio-text > p.estudio-subtitle {
  font-size: 13px;
  letter-spacing: .01em;
  color: var(--grafito-500);
}
.estudio-subtitle a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.estudio-subtitle a:hover { color: var(--bronce-600); }

.estudio-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 0;
  margin: 2px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.estudio-point h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3px;
}
.estudio-point p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 440px;
}

.estudio-quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

@media (max-width: 680px) {
  .estudio { grid-template-columns: 0.9fr 1.1fr; min-height: auto; }
  .estudio-img { aspect-ratio: 3/4; }
  .estudio-text { padding: 28px 16px; gap: 12px; }
  .estudio-text h2 { font-size: 22px; }
  .estudio-text > p { font-size: 13px; line-height: 1.55; }
  .estudio-points { gap: 12px; padding: 12px 0; }
  .estudio-point h3 { font-size: 13px; }
  .estudio-point p { font-size: 12px; }
  .estudio-quote { font-size: 14px; padding-left: 12px; }
}
@media (max-width: 420px) {
  .estudio-point:nth-child(n+3) { display: none; }
}

/* =========================== CONTACTO =========================== */
.contacto { padding: 60px 0 100px; }
.contacto-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  padding: 0 var(--gutter);
  align-items: start;
}

.cotizar-form, .reservar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 52px;
}
.cotizar-form h3, .reservar-card h3 {
  font-size: 28px;
  margin-bottom: 10px;
}
.form-sub {
  color: var(--grafito-500);
  font-size: 15.5px;
  margin-bottom: 32px;
}
.cotizar-form label,
.reservar-card label {
  display: block;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  letter-spacing: .01em;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cotizar-form input,
.cotizar-form select,
.cotizar-form textarea,
.reservar-card input {
  width: 100%;
  margin-top: 10px;
  padding: 15px 18px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color .2s ease;
}
.cotizar-form input:focus,
.cotizar-form select:focus,
.cotizar-form textarea:focus,
.reservar-card input:focus {
  outline: none;
  border-color: var(--accent);
}
.reservar-card .calendar-mock { margin-bottom: 24px; }
.btn-primary {
  margin-top: 10px;
  width: 100%;
  padding: 19px 24px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 15px;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background .2s ease;
}
.btn-primary:hover { background: var(--accent); }
.form-status {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--accent);
  min-height: 18px;
}

.email-fallback {
  margin-top: 12px;
  padding: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.email-fallback p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.email-fallback textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  resize: vertical;
  margin-bottom: 12px;
}
.btn-secondary {
  padding: 11px 20px;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 4px;
  transition: background .2s ease, color .2s ease;
}
.btn-secondary:hover { background: var(--ink); color: #FFFFFF; }
.btn-secondary.is-copied { border-color: var(--accent); color: var(--accent); }

/* --- Calendario mock --- */
.calendar-mock {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.calendar-mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--bg-alt);
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 600;
}
.cal-nav {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  border-radius: 50%;
  transition: background .2s ease;
}
.cal-nav:hover { background: var(--concreto-200); }
.calendar-mock-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 20px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  border-radius: 50%;
  color: var(--ink-soft);
}
.cal-day.is-label { font-size: 12.5px; color: var(--grafito-500); text-transform: uppercase; }
.cal-day.is-available { cursor: pointer; color: var(--ink); }
.cal-day.is-available:hover { background: var(--concreto-200); color: var(--accent); }
.cal-day.is-selected { background: var(--accent); color: #FFFFFF; }
.cal-day.is-disabled { opacity: .25; }
.calendar-slots {
  padding: 20px 22px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.calendar-slots-hint { font-size: 14.5px; color: var(--grafito-500); }
.slot-btn {
  font-size: 14.5px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: all .2s ease;
}
.slot-btn:hover { border-color: var(--accent); color: var(--accent); }
.slot-btn.is-selected { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.calendar-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--grafito-500);
}

@media (max-width: 900px) {
  .contacto-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cotizar-form, .reservar-card { padding: 30px 22px; }
}

/* =========================== FOOTER =========================== */
.site-footer {
  background: var(--bg-alt);
  color: var(--ink);
  padding: 60px var(--gutter) 30px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--accent);
}
.footer-links { display: flex; gap: 28px; font-size: 14px; color: var(--ink-soft); }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 12px;
  color: var(--grafito-500);
  flex-wrap: wrap;
  gap: 8px;
}

/* =========================== LIGHTBOX =========================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14,15,17,.95);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-img { width: 100%; height: 100%; max-width: 1100px; }
.lightbox-close {
  position: absolute;
  top: 28px; right: var(--gutter);
  color: #FFFFFF;
  font-size: 20px;
}
.lightbox-close:hover { color: var(--accent); }

@media (max-width: 640px) {
  .lightbox { padding: 24px; }
}
