/* ==========================================================================
   Diane Boote — Alexander Technique
   Shared design tokens live in :root. Change colours, fonts and widths here.
   ========================================================================== */

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree-latin-wght.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour — dark grey on white, matching Diane's printed materials */
  --colour-ink: #2d2c2b;          /* body text */
  --colour-brand: #474645;        /* sampled from the monogram; buttons, accents */
  --colour-brand-hover: #2d2c2b;
  --colour-muted: #5c5a57;        /* secondary text (≈6.8:1 on white) */
  --colour-rule: #dcdad6;         /* dividers */
  --colour-surface: #ffffff;
  --colour-surface-alt: #f5f4f2;  /* Lessons & Contact band */
  --colour-on-brand: #ffffff;

  /* Type */
  --font-display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-sm: 0.9375rem;
  --text-base: 1.125rem;
  --text-lead: clamp(1.1875rem, 1.05rem + 0.45vw, 1.3125rem);
  --text-h3: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  --text-h2: clamp(1.875rem, 1.5rem + 1.5vw, 2.625rem);
  --text-name: clamp(2.875rem, 2rem + 4vw, 5rem);
  --leading: 1.65;

  /* Layout */
  --container: 72rem;
  --measure: 38rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section-space: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  --header-height: 4.5rem;
  --radius: 2px;
  --tap: 3rem; /* minimum touch target */
}

/* ---------- Base ---------- */

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--colour-surface);
  color: var(--colour-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--colour-brand);
  text-wrap: balance;
  overflow-wrap: break-word; /* only breaks a word too long for the line, e.g. with very large text */
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-h3);
}

p {
  margin: 0;
}

figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--colour-ink);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: var(--header-height);
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--colour-brand);
  color: var(--colour-on-brand);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Shared pieces ---------- */

.prose > * + * {
  margin-top: 1.1em;
}

.prose > h2 + * {
  margin-top: 1.25rem;
}

.prose {
  max-width: var(--measure);
}

.lead {
  font-size: var(--text-lead);
  line-height: 1.55;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--colour-muted);
}

.section-label::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: currentColor;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  background: var(--colour-brand);
  color: var(--colour-on-brand);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.button:hover {
  background: var(--colour-brand-hover);
}

/* A thin offset rule behind photographs: quiet framing, no decoration. */
.framed-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0.875rem 0.875rem 0 -1px var(--colour-surface), 0.875rem 0.875rem 0 0 var(--colour-rule);
}

.section--tinted .framed-photo {
  box-shadow: 0.875rem 0.875rem 0 -1px var(--colour-surface-alt), 0.875rem 0.875rem 0 0 var(--colour-rule);
}

/* ---------- Header & navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.96);
  border-bottom: 1px solid var(--colour-rule);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgb(255 255 255 / 0.88);
    backdrop-filter: blur(8px);
  }
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap; /* with very large text the menu button drops to a second row instead of off-screen */
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  flex: 1 1 0;
  min-width: min(100%, 120px); /* fixed px so ordinary text enlargement does not force a wrap */
  max-width: max-content;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--tap);
  text-decoration: none;
  color: var(--colour-brand);
}

.brand__logo {
  width: 2.5rem;
  height: 2.5rem;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.brand__tag {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--colour-muted);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem clamp(0.75rem, 2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-family: var(--font-display);
  font-size: 1rem;
  text-decoration: none;
  color: var(--colour-ink);
  background: linear-gradient(currentColor, currentColor) no-repeat left calc(50% + 0.85em) / 0 1px;
  transition: background-size 0.25s ease;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="true"] {
  background-size: 100% 1px;
}

.site-nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--tap);
  padding: 0 0.875rem;
  border: 1px solid var(--colour-rule);
  border-radius: var(--radius);
  background: var(--colour-surface);
  color: var(--colour-ink);
  font: 500 1rem var(--font-display);
  cursor: pointer;
}

.no-js .site-nav__toggle {
  display: none;
}

