/* ============================================================
   Loom, quiet bodywork studio. Static sketch, no build step.
   Tokens in :root below. Motion spec in MOTION.md.
   ============================================================ */

:root {
  --linen: #F4EFE6;
  --char: #1A1814;
  --clay: #C4785A;
  --clay-deep: #A85B3F;
  --sage: #6B7F6A;
  --sage-ink: #4A5A49;      /* darkened sage, 6.4:1 on linen for small text */
  --mist: #E7E2D8;
  --hairline: rgba(26, 24, 20, 0.16);
  --hairline-strong: rgba(26, 24, 20, 0.28);
  --shadow-tint: rgba(122, 74, 51, 0.22);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --speed: 220ms;

  /* Shape lock: media blocks 18px, rows/panels 12px, buttons pill. */
  --radius-media: 18px;
  --radius-row: 12px;

  /* Z scale: header 10, skip link 20. Nothing else stacks. */
  --z-header: 10;
  --z-skip: 20;
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--linen);
  color: var(--char);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

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

p { margin: 0; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

section { padding-block: clamp(72px, 10vw, 128px); }

/* ---------- focus ---------- */

:focus-visible {
  outline: 2px solid var(--char);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: var(--z-skip);
  background: var(--char);
  color: var(--linen);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: top 150ms var(--ease-out);
}

.skip-link:focus-visible { top: 16px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--clay);
  color: var(--char);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  padding: 17px 30px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color var(--speed) var(--ease-out),
              transform var(--speed) var(--ease-out),
              box-shadow var(--speed) var(--ease-out);
}

.btn:hover {
  background: var(--clay-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px var(--shadow-tint);
}

.btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: none;
}

.btn-small { padding: 12px 22px; font-size: 0.95rem; }

.btn-light { background: var(--linen); }
.btn-light:hover { background: #FFFFFF; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }

.site-footer :focus-visible { outline-color: var(--linen); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 68px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 32px);
  margin-left: auto;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--speed) var(--ease-out);
}

.site-nav a:hover { border-bottom-color: var(--clay); }

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

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(86dvh, 820px);
  padding-block: 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(244, 239, 230, 0.97) 0%,
    rgba(244, 239, 230, 0.88) 22%,
    rgba(244, 239, 230, 0.55) 46%,
    rgba(244, 239, 230, 0.18) 74%,
    rgba(244, 239, 230, 0.10) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content .eyebrow,
.hero h1,
.hero-sub { max-width: 640px; }

.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sage-ink);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.9rem, 5.2vw + 1rem, 4.9rem);
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  max-width: 520px;
  margin-bottom: 34px;
  color: var(--char);
}

/* Signature: soft clay underline under the thesis, hand-drawn feel. */
.thesis-mark {
  position: relative;
  display: inline-block;
}

.thesis-mark::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.06em;
  bottom: -0.14em;
  height: 0.26em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8 C 30 3, 55 9.5, 85 7 S 150 3, 197 6.5' fill='none' stroke='%23C4785A' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}

/* ---------- section headers ---------- */

h2 {
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  margin-bottom: 14px;
}

.section-intro {
  max-width: 60ch;
  font-size: 1.1rem;
  color: rgba(26, 24, 20, 0.78);
  margin-bottom: clamp(36px, 5vw, 56px);
}

/* ---------- services ---------- */

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.service-row {
  display: grid;
  grid-template-columns: minmax(190px, 260px) 1fr auto;
  gap: 12px clamp(24px, 4vw, 56px);
  align-items: baseline;
  padding: 26px 18px;
  margin-inline: -18px;
  border-bottom: 1px solid var(--hairline);
  border-radius: var(--radius-row);
  transition: background-color var(--speed) var(--ease-out);
}

.service-row:last-child { border-bottom: 0; }

.service-row:hover { background: rgba(231, 226, 216, 0.75); }

.service-row h3 { font-size: 1.35rem; }

.service-desc {
  color: rgba(26, 24, 20, 0.78);
  max-width: 52ch;
}

