/* Melanie Schlachter Peña · Lino direction, with Esquinas, Piedra, Índice and Carta borrowed for sections. */

:root {
  --cream: #fbf8ee;
  --sand: #efe6d6;
  --clay: #76220b;
  --ink: #2b2420;
  --muted: #6b5f56;
  --line: #d9cdb9;
  --olive: #3e4939;
  --dusk: #f2d1b3;

  --display: "Italiana", "Didot", "Bodoni 72", serif;
  --didot: "GFS Didot", "Didot", "Bodoni 72", serif; /* the logo's face: for mid sizes, where Italiana gets too thin */
  --text: "Work Sans", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--cream); padding: 10px 14px; z-index: 20; }
.skip:focus { top: 12px; }

.display { font: 400 clamp(40px, 6vw, 76px)/1.02 var(--display); letter-spacing: -.005em; color: var(--olive); }

mark.tbd { background: #fff1a8; color: var(--ink); padding: 0 .2em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 22px; border-radius: 999px;
  font: 500 15px/1.2 var(--text); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-wa { background: var(--clay); color: var(--cream); border: 1px solid var(--clay); }
.btn-wa:hover { background: #5e1a08; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 16px; }
.btn-line { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--cream); }
.i-wa { width: 18px; height: 18px; flex: none; }
.link { font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* Header: the top two corners */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--clay); white-space: nowrap; }
.logo img { height: 40px; width: auto; }
.logo span { font: 400 24px/1 var(--didot); letter-spacing: .01em; }
.top .sections { margin-left: auto; }
.langs ul { display: flex; gap: 4px; font-size: 13px; letter-spacing: .04em; }
.langs a { display: inline-block; padding: 6px 6px; color: var(--muted); text-decoration: none; }
.langs a:hover { color: var(--ink); }
.langs a[aria-current] { color: var(--clay); text-decoration: underline; text-underline-offset: 5px; }
.top .sections ul { display: flex; gap: 28px; font-size: 15px; }
.top .sections a { text-decoration: none; color: var(--muted); }
.top .sections a:hover { color: var(--ink); }

/* Menu for phones and tablets: sections and languages behind one button (a plain <details>, works without JS) */
.menu { display: none; margin-left: auto; }
.menu summary {
  display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
  cursor: pointer; list-style: none; color: var(--ink);
}
.menu summary::-webkit-details-marker { display: none; }
.burger { position: relative; width: 22px; height: 9px; border-top: 1.5px solid; border-bottom: 1.5px solid; transition: border-color .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; right: 0; top: 2.5px; border-top: 1.5px solid currentColor; opacity: 0; transition: transform .25s, opacity .2s; }
.menu[open] .burger { border-color: transparent; }
.menu[open] .burger::before { opacity: 1; transform: rotate(45deg); }
.menu[open] .burger::after { opacity: 1; transform: rotate(-45deg); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  padding: 8px var(--gutter) 28px; background: var(--cream);
  border-bottom: 1px solid var(--line); box-shadow: 0 24px 32px -24px rgba(43, 36, 32, .25);
}
.menu-sections a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font: 400 28px/1.15 var(--didot); text-decoration: none; }
.menu-langs { display: flex; gap: 24px; margin-top: 22px; font-size: 15px; }
.menu-langs a { display: inline-block; padding: 6px 0; color: var(--muted); text-decoration: none; }
.menu-langs a[aria-current] { color: var(--clay); text-decoration: underline; text-underline-offset: 5px; }

/* The meridian: a line with one point per section */
.meridian { display: none; }

/* Hero: Lino's arch, with Esquinas' corners */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px);
  align-items: end;
  min-height: calc(100svh - 120px);
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(32px, 5vw, 56px);
  max-width: var(--max); margin: 0 auto;
  position: relative;
}
.hero h1 {
  font: 400 clamp(52px, 7.6vw, 112px)/.96 var(--display);
  letter-spacing: -.01em; color: var(--clay);
  max-width: 11ch; text-wrap: balance;
}
.lede { margin: 28px 0 32px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 36ch; }
.arch { position: relative; aspect-ratio: 4 / 5.6; max-height: 76svh; justify-self: end; width: 100%; max-width: 480px; }
.arch img {
  width: 100%; height: 100%; object-fit: cover; object-position: 44% center;
  border-radius: 999px 999px 0 0;
}
.corner {
  position: absolute; right: var(--gutter); bottom: 8px; transform: translateY(100%);
  font-size: 13px; line-height: 1.6; color: var(--muted); text-align: right;
}

/* Cuerpo y emoción */
.cuerpo {
  background: var(--sand);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 96px);
  padding: clamp(72px, 10vw, 140px) max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  margin-top: 56px;
}
.statement { font: 400 clamp(30px, 3.8vw, 50px)/1.18 var(--didot); color: var(--olive); }
.cuerpo-body p { max-width: 46ch; }
.symptoms { margin: 24px 0 28px; border-top: 1px solid var(--line); }
.symptoms li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.quiet { color: var(--muted); }

