/* Direction B — bakery sign. Hand-written, no framework (see CLAUDE.md). */

:root {
  --accent: #9c3b12;
  --accent-dark: #742b0c;
  --ink: #24201c;
  --ink-soft: #4c443c;
  --paper: #fdf6e9;
  --paper-warm: #f5e7ce;
  --dark: #2e2722;
  --dark-rule: #4a413a;
  --dark-link: #f3d9a8;
  --rule: #e8dac0;

  --font-display: 'Zilla Slab', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad-x: clamp(20px, 6vw, 72px);
  --measure: 70ch;
}

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

/*
 * Must come with !important. Several components below set `display: flex`,
 * and a class selector beats the browser's built-in [hidden] rule — so
 * el.hidden = true would silently do nothing to them.
 */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

p { margin: 0; text-wrap: pretty; max-width: var(--measure); }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }

:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------- test-mode banner */

.testbar {
  background: #2b2f6b;
  color: #eef0ff;
  padding: 12px var(--pad-x);
  font-size: 17px;
  line-height: 1.5;
  /* Deliberately not a warm tone — it should not look like part of the site. */
}

.testbar strong { letter-spacing: 0.04em; text-transform: uppercase; }

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

.masthead {
  background: var(--accent);
  color: var(--paper);
  padding: 58px var(--pad-x);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

.masthead__eyebrow {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.92;
}

.masthead h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.masthead p { font-size: 23px; line-height: 1.5; opacity: 0.94; max-width: none; }

/*
 * The pointing hand is decoration, not content, so it lives here rather than
 * in the markup — and which way it points depends on where the photo lands,
 * which is a layout question the template cannot answer.
 *
 * Desktop: two columns, photo to the right of the text.
 */
.masthead__text p::after {
  content: ' 👉';
  font-size: 2rem;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}
.masthead__text { display: flex; flex-direction: column; gap: 22px; }
.masthead__loaf {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.masthead__loaf img { width: 60%; max-width: 420px; display: block; }

.masthead__loaf figcaption {
  font-size: 16px;
  font-style: italic;
  opacity: 0.78;
  text-align: center;
}

/* Inner pages get the compact version. */
.masthead--slim { display: block; padding: 34px var(--pad-x); }
.masthead--slim h1 { font-size: clamp(32px, 5vw, 46px); margin-top: 10px; }
.masthead--slim a { color: var(--paper); }

/* ------------------------------------------------------- booking bar (dark) */

.bookbar {
  background: var(--dark);
  color: var(--paper);
  padding: 30px var(--pad-x) 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bookbar__row {
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
}

.bookbar__fact { display: flex; flex-direction: column; gap: 3px; }

.bookbar__label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
}

.bookbar__value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
}

.bookbar__cta { margin-left: auto; }

.bookbar__list {
  border-top: 1px solid var(--dark-rule);
  padding-top: 20px;
  display: flex;
  gap: 11px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 19px;
  line-height: 1.5;
}

.bookbar__list span { opacity: 0.82; }
.bookbar__list a { color: var(--dark-link); font-family: var(--font-display); font-size: 21px; font-weight: 600; }

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

.button {
  display: inline-block;
  background: var(--paper);
  color: var(--dark);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  padding: 16px 36px;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  min-height: 44px;
}

.button:hover { background: #fff; color: var(--dark); }
.button--accent { background: var(--accent); color: var(--paper); }
.button--accent:hover { background: var(--accent-dark); color: var(--paper); }
.button--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.button--outline:hover { background: var(--accent); color: var(--paper); }
.button[disabled] { opacity: 0.5; cursor: not-allowed; }

/* --------------------------------------------------------------------- body */

.body {
  padding: 56px var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.body section { display: flex; flex-direction: column; gap: 14px; }

.body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 600;
  line-height: 1.18;
  color: var(--accent);
}

.body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.photo-band { margin: 0; }

.photo-band img {
  display: block;
  width: 100%;
  /* height: clamp(240px, 34vw, 420px); */
  object-fit: cover;
  /* The loaf sits in the upper half; keep it in frame when the band crops. */
  object-position: center 32%;
  border-radius: 4px;
  background: #f0dcbe;
}

.photo-band figcaption, .tutor__photo figcaption {
  margin-top: 10px;
  font-size: 16px;
  font-style: italic;
  color: #6b6055;
}

.notice {
  background: var(--paper-warm);
  padding: 24px 26px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}

.notice__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

/* The form page is a narrower column than the prose pages. */
.body--form { max-width: 860px; gap: 32px; }

.people { display: flex; flex-direction: column; gap: 16px; }

.people__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.submit-row {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.body__aside {
  border-top: 1px solid var(--rule);
  padding-top: 26px;
}

.optional { font-weight: 400; color: #6b6055; }

/*
 * Lets a full-width band (the booking bar) sit between sections inside
 * `.body`, which is horizontally padded. Cancelling that padding is what keeps
 * the band edge to edge without needing a second <main>.
 */
.fullbleed {
  margin-left: calc(var(--pad-x) * -1);
  margin-right: calc(var(--pad-x) * -1);
}

/* ------------------------------------------------------------- about the tutor */

.tutor {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* Text first in the markup so it is read first, and it is the point of the
   section — the photo is supporting. */
.tutor__text { display: flex; flex-direction: column; gap: 14px; }

.tutor__photo { margin: 0; }

.tutor__photo img {
  display: block;
  width: 100%;
  max-width: 340px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ gallery */

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Auto-fits the columns, so it goes 3-up, 2-up then 1-up on its own
     without a stack of breakpoints. */
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 28px;
}

.gallery__item figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }

.gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #f0dcbe;
}

.gallery__item figcaption {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------- form */

.form { display: flex; flex-direction: column; gap: 26px; max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: 19px; }
.field .hint { font-size: 17px; color: var(--ink-soft); line-height: 1.5; }

.field input,
.field select,
.textarea {
  font-family: inherit;
  font-size: 19px;
  padding: 12px 14px;
  min-height: 48px;
  border: 2px solid #cdbfa6;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.textarea { line-height: 1.5; resize: vertical; }

.field input:focus,
.field select:focus,
.textarea:focus { border-color: var(--accent); }

.person-card {
  border: 2px solid var(--rule);
  border-radius: 4px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fffdf8;
}

.person-card__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
}

.error {
  background: #fbe6df;
  border: 2px solid var(--accent);
  border-radius: 3px;
  padding: 16px 20px;
  color: #7a2c0d;
  font-size: 19px;
  max-width: 640px;
}

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

.footer {
  background: var(--dark);
  color: var(--paper);
  padding: 48px var(--pad-x) 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.footer h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.62;
}

.footer ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer a { color: var(--dark-link); font-size: 19px; }
.footer p { font-size: 18px; opacity: 0.7; line-height: 1.5; }

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

@media (max-width: 760px) {
  body { font-size: 19px; }
  .masthead { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 40px; }
  /* Text first, photo beneath it — so the hand above points down at it. */
  .masthead__text p::after { content: ' 👇'; }
  .masthead__loaf img { max-width: 260px; }
  .bookbar__cta { margin-left: 0; width: 100%; text-align: center; }
  .footer { grid-template-columns: 1fr; gap: 32px; }
  .tutor { grid-template-columns: 1fr; gap: 24px; }
  .tutor__photo img { max-width: 100%; }
}

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