@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --navy: #071d35;
  --navy-2: #0d2c4b;
  --cream: #fff9ef;
  --paper: #ffffff;
  --amber: #f4a340;
  --amber-dark: #d67a14;
  --ink: #102238;
  --muted: #607084;
  --line: #dce2e8;
  --success: #246d4b;
  --danger: #a53d32;
  --shadow: 0 22px 60px rgba(7, 29, 53, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font: 16px/1.6 'DM Sans', sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: 'Playfair Display', Georgia, serif; color: var(--navy); line-height: 1.06; }
h1 { font-size: clamp(3rem, 7vw, 6.2rem); letter-spacing: -.045em; margin-bottom: 1.5rem; }
h2 { font-size: clamp(2.25rem, 4.5vw, 4.2rem); letter-spacing: -.035em; margin-bottom: .75rem; }
h3 { color: var(--navy); line-height: 1.25; }

.site-header { max-width: 1240px; margin: auto; padding: 1.2rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); border: 2px solid var(--amber); color: white; font-size: .85rem; letter-spacing: .04em; }
.text-link { text-decoration: none; font-weight: 600; border-bottom: 2px solid var(--amber); }

.hero { min-height: 680px; display: grid; grid-template-columns: 1.02fr .98fr; max-width: 1340px; margin: 0 auto; padding: 3rem 3rem 5rem; align-items: center; gap: 5rem; }
.hero-copy { padding-left: max(0rem, calc((100vw - 1240px) / 2)); }
.eyebrow { margin-bottom: .8rem; color: var(--amber-dark); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.lead { max-width: 590px; color: var(--muted); font-size: 1.24rem; margin-bottom: 2rem; }
.hero-photo { position: relative; margin: 0; min-height: 560px; }
.hero-photo::before { content: ''; position: absolute; inset: 9% -3% -3% 9%; border: 2px solid var(--amber); border-radius: 180px 180px 22px 22px; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 180px 180px 22px 22px; box-shadow: var(--shadow); }
.hero-photo figcaption { position: absolute; right: -1.5rem; bottom: 2rem; padding: .7rem 1.2rem; background: var(--amber); color: var(--navy); font-weight: 700; border-radius: 999px; transform: rotate(-4deg); }

.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: .8rem 1.3rem; text-decoration: none; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--amber); color: var(--navy); box-shadow: 0 10px 25px rgba(244, 163, 64, .25); }
.button-dark { background: var(--navy); color: white; width: 100%; }
.button-disabled { width: 100%; background: #dfe3e7; color: #718092; cursor: not-allowed; }
.button-small { min-height: 40px; padding: .5rem 1rem; background: var(--navy); color: white; }

.menu-section { background: var(--navy); color: white; padding: 6.5rem max(2rem, calc((100vw - 1180px) / 2)); }
.menu-section h2, .menu-section h3 { color: white; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: end; margin-bottom: 3rem; }
.section-heading > p { color: #bdc8d3; max-width: 500px; margin-left: auto; }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.meal-card { padding: 2rem; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); background: rgba(255,255,255,.06); }
.meal-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.availability { background: rgba(244,163,64,.14); border: 1px solid rgba(244,163,64,.45); color: #ffc675; padding: .25rem .65rem; border-radius: 999px; font-size: .84rem; font-weight: 700; }
.availability.sold-out { color: #cbd3dc; border-color: #627386; background: transparent; }
.price { color: var(--amber); font: 700 1.5rem 'Playfair Display', serif; }
.meal-card h3 { font-size: 1.5rem; margin-bottom: .65rem; }
.meal-card > p { color: #bdc8d3; min-height: 3.2rem; }
.pickup-row { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); padding: .9rem 0; margin: 1.5rem 0; color: #bdc8d3; }
.pickup-row strong { color: white; }
.empty-state { padding: 3rem; border: 1px dashed #6e7c89; border-radius: var(--radius); text-align: center; }

.notice-section { max-width: 1180px; margin: auto; padding: 7rem 2rem; display: grid; grid-template-columns: .65fr 1.35fr; gap: 5rem; }
.notice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.notice-grid > div { padding-top: 1rem; border-top: 3px solid var(--amber); }
.notice-grid h3 { margin-bottom: .5rem; }
.notice-grid p, .legal-note { color: var(--muted); }
.legal-note { grid-column: 2; font-size: .92rem; border-left: 3px solid var(--line); padding-left: 1rem; }

footer { background: #051526; color: white; padding: 2rem max(2rem, calc((100vw - 1180px) / 2)); display: flex; justify-content: space-between; align-items: center; }
footer div { display: flex; flex-direction: column; }
footer span { color: #9eacba; }

dialog { width: min(620px, calc(100% - 1.5rem)); max-height: 92vh; border: 0; border-radius: 28px; padding: 2rem; box-shadow: 0 40px 120px rgba(0,0,0,.35); overflow-y: auto; }
dialog::backdrop { background: rgba(3,14,26,.72); backdrop-filter: blur(5px); }
.dialog-close-row { display: flex; justify-content: flex-end; }
.dialog-close-row button { border: 0; background: #edf0f3; color: var(--navy); width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; }
.dialog-heading h2 { font-size: 2.4rem; }
.dialog-heading > p:last-child { color: var(--muted); }
.order-form { display: grid; gap: 1rem; }
.order-form label, .admin-meal-card label, .status-form label { display: grid; gap: .4rem; color: var(--navy); font-weight: 700; font-size: .92rem; }
input, select, textarea { width: 100%; border: 1px solid #cbd3dc; border-radius: 12px; padding: .78rem .9rem; background: white; color: var(--ink); font-size: 1rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(244,163,64,.25); border-color: var(--amber-dark); }
textarea { resize: vertical; }
.two-fields, .three-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.three-fields { grid-template-columns: repeat(3, 1fr); }
fieldset { border: 0; padding: 0; margin: .3rem 0; display: grid; gap: .6rem; }
legend { font-weight: 700; color: var(--navy); margin-bottom: .5rem; }
.radio-card { grid-template-columns: auto 1fr !important; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: .8rem; }
.radio-card input, .checkbox-row input { width: auto; accent-color: var(--amber-dark); }
.radio-card span { display: grid; }
.radio-card small { color: var(--muted); font-weight: 400; }
.optional { color: var(--muted); font-weight: 400; }
.checkbox-row { display: flex !important; flex-direction: row; align-items: flex-start; gap: .7rem !important; font-weight: 500 !important; }

.confirmation-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--navy); }
.confirmation-card, .auth-card { width: min(620px, 100%); background: white; padding: clamp(1.5rem, 5vw, 3.5rem); border-radius: 28px; box-shadow: var(--shadow); }
.confirmation-card .brand, .auth-card .brand { margin-bottom: 3rem; }
.confirmation-card h1, .auth-card h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
.confirmation-icon { display: grid; place-items: center; width: 62px; height: 62px; background: #dff3e9; color: var(--success); border-radius: 50%; font-size: 2rem; margin-bottom: 1.5rem; }
.order-summary { display: grid; grid-template-columns: 1fr auto; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1.5rem 0; }
.order-summary strong { text-align: right; }
.inline-alert { padding: .9rem 1rem; border-radius: 12px; background: #fff2dd; color: #75430d; margin: 1rem 0; }
.inline-alert.success { background: #e4f4eb; color: #155c3c; }
.inline-alert.error { background: #fbe7e4; color: #852d25; }
.muted { color: var(--muted); font-size: .92rem; margin-top: 1.4rem; }

.admin-page { background: #f3f5f7; min-height: 100vh; }
.auth-card { margin: 6vh auto; }
.admin-header { max-width: none; background: white; border-bottom: 1px solid var(--line); padding-left: max(2rem, calc((100vw - 1180px) / 2)); padding-right: max(2rem, calc((100vw - 1180px) / 2)); }
.admin-header nav { display: flex; gap: 1.3rem; }
.dashboard { max-width: 1180px; padding: 4rem 2rem 7rem; margin: auto; }
.dashboard-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 2rem; }
.dashboard-title h1 { font-size: clamp(3rem, 6vw, 5rem); margin-bottom: 0; }
.dashboard-title > span { background: white; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .8rem; }
.admin-section { margin-top: 3rem; }
.admin-section h2 { font-size: 2.3rem; }
.admin-section-title { display: flex; justify-content: space-between; }
.admin-section-title p { color: var(--muted); }
.admin-meals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.admin-meal-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; display: grid; gap: 1rem; }
.new-meal { max-width: 780px; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.form-footer .button { width: auto; }
.orders-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.order-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem; }
.order-card-heading { display: flex; justify-content: space-between; gap: 1rem; }
.order-card-heading h3 { margin: .2rem 0; }
.order-id { color: var(--amber-dark); font-size: .78rem; font-weight: 700; }
.order-note { background: #f3f5f7; padding: .7rem; border-radius: 10px; color: var(--muted); }
.status-form { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; display: flex; align-items: end; gap: .7rem; }
.status-form label { flex: 1; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 2rem 5rem; }
  .hero-copy { padding-left: 0; }
  .hero-photo { min-height: 480px; }
  .section-heading, .notice-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .notice-grid { grid-template-columns: 1fr; }
  .legal-note { grid-column: 1; }
  .admin-meals, .orders-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header { padding: 1rem; }
  .site-header .text-link { display: none; }
  h1 { font-size: 3.45rem; }
  .hero { padding: 2.5rem 1rem 4rem; min-height: auto; }
  .hero-photo { min-height: 370px; }
  .hero-photo::before { inset: 7% 0 -2% 7%; }
  .hero-photo figcaption { right: .5rem; }
  .menu-section { padding: 4.5rem 1rem; }
  .menu-grid { grid-template-columns: 1fr; }
  .meal-card > p { min-height: 0; }
  .notice-section { padding: 4.5rem 1rem; }
  footer { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 2rem 1rem; }
  dialog { padding: 1.2rem; }
  .two-fields, .three-fields { grid-template-columns: 1fr; }
  .dashboard { padding: 2.5rem 1rem 5rem; }
  .dashboard-title { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .admin-header nav a:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
