/*
Theme Name: The Alphabet Table
Description: The original Alphabet Table family meal archive mockup.
Version: 1.2.0
Text Domain: alphabet-table
*/
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:ital,opsz,wght,SOFT@0,9..144,500,35;0,9..144,600,35;1,9..144,500,35&display=swap');
:root {
  color-scheme: light;
  --paper: #fcf6e9;
  --ink: #35231f;
  --red: #a2392a;
  --line: #d8c6af;
  --serif: Fraunces, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); }
.wrap { width: min(1232px, 90%); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { display: inline-block; cursor: pointer; border: 1px solid var(--red); color: var(--red); background: transparent; border-radius: 3px; padding: .56rem .9rem; font-weight: 700; }
button:hover, .button:hover { background: #f3e0d2; }
:focus-visible { outline: 3px solid #bb623d; outline-offset: 4px; }
.primary { background: var(--red); color: white; }
.primary:hover { background: #812a21; }
.masthead, footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.15rem; }
.masthead { border-bottom: 1px solid var(--line); }
.brand { font: 600 clamp(1.2rem, 2.2vw, 1.65rem)/1.15 var(--serif); }
nav { display: flex; gap: clamp(.6rem, 2.2vw, 2.25rem); align-items: center; font-weight: 600; font-size: .9rem; }
nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
.hero { display: grid; grid-template-columns: .8fr 1.15fr; gap: 5%; align-items: center; padding-block: clamp(2.4rem, 5vw, 5rem) clamp(1.9rem, 4vw, 3.4rem); }
.eyebrow { font-size: .78rem; letter-spacing: .16em; font-weight: 700; text-transform: uppercase; color: var(--red); margin: 0 0 .55rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.04; }
h1 { font-size: clamp(3.2rem, 7.05vw, 7rem); letter-spacing: -.045em; }
h1 em { color: var(--red); font-weight: 500; }
.intro > p:not(.eyebrow) { max-width: 34ch; margin: 1.3rem 0; font-size: clamp(1rem, 1.4vw, 1.18rem); }
figure { margin: 0; }
img { display: block; width: 100%; object-fit: cover; color: white; background: #75482e; }
.hero-image { aspect-ratio: 1.53; border-radius: 50% 50% 3px 3px / 13% 13% 3px 3px; object-position: center 55%; }
figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin-top: .55rem; color: #6b4d43; font-size: .87rem; }
figcaption span:first-child { font-weight: 700; }
.chapters { border-top: 1px solid var(--line); padding-block: 2rem 4rem; }
.section-title, .archive-heading { display: flex; justify-content: space-between; align-items: end; gap: .6rem 1rem; flex-wrap: wrap; }
h2 { font-size: clamp(2.45rem, 5vw, 4.35rem); letter-spacing: -.06em; }
.note { color: #6b4d43; margin: 0; font-size: .88rem; }
.letters { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); border-block: 1px solid var(--line); margin-block: 1.5rem; padding: .65rem 0; }
.letters > * { text-align: center; padding: .3rem 0; border-radius: 2px; line-height: 1.3; }
.letters button { border-color: transparent; }
.letters button[aria-pressed="true"] { background: var(--red); color: white; }
.letters span { color: #77675d; }
.archive-heading { align-items: center; margin-bottom: 1.15rem; }
h3 { font-size: clamp(1.55rem, 3vw, 2.3rem); letter-spacing: -.04em; }
.meal-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 245px),1fr)); gap: 1.2rem; }
.meal-card { display: block; width: 100%; text-align: left; padding: 0; overflow: hidden; color: var(--ink); border: 1px solid var(--line); background: #fffaf0; }
.meal-card img { aspect-ratio: 1.65; }
.meal-card span { display: block; }
.card-copy { padding: 1rem 1.15rem 1.25rem; }
.card-title { font: 600 1.62rem/1.12 var(--serif); }
.card-menu { margin-top: .35rem; color: #6b4d43; font-size: .92rem; font-weight: 500; }
.appendix { background: #f1e0ca; border-block: 1px solid var(--line); padding-block: 3.3rem; }
.section-copy { margin: .65rem 0 1.5rem; }
dialog { border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: min(680px, 92vw); padding: 0; max-height: 88dvh; border-radius: 8px; }
dialog::backdrop { background: #2d160ebf; }
.dialog-content { padding: clamp(1rem, 4vw, 2rem); }
.close { position: sticky; z-index: 1; top: .5rem; float: right; margin: .5rem .5rem -3.5rem 0; background: var(--paper); font: 1.6rem/1 var(--sans); padding: .28rem .55rem; }
.dialog-photo { aspect-ratio: 2.1; }
dt { font-weight: 700; }
dd { margin: 0 0 .75rem; }
.preview-notice { background: #f1e0ca; padding: .8rem 1rem; }
form, label { display: grid; gap: .6rem; }
label { font-weight: 700; }
form .button { justify-self: start; }
input, select, textarea { width: 100%; padding: .5rem; border: 1px solid var(--line); background: #fffaf0; color: var(--ink); }
.photo-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.photo-preview img { aspect-ratio: 1; }
@media (max-width: 680px) {
  .masthead { align-items: flex-start; flex-direction: column; }
  nav { flex-wrap: wrap; }
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-image { aspect-ratio: 1.6; }
  .letters { grid-template-columns: repeat(13, minmax(0, 1fr)); row-gap: .3rem; }
  h1 br { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.masthead-brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark { display: block; width: 66px; height: 50px; object-fit: contain; background: transparent; }


#upload-dialog [hidden], .meal-carousel-controls[hidden] { display: none; }
.meal-carousel-controls { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line); }
.meal-photo-caption { margin: .6rem 1rem 0; color: #6b4d43; }
