/* Dorah Andrade, postpartum doula. One page, mobile-first.
   Palette sampled from assets/mockup-preview-1.png. Headings keep the mockup
   terracotta (large text, 3.4:1); body-size terracotta uses the darkened
   --terracotta-text (4.7:1) to pass WCAG AA. */

:root {
  --cream: #eee9e4;            /* mockup band A */
  --blush: #f4e8ea;            /* mockup band B */
  --terracotta: #b86a3a;       /* mockup headings, large text only */
  --terracotta-text: #9a5427;  /* darkened for body-size terracotta and the button */
  --frame: #eb6200;            /* thin arch and card outlines */
  --ink: #7a5646;              /* mockup body brown, 5.4:1 */
  --check: #546d7a;            /* mockup checkmark slate */

  --font-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --font-serif: "Libre Caslon Text", Georgia, serif;
  --font-sans: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-cjk: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --band-pad: clamp(3.5rem, 9vw, 7rem);
  --content-max: 72rem;
}

*, *::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.0625rem/1.65 var(--font-sans);
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .hero__title { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--terracotta-text); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  background: var(--terracotta-text); color: #fff; padding: .5rem 1rem; border-radius: 999px;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: var(--band-pad) 0; }
.band--cream { background: var(--cream); }
.band--blush { background: var(--blush); }
.band--ruled { border-bottom: 1.5px solid var(--frame); }

/* ---------- Type ---------- */
.display {
  font: 400 clamp(2.4rem, 7vw, 3.6rem)/1.08 var(--font-display);
  color: var(--terracotta);
  letter-spacing: -.005em;
}
.display--caps { text-transform: uppercase; letter-spacing: .01em; font-size: clamp(2rem, 6vw, 3.25rem); }
.display--center { text-align: center; }
.lede {
  font: 700 clamp(1.125rem, 2.4vw, 1.35rem)/1.35 var(--font-serif);
  color: var(--terracotta-text);
}
p + p { margin-top: 1em; }

