/* Thorrington Wellness Centre - the base layer: tokens, type, buttons,
   surfaces, the menu, the register form, the footer and the phone action bar.
   Taken from the Evie Davies site on 2026-10-21, when Thorrington became its
   own website, keeping only what this site uses. css/site.css holds the page.

   Breakpoint 900px: .d-only above it, .m-only at or below it. Every text
   pairing keeps its measured contrast (tokens below). Width is set by
   containers, never by a text element (house section E). */

:root {
  /* Palette. Ratios measured by the design. */
  --forest:   #2F4A2A; /* 9.28:1 on ivory, 8.36:1 on cream; ivory on it 9.28:1 */
  --forest-2: #3C5A33; /* 6.90:1 on ivory */
  --ivory:    #FBF8F1; /* the page: a warm white */
  --cream:    #F2ECDF; /* the alternate sections */
  --sage:     #A3B092; /* text on sage is --ink only */
  --gold:     #C49A3C; /* decoration only on light; text only on forest or navy */
  --gold-deep:#82611E; /* gold as text on light: 5.38:1 on ivory, 4.85:1 on cream */
  --navy:     #1F2B45; /* ivory on it 12.52:1; gold on it 5.39:1 */
  --ink:      #1E241C; /* 14.09:1 on ivory */
  --muted:    #5E6355; /* 5.84:1 on ivory, 5.26:1 on cream */
  --soft:     #CFD6C6; /* secondary text on forest, 9.3:1 */
  --soft-navy:#C9CFDD;
  --hairline: rgba(47,74,42,.18);

  --font-display: Cinzel, 'Trajan Pro', Georgia, serif;
  --font-display-lc: 'Cormorant Garamond', Garamond, Georgia, serif; /* the lower-case hero headline */
  --font-body: Lato, system-ui, sans-serif;
  --font-ui: Lato, system-ui, sans-serif;

  --t-h2: 40px;
  --t-h3: 26px;
  --t-h4: 20px;
  --t-lead: 20px;
  --t-body: 17px;
  --t-small: 15px;
  --t-label: 13px;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 30px;

  --gutter: 64px;
  --section: 104px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: 600ms;
}

@media (max-width: 1200px) { :root { --gutter: 40px; --section: 88px; } }
@media (max-width: 900px) {
  :root { --t-h2: 30px; --t-h3: 21px; --t-lead: 18px; --t-body: 16px; --t-small: 14px; --gutter: 20px; --section: 48px; }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (max-width: 900px) { html { scroll-padding-top: 72px; } }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--font-body); font-weight: 400; font-size: var(--t-body); line-height: 1.6; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--forest); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.on-dark :focus-visible, .on-navy :focus-visible { outline-color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--forest); margin: 0; line-height: 1.12; text-wrap: balance; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }
p { margin: 0; }
address { font-style: normal; }
.lead { font-size: var(--t-lead); line-height: 1.5; }
.small { font-size: var(--t-small); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--forest); color: var(--ivory); padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }

.wrap { width: min(1312px, 100% - 2 * var(--gutter)); margin-inline: auto; }
section { position: relative; }

@media (min-width: 901px) { .m-only { display: none !important; } }
@media (max-width: 900px) { .d-only { display: none !important; } }

