/* ===== Marca Monarda ===== */
:root {
  --verde: #157c67;
  --arena: #dcaf8e;
  --rosa: #dcaca8;
  --terracota: #bf855c;
  --musgo: #12332b;
  --papel: #f5f1ea;

  --ink: var(--musgo);
  --paper: var(--papel);
  --muted: #5d6f66;                 /* musgo aclarado para texto secundario */
  --line: rgba(18, 51, 43, 0.15);
  --sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* gutters */
.nav, .hero, .block, .site-footer { padding-inline: clamp(1.25rem, 6vw, 6rem); }

/* Etiquetas (Light, mayúsculas, verde) */
.label {
  font-weight: 300;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verde);
}

/* Títulos (Bold) */
h1, h2, h3 {
  font-weight: 700;
  color: var(--musgo);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 92px; }
.brand { display: flex; align-items: center; }
.brand img { height: 54px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a,
.nav-contact {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--musgo);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-contact:hover { color: var(--verde); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 0.4rem 0; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--musgo); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding-top: clamp(4rem, 13vw, 10rem);
  padding-bottom: clamp(4rem, 11vw, 8rem);
}
.hero-leaf {
  position: absolute;
  top: clamp(3.5rem, 11vw, 8rem);
  right: clamp(1.25rem, 6vw, 6rem);
  width: clamp(80px, 13vw, 170px);
  height: auto;
  opacity: 0.9;
  pointer-events: none;
}
.hero-title {
  font-size: clamp(2.1rem, 5.4vw, 4.4rem);
  margin: 1.4rem 0 1.6rem;
  max-width: 16ch;
}
.hero-intro {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-cta {
  display: inline-block;
  margin-top: 2rem;
  background: none;
  border: 1px solid var(--verde);
  color: var(--verde);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hero-cta:hover { background: var(--verde); color: var(--papel); }

/* ===== Bloques ===== */
.block {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-top: clamp(2.8rem, 7vw, 5rem);
  padding-bottom: clamp(2.8rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
}
.block > .label { padding-top: 0.35rem; }
.block-body { max-width: 820px; }

/* Lista de servicios */
.list { list-style: none; }
.list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}
.list li:last-child { border-bottom: 1px solid var(--line); }
.list h3 { font-size: 1.2rem; font-weight: 700; }
.list p { color: var(--muted); font-size: 0.98rem; text-align: right; }

/* ===== Imagen grande del inicio + galería ===== */
.hero-media { margin-top: clamp(2rem, 5vw, 3.5rem); }
.hero-media .slot { aspect-ratio: 16 / 9; }
@media (min-width: 900px) { .hero-media .slot { aspect-ratio: 21 / 9; } }

.slot {
  position: relative;
  overflow: hidden;
  background: var(--rosa);
}
.slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.3s ease;
}
.slot img.show { opacity: 1; }
.hero-media .slot img.show { animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }

.work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
}
.work .slot { aspect-ratio: 4 / 3; }
.note { margin-top: 1.6rem; font-size: 0.82rem; color: var(--muted); font-weight: 300; }

/* ===== Email grande (modal) ===== */
.mail {
  display: inline-block;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--verde);
  border-bottom: 1px solid var(--verde);
  padding-bottom: 2px;
  word-break: break-word;
  transition: opacity 0.2s;
}
.mail:hover { opacity: 0.6; }

/* Meta (definición) */
.meta { margin-top: 1.4rem; }
.meta > div {
  display: flex;
  gap: 1.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
}
.meta > div:last-child { border-bottom: 1px solid var(--line); }
.meta dt { flex: 0 0 110px; color: var(--muted); font-weight: 300; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; padding-top: 0.2rem; }
.meta dd a:hover { color: var(--verde); }

/* ===== Formulario ===== */
.form { margin-top: 1.8rem; display: grid; gap: 1.1rem; }
.form input, .form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  resize: vertical;
}
.form ::placeholder { color: var(--muted); }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--verde); }
.form button[type=submit] {
  justify-self: start;
  background: var(--verde);
  color: var(--papel);
  border: 1px solid var(--verde);
  padding: 0.7rem 1.7rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.form button[type=submit]:hover { background: transparent; color: var(--verde); }
.form button[type=submit]:disabled { opacity: 0.5; cursor: default; }
.feedback { font-size: 0.9rem; color: var(--muted); min-height: 1.2em; }

/* ===== Footer (par Verde + Papel) ===== */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 2.4rem;
  padding-bottom: 2.4rem;
  background: var(--verde);
  color: var(--papel);
}
.brand-footer img { height: 30px; width: auto; }
.footer-right { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.footer-ig {
  display: inline-flex;
  color: var(--papel);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.footer-ig:hover { opacity: 1; }
.footer-contact {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--papel);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.footer-contact:hover { opacity: 1; }
.footer-copy { font-size: 0.82rem; font-weight: 300; opacity: 0.85; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 51, 43, 0.5);
  animation: modal-fade 0.25s ease;
}
.modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 2.5rem));
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: var(--papel);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  animation: modal-pop 0.25s ease;
}
.modal-leaf { height: 46px; width: auto; margin-bottom: 1.2rem; }
.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  background: none;
  border: 0;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.modal-close:hover { color: var(--musgo); }
.modal-panel h2 { margin: 0.3rem 0 1.4rem; }
.modal-panel .mail { margin-bottom: 0.4rem; }
body.modal-open { overflow: hidden; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .nav { height: 64px; }
  .brand img { height: 38px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: calc(64px + env(safe-area-inset-top, 0px)); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.3rem;
    background: var(--paper);
    padding: 1.6rem clamp(1.25rem, 6vw, 6rem);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a, .nav-contact { font-size: 1rem; text-align: left; }

  .hero { padding-top: clamp(2.2rem, 9vw, 3.5rem); }
  .hero-title { font-size: clamp(2rem, 9vw, 2.8rem); }
  .hero-leaf { display: none; }
  .block { grid-template-columns: 1fr; gap: 1.2rem; }
  .work { grid-template-columns: repeat(2, 1fr); }
  .list li { flex-direction: column; gap: 0.2rem; }
  .list p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media .slot img.show { animation: none; }
  .slot img { transition: opacity 0.4s ease; }
  .modal-backdrop, .modal-panel { animation: none; }
  html { scroll-behavior: auto; }
}
