/* Belle Vie by Begoña Miravalles — one page, mobile-first */

:root {
  /* colour: ivory and stone grounds, warm greys, plum only as an accent */
  --ivory: #faf7f2;
  --stone: #f2ece4;
  --sand: #e6ddd2;
  --taupe: #b6a696;
  --ink: #2f2a27;
  --grey: #6b625b;
  --plum: #5b2a45;
  --plum-2: #47203a;
  --on-plum: #faf7f2;

  /* type: one family, five sizes, nothing else */
  --font: "Literata", Georgia, "Times New Roman", serif;
  --fs-small: 0.875rem;                                   /* 14 */
  --fs-body: 1.125rem;                                    /* 18 */
  --fs-lead: clamp(1.25rem, 1.15rem + 0.4vw, 1.4375rem);  /* 20–23 */
  --fs-h2: clamp(2rem, 1.55rem + 1.6vw, 3rem);            /* 32–48 */
  --fs-display: clamp(3rem, 2rem + 4.2vw, 5.75rem);       /* 48–92 */

  --gutter: clamp(20px, 4vw, 48px);
  --max: 1240px;
  --sec: clamp(72px, 8vw, 120px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; scrollbar-color: var(--taupe) var(--ivory); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, blockquote, address { margin: 0; }
p { text-wrap: pretty; }
address { font-style: normal; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--plum); color: var(--on-plum); }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--plum); color: var(--on-plum); padding: 10px 16px;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- type roles ---------- */
h1 {
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
h1 span {
  display: block;
  margin-top: 14px;
  font-size: var(--fs-lead);
  letter-spacing: 0;
  color: var(--grey);
}
h2 {
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h3 { font-size: var(--fs-body); font-weight: 500; line-height: 1.4; }
.lead { font-size: var(--fs-lead); line-height: 1.5; }
.note { font-size: var(--fs-small); color: var(--grey); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 26px;
  background: var(--plum); color: var(--on-plum);
  font-size: var(--fs-body); line-height: 1.2;
  text-decoration: none; border-radius: 999px;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--small { min-height: 44px; padding: 8px 20px; font-size: var(--fs-small); }
.btn--ghost { background: var(--sand); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--plum-2); }
  .btn--ghost:hover { background: var(--taupe); }
}
.link {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em;
  text-decoration-color: var(--taupe);
  transition: text-underline-offset 200ms var(--ease-out), text-decoration-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-underline-offset: 0.4em; text-decoration-color: var(--plum); }
}

/* ---------- header ---------- */
.top { position: relative; z-index: 10; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { font-size: var(--fs-lead); text-decoration: none; letter-spacing: 0; }
.nav { margin-left: auto; }
.nav-toggle {
  min-height: 44px; padding: 8px 4px; background: none; border: 0; cursor: pointer;
  font-size: var(--fs-small); text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--taupe);
}
.nav-list { display: none; }
.js .nav.open .nav-list {
  display: block;
  position: absolute; left: var(--gutter); right: var(--gutter); top: 72px;
  background: var(--ivory); padding: 8px 20px 16px;
  box-shadow: 0 16px 40px rgba(47, 42, 39, 0.14); /* taste-skill-ignore: open menu overlay */
}
.nav.open .nav-list a { display: block; padding: 10px 0; font-size: var(--fs-lead); text-decoration: none; }
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .nav-list { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-small); }

