/*
 * yourbeth.com. Brand tokens from brand/07-Colour/beth-colours.json; sizes,
 * radius and shadow from spec section 3, in CSS pixels as the app uses them.
 *
 * Rose is reserved for attention: on this site, only a form error.
 * The gradient is for the logo tile and the odd accent, never a page wash.
 */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Mulish";
  src: url("fonts/Mulish-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Mulish";
  src: url("fonts/Mulish-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --plum: #6E3C86;
  --deep-plum: #5B2F72;
  --orchid: #C063A6;
  --blush: #F4A0C0;
  --rose: #B23A66;
  --aubergine: #3D2145;
  --pale-blush: #FCEBF1;
  --lavender: #DEC6F2;
  --white: #FFFFFF;
  --gradient: linear-gradient(135deg, #F4A0C0 0%, #C063A6 52%, #6E3C86 100%);
  --radius: 12px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

/* A display rule on a class would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--pale-blush);
  color: var(--aubergine);
  font-family: Mulish, Candara, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: Fraunces, "Book Antiqua", Georgia, serif;
  font-weight: 700;
  color: var(--plum);
  line-height: 1.25;
  margin: 0 0 12px;
}
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

p { margin: 0 0 16px; }

a { color: var(--plum); text-underline-offset: 2px; }
a:hover { color: var(--deep-plum); }

:focus-visible { outline: 3px solid var(--orchid); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* -------------------------------------------------------------- header -- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(252, 235, 241, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--lavender);
}
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--plum);
}
.brand img { display: block; }

.links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.links a { color: var(--aubergine); text-decoration: none; font-size: 14px; white-space: nowrap; }
.links a:hover, .links a[aria-current="page"] { color: var(--plum); }
.links a[aria-current="page"] { font-weight: 700; }

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--plum);
  color: var(--white);
  font: 700 16px/1 Mulish, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--deep-plum); color: var(--white); }
.btn:active { background: var(--deep-plum); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }

.quiet-link { font-weight: 700; display: inline-flex; align-items: center; min-height: 48px; }

.pill {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--lavender);
  color: var(--deep-plum);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- hero -- */

.hero { padding: 48px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
.hero-text { padding-top: 24px; }
/* The slogan. Spec section 3 gives the display size as 28pt; this is the one
   heading set in that literal unit, so it is the first thing anyone sees. */
.hero h1 { font-size: 28pt; max-width: 16ch; }
@media (max-width: 560px) { .hero h1 { font-size: 30px; } }
.lede { font-size: 18px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 24px; }

.hero-card {
  margin: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* The one accent: the gradient as a thin rule across the top of the card. */
.hero-card::before { content: ""; display: block; height: 4px; background: var(--gradient); }

/* The video in the hero: the card keeps its gradient rule; the play button
   sits on the poster until she presses it. */
.hero-video { position: relative; align-self: center; }
.hero-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--deep-plum); }
.hero-video .play {
  position: absolute;
  left: 50%;
  top: calc(50% - 18px);
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 99px;
  background: var(--white);
  color: var(--plum);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.hero-video .play:hover { background: var(--pale-blush); }
.hero-video .play[hidden] { display: none; }
.hero-video figcaption { padding: 10px 16px; font-size: 14px; }

.chat { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.bubble {
  margin: 0;
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
}
.bubble p { margin: 0; }
.bubble p + p, .bubble p + ul { margin-top: 8px; }
.bubble ul { margin: 0; padding-left: 18px; }
.bubble li + li { margin-top: 4px; }
.bubble.her { align-self: flex-end; background: var(--plum); color: var(--white); }
.bubble.beth { align-self: flex-start; background: var(--lavender); color: var(--aubergine); }

/* ------------------------------------------------------------ sections -- */

main > section { padding: 48px 0; }
.band { background: var(--white); }
.intro { max-width: 70ch; margin-bottom: 32px; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.band .card { background: var(--pale-blush); box-shadow: none; }

.steps { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps p { margin: 0; }
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 99px;
  background: var(--plum);
  color: var(--white);
  font-weight: 700;
}

.days { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 840px; }
.days p { margin: 0; }

.team { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.member { display: flex; flex-direction: column; }
.member img { border-radius: 99px; margin-bottom: 12px; display: block; }
.member h3 { margin-bottom: 4px; }
.member h3 span { display: block; font-family: Mulish, system-ui, sans-serif; font-size: 12px; font-weight: 700; color: var(--orchid); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }
.member .tag { font-size: 14px; margin-bottom: 12px; }
.member blockquote {
  margin: auto 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--lavender);
  font-size: 14px;
  line-height: 1.5;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.two-col > div { max-width: 70ch; }

.promises, .plain, .ticks { padding: 0; margin: 0; list-style: none; }
.promises li, .plain li { padding: 12px 0; border-top: 1px solid var(--lavender); }
.promises li:first-child, .plain li:first-child { border-top: 0; padding-top: 0; }
.ticks li { position: relative; padding: 4px 0 4px 28px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--plum);
  border-bottom: 2px solid var(--plum);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- join -- */

.join { background: var(--white); }
.join-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.join-text { max-width: 70ch; }
.join .card { background: var(--pale-blush); box-shadow: none; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 14px; font-weight: 700; }
.optional { font-weight: 400; font-size: 12px; opacity: 0.8; }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--lavender);
  color: var(--aubergine);
  font: 16px/1.4 Mulish, system-ui, sans-serif;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--plum); background: var(--white); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--rose); }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.problem { margin: 0; color: var(--rose); font-weight: 700; font-size: 14px; }
.fine { margin: 0; font-size: 12px; }

.done { align-items: flex-start; }
.done img { border-radius: 99px; }
.done h3 { font-size: 20px; margin: 0; }
.done p { margin: 0; }

/* ---------------------------------------------------- morning briefing -- */

.morning { align-items: start; }
.briefing { margin: 0; display: flex; flex-direction: column; gap: 12px; max-width: 460px; justify-self: center; width: 100%; }
.lock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--aubergine);
  color: var(--white);
  font-size: 14px;
  line-height: 1.4;
}
.lock img { border-radius: 8px; flex: none; }
.lock div { flex: 1; min-width: 0; }
.lock strong { display: block; }
.lock time { font-size: 12px; opacity: 0.75; align-self: flex-start; }
.day { padding: 24px; }
.day::before { content: ""; display: block; height: 4px; margin: -24px -24px 20px; border-radius: var(--radius) var(--radius) 0 0; background: var(--gradient); }
.day-date { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--orchid); }
.day h3 { font-size: 20px; margin: 0 0 12px; }
.day ul { list-style: none; margin: 0; padding: 0; }
.day li { padding: 10px 0; border-top: 1px solid var(--pale-blush); font-size: 14px; line-height: 1.5; }
.day li span { display: block; font-size: 12px; font-weight: 700; color: var(--plum); }
.briefing figcaption { font-size: 12px; text-align: center; }