/* ---------- Wordmark ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem var(--gutter) 0; background: var(--cream);
}

/* ---------- Language toggle (EN · PT · ES · 中文) ---------- */
.lang-toggle { display: flex; align-items: center; flex-shrink: 0; }
.lang-toggle button {
  min-width: 2.25rem; min-height: 2.25rem; padding: 0 .35rem;  /* comfortable tap target */
  border: 0; background: none; cursor: pointer;
  font: 400 .92rem/1 var(--font-sans); letter-spacing: .04em; color: var(--ink);
}
.lang-toggle button[data-lang="zh"] { font-family: var(--font-cjk); letter-spacing: 0; }
.lang-toggle button:hover { color: var(--terracotta-text); }
.lang-toggle button.is-active {
  color: var(--terracotta-text); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .35em;
}
.lang-toggle__dot { color: var(--ink); opacity: .55; }
.wordmark { color: var(--terracotta-text); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.wordmark__serif { font: 700 1em var(--font-serif); }
.wordmark__sans { font: 400 1em var(--font-sans); }

/* ---------- Arches ---------- */
.arch { display: block; margin: 0; }
.arch img { width: 100%; height: 100%; object-fit: cover; border-radius: 50vw 50vw 0 0; }
.arch--outlined img { border: 1.5px solid var(--frame); }
.arch--nicu img { border: 2px solid #fff; aspect-ratio: 5 / 6; object-position: 30% center; }
.arch--portrait img { aspect-ratio: 4 / 5; object-position: center 25%; border-radius: 50% 50% 0 0 / 38% 38% 0 0; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(1.5rem, 4vw, 3rem); }
.hero__grid { display: grid; gap: 1.75rem; align-items: center; }
/* Phones: a shorter arch so the name and Contact button sit above the fold. */
.hero__photo { max-width: 17.5rem; width: 100%; margin: 0 auto; }
.hero__photo img { aspect-ratio: 1; object-position: center 15%; }  /* keeps her hair inside the square arch */
.hero__name {
  font: 400 clamp(3rem, 11vw, 5.25rem)/1 var(--font-display);
  color: var(--terracotta);
  letter-spacing: -.01em;
}
.hero__title {
  margin-top: .6rem;
  font: 400 clamp(1.5rem, 4.4vw, 2.2rem)/1.2 var(--font-display);
  color: var(--terracotta);
}
.hero__intro { margin-top: 1.5rem; max-width: 34rem; font-size: 1.125rem; }
.button {
  display: inline-block; margin-top: 2rem;
  padding: .95rem 2.25rem; border-radius: 999px;
  background: var(--terracotta-text); color: #fff;
  font: 600 1.05rem/1 var(--font-sans); letter-spacing: .02em; text-decoration: none;
  box-shadow: 0 0 0 1.5px var(--terracotta-text), 0 0 0 5px var(--cream), 0 0 0 6.5px var(--frame);
  transition: background-color .2s ease;
}
.button:hover { background: #82451d; }

/* ---------- Two-column split sections ---------- */
.split { display: grid; gap: 2.5rem; align-items: center; }
.split__body > .lede { margin-bottom: 1.5rem; }

/* ---------- Services ---------- */
.cards { display: grid; gap: 1.75rem; margin-top: 2.75rem; }
.card {
  border: 1.5px solid var(--frame); border-radius: 2.5rem;
  padding: 1.25rem 1.25rem 2rem; text-align: center;
  max-width: 24rem; width: 100%; margin: 0 auto;
}
.card__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1.75rem; }
.card__title { margin: 1.25rem 0 .5rem; font: 700 1.35rem/1.2 var(--font-serif); color: var(--ink); }
.card p { font-size: .98rem; }

/* ---------- Why families choose Dorah ---------- */
.section-intro { margin: 1rem auto 0; max-width: 44rem; text-align: center; font-size: 1.1rem; }
.reasons { display: grid; gap: 3rem; margin-top: 3rem; }
.reason { text-align: center; max-width: 22rem; margin: 0 auto; }
.reason__icon { height: 7.5rem; width: auto; margin: 0 auto 1.25rem; }
.reason__icon--newborn { height: 6.5rem; margin-top: .5rem; margin-bottom: 1.75rem; }
.reason__title { font: 700 1.3rem/1.2 var(--font-serif); color: var(--ink); margin-bottom: .6rem; }
.reason p { font-size: .98rem; }

/* ---------- Experiences ---------- */
#experience-heading + .lede { margin: 1rem 0 2rem; }
/* Reads down the columns, as in the mockup: four families left, three right. */
.families { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 1.4rem 1.5rem; }
.families li { font: 400 1rem/1.35 var(--font-serif); }
.families__city { display: block; font-weight: 700; color: var(--terracotta-text); }
.families__family { display: block; }
.families__time { display: block; font: 400 .92rem/1.4 var(--font-sans); }
.references { margin-top: 2rem; font: 700 1.05rem var(--font-serif); }
.arch--nicu { max-width: 26rem; width: 100%; margin: 0 auto; }
.photo-figure { margin: 0; }
.photo-caption { max-width: 26rem; margin: .75rem auto 0; text-align: center; font: 400 .92rem/1.4 var(--font-sans); color: var(--ink); }

/* ---------- About ---------- */
.arch--portrait { max-width: 26rem; width: 100%; margin: 0 auto; }
.about__kicker { margin: 1.25rem 0 .5rem; font: 700 1.1rem var(--font-sans); color: var(--ink); }

/* ---------- Qualifications + contact ---------- */
.split--closing { align-items: start; }
.checklist { margin-top: 1.5rem; }
.checklist li {
  position: relative; padding-left: 1.9rem; margin-bottom: .45rem;
  font: 600 1.05rem/1.45 var(--font-sans);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.2rem; height: 1.2rem;
  background: var(--check);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13.5l5.5 5.5L21 5' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13.5l5.5 5.5L21 5' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.contact__label { margin-top: 1.75rem; font: 600 1.5rem/1.2 var(--font-sans); color: var(--terracotta); }
.contact__link {
  display: inline-block; margin-top: .3rem; padding: .2rem 0;
  font-size: 1.25rem; color: var(--terracotta-text);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
}
.contact__link:hover { text-decoration-thickness: 2px; }
.contact__soon { margin-top: 1.75rem; font: 400 1.25rem/1.5 var(--font-sans); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blush); padding: 2.5rem 0; border-top: 1.5px solid var(--frame); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: baseline; justify-content: space-between; }
.site-footer p { font-size: .95rem; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .reasons { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
@media (min-width: 860px), (orientation: landscape) and (min-width: 640px) {
  /* two columns on desktop, and on a phone held sideways, so the name and button stay in the first screen */
  .hero__grid { grid-template-columns: 5fr 6fr; gap: clamp(3rem, 6vw, 5.5rem); }
  .hero__photo { max-width: none; }
  .hero__photo img { aspect-ratio: 5 / 6; object-position: center 40%; }
  .card__photo { aspect-ratio: 1; }
  .split { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); }
  .split--media-left { grid-template-columns: 5fr 6fr; }
  .split--media-right { grid-template-columns: 6fr 5fr; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
  .card { max-width: none; }
  .display--caps.display--center { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
}

/* ---------- Simplified Chinese ----------
   Caslon and Figtree have no CJK glyphs, so under zh each font token gains the CJK stack
   (before any generic family): Latin runs such as "Dorah" and city names keep their
   typeface and Chinese falls through to Noto Sans SC / PingFang SC. Taller leading suits CJK. */
html:lang(zh) {
  --font-display: "Libre Caslon Display", "Libre Caslon Text", var(--font-cjk);
  --font-serif: "Libre Caslon Text", var(--font-cjk);
  --font-sans: "Figtree", var(--font-cjk);
}
:lang(zh) body { line-height: 1.85; }
:lang(zh) .display, :lang(zh) .hero__name, :lang(zh) .hero__title { letter-spacing: .02em; line-height: 1.3; }
:lang(zh) .lede, :lang(zh) .card__title, :lang(zh) .reason__title, :lang(zh) .families li { line-height: 1.6; }
/* Break Chinese headings only at spaces or the <wbr> hints in i18n.js, never mid-word. */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) .hero__title { word-break: keep-all; }
:lang(zh) .wordmark__serif, :lang(zh) .wordmark__sans { font-family: var(--font-cjk); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* A phone held sideways: little height, so the hero tightens to keep the name,
   title, intro and button in the first screen. */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { padding-top: 0.75rem; }
  .hero__grid { grid-template-columns: 2fr 3fr; gap: 1.5rem; align-items: center; }
  .hero__photo { max-width: 15rem; }
  .hero__photo img { aspect-ratio: 5 / 6; }
  .hero__name { font-size: 2.4rem; line-height: 1.05; }
  .hero__title { font-size: 1.05rem; margin-top: 0.4rem; }
  .hero__intro { font-size: 0.92rem; line-height: 1.4; margin-top: 0.75rem; max-width: 30rem; }
  .hero__intro + * { margin-top: 0.85rem; }
}
