/* The Wee Cake Stop. Palette: paper, ink, dark wood accent from the stall sign. Type: Fraunces display, Inter text. */
:root {
  --paper: #F6F1EA;
  --surface: #FFFCF7;
  --line: #DCCFBE;
  --ink: #1C1814;
  --body: #4A4038;
  --accent: #3A2A1F;
  --accent-hover: #2C2018;
  --accent-ink: #FBF6EF;

  --f-display: "Fraunces", Georgia, serif;
  --f-text: "Inter", system-ui, sans-serif;

  --fs-xs: 0.8125rem;  /* 13 */
  --fs-sm: 1rem;       /* 16 body */
  --fs-md: 1.25rem;    /* 20 */
  --fs-lg: 1.625rem;   /* 26 */
  --fs-xl: 2.125rem;   /* 34 */
  --fs-2xl: 3rem;      /* 48, desktop h1 only */

  --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px;
  --s-5: 32px; --s-6: 48px; --s-7: 64px;

  --r-sm: 4px;
  --r-pill: 999px;

  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 400 var(--fs-sm)/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 var(--s-3); }
h1, h2, h3 { font-family: var(--f-display); color: var(--ink); font-weight: 400; margin: 0; }
h1 { font-size: var(--fs-xl); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-lg); line-height: 1.2; margin-bottom: var(--s-4); }
h3 { font-size: var(--fs-md); line-height: 1.3; font-weight: 600; margin-bottom: var(--s-1); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-3); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s-3); top: var(--s-2); z-index: 20; background: var(--surface); padding: var(--s-2) var(--s-3); }

/* Nav: compact, solid, one line */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-3);
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.mark {
  font: 600 var(--fs-md)/1 var(--f-display);
  color: var(--ink); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav nav { display: flex; gap: var(--s-2); }
.nav nav a {
  min-height: 44px; min-width: 44px; padding: 0 var(--s-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 500; text-decoration: none;
}
.nav nav a:hover { text-decoration: underline; }
.nav-wide { display: none !important; color: var(--body) !important; }

/* Buttons: pill is the only pill on the page */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s-4);
  border: 0; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink);
  font: 500 var(--fs-sm)/1 var(--f-text);
  text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease-out;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-light { background: var(--accent-ink); color: var(--accent); }
.btn-light:hover { background: #FFFFFF; }

/* Hero: photo then green panel on phones, side by side from 900px */
.hero { display: grid; margin-bottom: var(--s-6); }
.hero-photo { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-panel { background: var(--accent); color: var(--accent-ink); padding: var(--s-5) var(--s-3); }
.hero-panel h1 { color: #FFFFFF; max-width: 14ch; margin-bottom: var(--s-3); }
.hero-panel .lede { max-width: 34ch; margin-bottom: var(--s-4); }
.hero-panel a:focus-visible { outline-color: var(--accent-ink); }

/* What I make: two photos at different sizes, not identical cards */
.cakes { margin-bottom: var(--s-6); }
.cake-grid { display: grid; gap: var(--s-5); }
.cake { margin: 0; }
.cake img { width: 100%; object-fit: cover; border-radius: var(--r-sm); background: var(--line); }
.cake-tall img { aspect-ratio: 4 / 5; object-position: 50% 45%; }
.cake-square img { aspect-ratio: 1 / 1; object-position: 50% 58%; }
.cake figcaption { padding-top: var(--s-3); }
.cake figcaption p { margin: 0; }
.cake-note { border-top: 1px solid var(--line); padding-top: var(--s-3); margin: 0; }
.cake-note strong { color: var(--ink); font-weight: 600; }

/* About: heading and text side by side on desktop */
.about { margin-bottom: var(--s-6); }
.about-body { max-width: 60ch; }
.social { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin: 0; }
.social a {
  min-height: 44px; min-width: 44px; display: inline-flex; align-items: center;
  font-weight: 500; text-underline-offset: 3px;
}

/* Order: the one raised surface */
.order {
  margin-bottom: var(--s-6);
}
.order-intro { max-width: 60ch; }
.form {
  display: grid; gap: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s-4) var(--s-3);
  margin-top: var(--s-2);
}
.field label { display: block; font: 500 var(--fs-xs)/1.4 var(--f-text); color: var(--ink); margin-bottom: var(--s-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px;
  border: 1px solid #BFB2A1; border-radius: var(--r-sm);
  background: #FFFFFF; color: var(--ink);
  padding: 12px; font: 400 var(--fs-sm)/1.4 var(--f-text);
}
.field textarea { min-height: 120px; resize: vertical; }
.field [aria-invalid="true"] { border-color: #9B2C2C; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.form-msg { margin: 0; font-size: var(--fs-sm); }
.form-msg:empty { display: none; }
.form-msg.is-error { color: #9B2C2C; }
.form-msg.is-ok { color: var(--accent); font-weight: 500; }

.footer { border-top: 1px solid var(--line); padding: var(--s-5) 0 var(--s-6); }
.footer-in { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; align-items: flex-start; }
.footer strong { font-family: var(--f-display); color: var(--ink); font-weight: 600; }
.footer p { margin: 0; }

@media (min-width: 900px) {
  .wrap, .nav-in { padding: 0 var(--s-5); }
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  .nav-wide { display: inline-flex !important; }
  .nav nav { gap: var(--s-3); }
  .hero { grid-template-columns: 5fr 6fr; margin-bottom: var(--s-7); }
  .hero-photo { aspect-ratio: auto; min-height: 440px; position: relative; }
  .hero-photo img { position: absolute; inset: 0; }
  .hero-panel { padding: var(--s-7) var(--s-6); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
  .cakes, .about, .order { margin-bottom: var(--s-7); }
  .cake-grid { grid-template-columns: 7fr 5fr; align-items: end; gap: var(--s-5) var(--s-6); }
  .cake-square { align-self: start; }
  .cake-note { grid-column: 1 / -1; max-width: 60ch; }
  .about { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-6); align-items: start; }
  .order { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-6); align-items: start; }
  .form { grid-template-columns: 1fr 1fr; padding: var(--s-5); margin-top: 0; }
  .form .full { grid-column: 1 / -1; }
}

/* Wee Cake Stop: offers as alternating photo rows; the stall as a photo spread */
.hero-photo img { object-position: 50% 55%; }
.bakes { margin-bottom: var(--s-6); }
.bake { margin: 0 0 var(--s-5); display: grid; gap: var(--s-3); }
.bake img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-sm); background: var(--line); }
.bake figcaption p { margin: 0; }
.stall { margin-bottom: var(--s-6); }
.stall-intro { max-width: 60ch; }
.stall-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.stall-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-sm); background: var(--line); }
.stall-grid .wide { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.order-intro .social { margin-bottom: var(--s-3); word-break: break-all; }
@media (min-width: 900px) {
  .bakes { margin-bottom: var(--s-7); }
  .bake { grid-template-columns: 7fr 5fr; gap: var(--s-6); align-items: center; margin-bottom: var(--s-6); }
  .bake-flip { grid-template-columns: 5fr 7fr; }
  .bake-flip img { order: 2; }
  .stall { display: grid; grid-template-columns: 4fr 8fr; gap: var(--s-6); align-items: start; margin-bottom: var(--s-7); }
  .stall-grid { gap: var(--s-3); }
  .stall-grid .wide { aspect-ratio: 16 / 9; }
  .stall-grid img:not(.wide) { aspect-ratio: 1 / 1; }
}
