/* styles/styles.css */
/* Mobile-first, clean spacing, parchment theme */

/* --- Vars --- */
:root{
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --accent: #734f2f;
  --accent-contrast: #ffffff;
  --maxw: 72rem;      /* 1152px */
  --radius: 12px;
  --gap: 1rem;

  /* brand bands */
  --cream: #f3e5c3;
  --cream-border: #e2d3b3;

  /* paper surfaces */
  --paper: #fbf0d9;
  --paper-border: #e6d6b5;
  --paper-ink: #27241d;
  --paper-muted: #6e665a;
}

/* --- Resets + sticky footer layout --- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }
body{
  min-height: 100dvh;
  display: flex;
  flex-direction: column;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--text);

  /* non-repeating image + cream fallback so no white strip */
  background: var(--cream) center / cover no-repeat url("../images/background.jpg");
  background-attachment: scroll;
}
main{ flex: 1 0 auto; }

/* --- A11y helpers --- */
.skip-link{
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus{ position: static; width: auto; height: auto; padding: .5rem; background: #ffd; display: inline-block; }

a:focus-visible,
.btn:focus-visible,
.btn-qty:focus-visible,
.cart-link:focus-visible{
  outline: 3px solid rgba(217,199,160,.65);
  outline-offset: 2px;
  border-radius: 8px;
}

.visually-hidden{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --- Layout helpers --- */
.container{ width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }
.section{ padding: 2.25rem 0; }             /* tighter overall */
.section:last-of-type{ padding-bottom: 1.25rem; } /* kill bottom gap on last section */
.lead{ font-size: 1.125rem; color: var(--muted); }

/* --- Header / Footer bands --- */
.site-header{
  background: var(--cream);
  border-bottom: 1px solid var(--cream-border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.site-footer{
  background: var(--cream);
  border-top: 1px solid var(--cream-border);
  box-shadow: 0 -1px 0 rgba(0,0,0,0.04);
  margin-top: 1rem; /* closer to content */
}
.header-inner,
.footer-inner{
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; padding: .75rem 0; flex-wrap: wrap;
}
.header-inner{ min-height: 82px; } /* compact for flush fit */
.footer-contact a{ color: var(--text); }

/* --- Brand wordmark --- */
.brand-link{
  font-family: "Cookie", cursive;
  font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw + .35rem, 4.25rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-decoration: none;
  color: #5a3b25;
  text-shadow:
    0 1px 0 rgba(255, 248, 229, 0.8),
    0 2px 0 rgba(0,0,0,0.06);
}

.nav a{
  text-decoration: none;
  color: var(--text);
  padding: .5rem .75rem;
  border-radius: 8px;
}
.nav a:hover,
.nav a:focus{ background: #f0f0f0; }

/* --- Hero --- */
.hero{ padding: 1.5rem 0 0; margin: 0; }
.hero-inner{ display: grid; gap: 1.1rem; }

/* smaller, square crop so it fits better */
.hero-image{
  width: 100%;
  max-width: 480px;       /* ~2/3 of old 720px */
  aspect-ratio: 1 / 1;    /* square frame */
  object-fit: cover;      /* crop nicely */
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin-inline: auto;
}

.hero-text h1{ margin: 0 0 .5rem 0; line-height: 1.2; }
.cta{ margin-top: .5rem; }
.hero-banner{ display: none !important; }

/* desktop: image LEFT, text RIGHT */
@media (min-width: 900px){
  .hero{ padding: 2.25rem 0; }
  .hero-inner{
    grid-template-columns: 1fr 1fr;
    align-items: center;
    column-gap: 1.75rem;
  }
  .hero-image{ justify-self: start; }
  .hero-text{ justify-self: start; text-align: left; }
}

/* --- Lists --- */
.list{ margin: .5rem 0 0 1rem; }
.list li{ margin: .25rem 0; }

/* --- Buttons --- */
.btn{
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover,
.btn:focus{ background: var(--accent); color: var(--accent-contrast); }

.btn-outline{
  background: transparent;
  border-color: #cdbb99;
  color: #4a3b2b;
}
.btn-outline:hover,
.btn-outline:focus{
  background: var(--cream);
  border-color: #c7b48f;
}

/* --- Cards / Paper surfaces --- */
.card,
.order-card,
.section-card{
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius);
  color: var(--paper-ink);
  box-shadow:
    0 1px 1px rgba(0,0,0,0.03),
    0 8px 24px rgba(0,0,0,0.04);
}
.section-card{ padding: 1rem; }
.order-card{ padding: 1rem; margin: 1rem 0; }

.card{
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card-img{
  width: 100%; height: 200px; object-fit: cover; background: #f3f3f3;
}
.card-body{ padding: 1rem; }
.card-title{ margin: 0 0 .25rem 0; }
.card-text{ margin: 0 0 .75rem 0; color: var(--paper-muted); }

/* --- Menu grid --- */
.menu-grid{ display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1rem; }
@media (min-width: 700px){ .menu-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px){ .menu-grid{ grid-template-columns: repeat(3, 1fr); } }

/* --- Price list --- */
.price{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .25rem .75rem;
  margin: .25rem 0 1rem 0;
}
.price dt{ color: var(--paper-muted); }
.price dd{ margin: 0; font-weight: 600; }

/* --- Quantity controls --- */
.qty-row{ display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .5rem 0; }
.qty{ display: inline-flex; align-items: center; gap: .5rem; }
.qty-label{ font-weight: 600; }
.btn-qty{
  width: 2.25rem; height: 2.25rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fafafa;
  font-weight: 700;
}
.btn-qty[disabled]{ opacity: .5; cursor: not-allowed; }
.qty-num{ min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }

/* --- Cart badge --- */
.cart-link{
  display: inline-flex; align-items: center; gap: .35rem;
  text-decoration: none; color: var(--text);
  padding: .5rem .65rem; border-radius: 8px;
}
.cart-link:hover,
.cart-link:focus{ background: #f0f0f0; }
.cart-count{
  display: inline-block; min-width: 1.25rem; padding: 0 .25rem;
  text-align: center; border-radius: 999px; border: 1px solid #ddd; font-size: .9rem;
}

/* --- Order table --- */
.empty-state{
  padding: .75rem; background: #fff8e1; border: 1px solid #ffe6a3; border-radius: 8px;
}
.order-title{ margin: 0 0 .5rem 0; }

.order-table{ width: 100%; border-collapse: collapse; margin-top: .5rem; }
.order-table th, .order-table td{
  padding: .5rem .5rem; border-bottom: 1px solid #ecdcbc;
}
.order-table thead th{ text-align: left; background: #f6e8c9; color: var(--paper-ink); }
.order-table .num{ text-align: right; }
.order-table .right{ text-align: right; }

.order-actions{ margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* --- Forms --- */
.details-form{ display: grid; gap: .75rem; }
.field{ display: grid; gap: .25rem; }
.field input, .field textarea{
  padding: .6rem .7rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font: inherit;
  background: #fdf6e5;      /* warm input fill */
  color: var(--paper-ink);
  border-color: var(--paper-border);
}
.field input::placeholder,
.field textarea::placeholder{ color: #9a8f7e; }
.field input:focus,
.field textarea:focus{
  outline: none; border-color: #d9c7a0;
  box-shadow: 0 0 0 3px rgba(217,199,160,.25);
}
.hint{ color: var(--muted); font-size: .9rem; }

/* Keep delivery inputs white */
.details-form .field input,
.details-form .field textarea{
  background: #ffffff !important;
  color: var(--text);
  border-color: #ddd;
}
.details-form .field input::placeholder,
.details-form .field textarea::placeholder{ color: #8a8a8a; }
.details-form .field input:focus,
.details-form .field textarea:focus{
  border-color: #999;
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

/* Space under the menu grid before the Review Order button */
.menu-actions { margin-top: 1rem; }

@media (min-width: 700px){
  .menu-actions { margin-top: 1.25rem; }
}
@media (min-width: 1100px){
  .menu-actions { margin-top: 1.5rem; }
}