.site-nav__toggle-icon,
.site-nav__toggle-icon::before,
.site-nav__toggle-icon::after {
  display: block;
  width: 1.125rem;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav__toggle-icon {
  position: relative;
}

.site-nav__toggle-icon::before,
.site-nav__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-nav__toggle-icon::before { top: -6px; }
.site-nav__toggle-icon::after { top: 6px; }

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon {
  background: transparent;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Small screens: when JavaScript is available the links fold behind a Menu button.
   Without JavaScript the links simply wrap under the logo. */
@media (max-width: 55.99em) {
  .no-js .site-header__inner {
    flex-wrap: wrap;
    padding-block: 0.5rem;
  }

  .js .site-nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--colour-surface);
    border-bottom: 1px solid var(--colour-rule);
    box-shadow: 0 12px 24px -16px rgb(0 0 0 / 0.25);
    /* Keep every link reachable on short screens and at high zoom: 100% is the header's height. */
    max-height: calc(100vh - 100%);
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .js .site-nav__list:not([data-open="true"]) {
    display: none;
  }

  .js .site-nav__list a {
    display: flex;
    min-height: 3.25rem;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--colour-rule);
    background: none;
  }

  .js .site-nav__list li:last-child a {
    border-bottom: 0;
  }
}

@media (min-width: 56em) {
  .site-nav__toggle {
    display: none !important;
  }
}

/* ---------- Home ---------- */

.hero {
  padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) clamp(3.5rem, 2rem + 5vw, 6rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "heading"
    "media"
    "body";
  gap: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.hero__heading { grid-area: heading; }
.hero__media { grid-area: media; }
.hero__body { grid-area: body; max-width: var(--measure); }

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero__kicker {
  font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--colour-muted);
}

.hero__name {
  font-size: var(--text-name);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}

.hero__tagline {
  max-width: 26ch;
  margin-top: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  padding-top: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border-top: 1px solid var(--colour-rule);
  font-family: var(--font-display);
  font-size: clamp(1.3125rem, 1.1rem + 0.8vw, 1.6875rem);
  font-weight: 300;
  line-height: 1.35;
  color: var(--colour-ink);
}

.hero__media {
  max-width: min(18rem, calc(100% - 0.875rem));
}

.hero__body > p + p {
  margin-top: 1.1em;
}

.offer {
  display: grid;
  gap: 0.25rem;
  margin: 2rem 0;
  padding: 1.125rem 0;
  border-block: 1px solid var(--colour-rule);
  list-style: none;
  font-family: var(--font-display);
}

.offer__item {
  font-size: 1.0625rem;
  color: var(--colour-muted);
}

.offer__item--lead {
  font-size: 1.1875rem;
  font-weight: 500;
  color: var(--colour-brand);
}

@media (min-width: 36em) {
  .offer {
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: baseline;
    gap: 1.25rem;
  }

  .offer__item + .offer__item {
    padding-left: 1.25rem;
    border-left: 1px solid var(--colour-rule);
  }
}

@media (min-width: 52em) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "heading media"
      "body    media";
    column-gap: clamp(3rem, 6vw, 6rem);
    row-gap: 2.25rem;
  }

  .hero__media {
    justify-self: end;
    align-self: start;
    width: 100%;
    max-width: 25rem;
    padding-top: 0.5rem;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section-space);
}

.section--ruled {
  border-top: 1px solid var(--colour-rule);
}

.section--tinted {
  background: var(--colour-surface-alt);
}

/* About */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

.facts dl {
  margin: 0;
  border-top: 1px solid var(--colour-brand);
}

.facts__row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--colour-rule);
}

.facts dt {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--colour-muted);
}

.facts dd {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  line-height: 1.4;
  color: var(--colour-brand);
}

@media (min-width: 52em) {
  .about__grid {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
    column-gap: clamp(3rem, 8vw, 7rem);
    align-items: start;
  }

  .facts {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    margin-top: 0.75rem;
  }
}

