/* YogaWithHollandAndPeter.com — site stylesheet
   Design language: warm grey ground, serif display with clay ampersand,
   overlapping Holland/Peter circles, letterspaced caps for labels. */

:root {
  --paper: #edece8;
  --paper-raised: #f6f5f2;
  --ink: #2f3b37;
  --ink-soft: #67706c;
  --clay: #c2917c;       /* Holland's circle, ampersand, accents */
  --slate: #9db1b9;      /* Peter's circle */
  --line: #d8d6d0;
  --on-accent: #fff;   /* text on a clay-filled button */
  --max-width: 46rem;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Dark theme.
   The theme is resolved and stamped onto <html data-theme> by an inline
   script in each page's <head>, before first paint, so there is no flash of
   the wrong palette. Only the colour tokens change; every rule below reads
   through them.

   Kept warm rather than neutral: the ground is a deepened version of --ink
   from the light palette, so the site reads as the same room with the lights
   down rather than as a different design. The clay and slate accents are
   lifted slightly because the same hue needs more luminance to hold contrast
   against a dark ground. */

:root[data-theme="dark"] {
  --paper: #1b201e;
  --paper-raised: #232927;
  --ink: #e6e4dd;
  --ink-soft: #a2aaa5;
  --clay: #d3a48d;
  --slate: #93a9b2;
  --line: #363d3a;
  --on-accent: #1b201e;
  color-scheme: dark;
}

:root {
  color-scheme: light;
}

/* Without JavaScript no data-theme is stamped, so honour the OS setting
   directly. Scoped to :not([data-theme]) so it never fights an explicit
   choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #1b201e;
    --paper-raised: #232927;
    --ink: #e6e4dd;
    --ink-soft: #a2aaa5;
    --clay: #d3a48d;
    --slate: #93a9b2;
    --line: #363d3a;
    --on-accent: #1b201e;
    color-scheme: dark;
  }

}

/* Theme toggle — a half-filled disc cycling auto -> Yang -> Yin. The
   yin-yang itself belongs to the hero mark; a second one here would compete. */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 1.9rem;
  height: 1.9rem;
  border: none;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 50%;
}

.theme-toggle:hover {
  color: var(--clay);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  transition: transform 0.35s ease;
}

/* Rotating the half-filled disc distinguishes the three states without
   needing three icons: filled right for Yin, filled left for Yang, and
   half-turned while following the time of day. */
:root[data-theme-mode="light"] .theme-toggle svg {
  transform: rotate(180deg);
}

:root[data-theme-mode="dark"] .theme-toggle svg {
  transform: rotate(0deg);
}

/* In automatic mode the symbol sits at a slight angle, so "following the
   time of day" reads as its own state rather than as one of the two. */
:root[data-theme-mode="auto"] .theme-toggle svg {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg {
    transition: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: 3rem; }
h2 { font-size: 1.9rem; margin-top: 2.75rem; }

.amp {
  color: var(--clay);
  font-style: italic;
}

a {
  color: var(--ink);
}

a:hover {
  color: var(--clay);
}

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

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Header & navigation — centered stack */

.site-header {
  padding: 2.25rem 1rem 1.5rem;
  text-align: center;
}

.site-title {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 1.4rem;
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}

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

/* About dropdown — native <details>, no JS */

.nav-about {
  position: relative;
}

.nav-about summary {
  list-style: none;
  cursor: pointer;
  color: var(--ink-soft);
}

.nav-about summary::-webkit-details-marker {
  display: none;
}

.nav-about summary::after {
  content: ' \25BE'; /* small caret */
  font-size: 0.8em;
}

.nav-about summary:hover,
.nav-about[open] summary {
  color: var(--clay);
}

.nav-drop {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: max-content;
  padding: 0.8rem 1.4rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(47, 59, 55, 0.08);
  z-index: 10;
}

.btn-signup {
  border: 1px solid var(--clay);
  color: var(--clay) !important;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
}

.btn-signup:hover {
  background: var(--clay);
  color: var(--paper) !important;
}

/* Mobile navigation — the nav collapses behind a hamburger below 720px.
   CSS-only: the checkbox holds the open/closed state. */

.nav-open,
.nav-burger {
  display: none;
}

@media (max-width: 719.98px) {
  .site-header {
    position: relative;
    padding: 1.1rem 3.5rem 1.1rem 1rem;
  }

  .site-title {
    font-size: 1.45rem;
  }

  .nav-burger {
    display: block;
    position: absolute;
    top: 1.35rem;
    right: 1rem;
    padding: 0.4rem;
    cursor: pointer;
  }

  .nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav-burger span + span {
    margin-top: 5px;
  }

  .nav-open:checked ~ .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-open:checked ~ .nav-burger span:nth-child(2) {
    opacity: 0;
  }

  .nav-open:checked ~ .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    display: none;
  }

  .nav-open:checked ~ .site-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    width: 100%;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
  }

  /* The About dropdown flattens into the menu list on mobile */
  .nav-drop {
    position: static;
    transform: none;
    display: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.75rem 0 0;
    gap: 1.1rem;
    text-align: center;
  }

  .nav-about[open] .nav-drop {
    display: flex;
  }

  .home .site-header {
    padding-top: 1.1rem;
    min-height: 3.6rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  @media (prefers-reduced-motion: reduce) {
    .nav-burger span {
      transition: none;
    }
  }
}

