/* =====================================================================
   EMBER & IVES — Design tokens
   Editorial-menu aesthetic: warm paper, ink, ember/brass accents,
   Fraunces for display, Inter for UI/body.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

:root{
  /* --- color --- */
  --ink:            #1B1512;
  --ink-soft:       #4A4038;
  --paper:          #F7F2EA;
  --paper-raised:   #FFFFFF;
  --line:           #DDD3C4;
  --line-strong:    #C9BBA4;
  --ember:          #C1502E;
  --ember-dark:     #9C3E22;
  --ember-tint:     #F3DED4;
  --brass:          #A8823D;
  --brass-tint:     #EFE3C6;
  --sage:           #5C6E52;
  --sage-tint:      #E1E8DA;
  --error:          #A93226;
  --error-tint:     #F5DEDA;

  /* --- type --- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1:  clamp(1.2rem, 1.13rem + 0.35vw, 1.375rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.5rem);
  --step-4:  clamp(2.4rem, 1.9rem + 2.4vw, 3.5rem);
  --step-5:  clamp(3rem, 2.2rem + 3.8vw, 4.75rem);

  /* --- spacing (8pt-ish scale) --- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* --- shape / motion --- */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.22,.68,0,1);
  --dur: 220ms;

  --shadow-card: 0 1px 2px rgba(27,21,18,0.06), 0 8px 24px -12px rgba(27,21,18,0.18);
  --shadow-pop: 0 12px 32px -8px rgba(27,21,18,0.28);

  --content-max: 1180px;
}

@media (prefers-color-scheme: dark){
  /* Intentionally not auto-switching to dark — a restaurant ordering
     app benefits from consistent brand presentation. Reserved for a
     future explicit toggle. */
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html:focus-within{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: padding-top 0.2s ease;
}

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

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
}
h1{ font-size: var(--step-5); font-weight: 500; letter-spacing: -0.01em; }
h2{ font-size: var(--step-3); }
h3{ font-size: var(--step-2); }
h4{ font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; }

p{ margin: 0 0 var(--sp-4); max-width: 62ch; }

.container{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}
@media (max-width: 640px){
  .container{ padding: 0 var(--sp-4); }
}

/* --- focus states: visible everywhere --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible{
  outline: 2.5px solid var(--ember);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- buttons --- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  padding: 0.9em 1.6em;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn:active{ transform: scale(0.97); }
.btn:disabled{ opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary{ background: var(--ink); color: var(--paper); }
.btn-primary:hover{ background: var(--ember-dark); }

.btn-ember{ background: var(--ember); color: #fff; }
.btn-ember:hover{ background: var(--ember-dark); }

.btn-outline{ background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover{ border-color: var(--ink); }

.btn-ghost{ background: transparent; color: var(--ink); padding: 0.6em 0.9em; }
.btn-ghost:hover{ color: var(--ember); }

.btn-sm{ padding: 0.55em 1.1em; font-size: 0.8rem; }
.btn-block{ width: 100%; }

/* --- form elements --- */
label{
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--ink-soft);
}
input, select, textarea{
  font-family: var(--font-body);
  font-size: var(--step-0);
  width: 100%;
  padding: 0.85em 1em;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper-raised);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder{ color: #A79A87; }
input:focus, select:focus, textarea:focus{ border-color: var(--ember); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible{ outline: 2.5px solid var(--ember); outline-offset: 1px; }
.field{ margin-bottom: var(--sp-5); }
.field-error{ border-color: var(--error) !important; }
.field-error-msg{ color: var(--error); font-size: var(--step--1); margin-top: var(--sp-2); }
.field-hint{ color: var(--ink-soft); font-size: var(--step--1); margin-top: var(--sp-2); }
fieldset{ border: none; padding: 0; margin: 0; }

/* --- badges --- */
.badge{
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3em 0.7em;
  border-radius: var(--radius-pill);
  line-height: 1;
}
.badge-ember{ background: var(--ember-tint); color: var(--ember-dark); }
.badge-brass{ background: var(--brass-tint); color: #7A5F26; }
.badge-sage{ background: var(--sage-tint); color: #3D4A36; }
.badge-error{ background: var(--error-tint); color: var(--error); }
.badge-outline{ background: transparent; border: 1px solid var(--line-strong); color: var(--ink-soft); }

.veg-dot{ width: 12px; height: 12px; border: 2px solid var(--sage); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.veg-dot::after{ content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.nonveg-dot{ width: 12px; height: 12px; border: 2px solid var(--ember); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nonveg-dot::after{ content: ''; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--ember); }

/* --- dividers --- */
.rule{ border: none; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }
.rule-brass{ border: none; height: 2px; background: linear-gradient(90deg, var(--brass), transparent); width: 72px; margin: var(--sp-4) 0; }

/* --- utility --- */
.visually-hidden{ 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: -999px; top: 0; background: var(--ink); color: var(--paper); padding: var(--sp-3) var(--sp-4); z-index: 999; border-radius: 0 0 var(--radius-sm) 0; }
.skip-link:focus{ left: 0; }
.section{ padding: var(--sp-9) 0; }
@media (max-width: 640px){ .section{ padding: var(--sp-7) 0; } }
.text-muted{ color: var(--ink-soft); }
.text-center{ text-align: center; }
.stack > * + *{ margin-top: var(--sp-4); }
