/* ------------------------------------------------------------------
   Dr. Haya — Acupuntura
   Warm paper, ink, one vermilion seal. Editorial serif display, quiet
   grotesque body. No third-party requests: both faces are self-hosted.
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f1e6;
  --paper-alt: #efe7d7;
  --surface: #fffcf5;
  --ink: #1b1815;
  --ink-soft: #3f3a33;
  --muted: #625b50;
  --line: rgba(27, 24, 21, 0.13);
  --line-strong: rgba(27, 24, 21, 0.26);
  --seal: #9d2c18;
  --seal-ink: #fdf6ec;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Archivo", ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;

  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1: clamp(1.12rem, 1.05rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.55rem, 1.3rem + 1.1vw, 2.1rem);
  --step-3: clamp(2rem, 1.55rem + 2.1vw, 3.05rem);
  --step-4: clamp(2.7rem, 1.85rem + 4vw, 5.1rem);

  --pad: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 8vw, 7.5rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

/* Fraunces is variable on optical size: at small sizes it flattens into a
   plain roman. Push the axis up so headings keep their cut at every step. */
h1 { font-variation-settings: "opsz" 120; }
h2 { font-variation-settings: "opsz" 72; }
h3,
dt,
blockquote { font-variation-settings: "opsz" 40; }

p { margin: 0; }

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

::selection {
  background: var(--seal);
  color: var(--seal-ink);
}

:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

.wrap {
  width: min(1180px, 100% - (var(--pad) * 2));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--pad);
  top: -4rem;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: top 160ms ease;
}
.skip:focus-visible { top: 1rem; }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  /* Flat, opaque paper: no backdrop-filter. The page behind is the same
     colour anyway, and blur smears scrolled content into the bar. */
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex: 0 0 auto;
}

.seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 2px;
  background: var(--seal);
  color: var(--seal-ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.seal-lg {
  width: 56px;
  height: 56px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 1.15rem;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}

.nav {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.8rem);
  margin-inline-start: auto;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding-block: 0.45rem;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }

.head-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease;
}
.head-phone:hover { border-color: var(--ink); background: var(--surface); }

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(3.2rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem);
}

.hero-inner { position: relative; }

.hero-copy { max-width: 34rem; }

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: var(--step-4);
  line-height: 0.99;
  letter-spacing: -0.028em;
  font-weight: 500;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
}

.lede {
  margin-top: 1.5rem;
  max-width: 32rem;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--seal);
  color: var(--seal-ink);
  border: 1px solid var(--seal);
}
.btn-solid:hover { background: #862514; border-color: #862514; }

.btn-quiet {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.btn-quiet:hover { border-color: var(--ink); background: var(--surface); }

.hero-motto {
  position: absolute;
  right: 0;
  top: 0.4rem;
  writing-mode: vertical-rl;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 0.9rem;
  border-left: 1px solid var(--line);
}

.hero-thread {
  position: absolute;
  right: clamp(2.5rem, 7vw, 6rem);
  top: 7.5rem;
  width: 120px;
  height: 460px;
  color: var(--line-strong);
  pointer-events: none;
}

.thread-path {
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  animation: draw 2.4s cubic-bezier(0.22, 0.7, 0.2, 1) 0.25s forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* ---------- imagery ---------- */

/* Full-bleed band under the hero. Fixed height + object-fit keeps the layout
   from jumping while the file loads. */
.band {
  margin: 0;
  border-block: 1px solid var(--line);
  background: var(--paper-alt);
}

.band img {
  display: block;
  width: 100%;
  height: clamp(200px, 30vw, 420px);
  object-fit: cover;
  object-position: center 42%;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.6vw, 2.2rem);
  align-items: start;
  margin-top: clamp(2.6rem, 5vw, 4.5rem);
}

.gallery figure {
  margin: 0;
}

/* Offsetting the middle plate breaks the catalogue symmetry. */
.gallery figure:nth-child(2) {
  margin-top: clamp(1.4rem, 3.6vw, 3.2rem);
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
}

.gallery figcaption {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--muted);
}

.gallery-note {
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: right;
}

/* ---------- facts ---------- */

.facts {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.facts-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.fact {
  padding: clamp(1.3rem, 2.5vw, 1.9rem) clamp(0.9rem, 2vw, 1.6rem);
  border-left: 1px solid var(--line);
}
.fact:first-child { border-left: 0; padding-left: 0; }

.fact-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.fact-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 18ch;
}

/* ---------- sections ---------- */

.section { padding-block: var(--section-y); }
.section-alt { background: var(--paper-alt); }

.section-head { max-width: 46rem; }

.section-head h2 {
  font-size: var(--step-3);
  letter-spacing: -0.022em;
}

.section-lede {
  margin-top: 1.1rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.55;
}

/* treatments */

.treatments {
  margin: clamp(2.2rem, 4vw, 3.4rem) 0 0;
  border-top: 1px solid var(--line-strong);
}

.treatment {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1rem, 4vw, 3.5rem);
  align-items: baseline;
  padding-block: clamp(1.35rem, 2.4vw, 1.8rem);
  border-bottom: 1px solid var(--line);
}