/* On the home page the hero headline is the site title, so the header
   shows only the nav — avoids saying the name twice in a row. */
.home .site-title {
  display: none;
}

.home .site-header {
  padding-top: 1.5rem;
}

.home .site-nav {
  margin-top: 0;
}

/* Main content */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

main h1, main h2 {
  text-align: center;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* A quieter line under a lede: the "check your spam folder" kind of aside. */
.note {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  max-width: 36rem;
  margin: 3rem auto;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 2.25rem 0;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.btn:hover {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--on-accent);
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
}

.btn.secondary:hover {
  color: var(--clay);
  border-color: var(--clay);
  background: transparent;
}

/* Home page offerings — 2×2 grid, single column on small screens */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2.75rem;
}

.offer {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem 1.5rem 1.75rem;
  text-align: center;
}

.offer h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.offer p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

@media (max-width: 719.98px) {
  .offer-grid {
    grid-template-columns: 1fr;
  }
}

.placeholder {
  background: var(--paper-raised);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Hero — the p/h mark */

.mark {
  display: block;
  width: 13rem;
  height: 13rem;
  margin: 2.5rem auto 0;
  animation: breathe 8s ease-in-out infinite;
}

.mark-letters {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}

.hero {
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  margin: 0.75rem 0 0;
}

/* Breathing: circles swell for four counts, settle for four */

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.breath-line {
  position: relative;
  margin: 1.75rem auto 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.breath-line .phase {
  display: inline-block;
  position: relative;
}

.breath-line .in,
.breath-line .out {
  white-space: nowrap;
}

.breath-line .out {
  position: absolute;
  left: 0;
  top: 0;
}

@keyframes phase-a {
  0%, 45% { opacity: 1; }
  55%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes phase-b {
  0%, 45% { opacity: 0; }
  55%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

.breath-line .in { animation: phase-a 8s ease-in-out infinite; }
.breath-line .out { animation: phase-b 8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .mark,
  .breath-line .in,
  .breath-line .out {
    animation: none;
  }
  .breath-line .out {
    display: none;
  }
}

/* Contact form */

form.contact {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
  margin: 0 auto;
}

form.contact label {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: grid;
  gap: 0.35rem;
}

form.contact input,
form.contact select,
form.contact textarea {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink);
  width: 100%;
}

form.contact input:focus,
form.contact select:focus,
form.contact textarea:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
}

/* Embeds */

.embed iframe {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 1rem 2.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

.site-footer .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}

.site-footer a {
  color: var(--ink-soft);
}

/* Contact form: error banner and the Turnstile widget */

.form-error {
  max-width: 34rem;
  margin: 0 auto 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--clay);
  border-radius: 6px;
  background: var(--paper-raised);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink);
}

.form-notice {
  max-width: 34rem;
  margin: 0 auto 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-raised);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink);
}

/* /admin/: the class label is the field label, so let it wrap and sit the
   signup count on its own line beneath it. */