/* The Alexander Technique */

.technique__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

.technique__media {
  max-width: min(26rem, calc(100% - 0.875rem));
}

@media (min-width: 52em) {
  .technique__intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    column-gap: clamp(3rem, 8vw, 7rem);
    align-items: start;
  }

  .technique__media {
    justify-self: end;
    margin-top: 0.75rem;
  }
}

.explore__title {
  max-width: 28ch;
  margin-top: clamp(4rem, 3rem + 4vw, 6rem);
}

.explore {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0 clamp(1.5rem, 3vw, 3rem);
  margin: 2rem 0 0;
}

.explore__item {
  padding: 1.5rem 0 1.75rem;
  border-top: 1px solid var(--colour-rule);
}

.explore dt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--colour-brand);
}

.explore dd {
  margin: 0.5rem 0 0;
  color: var(--colour-ink);
}

.everyday {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
  padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  border-top: 1px solid var(--colour-brand);
}

@media (min-width: 52em) {
  .everyday {
    grid-template-columns: minmax(12rem, 20rem) minmax(0, 1fr);
    column-gap: clamp(3rem, 8vw, 7rem);
  }
}

/* Lessons & Contact */

.lessons__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

.lesson-details {
  max-width: var(--measure);
  margin: 2.25rem 0 0;
  border-top: 1px solid var(--colour-brand);
}

.lesson-details__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--colour-rule);
  font-family: var(--font-display);
}

.lesson-details dt {
  font-size: 1.0625rem;
  color: var(--colour-muted);
}

.lesson-details dd {
  margin: 0;
  font-size: 1.25rem;
  color: var(--colour-brand);
}

.lesson-details__row--lead dd {
  font-weight: 500;
}

.lessons__media {
  max-width: min(20rem, calc(100% - 0.875rem));
  margin-top: 3rem;
}

.contact-card {
  align-self: start;
  /* px rather than rem: same as before at normal size, but padding does not swell with enlarged text */
  padding: clamp(20px, 12px + 2.5vw, 44px);
  background: var(--colour-surface);
  border: 1px solid var(--colour-rule);
  border-top: 3px solid var(--colour-brand);
  border-radius: var(--radius);
}

.contact-card > p {
  margin-top: 1rem;
}

.contact-list {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-link {
  display: flex;
  flex-wrap: wrap; /* with very large text the icon sits above the label instead of squeezing it */
  align-items: center;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1rem);
  min-height: 4rem;
  padding: 12px clamp(14px, 8px + 1.5vw, 18px);
  border: 1px solid var(--colour-brand);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--colour-brand);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
  background: var(--colour-brand);
  color: var(--colour-on-brand);
}

.contact-link__icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
}

.contact-link__text {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: min(100%, 7.5rem); /* below this the text moves under the icon */
  line-height: 1.3;
}

.contact-link__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-link__value {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  overflow-wrap: anywhere;
}

.contact-card__location {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 0 1.125rem;
  font-family: var(--font-display);
  color: var(--colour-muted);
}

@media (min-width: 52em) {
  .lessons__grid {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
    column-gap: clamp(3rem, 7vw, 6rem);
  }

  .contact-card {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
  }
}

/* ---------- Privacy page ---------- */

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap);
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--colour-ink);
}

.notice {
  padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) var(--section-space);
}

.notice h1 {
  font-size: var(--text-h2);
  letter-spacing: -0.01em;
}

.notice .prose > h2 {
  margin-top: 2.5rem;
  font-size: var(--text-h3);
}

.notice__updated {
  font-size: var(--text-sm);
  color: var(--colour-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--colour-rule);
  font-size: var(--text-sm);
  color: var(--colour-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.site-footer__brand img {
  width: 2rem;
  height: 2rem;
}

.site-footer__name {
  margin-right: 0.375rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--colour-brand);
}

.site-footer__meta a {
  display: inline-block;
  padding-block: 0.75rem;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