/* ---------- hero ---------- */
.hero { padding: 8px 0 clamp(40px, 5vw, 72px); }
.hero-grid { display: grid; gap: 40px; }
.hero-pic { order: -1; height: 40svh; min-height: 280px; overflow: hidden; background: var(--stone); }
.hero-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 72%; }
.hero-copy .lead { margin-top: 28px; max-width: 30ch; }
.hero-facts { margin-top: 20px; display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--grey); }
.stars { color: var(--plum); display: inline-flex; }
.stars svg, .stars-s { width: 80px; height: 16px; fill: currentColor; flex: none; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

/* ---------- sections ---------- */
.sec { padding-block: var(--sec); }
.sec--stone { background: var(--stone); }
.sec--tight-top { padding-top: 0; }
.sec-head { display: grid; gap: 16px; max-width: 40rem; margin-bottom: 56px; }

.sec-cta { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* services */
.menu { display: grid; gap: 48px; }
.menu-col { max-width: 32rem; }
.group + .group { margin-top: 48px; }
.group h3 { margin-bottom: 4px; letter-spacing: 0.02em; }
.group li {
  display: grid; grid-template-columns: 14px 1fr auto; column-gap: 14px; align-items: baseline;
  padding: 12px 0;
}
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--taupe)); align-self: start; margin-top: 0.5em; }
.name small { display: block; font-size: var(--fs-small); color: var(--grey); line-height: 1.5; margin-top: 2px; max-width: 36ch; }
.val { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.val i { font-style: normal; font-size: var(--fs-small); color: var(--grey); }

/* tone chart */
.tone-grid { display: grid; gap: 48px; }
.tone-intro p { margin-top: 16px; max-width: 34ch; }
.tone-pic { display: none; }
.tone { display: grid; gap: 28px; }
.tone fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.tone legend { padding: 0; margin-bottom: 10px; color: var(--grey); }
.tone legend output { color: var(--ink); }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sw { position: relative; }
/* the radio stays in the page for keyboard and screen readers, but the swatch itself takes the pointer */
.sw input, .pill input {
  position: absolute; left: 0; bottom: 0; width: 1px; height: 1px;
  margin: 0; opacity: 0; pointer-events: none;
}
.sw label {
  display: flex; align-items: flex-end; height: 56px; padding: 6px;
  background: var(--c); cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.sw label i { font-style: normal; font-size: var(--fs-small); background: var(--ivory); color: var(--ink); padding: 0 6px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.sw input:checked + label { outline: 2px solid var(--plum); outline-offset: 3px; }
.sw input:focus-visible + label { outline: 2px solid var(--plum); outline-offset: 3px; }
.sw input:checked + label i { background: var(--plum); color: var(--on-plum); }
.sw label:active { transform: scale(0.96); }
.sw-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tone-extra { display: grid; gap: 2px; }
.tick { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-top: 10px; cursor: pointer; }
.tick input { width: 20px; height: 20px; margin: 0.2em 0 0; accent-color: var(--plum); flex: none; }
.problems { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: var(--ivory); transition: background-color 200ms ease, transform 160ms var(--ease-out); }
.pill input:checked + span { background: var(--plum); color: var(--on-plum); }
.pill input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 3px; }
.pill:active span { transform: scale(0.97); }
.tone-problem[hidden] { display: none; }
.tone.correcting .tone-pair { display: none; }
.tone-result { display: grid; gap: 16px; padding: 24px; background: var(--ivory); }
.tone-pair { display: flex; }
.chip {
  flex: 1; height: 96px; display: flex; align-items: flex-end; padding: 10px 12px;
  background: var(--c, #6a4630); color: var(--t, #faf7f2);
  transition: background-color 400ms var(--ease-out);
}
.chip b { font-size: var(--fs-lead); font-weight: 400; line-height: 1; }
.tone-text { font-size: var(--fs-lead); line-height: 1.45; }
.tone-result .btn { justify-self: start; }
html:not(.js) .tone fieldset, html:not(.js) .tone-pair { display: none; }

/* about */
.about-grid { display: grid; gap: 40px; }
.portrait {
  order: 1; width: min(100%, 15rem);
  aspect-ratio: 4 / 5; background: var(--sand);
  display: flex; align-items: flex-end; padding: 14px;
}
.portrait { padding: 0; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.letter { max-width: 36rem; }
.letter h2 { margin-bottom: 24px; }
.letter p + p { margin-top: 1em; }
.sign { margin-top: 28px !important; display: grid; gap: 2px; }
.sign em { font-size: var(--fs-lead); }
.sign span { font-size: var(--fs-small); color: var(--grey); }

/* gallery */
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mosaic figure { position: relative; overflow: hidden; background: var(--stone); aspect-ratio: 4 / 5; }
.mosaic .m-a, .mosaic .m-d { grid-column: span 2; aspect-ratio: 3 / 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.mosaic figcaption {
  position: absolute; left: 10px; bottom: 10px;
  background: var(--ivory); font-size: var(--fs-small); padding: 3px 10px;
}
@media (hover: hover) and (pointer: fine) {
  .mosaic figure:hover img { transform: scale(1.03); }
}

/* before / after */
.ba-grid { display: grid; gap: 40px; }
.ba .sec-cta { margin-top: 28px; }
.ba-intro p { margin-top: 16px; max-width: 34ch; }
.ba-frame { position: relative; display: block; width: 100%; max-width: 26rem; aspect-ratio: 1 / 1; background: var(--sand); }
.ba-slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; opacity: 0; transition: opacity 600ms ease; }
.ba-slide.on { opacity: 1; }
.ba-slide { gap: 4px; }
.ba-slide > span { position: relative; display: flex; align-items: flex-end; padding: 10px; background: var(--sand); overflow: hidden; }
.ba-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-slide i { position: relative; }
.ba-slide i { font-style: normal; font-size: var(--fs-small); background: var(--ivory); color: var(--ink); padding: 3px 8px; line-height: 1.4; }
.ba-bar { margin-top: 14px; max-width: 26rem; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ba-cap { font-size: var(--fs-small); color: var(--grey); }
.ba-ctrl { display: flex; align-items: center; gap: 4px; flex: none; }
.ba-count { font-size: var(--fs-small); color: var(--grey); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: center; }
.ba-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ivory); border: 0; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.ba-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ba-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .ba-btn:hover { background: var(--sand); } }

/* reviews */
.quotes { display: grid; gap: 48px; }
.quote { display: grid; gap: 18px; align-content: start; max-width: 30rem; }
.quote::before { content: "“"; font-size: var(--fs-display); line-height: 0.6; color: var(--taupe); height: 0.45em; }
.quote blockquote { font-size: var(--fs-lead); line-height: 1.45; }
.quote figcaption { display: grid; gap: 4px; }
.quote figcaption b { font-weight: 500; }
.quote figcaption span { display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--grey); }
.quote .stars-s { color: var(--plum); }

/* visit */
.visit-grid { display: grid; gap: 48px; }
.visit-info { display: grid; gap: 32px; align-content: start; }
.visit-links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.hours h3 { margin-bottom: 4px; }
.now { color: var(--plum); font-size: var(--fs-small); }
.now::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 8px; transform: translateY(-1px); }
.hours table { width: 100%; max-width: 26rem; border-collapse: collapse; margin: 12px 0; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 7px 10px; text-align: left; font-weight: 400; }
.hours td { text-align: right; }
.hours tr.today { background: var(--ivory); }
.hours tr.today th { font-weight: 500; }
.map { position: relative; aspect-ratio: 1 / 1; background: var(--sand); min-height: 300px; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; }
.map iframe { position: relative; width: 100%; height: 100%; border: 0; display: block; filter: grayscale(0.55) sepia(0.12); }

/* footer */
.foot { padding: 64px 0 48px; }
.foot-grid { display: grid; gap: 20px; }
.foot-brand { font-size: var(--fs-lead); }
.foot-brand span { font-style: italic; color: var(--grey); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-nav a { text-decoration: none; display: inline-block; padding: 6px 0; }
@media (hover: hover) and (pointer: fine) { .foot-nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; } }
.foot-small { font-size: var(--fs-small); color: var(--grey); }

/* ======================================================
   Tablet and up
   ====================================================== */
@media (min-width: 760px) {
  .menu { grid-template-columns: 1fr 1fr; column-gap: 72px; }
  .hero-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .hero-pic { order: 0; height: auto; aspect-ratio: 4 / 5; }
  .quotes { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .swatches { grid-template-columns: repeat(10, 1fr); }
  .sw label { height: 64px; }
  .mosaic { grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(180px, 20vw, 300px); gap: 12px; }
  .mosaic figure, .mosaic .m-a, .mosaic .m-d, .mosaic .m-f { aspect-ratio: auto; grid-column: auto; }
  .mosaic .m-a { grid-column: 1 / 7; grid-row: 1 / 3; }
  .mosaic .m-b { grid-column: 7 / 10; grid-row: 1; }
  .mosaic .m-c { grid-column: 10 / 13; grid-row: 1; }
  .mosaic .m-d { grid-column: 7 / 13; grid-row: 2; }
  .mosaic .m-e { grid-column: 1 / 5; grid-row: 3; }
  .mosaic .m-f { grid-column: 5 / 13; grid-row: 3; }
}

@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .nav-list, .js .nav-list { display: flex; gap: 28px; font-size: var(--fs-small); }
  .nav-list a { text-decoration: none; padding: 10px 0; }
  @media (hover: hover) and (pointer: fine) {
    .nav-list a:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-color: var(--taupe); }
  }
  .nav { margin-right: 12px; }

  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: 5fr 7fr; align-items: center; gap: 72px; }
  .hero-pic { order: 0; aspect-ratio: 4 / 5; max-height: calc(100svh - 120px); width: 100%; }
  .hero-pic img { object-position: 40% 100%; }

  .tone-grid { grid-template-columns: 4fr 7fr; gap: 80px; align-items: start; }
  .tone-pic { display: block; margin-top: 40px; aspect-ratio: 3 / 4; overflow: hidden; }
  .tone-pic img { width: 100%; height: 100%; object-fit: cover; }

  .about-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .portrait { order: 0; width: 100%; max-width: 22rem; }

  .ba-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }

  .visit-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: stretch; }
  .map { aspect-ratio: auto; height: 100%; min-height: 520px; }

  .foot-grid { grid-template-columns: 1fr auto; align-items: center; row-gap: 12px; }
  .foot-grid .foot-small { grid-column: 1 / -1; }
}

/* ======================================================
   Motion: quiet, quick, once
   ====================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js [data-r] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  .js [data-r].in { opacity: 1; transform: none; }

  .js .group[data-r] li { opacity: 0; transform: translateY(8px); transition: opacity 450ms var(--ease-out), transform 500ms var(--ease-out); }
  .js .group[data-r].in li { opacity: 1; transform: none; }
  .js .group[data-r].in li:nth-child(2) { transition-delay: 40ms; }
  .js .group[data-r].in li:nth-child(3) { transition-delay: 80ms; }
  .js .group[data-r].in li:nth-child(4) { transition-delay: 120ms; }
  .js .group[data-r].in li:nth-child(5) { transition-delay: 160ms; }
  .js .group[data-r].in li:nth-child(6) { transition-delay: 200ms; }

  /* the hero photograph opens once, then rests */
  .hero-pic img { animation: open 1100ms var(--ease-out) both, settle 1600ms var(--ease-out) both; }
  @keyframes open { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
}
