/* =========================================================
   One Smart Cookie — styles
   Palette derived from the logo (cream, chocolate, golden
   cookie tan, teal + red glasses accents).
   ========================================================= */

:root {
  --cream: #fbf6ec;
  --cream-deep: #f3e9d6;
  --choc: #4a2e1c;
  --choc-soft: #5b3a21;
  --tan: #d9a23b;
  --tan-deep: #c4872a;
  --teal: #3fa9a0;
  --red: #d15b4a;

  --text: #3a2617;
  --muted: #7a6450;
  --white: #ffffff;

  --maxw: 1140px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(74, 46, 28, 0.12);
  --shadow-sm: 0 4px 14px rgba(74, 46, 28, 0.1);

  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* offset sticky header for anchor jumps */
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--choc);
  line-height: 1.15;
  margin: 0 0 0.4em;
}

.container {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--choc);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--tan);
  color: var(--choc);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--tan-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--choc);
  border-color: var(--choc);
}
.btn-ghost:hover {
  background: var(--choc);
  color: var(--cream);
}
.btn-block {
  display: block;
  width: 100%;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--cream-deep);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--choc);
}
.brand:hover {
  text-decoration: none;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--choc);
}
.primary-nav a:hover {
  color: var(--tan-deep);
  text-decoration: none;
}
.nav-cta {
  background: var(--tan);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}
.nav-cta:hover {
  background: var(--tan-deep);
  color: var(--choc) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 26px;
  height: 3px;
  background: var(--choc);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(
      120% 120% at 50% 0%,
      var(--cream) 0%,
      var(--cream-deep) 100%
    );
  text-align: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}
.hero-logo {
  width: clamp(140px, 30vw, 220px);
  height: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 10px 22px rgba(74, 46, 28, 0.18));
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin-bottom: 0.3em;
}
.hero-eyebrow {
  display: inline-block;
  margin: 0 auto 0.9rem;
  padding: 0.4rem 1rem;
  background: var(--cream);
  border: 2px solid var(--tan);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--choc);
  box-shadow: var(--shadow-sm);
}
.hero-tagline {
  max-width: 34ch;
  margin: 0 auto 1.6rem;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.menu {
  background: var(--white);
}
.section-head {
  text-align: center;
  max-width: 55ch;
  margin: 0 auto 2.5rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.section-sub {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

/* ---------- Menu cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--cream);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--cream-deep);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.card-body {
  padding: 1.1rem 1.2rem 1.3rem;
}
.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.3em;
}
.card-text {
  color: var(--muted);
  margin: 0 0 0.7em;
}
.card-price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--tan-deep);
  margin: 0;
}
.menu-note {
  text-align: center;
  margin-top: 2.5rem;
  color: var(--muted);
}

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.about-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}
.about-body p {
  margin: 0 0 1rem;
}

/* ---------- Order form ---------- */
.order {
  background: var(--cream-deep);
}
.order-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.form-field {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
}
.form-field label,
.fulfillment legend {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--choc);
  margin-bottom: 0.35rem;
}
.req {
  color: var(--red);
}
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--text);
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(63, 169, 160, 0.2);
}
.form-field.invalid input,
.form-field.invalid select {
  border-color: var(--red);
}
.field-error {
  color: var(--red);
  font-size: 0.85rem;
  min-height: 1.1em;
  margin-top: 0.25rem;
}
.fulfillment {
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}
.fulfillment legend {
  padding: 0 0.4rem;
}
.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 1.4rem;
  font-weight: 600;
  color: var(--text);
}
.radio input {
  width: auto;
  accent-color: var(--teal);
}
.form-status {
  text-align: center;
  font-weight: 700;
  margin: 1rem 0 0;
  min-height: 1.4em;
}
.form-status.success {
  color: var(--teal);
}
.form-status.error {
  color: var(--red);
}

/* ---------- Location ---------- */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.location-card {
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.location-card h3 {
  font-size: 1.3rem;
  color: var(--tan-deep);
}
.location-card p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--choc);
  color: var(--cream);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.footer-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  color: var(--cream);
  font-weight: 600;
}
.footer-nav a:hover {
  color: var(--tan);
  text-decoration: none;
}
.footer-copy {
  margin: 0;
  color: var(--cream-deep);
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--cream-deep);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .primary-nav.open {
    max-height: 340px;
  }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }
  .primary-nav li {
    border-bottom: 1px solid var(--cream-deep);
  }
  .primary-nav a {
    display: block;
    padding: 0.85rem 0;
  }
  .nav-cta {
    text-align: center;
    margin-top: 0.6rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
  }
  .about-media {
    order: -1;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