.treatment dt {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.45rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  font-weight: 500;
}

.treatment dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 44ch;
}

.note {
  margin-top: clamp(1.8rem, 3vw, 2.6rem);
  max-width: 52ch;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
  padding-left: 1.1rem;
  border-left: 1px solid var(--line-strong);
}

/* steps */

.steps {
  list-style: none;
  margin: clamp(2.2rem, 4vw, 3.4rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.6rem, 4vw, 3.5rem);
}

.step {
  border-top: 1px solid var(--line-strong);
  padding-top: 1.2rem;
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 1.5rem;
}

.step h3 {
  font-size: var(--step-1);
  letter-spacing: -0.012em;
  margin-bottom: 0.55rem;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 34ch;
}

/* about */

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-quote blockquote {
  margin: 1.6rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.about-quote blockquote p { margin: 0; }

.about-copy h2 {
  font-size: var(--step-3);
  margin-bottom: 1.3rem;
}

.about-copy p + p { margin-top: 0.95rem; }
.about-copy p {
  color: var(--ink-soft);
  max-width: 52ch;
}

.credentials {
  list-style: none;
  margin: 1.9rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.credentials li {
  padding: 0.62rem 0 0.62rem 1.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
}
.credentials li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--line-strong);
}

/* place */

.place {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.place-address h2 {
  font-size: var(--step-3);
  margin-bottom: 1.4rem;
}

.place-address address {
  font-style: normal;
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
}

.place-social { margin-top: 1.6rem; }
.place-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 160ms ease;
}
.place-social a:hover { border-bottom-color: var(--ink); }

.place-hours h3 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.place-hours table {
  width: 100%;
  border-collapse: collapse;
}

.place-hours th,
.place-hours td {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
  font-weight: 400;
  text-align: left;
}

.place-hours th { color: var(--ink-soft); }
.place-hours td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.place-hours td.closed { color: var(--muted); }

.hours-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 30ch;
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: clamp(2rem, 4vw, 3rem) clamp(2.4rem, 4vw, 3.4rem);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(1.4rem, 4vw, 3rem);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.3;
}
.foot-brand .seal { width: 34px; height: 34px; font-size: 0.82rem; }

.foot-small {
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.foot-note {
  flex: 1 1 20rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 46ch;
}

.foot-year {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}

/* ---------- reveal ---------- */

.js [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(14px);
}

[data-reveal] {
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-motto,
  .hero-thread { display: none; }

  .hero-copy { max-width: 40rem; }

  .facts-inner { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .about,
  .place { grid-template-columns: 1fr; }

  .about-quote { order: 2; }
}

@media (max-width: 720px) {
  .head-inner {
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
    padding-block: 0.7rem;
  }

  .brand { order: 1; }
  .head-phone { order: 2; margin-left: auto; }
  .nav {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
    padding-bottom: 0.15rem;
  }

  .treatment { grid-template-columns: 1fr; gap: 0.5rem; }
  .steps { grid-template-columns: 1fr; }
  .step-num { margin-bottom: 0.9rem; }

  .gallery { grid-template-columns: 1fr; }
  .gallery figure:nth-child(2) { margin-top: 0; }

  .foot-year { margin-left: 0; }
}

@media (max-width: 520px) {
  .facts-inner { grid-template-columns: 1fr; }
  .fact,
  .fact:nth-child(3) {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }
  .fact:first-child { border-top: 0; }
  .fact-label { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .thread-path { stroke-dashoffset: 0; }
  .js [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
}