/* ------------------------------------------------- the two inner pages -- */

.page-hero { padding: 48px 0 32px; }
.page-hero h1 { max-width: 22ch; }

.toc { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 99px;
  background: var(--white);
  color: var(--plum);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.toc a::before { content: counter(toc) ". "; white-space: pre; color: var(--orchid); }
.toc a:hover { background: var(--lavender); }

.group-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.group-head img { border-radius: 99px; flex: none; display: block; }
.group-head h2 { margin: 0; }
.group-head p { margin: 0; font-size: 14px; }

.scenarios { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.scenario { display: flex; flex-direction: column; }
.scenario h3 { font-size: 16px; }
.moment { font-size: 14px; }
.fix {
  margin: auto 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--lavender);
  font-size: 14px;
  line-height: 1.5;
}
.fix span {
  display: block;
  margin-bottom: 4px;
  color: var(--plum);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.band .scenario { background: var(--pale-blush); }
.band .scenario .fix { background: var(--white); }

/* "Watch her work": the topics on the left, a phone playing them on the right. */
.showcase-grid { display: grid; grid-template-columns: 1fr minmax(320px, 400px); gap: 48px; align-items: start; }
.topics { position: relative; list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.topics button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 16px 8px 8px;
  border: 0;
  border-radius: var(--radius);
  background: var(--pale-blush);
  color: var(--aubergine);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.topics button:hover { background: var(--lavender); }
.topics button[aria-pressed="true"] { background: var(--plum); color: var(--white); }
.topics img { border-radius: 99px; flex: none; display: block; }
.topics strong { display: block; font-size: 14px; line-height: 1.3; }
.topics small { display: block; font-size: 12px; opacity: 0.8; }

.device {
  margin: 0;
  position: sticky;
  top: 88px;
  border: 10px solid var(--aubergine);
  border-radius: 40px;
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.device-head { display: flex; align-items: center; gap: 12px; padding: 20px 16px 12px; border-bottom: 1px solid var(--pale-blush); }
.device-head img { border-radius: 99px; display: block; }
.device-head strong { display: block; font-family: Fraunces, Georgia, serif; color: var(--plum); }
.device-head span { font-size: 12px; }
.device-chat {
  height: 460px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.device-chat::-webkit-scrollbar { display: none; }
.device-chat .bubble { animation: pop 0.25s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .device-chat .bubble { animation: none; } }

.typing { display: flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 99px; background: var(--plum); opacity: 0.35; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 50% { opacity: 1; } }

/* The photographed class calendar, drawn rather than shown. */
.photo {
  width: 180px;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 8px;
  background: var(--white);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.photo span { grid-column: 1 / -1; color: var(--aubergine); font-size: 11px; font-weight: 700; }
.photo i { aspect-ratio: 1; border-radius: 2px; background: var(--lavender); }
.photo i:nth-child(5n + 3) { background: var(--blush); }
.photo i:nth-child(7n + 6) { background: var(--orchid); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.tip h3 { margin-bottom: 4px; }
.tip p { margin: 0; font-size: 14px; }
.band .tip { background: var(--pale-blush); box-shadow: none; }

.chat.said { padding: 0; align-items: flex-start; }
.chat.said .bubble { align-self: flex-start; }

.teasers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.teaser { display: flex; flex-direction: column; text-decoration: none; color: var(--aubergine); border-top: 4px solid var(--plum); }
.teaser:hover { color: var(--aubergine); background: var(--white); outline: 2px solid var(--lavender); }
.teaser h3 { font-size: 20px; }
.teaser p { font-size: 14px; }
.more-link { margin-top: auto; font-weight: 700; color: var(--plum); }
.more-link::after { content: " →"; }

.cta { text-align: center; }
.cta .actions { justify-content: center; }

.note-dialog {
  max-width: min(420px, calc(100vw - 32px));
  padding: 32px 24px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--aubergine);
  box-shadow: var(--shadow);
  text-align: center;
}
.note-dialog::backdrop { background: rgba(61, 33, 69, 0.45); }
.note-dialog img { border-radius: 99px; display: block; margin: 0 auto 16px; }
.note-dialog h3 { font-size: 20px; }
.note-dialog form { margin-top: 8px; }
.note-dialog .btn { width: 100%; }

/* ----------------------------------------------------------------- faq -- */

details { border-top: 1px solid var(--lavender); }
details:last-of-type { border-bottom: 1px solid var(--lavender); }
summary {
  cursor: pointer;
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  font-weight: 700;
  color: var(--plum);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--orchid); }
details[open] summary::after { content: "–"; }
details p { max-width: 70ch; }

/* -------------------------------------------------------------- footer -- */

.foot { border-top: 1px solid var(--lavender); padding: 24px 0; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }

/* ------------------------------------------------------- privacy, terms -- */

main.legal { max-width: 70ch; margin: 0 auto; padding: 48px 16px; }
main.legal h1 { margin-bottom: 4px; }
main.legal h2 { margin-top: 40px; }
main.legal h3 { margin-top: 24px; }
.updated { font-size: 12px; opacity: 0.8; }

.notice {
  background: var(--white);
  border-left: 4px solid var(--plum);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin: 24px 0;
}

table { border-collapse: collapse; width: 100%; margin: 16px 0; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--lavender); vertical-align: top; }
th { color: var(--plum); font-weight: 700; }

/* -------------------------------------------------------------- narrow -- */

@media (max-width: 880px) {
  .hero-grid, .two-col, .join-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps, .team { grid-template-columns: 1fr 1fr; }
  /* The showcase: the topics become a row of chips above the phone. */
  .showcase-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .showcase-grid > * { min-width: 0; }
  .topics { flex-direction: row; overflow-x: auto; margin-top: 16px; padding-bottom: 4px; scrollbar-width: none; }
  .topics::-webkit-scrollbar { display: none; }
  .topics li { flex: none; }
  .topics button { width: auto; min-height: 48px; padding: 6px 14px 6px 6px; }
  .topics img { width: 32px; height: 32px; }
  .topics small { display: none; }
  .device { position: static; max-width: 400px; width: 100%; justify-self: center; }
  .device-chat { height: 420px; }
  /* The page links drop to a second row that scrolls sideways, rather than vanishing. */
  .top-row { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
  .links { order: 3; width: 100%; margin: 0; overflow-x: auto; gap: 20px; padding: 4px 0 10px; scrollbar-width: none; }
  .links::-webkit-scrollbar { display: none; }
}

@media (max-width: 560px) {
  .hero { padding: 32px 0; }
  main > section { padding: 32px 0; }
  .steps, .team, .days, .field-row, .scenarios, .teasers { grid-template-columns: 1fr; }
  .page-hero { padding: 32px 0 24px; }
  .lede { font-size: 16px; }
  .bubble { max-width: 92%; }
}