/* Método: Piedra's two photos */
.metodo {
  display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(40px, 7vw, 112px); align-items: start;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(80px, 11vw, 160px) var(--gutter);
}
.metodo-photos { position: relative; padding-bottom: 22%; position: sticky; top: 96px; }
.ph-main { width: 82%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% center; filter: saturate(.8); }
.ph-small {
  position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1; object-fit: cover;
  border: 10px solid var(--cream); filter: saturate(.8);
}
.metodo-text h2 { margin-bottom: 36px; max-width: 10ch; }
.metodo-text p { max-width: 54ch; }
.metodo-text p + p { margin-top: 1.1em; }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 48px; border-top: 1px solid var(--line); }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-right: 16px; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { font: 400 23px/1.25 var(--didot); margin-top: 2px; }


/* Motivos: Índice */
.motivos { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(80px, 11vw, 160px); }
.motivos-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; padding-bottom: 40px; border-bottom: 1px solid var(--ink); }
.motivos-head p { color: var(--muted); max-width: 40ch; justify-self: end; }
.index { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 40px; }
.index h3 { font: 500 15px/1.4 var(--text); color: var(--clay); margin-bottom: 12px; }
.index-note { color: var(--muted); font-size: 15px; margin: -8px 0 12px; }
.index li { border-bottom: 1px solid var(--line); }
.index li a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 0; text-decoration: none;
  font: 400 clamp(24px, 2.6vw, 32px)/1.2 var(--didot);
  background: linear-gradient(90deg, var(--dusk), #e9c9cf) no-repeat 0 0 / 0% 100%;
  transition: background-size .45s cubic-bezier(.2,.7,.2,1), padding-left .45s cubic-bezier(.2,.7,.2,1);
}
.index li a span { font: 400 14px/1.3 var(--text); color: var(--muted); text-align: right; }
.index li a:hover, .index li a:focus-visible { background-size: 100% 100%; padding-left: 12px; }
.index-photo { margin-top: 40px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 999px 999px 0 0; filter: saturate(.85); }
.disclaimer { margin-top: 40px; font-size: 14px; color: var(--muted); }

/* Sobre mí: Carta */
.sobre {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 112px); align-items: center;
  background: var(--sand);
  padding: clamp(80px, 11vw, 160px) max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}
.sobre-photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 27% center; border-radius: 50%; }
.letter { max-width: 56ch; }
.letter h2 { margin-bottom: 32px; }
.letter p + p { margin-top: 1.1em; }
.sign { font: 400 26px/1.2 var(--didot); color: var(--clay); margin-top: 36px !important; }

/* Reseñas */
.resenas { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 11vw, 160px) var(--gutter) clamp(72px, 10vw, 128px); }
.quotes { margin: 56px 0 40px; border-top: 1px solid var(--ink); }
.quotes blockquote {
  display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2.4fr); column-gap: clamp(24px, 5vw, 80px);
  margin: 0; padding: 36px 0; border-bottom: 1px solid var(--line);
}
.quotes .q { grid-column: 2; grid-row: 1; font-size: 18px; line-height: 1.75; max-width: 62ch; }
.quotes .q::before { content: "“"; }
.quotes .q::after { content: "”"; }
.quotes footer { grid-column: 1; grid-row: 1; font: 400 24px/1.2 var(--didot); color: var(--clay); }
.quotes details { grid-column: 2; margin-top: 14px; font-size: 14px; color: var(--muted); }
.quotes summary { cursor: pointer; width: fit-content; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.quotes details p { margin-top: 12px; max-width: 62ch; font-size: 16px; line-height: 1.7; }

/* Preguntas */
.preguntas {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px);
  max-width: var(--max); margin: 0 auto; padding: clamp(80px, 11vw, 160px) var(--gutter);
}
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 20px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg) translateY(-4px); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, 0); }
.faq details p { padding: 0 0 22px; max-width: 58ch; color: var(--muted); }

/* Contacto */
.contacto {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 112px);
  border-top: 1px solid var(--ink);
  max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) 0;
  width: calc(100% - 2 * var(--gutter));
}
.contacto-info > p { margin: 20px 0 28px; color: var(--muted); }
.details { margin-top: 44px; border-top: 1px solid var(--line); }
.details div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); font-size: 15px; }
.details a { text-decoration-color: var(--line); text-underline-offset: 4px; overflow-wrap: anywhere; }
.map { display: block; margin-top: 32px; text-decoration: none; }
.map svg { width: 100%; height: auto; background: var(--sand); }
.map .streets path { stroke: var(--cream); stroke-width: 9; fill: none; }
.map .names text { font: 400 11px var(--text); fill: var(--muted); letter-spacing: .02em; }
.map .pin { fill: var(--clay); }
.map .pin-halo { fill: none; stroke: var(--clay); stroke-width: 1; opacity: .5; }
.map .link { display: inline-block; margin-top: 14px; }