.service-meta {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sage-ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- quote band ---------- */

.quote-band {
  background: var(--mist);
  padding-block: clamp(64px, 8vw, 104px);
}

.quote {
  max-width: 860px;
}

.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  line-height: 1.32;
  letter-spacing: -0.005em;
}

.quote blockquote p { margin: 0; }

.quote figcaption {
  margin-top: 22px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--sage-ink);
}

/* ---------- therapists ---------- */

.therapist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 56px);
}

.photo-frame {
  border-radius: var(--radius-media);
  overflow: hidden;
  margin-bottom: 22px;
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

.therapist:hover .photo-frame img { transform: scale(1.02); }

.therapist h3 { font-size: 1.5rem; margin-bottom: 6px; }

.therapist .cred {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sage-ink);
  margin-bottom: 4px;
}

.therapist .focus {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.therapist > p:last-child { color: rgba(26, 24, 20, 0.78); max-width: 44ch; }

/* ---------- visit ---------- */

.visit-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}

.visit-text .address {
  color: rgba(26, 24, 20, 0.78);
  max-width: 46ch;
  margin-bottom: 28px;
}

.hours {
  margin: 0 0 28px;
  border-top: 1px solid var(--hairline);
}

.hours > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.hours dt { font-weight: 600; }

.hours dd {
  margin: 0;
  color: var(--sage-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.first-visit {
  color: rgba(26, 24, 20, 0.78);
  max-width: 46ch;
  margin-bottom: 32px;
}

.visit-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-media);
}

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

.site-footer {
  background: var(--char);
  color: var(--linen);
  padding-block: clamp(64px, 8vw, 104px) 40px;
}

.footer-line {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.2;
  max-width: 18ch;
  margin-bottom: 30px;
}

.footer-cta { margin-bottom: 28px; }

.footer-mail { margin-bottom: 40px; }

.footer-mail a {
  font-size: 1.05rem;
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--speed) var(--ease-out);
}

.footer-mail a:hover { text-decoration-color: var(--linen); }

.footer-small {
  font-size: 0.9rem;
  color: rgba(244, 239, 230, 0.78);
  margin-bottom: 6px;
}

/* ---------- mobile ---------- */

@media (max-width: 820px) {
  .header-row { flex-wrap: wrap; row-gap: 0; padding-block: 12px; }
  .site-nav { flex-basis: 100%; order: 3; padding-top: 4px; padding-bottom: 10px; }
  .btn-small { margin-left: auto; }
  .site-header { position: static; }

  .hero { min-height: 78dvh; }

  .service-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name meta"
      "desc desc";
  }
  .service-row h3 { grid-area: name; }
  .service-desc { grid-area: desc; }
  .service-meta { grid-area: meta; }

  .therapist-grid { grid-template-columns: 1fr; }

  .visit-grid { grid-template-columns: 1fr; }
  .visit-media { order: -1; }
}

/* ---------- motion (spec in MOTION.md) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-item {
    opacity: 0;
    transform: translateY(16px);
    animation: hero-rise 650ms var(--ease-out) forwards;
  }
  .hero-item:nth-child(1) { animation-delay: 80ms; }
  .hero-item:nth-child(2) { animation-delay: 170ms; }
  .hero-item:nth-child(3) { animation-delay: 260ms; }
  .hero-item:nth-child(4) { animation-delay: 350ms; }

  @keyframes hero-rise {
    to { opacity: 1; transform: translateY(0); }
  }

  /* Underline draws itself once, after the headline lands. */
  .thesis-mark::after {
    clip-path: inset(0 100% 0 0);
    animation: underline-draw 700ms var(--ease-out) 620ms forwards;
  }

  @keyframes underline-draw {
    to { clip-path: inset(0 0 0 0); }
  }
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-item,
  .js .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .thesis-mark::after {
    clip-path: none;
    animation: none;
  }

  .btn:hover { transform: none; }
  .therapist:hover .photo-frame img { transform: none; }
  .photo-frame img,
  .btn,
  .service-row,
  .site-nav a,
  .footer-mail a { transition: none; }
}
