/* Tash's Kitchen – site styles */
:root {
  --ink: #1F2421;
  --ink-soft: #4A504C;
  --muted: #5B615D;
  --ground: #FFFFFF;
  --panel: #F1EEE8;
  --line: #DCD8D0;
  --line-soft: #EEEAE3;
  --accent: #B83A1E;
  --accent-dark: #962E16;
  --accent-tint: #FBEAE5;
  --accent-line: #F0C3B6;
  --dark: #1F2421;
  --radius: 20px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.1; }
h1, h2 { font-family: var(--font-display); font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 760px; }
.narrow-left { max-width: 560px; }
.section { padding-block: 32px 72px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.center { text-align: center; }
.center .brand { align-self: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.pre-line { white-space: pre-line; }
.lead { font-size: 19px; color: var(--ink-soft); }
.eyebrow { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; color: var(--accent); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 8px; color: #fff; }

/* Header & footer */
.site-header { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 26px; text-decoration: none; }
.brand-mark { height: 40px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-weight: 500; }
.nav a:not(.btn) { text-decoration: none; }
.site-footer { border-top: 1px solid var(--line-soft); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-block: 24px; color: var(--ink-soft); font-size: 15px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-large { min-height: 54px; font-size: 17px; }
.link-btn { background: none; border: 0; padding: 10px 0; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { background: var(--panel); color: var(--accent); }

.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.like.on { background: var(--accent-tint); color: var(--accent); border-color: var(--accent-line); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-block: 40px 32px; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; }
.hero .lead { max-width: 520px; }
.hero-photo {
  flex: 1 1 420px; height: 380px; border-radius: 24px; background: var(--panel); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-text { color: var(--muted); font-weight: 500; }

/* Gallery */
.section-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { font-size: 36px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card-photo { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card-photo:hover img { transform: scale(1.03); }
.badge { position: absolute; top: 14px; left: 14px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.card-body { display: flex; flex-direction: column; gap: 6px; }
.card-body h3 { font-size: 20px; font-weight: 600; line-height: 1.25; }
.card-body h3 a { text-decoration: none; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* About */
.about { background: var(--dark); color: #fff; }
.about-inner { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-block: 64px; }
.portrait {
  flex: 0 0 240px; width: 240px; height: 240px; border-radius: 50%; background: #3A403C; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-initial { font-family: var(--font-display); font-size: 96px; color: #C9CDC9; }
.about-text { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.about-text h2 { font-size: 36px; }
.about-text p { font-size: 18px; line-height: 1.6; color: #D9DCD9; max-width: 620px; }

/* Forms */
.form { margin-top: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > .field { flex: 1 1 240px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.field input, .field textarea, .field select {
  min-height: 48px; border: 1px solid #A9A397; border-radius: 12px; padding: 10px 14px;
  font: inherit; font-weight: 400; color: var(--ink); background: #fff;
}
.field textarea { resize: vertical; }
.field input[type="file"] { padding: 10px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-status { min-height: 1.5em; color: var(--ink-soft); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.setup-notice { margin-top: 8px; padding: 14px 18px; border-radius: 12px; background: #FFF4D6; color: #5A4300; }

/* Dish page */
.post-page { padding-block: 8px 72px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px; text-decoration: none; font-weight: 500; }
.dish { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.dish-photo { flex: 1 1 460px; border-radius: 24px; overflow: hidden; background: var(--panel); }
.dish-photo img { width: 100%; height: auto; }
.dish-info { flex: 1 1 380px; }
.dish-info h1 { font-size: clamp(32px, 4vw, 48px); }
.comments { margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.comments h2 { font-family: var(--font-body); font-size: 19px; font-weight: 600; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.comment { display: flex; gap: 12px; align-items: flex-start; }
.comment-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.comment-meta { font-size: 15px; }
.avatar { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: #E9E5DD; display: flex; align-items: center; justify-content: center; font-weight: 600; }

/* Sign-in dialog */
.dialog { border: 0; border-radius: 20px; padding: 28px; width: min(440px, calc(100vw - 32px)); color: var(--ink); }
.dialog::backdrop { background: rgba(20, 24, 22, 0.55); }
.dialog h2 { font-size: 28px; }
.divider { text-align: center; color: var(--muted); font-size: 14px; }
.signin-status { min-height: 1.5em; color: var(--ink-soft); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 500;
  transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px); z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Admin */
.admin { padding-block: 8px 72px; display: flex; flex-direction: column; gap: 24px; }
.admin h1 { font-size: 40px; }
.admin-section { padding: 24px; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.admin-section h2 { font-size: 26px; }
.upload-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.upload-field { flex: 1 1 260px; }
.upload-preview { flex: 0 0 160px; height: 160px; border-radius: 14px; background: var(--panel); overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; font-size: 14px; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.admin-item { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; padding-block: 14px; border-top: 1px solid var(--line-soft); }
.admin-item:first-child { border-top: 0; }
.admin-item.is-hidden { opacity: 0.6; }
.admin-item-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--panel); }

@media (max-width: 640px) {
  .hero { padding-top: 16px; }
  .hero-photo { height: 280px; }
  .section-head h2, .about-text h2 { font-size: 30px; }
  .portrait { flex-basis: 180px; width: 180px; height: 180px; }
  .admin-section { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-photo img, .toast { transition: none; }
}