form.admin label .optional {
  display: block;
  margin: 0.15rem 0 0.4rem;
}

.cf-turnstile {
  margin: 0.5rem 0 0.25rem;
}

.optional {
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink-soft);
}

/* Navigation item for a section that does not exist yet. Not a link, because
   a link to nowhere is worse than plain text for anyone using a keyboard or
   a screen reader. */

.nav-soon {
  color: var(--ink-soft);
  opacity: 0.65;
  cursor: default;
}

.nav-soon em {
  font-style: normal;
  font-size: 0.85em;
  letter-spacing: 0.08em;
  color: var(--clay);
}

/* Admin: who signed up for each class, with payment status. */
form.admin ul.signups {
  list-style: none;
  margin: -0.75rem 0 1.5rem;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.9rem;
}

form.admin ul.signups li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.btn.small {
  font-size: 0.65rem;
  padding: 0.3rem 0.8rem;
  margin-left: 0.5rem;
}

/* /schedule/: the schedule is the class picker (issue #17); tick as many
   classes as you like (issue #24). /signup/thanks/ reuses ul.schedule for
   the list of what was booked. */
form.contact fieldset.schedule,
ul.schedule {
  border: none;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

fieldset.schedule legend {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0;
  margin-bottom: 0.35rem;
}

fieldset.schedule label,
ul.schedule li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.8rem 0.6rem;
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

ul.schedule li { cursor: default; }

/* Undo the full-width every form input normally gets: a checkbox is a box.
   (Radio kept so a page cached before issue #24 still lays out right.) */
fieldset.schedule input[type="checkbox"],
fieldset.schedule input[type="radio"] {
  width: auto;
  flex: none;
  margin: 0;
  accent-color: var(--clay);
}

fieldset.schedule .when,
ul.schedule .when {
  flex: 1;
  min-width: 0;
}

fieldset.schedule .when strong,
ul.schedule .when strong {
  font-weight: 700;
}

fieldset.schedule label:hover {
  background: color-mix(in srgb, var(--clay) 7%, transparent);
}

fieldset.schedule label:has(input:checked) {
  background: color-mix(in srgb, var(--clay) 14%, transparent);
}

fieldset.schedule label.cancelled,
ul.schedule li.cancelled {
  cursor: default;
  color: var(--ink-soft);
  background: none;
}

fieldset.schedule label.cancelled .when,
ul.schedule li.cancelled .when {
  text-decoration: line-through;
  font-weight: 400;
}

fieldset.schedule label.cancelled .when strong { font-weight: 400; }

/* /waiver/: the liability waiver, readable in full above the signature
   form (issue #7). The text sits in its own bordered block so it reads as
   the document being signed, not as page copy. */

article.waiver {
  max-width: 38rem;
  margin: 2rem auto;
  padding: 1.75rem 2rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.6;
}

article.waiver h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  text-align: left;
}

article.waiver p {
  margin: 0 0 1em;
}

article.waiver .revised {
  margin: 1.25rem 0 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* A checkbox with a sentence beside it: plain text, not a letterspaced
   field label, and the box stays a box. */
form.contact label.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  line-height: 1.5;
}

form.contact label.check input[type="checkbox"] {
  width: auto;
  flex: none;
  margin: 0.3rem 0 0;
  accent-color: var(--clay);
}

/* The signature field: what is typed here is the signature, so it looks
   like one — a ruled line in the display face rather than a plain box. */
form.contact input.signature {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-style: italic;
  padding: 0.4rem 0.75rem;
  border-width: 0 0 2px;
  border-radius: 0;
  background: transparent;
}

/* Signed-waiver details on the page and the printable copy. */
dl.record {
  max-width: 34rem;
  margin: 1.5rem auto;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}

dl.record dt {
  color: var(--ink-soft);
}

dl.record dd {
  margin: 0;
  word-break: break-word;
}

@media print {
  body.print-waiver .site-header,
  body.print-waiver .site-footer,
  body.print-waiver form,
  body.print-waiver .btn,
  body.print-waiver .no-print {
    display: none !important;
  }

  body.print-waiver article.waiver {
    border: none;
    padding: 0;
    background: none;
  }
}
