/* =======================================================
   Brew & Bean — Coffee Shop Landing Page
   Palette: brown #6F4E37 | cream #F5F0E8 | caramel #C8A27A
   ======================================================= */

/* --- Theme tokens --- */
:root {
  --brand:       #6F4E37;
  --brand-light:#8B6B4E;
  --brand-dark: #4A3325;
  --accent:      #C8A27A;
  --accent-light:#E0C8A8;
  --bg:          #FFFBF6;
  --bg-alt:      #F5F0E8;
  --card-bg:     #FFFFFF;
  --text:        #2C241A;
  --text-muted:  #6B5D50;
  --border:      #D4C8B8;
  --error:       #C0392B;
  --success:     #27AE60;
  --radius:      12px;
  --shadow-sm:   0 1px 3px rgba(74,51,37,0.08);
  --shadow-md:   0 4px 16px rgba(74,51,37,0.10);
  --shadow-lg:   0 8px 32px rgba(74,51,37,0.12);
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width:   1120px;
  --max-narrow:  680px;
}

[data-theme="dark"] {
  --brand:       #C8A27A;
  --brand-light:#E0C8A8;
  --brand-dark: #8B6B4E;
  --accent:      #6F4E37;
  --accent-light:#4A3325;
  --bg:          #1A1410;
  --bg-alt:      #241C16;
  --card-bg:     #2C241A;
  --text:        #EDE4D8;
  --text-muted:  #B0A090;
  --border:      #3D3228;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.30);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.40);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--max-narrow); }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 1.25rem; font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
}
.nav { display: flex; gap: 24px; }
.nav a {
  font-size: 0.95rem; font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav a:hover { color: var(--brand); }

.theme-toggle {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: background 0.2s;
}
.theme-toggle:hover { background: var(--bg-alt); }

/* --- Section --- */
.section {
  padding: 80px 0;
}
.section--alt { background: var(--bg-alt); }
.section__title {
  font-size: 2rem; font-weight: 700;
  text-align: center; margin-bottom: 8px;
  color: var(--brand-dark);
}
.section__subtitle {
  text-align: center; color: var(--text-muted);
  font-size: 1.05rem; margin-bottom: 48px;
}

/* --- Hero --- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 60%, var(--brand-light) 100%);
  color: #fff;
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.15;
  max-width: 720px; margin: 0 auto 20px;
  letter-spacing: -0.03em;
}
.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 560px; margin: 0 auto 36px;
  opacity: 0.92; line-height: 1.7;
}
.hero__actions {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.25s;
}
.btn--primary {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-1px); }

.btn--ghost {
  background: transparent; color: currentColor;
  border-color: currentColor; opacity: 0.85;
}
.btn--ghost:hover { opacity: 1; background: rgba(255,255,255,0.10); }

.btn--block { width: 100%; justify-content: center; }

/* Override ghost in hero context */
.hero .btn--ghost { border-color: rgba(255,255,255,0.6); color: #fff; }
.hero .btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

/* --- Menu Grid --- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.menu-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.menu-card__image {
  height: 200px;
  background-size: cover;
  background-position: center;
}
.menu-card__body {
  padding: 20px;
}
.menu-card__name {
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 6px; color: var(--brand-dark);
}
.menu-card__desc {
  font-size: 0.92rem; color: var(--text-muted);
  margin-bottom: 12px; line-height: 1.55;
}
.menu-card__price {
  font-size: 1.2rem; font-weight: 700;
  color: var(--brand);
}

/* --- About --- */
.about-content p {
  font-size: 1.05rem; color: var(--text-muted);
  margin-bottom: 16px; line-height: 1.75;
}
.about-content p:last-child { margin-bottom: 0; }

/* --- Contact Form --- */
.lead-form {
  background: var(--card-bg);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.field {
  margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-size: 0.9rem; font-weight: 600;
  color: var(--text);
}
.field input,
.field textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem; font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,162,122,0.25);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--error);
}
.field__error {
  font-size: 0.82rem; color: var(--error);
  min-height: 1.2em;
}
.form-status {
  margin-top: 16px; font-weight: 600; text-align: center;
}
.form-status--success { color: var(--success); }
.form-status--error   { color: var(--error); }

/* --- Footer --- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer__address { margin-top: 6px; }

/* ==============================================
   Responsive
   ============================================== */

/* Tablet: 2-column menu */
@media (max-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
  .hero { padding: 80px 0 64px; }
}

/* Mobile: single column */
@media (max-width: 640px) {
  .menu-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 64px 0 48px; }
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__actions .btn { width: 100%; max-width: 300px; }
  .header-inner { height: 56px; }
  .nav { gap: 12px; }
  .nav a { font-size: 0.85rem; }
  .section__title { font-size: 1.6rem; }
  .lead-form { padding: 24px; }
}