/* Eyebrow: a label with thin gold rules either side */
.eyebrow { display: inline-flex; align-items: center; gap: 14px; font-family: var(--font-ui); font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.eyebrow::before, .eyebrow::after { content: ""; width: 32px; height: 1px; background: var(--gold); }
.eyebrow.left::before { display: none; }
.on-dark .eyebrow, .on-navy .eyebrow, .eyebrow.on-dark { color: var(--gold); }
.eyebrow + h2 { margin-top: 14px; }

/* Buttons. The booking action is forest with ivory text, 8.74:1. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: var(--r-md); corner-shape: squircle; font-family: var(--font-ui); font-weight: 700; font-size: 16px; letter-spacing: .02em; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform 200ms var(--ease); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: var(--ivory); }
.btn-primary:hover { background: var(--forest-2); color: var(--ivory); }
.btn-secondary { background: transparent; color: var(--gold-deep); border-color: var(--gold-deep); }
.btn-secondary:hover { background: var(--gold-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--ivory); }
.btn-light, .on-dark a.btn-light, .on-navy a.btn-light { background: var(--ivory); color: var(--forest); }
.btn-light:hover, .on-dark a.btn-light:hover { background: var(--cream); color: var(--forest); }
.on-dark a.btn-outline-light, .btn-outline-light { background: transparent; color: var(--ivory); border-color: var(--ivory); }
.btn-outline-light:hover, .on-dark a.btn-outline-light:hover { background: var(--ivory); color: var(--forest); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* Surfaces */
.card, .media { border-radius: var(--r-md); corner-shape: squircle; }
.panel { border-radius: var(--r-lg); corner-shape: squircle; }
.media { overflow: hidden; background: var(--cream); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.on-dark { background: var(--forest); color: var(--ivory); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-dark a { color: var(--ivory); }
.on-dark .muted, .soft { color: var(--soft); }
.on-navy { background: var(--navy); color: var(--ivory); }
.on-navy h2, .on-navy h3, .on-navy a { color: var(--ivory); }
.on-navy .muted { color: var(--soft-navy); }

.rhythm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 14px; font-family: var(--font-display); font-weight: 500; letter-spacing: .22em; text-transform: uppercase; font-size: var(--t-label); color: var(--forest); }
.rhythm span + span::before { content: "•"; color: var(--gold); margin-right: 14px; }

/* Reveal once on first scroll into view. Without JavaScript nothing is hidden. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- Header pieces */
.nav { display: flex; gap: clamp(20px, 2.5vw, 36px); font-family: var(--font-ui); font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.nav a { color: var(--forest); text-decoration: none; padding: 12px 0; }
.nav a:hover { color: var(--gold-deep); }
.header-actions { display: flex; justify-content: end; align-items: center; gap: 18px; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--forest); background: transparent; border: 1px solid var(--hairline); cursor: pointer; padding: 0; }

/* Full-screen mobile menu */
.menu { position: fixed; inset: 0; z-index: 70; background: var(--forest); color: var(--ivory); padding: 20px; display: flex; flex-direction: column; overflow-y: auto; }
.menu[hidden] { display: none; }
.menu .close { align-self: end; color: var(--ivory); border: 0; }
.menu .other { margin-top: 28px; display: grid; gap: 14px; font-family: var(--font-ui); font-size: 18px; font-weight: 700; }
.menu .other a { color: var(--ivory); text-decoration: none; min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid rgba(246,241,231,.15); }
body.menu-open { overflow: hidden; }

/* ---------------------------------------------------------------- Register form */
.join { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.join .full { grid-column: 1 / -1; }
.fld { display: grid; gap: 6px; }
.fld label { font-family: var(--font-ui); font-size: var(--t-small); color: var(--forest); font-weight: 700; }
/* No default inputs (house v1.75.0): every control is drawn here. */
.join input[type="text"], .join input[type="email"], .join select { width: 100%; font-family: var(--font-ui); font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-sm); corner-shape: squircle; min-height: 48px; padding: 0 16px; appearance: none; -webkit-appearance: none; }
.join input:focus, .join select:focus { outline: 2px solid var(--gold-deep); outline-offset: 2px; border-color: var(--forest); }
.join .select { position: relative; }
.join .select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--forest); border-bottom: 1.5px solid var(--forest); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.join select { padding-right: 44px; cursor: pointer; }
.consent { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; }
.consent .box { width: 22px; height: 22px; border: 1.5px solid var(--forest); border-radius: 6px; background: #fff; display: grid; place-items: center; margin-top: 1px; }
.consent .box::after { content: ""; width: 6px; height: 11px; border: solid var(--ivory); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); opacity: 0; }
.consent input:checked + .box { background: var(--forest); }
.consent input:checked + .box::after { opacity: 1; }
.consent input:focus-visible + .box { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #8A2B1E; font-size: 14px; font-weight: 700; }
.joined { grid-column: 1 / -1; background: var(--cream); border-left: 3px solid var(--gold); padding: 14px 16px; border-radius: var(--r-sm); color: var(--forest); font-weight: 700; }
.join button[aria-busy="true"] { opacity: .8; cursor: progress; }

@media (max-width: 900px) {
  .join { grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
  .consent { font-size: 13px; }
}

/* ---------------------------------------------------------------- 11 Footer */
.footer { padding: 72px 0 40px; }
.footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 48px; }
.footer h4 { font-size: 13px; letter-spacing: .2em; color: var(--gold); margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.footer a { color: var(--ivory); text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer address { font-size: 15px; line-height: 1.5; }
.footer .legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(246,241,231,.2); display: flex; justify-content: space-between; gap: 24px; font-size: 13px; color: var(--soft); flex-wrap: wrap; }
.footer .legal-links { display: flex; gap: 18px; }
.footer .legal a { color: var(--soft); }

@media (max-width: 1200px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  body { padding-bottom: 76px; }
  .footer { padding: 40px 0 32px; }
  .footer .cols { grid-template-columns: 1fr; gap: 28px; }
  .footer h4 { font-size: 12px; margin-bottom: 10px; }
  .footer ul { gap: 8px; }
  .footer .legal { margin-top: 28px; padding-top: 20px; font-size: 12px; display: grid; gap: 10px; }
}

/* Sticky action bar, phones */
.bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: rgba(246,241,231,.96); border-top: 1px solid var(--hairline); padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; align-items: center; }
@supports (backdrop-filter: blur(10px)) { .bar { backdrop-filter: blur(10px); } }

/* ---------------------------------------------------------------- 404 and 500 */
.notfound { padding: 200px 0 140px; }
.notfound h1 { font-size: clamp(34px, 3.6vw, 52px); letter-spacing: .06em; margin: 18px 0 18px; }
.notfound .lead { margin-bottom: 28px; }
.nf-links { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .notfound { padding: 120px 0 72px; } .nf-links .btn { flex: 1 1 100%; } }
