/* Panadería La Espiga de Oro — styles
   Tokens: --bg (warm cream), --ink (espresso), --accent (golden amber) */

:root {
  --bg: #fbf3e4;
  --bg-warm: #f5e8cf;
  --ink: #43301d;
  --ink-soft: #6f5638;
  --accent: #b97a1e;
  --accent-deep: #8f5c12;
  --card: #fffaf0;
  --line: #e3d2ae;
  --radius: 14px;
  --max: 1020px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Karla", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-word {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.5rem, 8vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h3 { font-size: 1.25rem; margin-bottom: 0.15em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px;
  transition: top 0.2s ease-out;
}
.skip-link:focus { top: 12px; }

a { color: var(--accent-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [role="tab"]:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; color: var(--accent); flex: none; }
.brand-word { font-size: 1.3rem; margin: 0; }
.brand-word strong { color: var(--accent-deep); }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.site-nav a:hover { color: var(--accent-deep); }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: "Karla", sans-serif; font-weight: 700; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  transition: background-color 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }

/* Hero — centered, warm, wavy divider */
.hero { background: var(--bg-warm); text-align: center; padding: 80px 0 0; position: relative; }
.hero-inner { max-width: 44rem; padding-bottom: 64px; }
.eyebrow {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--accent-deep); margin: 0 0 18px;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 36rem; margin: 0 auto; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.oven-strip {
  display: flex; justify-content: center; gap: 12px 36px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line);
}
.oven-item { font-size: 0.95rem; color: var(--ink-soft); }
.oven-time { display: block; font-family: "Fraunces", serif; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.hero-wave { display: block; width: 100%; height: 48px; margin-bottom: -1px; }

/* Sections */
.section { padding: 76px 0; }
.section-warm { background: var(--bg-warm); }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 40px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

/* Tabs */
.tabs { max-width: 760px; margin: 0 auto; }
.tab-list {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 8px;
}
.tab {
  font: inherit; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--ink-soft);
  border: 2px solid var(--line); border-radius: 999px;
  padding: 10px 22px;
  transition: background-color 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}
.tab:hover { border-color: var(--accent); color: var(--accent-deep); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tab-panel { padding-top: 24px; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 16px 6px; border-bottom: 1px dotted var(--line);
}
.menu-list p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.price {
  font-family: "Fraunces", serif; font-weight: 700; font-size: 1.3rem;
  color: var(--accent-deep); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.panel-note { text-align: center; color: var(--ink-soft); margin-top: 26px; }

/* Cake form section — form left, copy right (mirror of carnicería's order) */
.form-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: start; }
.order-form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: grid; gap: 18px;
  box-shadow: 0 6px 18px rgba(67, 48, 29, 0.08);
}
.field label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }
.field .optional { font-weight: 400; color: var(--ink-soft); font-size: 0.85em; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
  padding: 11px 13px;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-confirm {
  margin: 0; padding: 16px; border-radius: 10px;
  background: #f3e9c8; border: 2px solid var(--accent); color: var(--ink); font-weight: 600;
}
.lede-small { color: var(--ink-soft); font-size: 1.08rem; }
.cake-facts { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 12px; }
.cake-facts li {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; font-size: 0.98rem;
}
.cake-facts strong { color: var(--accent-deep); }
.demo-note {
  display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--accent-deep);
  border: 1.5px dashed var(--accent); border-radius: 10px; padding: 8px 12px; margin-top: 14px;
}

/* Visit */
.visit-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; max-width: 860px; margin: 0 auto; }
.address { font-style: normal; font-size: 1.2rem; line-height: 1.7; margin: 18px 0 0; }
table.hours { border-collapse: collapse; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hours th, .hours td { padding: 16px 20px; text-align: left; }
.hours th { font-family: "Fraunces", serif; font-size: 1.05rem; }
.hours tr + tr th, .hours tr + tr td { border-top: 1px solid var(--line); }

/* Footer */
.site-footer { background: var(--ink); color: var(--bg); padding: 52px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding-bottom: 34px; }
.footer-brand .brand-word { color: var(--bg); }
.footer-brand .brand-word strong { color: #e8b96a; }
.disclaimer { font-size: 0.88rem; opacity: 0.78; max-width: 34rem; margin: 12px 0 0; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--bg); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.footer-nav a:hover { color: #e8b96a; }
.footer-base { border-top: 1px solid rgba(251, 243, 228, 0.2); padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); }
.footer-base p { margin: 0; font-size: 0.85rem; opacity: 0.65; }

/* Reveal — initial states set only when JS runs */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.35s ease-out, transform 0.35s ease-out; }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Tab panel switch is instant (state change, not decoration) */
.tab-panel[hidden] { display: none; }

/* Mobile */
@media (max-width: 860px) {
  .form-grid, .visit-inner, .footer-inner { grid-template-columns: 1fr; }
  .form-grid, .visit-inner { gap: 36px; }
  .site-nav { display: none; }
  .header-call { margin-left: auto; }
  .section { padding: 56px 0; }
  .hero { padding-top: 56px; }
  .order-form { padding: 24px; }
  .tab-list { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .tab { flex: none; }
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
