/* ============ Alma Interiores ============ */
:root {
  --cream: #F6F2EC;
  --sand: #EAE2D6;
  --sand-2: #DDD2C2;
  --ink: #24231F;
  --muted: #6E6A62;
  --green: #8A5236;        /* canela del logo (color principal) */
  --green-dark: #6C3F29;
  --tint: #F1E6DC;          /* fondo suave del color principal */
  --sage: #7F8F6E;          /* verde salvia de las hojas */
  --tan: #A98468;           /* "Interiores" del logo */
  --line: rgba(36, 35, 31, .12);
  --f-display: 'Fraunces', Georgia, serif;
  --f-script: 'Allura', 'Brush Script MT', cursive;
  --f-body: 'Jost', system-ui, -apple-system, Segoe UI, sans-serif;
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.05rem/1.7 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--cream); padding: 8px 14px; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 400; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.8rem, 7vw, 6rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
h3 { font-size: 1.4rem; }
em { font-style: italic; color: var(--green); }
p { margin: 0; }
.eyebrow { font: 500 .78rem/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--green); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 28px; border-radius: 999px; border: 1px solid transparent; font: 500 .95rem/1 var(--f-body); text-decoration: none; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s, transform .2s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-dark { background: var(--green); color: #fff; }
.btn-dark:hover { background: var(--green-dark); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-outline-light { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* ---------- Espacios para fotos (mientras no haya imagen) ---------- */
.ph { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--sand), var(--sand-2)); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.missing img { display: none; }
.ph.missing::after {
  content: attr(data-ph); position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  font: 500 .78rem/1.4 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: rgba(36, 35, 31, .45);
  background-image: repeating-linear-gradient(135deg, transparent 0 22px, rgba(255, 255, 255, .25) 22px 23px);
}

/* ---------- Barra de demostración ---------- */
.demo-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; padding: 9px 16px; background: #0C0B0E; color: #D9D2C4; font-size: .8rem; text-align: center; }
.demo-bar b { color: #E2B34E; }
.demo-bar a { color: #E2B34E; font-weight: 600; text-underline-offset: 3px; }
.demo-bar .demo-brand { text-decoration: none; }
.footer .credit a { text-decoration: none; }

/* ---------- Navegación ---------- */
.nav-bar { position: sticky; top: 0; z-index: 40; background: rgba(246, 242, 236, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.logo { display: inline-grid; text-decoration: none; line-height: 1; }
.logo b { font: 400 2.5rem/.8 var(--f-script); color: var(--green); letter-spacing: 0; }
.logo span { font: 400 .78rem/1 var(--f-display); letter-spacing: .32em; color: var(--tan); margin: 2px 0 0 18px; }
.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: .95rem; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta { color: #fff; padding: 12px 22px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; margin: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(88vh, 860px); display: grid; align-items: end; color: #fff; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media::before { content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(28, 20, 14, .78) 0%, rgba(28, 20, 14, .55) 38%, rgba(28, 20, 14, .1) 70%, transparent 100%),
    linear-gradient(180deg, transparent 55%, rgba(28, 20, 14, .45) 100%); }
.hero h1, .hero p { text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
@media (max-width: 760px) { .hero-media::before { background: linear-gradient(180deg, rgba(28, 20, 14, .35) 0%, rgba(28, 20, 14, .55) 45%, rgba(28, 20, 14, .85) 100%); } }
.hero-media.missing { background: linear-gradient(135deg, #9C7A5F, #5E6B52); }
.hero-media.missing::after { color: rgba(255, 255, 255, .5); z-index: 2; place-items: start end; }
.hero-content { padding: 120px 0 72px; display: grid; gap: 22px; max-width: 760px; margin-left: max(24px, (100% - var(--max)) / 2); }
.hero .eyebrow { color: #EADFCF; }
.hero h1 em { color: #E7D7BE; }
.hero p { font-size: 1.15rem; max-width: 52ch; color: rgba(255, 255, 255, .88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }

.pillars { background: var(--ink); color: var(--cream); padding: 0; }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.pillars-grid div { padding: 30px 28px; display: grid; gap: 2px; }
.pillars-grid div + div { border-left: 1px solid rgba(246, 242, 236, .14); }
.pillars-grid b { font: 400 1.3rem/1.2 var(--f-display); }
.pillars-grid span { font-size: .9rem; color: rgba(246, 242, 236, .65); }

/* ---------- Secciones ---------- */
section { padding: clamp(80px, 10vw, 130px) 0; }
.section-head { display: grid; gap: 18px; margin-bottom: 56px; max-width: 720px; }
.section-head.split { max-width: none; grid-template-columns: 1fr auto; align-items: end; gap: 28px; }

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { padding: 34px 28px; border-radius: 22px; background: #fff; border: 1px solid var(--line); display: grid; gap: 14px; align-content: start; transition: transform .3s, box-shadow .3s; }
.service:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(36, 35, 31, .35); }
.service .icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--green); }
.service .icon svg { width: 26px; height: 26px; }
.service p { color: var(--muted); font-size: .97rem; }

/* ---------- Proyectos ---------- */
.projects { background: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: transparent; padding: 9px 18px; border-radius: 999px; font-size: .9rem; cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 280px; grid-auto-flow: dense; gap: 18px; }
.work { margin: 0; position: relative; border-radius: 18px; overflow: hidden; }
.work.tall { grid-row: span 2; }
.work.full { grid-column: 1 / -1; }
.work.full img { object-position: center 60%; }
.work[hidden] { display: none; }
.work > button { display: block; width: 100%; height: 100%; border: 0; padding: 0; cursor: zoom-in; }
.work img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.work:hover img { transform: scale(1.05); }
.work figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 18px; display: grid; color: #fff; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(20, 18, 15, .7)); }
.work figcaption b { font: 400 1.2rem/1.2 var(--f-display); }
.work figcaption span { font-size: .85rem; opacity: .85; }
.work .ph.missing + figcaption { background: linear-gradient(180deg, transparent, rgba(36, 35, 31, .55)); }

/* ---------- Estudio y equipo ---------- */
.studio { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.studio-media { aspect-ratio: 4 / 5; border-radius: 200px 200px 22px 22px; }
.studio-copy { display: grid; gap: 22px; }
.studio-copy > p { color: var(--muted); font-size: 1.08rem; }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 12px; }
.team figure { margin: 0; display: grid; gap: 12px; }
.avatar { aspect-ratio: 1; border-radius: 50%; }
.avatar.missing::after { font-size: .6rem; }
.team figcaption { display: grid; text-align: center; }
.team b { font: 400 1.1rem/1.3 var(--f-display); }
.team span { font-size: .85rem; color: var(--muted); }

/* ---------- Proceso ---------- */
.process { background: var(--sand); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { display: grid; gap: 10px; padding-top: 24px; border-top: 1px solid rgba(36, 35, 31, .3); }
.steps span { font: italic 400 1.1rem/1 var(--f-display); color: var(--green); }
.steps p { color: var(--muted); font-size: .97rem; }

/* ---------- Visítanos ---------- */
.visit { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: stretch; }
.visit-info { display: grid; gap: 22px; align-content: start; }
.visit-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.visit-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.visit-list li > svg { flex: none; width: 24px; height: 24px; color: var(--sage); margin-top: 2px; }
.visit-list div { display: grid; gap: 2px; flex: 1; }
.visit-list small { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.visit-list a { text-decoration: none; font-weight: 500; }
.visit-list a:hover { color: var(--green); }
.open-now { font-style: normal; letter-spacing: .04em; text-transform: none; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; }
.open-now.is-open { background: #E6EBDF; color: #56663F; }
.open-now.is-closed { background: #F1E3DF; color: #9A4A3A; }
.hours { border-collapse: collapse; margin-top: 4px; font-size: .95rem; }
.hours td { padding: 3px 0; }
.hours td:first-child { padding-right: 28px; color: var(--muted); }
.hours tr.today td { color: var(--ink); font-weight: 600; }
.map { border-radius: 22px; overflow: hidden; min-height: 380px; background: var(--sand); border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; filter: grayscale(.35) sepia(.12); }

/* ---------- Contacto ---------- */
.contact { background: var(--green); color: #fff; }
.contact .eyebrow { color: #EBD6C6; }
.contact em { color: #E7D7BE; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact-copy { display: grid; gap: 20px; }
.contact-copy p { color: rgba(255, 255, 255, .8); font-size: 1.08rem; }
.form { background: var(--cream); color: var(--ink); border-radius: 24px; padding: clamp(26px, 4vw, 42px); display: grid; gap: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .86rem; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .97rem; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(138, 82, 54, .14); }
.field.invalid input, .field.invalid textarea { border-color: #B5523F; }
.field-error { display: none; font-size: .8rem; color: #B5523F; }
.field.invalid .field-error { display: block; }
.form .btn { width: 100%; margin-top: 4px; }
.form-msg { display: none; padding: 12px; border-radius: 12px; background: var(--tint); color: var(--green); text-align: center; font-size: .92rem; }
.form-msg.show { display: block; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: rgba(246, 242, 236, .7); padding: 56px 0 40px; }
.footer { display: grid; gap: 14px; justify-items: center; text-align: center; font-size: .9rem; }
.footer .logo { justify-items: center; }
.footer .logo b { color: #D9B89C; }
.footer .logo span { color: #C7AE98; margin-left: 0; }
.footer .credit { font-size: .8rem; color: rgba(246, 242, 236, .5); }
.footer .credit b { color: #E2B34E; }

/* ---------- WhatsApp flotante ---------- */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45); transition: transform .2s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Volver arriba (encima del botón de WhatsApp) ---------- */
.to-top { position: fixed; right: 27px; bottom: 94px; z-index: 50; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--cream); color: var(--green); cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 24px -12px rgba(36, 35, 31, .5);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s, visibility .3s, background-color .2s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green); color: #fff; }
.to-top svg { width: 20px; height: 20px; }
@media (max-width: 760px) { .to-top { right: 19px; bottom: 82px; width: 46px; height: 46px; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ---------- Galería ampliada ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(16, 15, 13, .94); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; gap: 14px; justify-items: center; }
.lightbox img { max-height: 78vh; width: auto; border-radius: 10px; }
.lightbox figcaption { color: var(--cream); text-align: center; font-family: var(--f-display); font-size: 1.2rem; }
.lightbox button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.lightbox button svg { width: 22px; height: 22px; }
.lb-close { position: absolute; top: 20px; right: 20px; }

/* ---------- Aparición ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .work img, .service { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .studio, .visit, .contact-grid { grid-template-columns: 1fr; }
  .studio-media { max-width: 460px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .section-head.split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .nav-toggle { display: grid; }
  .nav-links { position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--cream); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 0; font-size: 1.05rem; }
  .nav-links .nav-cta { margin-top: 8px; padding: 14px; }
  .hero-content { padding: 90px 0 48px; margin-left: 16px; margin-right: 16px; }
  .pillars-grid, .services, .row, .steps { grid-template-columns: 1fr; }
  .pillars-grid div + div { border-left: 0; border-top: 1px solid rgba(246, 242, 236, .14); }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .work.tall { grid-row: span 1; }
  .team { gap: 12px; }
  .team b { font-size: .95rem; }
  .lightbox { grid-template-columns: 44px 1fr 44px; padding: 12px; }
  .lightbox button { width: 40px; height: 40px; }
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
}