.form { display: grid; gap: 18px; align-content: start; align-self: start; background: var(--sand); padding: clamp(24px, 4vw, 48px); }
.form h3 { font: 400 30px/1.15 var(--didot); }
.form-hint { color: var(--muted); margin-top: -10px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; font: 400 17px/1.4 var(--text); color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 0; padding: 12px 14px;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 1px var(--clay); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-status { min-height: 1.6em; font-size: 15px; }
.form-status.ok { color: var(--olive); }
.form-status.err { color: var(--clay); }

/* Footer */
.foot { background: var(--olive); color: #e9e6da; padding: 72px var(--gutter) 112px; text-align: center; }
.foot-mark { margin: 0 auto 20px; height: 56px; width: auto; }
.foot-name { font: 400 28px/1.2 var(--didot); color: var(--cream); margin-bottom: 10px; }
.foot p { max-width: 46ch; margin-left: auto; margin-right: auto; }
.foot-links { display: flex; justify-content: center; gap: 28px; margin: 28px 0; }
.foot-links a { text-underline-offset: 5px; text-decoration-color: rgba(233,230,218,.4); }
.foot-small { font-size: 13px; opacity: .7; }

/* WhatsApp, always at hand: a floating pill at the lower right, a full-width bar on phones.
   It steps aside while the hero or contact button is in view (main.js). */
.sticky-wa {
  position: fixed; right: 24px; bottom: 24px; z-index: 9;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--clay); color: var(--cream);
  font: 500 15px/1 var(--text); text-decoration: none;
  box-shadow: 0 10px 28px -12px rgba(118, 34, 11, .7);
  transition: opacity .3s, transform .3s, visibility .3s, background-color .2s;
}
.sticky-wa:hover { background: #5e1a08; }
.sticky-wa.away { opacity: 0; visibility: hidden; transform: translateY(12px); }

/* ===== Wide screens: the meridian rail ===== */
@media (min-width: 1100px) {
  .meridian {
    display: flex; flex-direction: column; justify-content: space-between;
    position: fixed; z-index: 8; left: 28px; top: 120px; bottom: 56px; width: 9px;
  }
  .meridian-line {
    position: absolute; left: 4px; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(var(--clay), var(--clay)) no-repeat 0 0 / 1px calc(var(--progress, 0) * 100%), var(--line);
  }
  .meridian a {
    position: relative; width: 9px; height: 9px; border-radius: 50%;
    background: var(--cream); border: 1px solid var(--line);
    transition: background-color .3s, border-color .3s, transform .3s;
  }
  .meridian a.on { background: var(--clay); border-color: var(--clay); }
  .meridian a:hover { transform: scale(1.5); }
}

/* ===== Header: hide the section links before they crowd the logo ===== */
@media (max-width: 1000px) {
  .top .sections, .top .langs { display: none; }
  .menu { display: block; }
}

/* ===== Tablet and phone ===== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 28px; padding-top: 8px; }
  .arch { order: -1; justify-self: stretch; max-width: none; aspect-ratio: 4 / 4.2; max-height: 62svh; }
  .arch img { object-position: 45% 30%; border-radius: 0; }
  .corner { position: static; transform: none; text-align: left; margin-top: -4px; }
  .hero h1 { max-width: 11ch; }
  .lede { margin: 20px 0 24px; }
  .cuerpo, .metodo, .sobre, .preguntas, .contacto { grid-template-columns: 1fr; }
  .metodo-photos { position: relative; top: 0; }
  .motivos-head { grid-template-columns: 1fr; }
  .motivos-head p { justify-self: start; }
  .index { grid-template-columns: 1fr; }
  .quotes blockquote { grid-template-columns: 1fr; padding: 28px 0; }
  .quotes footer { grid-row: 1; margin-bottom: 12px; font-size: 22px; }
  .quotes .q, .quotes details { grid-column: 1; }
  .quotes .q { grid-row: 2; font-size: 17px; }
}

@media (max-width: 720px) {
  body { font-size: 16.5px; padding-bottom: 88px; }
  .logo { gap: 8px; }
  .logo img { height: 28px; }
  .logo span { font-size: 17px; }
  .top { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .sticky-wa { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); min-height: 54px; font-size: 16px; }
  .hero .btn-lg { width: 100%; }
  .cuerpo { margin-top: 40px; }
  .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { padding-right: 0; }
  .pair { grid-template-columns: 1fr; }
  .details div { grid-template-columns: 1fr; gap: 2px; }
  .form .btn { justify-self: stretch; }
  .foot { padding-bottom: 120px; }
}

@media (max-width: 340px) {
  .logo span { font-size: 15px; }
}

/* ===== Page load: the photo settles in and the hero text rises ===== */
@media (prefers-reduced-motion: no-preference) {
  .js .arch img { opacity: 0; transform: scale(1.03); animation: settle 1.2s ease-out .2s forwards; }
  .js .hero h1, .js .hero .lede, .js .hero .btn { opacity: 0; animation: rise .9s ease-out forwards; }
  .js .hero h1 { animation-delay: .5s; }
  .js .hero .lede { animation-delay: .8s; }
  .js .hero .btn { animation-delay: 1s; }
}
@keyframes settle { to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .index li a, .meridian a, .sticky-wa { transition: none; }
}
