/* ============================================================
   JY CAFE — Design System / Base Styles
   Unique "Aesthetic" theme: lavender, rose, blush, warm cream.
   Mobile-first, accessible, SEO-friendly.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Palette */
  --lavender-950: #2D2240;
  --lavender-900: #3D2E5C;
  --lavender-800: #52417A;
  --lavender-700: #6B5B8D;
  --lavender-600: #8471A8;
  --lavender-500: #9D8BC0;
  --rose-500: #C97B8B;
  --rose-400: #D4919E;
  --blush-50: #FFF8F5;
  --blush-100: #FFF0EA;
  --blush-200: #FFE4DB;
  --cream-50: #FFFAF7;
  --cream-100: #FFF5EE;
  --cream-200: #FFE8DC;
  --sand-300: #E8CDB8;
  --gold-400: #D4A574;
  --gold-500: #C49464;
  --ink-900: #2A1F3D;
  --ink-700: #4A3D5C;
  --ink-500: #7A6D8A;
  --white: #FFFFFF;
  --red-badge: #B3261E;
  --green-badge: #1F7A3D;

  /* Typography */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;

  /* Radius */
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(42, 31, 61, 0.06);
  --shadow-md: 0 10px 30px rgba(42, 31, 61, 0.10);
  --shadow-lg: 0 22px 60px rgba(61, 46, 92, 0.18);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.5s;

  /* Layout */
  --container: 1200px;
  --header-h: 76px;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@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;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-700);
  background-color: var(--cream-50);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: none; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--lavender-900);
  letter-spacing: -0.01em;
}

/* ---------- 3. Focus & accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--lavender-900);
  color: var(--cream-50);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  transition: top 0.25s var(--ease);
}

.skip-link:focus { top: 14px; }

::selection { background: var(--gold-400); color: var(--lavender-950); }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--cream-200); }
::-webkit-scrollbar-thumb {
  background: var(--gold-500);
  border-radius: var(--r-pill);
  border: 3px solid var(--cream-200);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-400); }

/* ---------- 4. Utilities ---------- */
.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container { width: min(100% - 64px, var(--container)); }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.section { padding-block: clamp(64px, 9vw, 120px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
  background: var(--cream-200);
  padding: 8px 16px 8px 12px;
  border-radius: var(--r-pill);
}

.eyebrow svg { width: 16px; height: 16px; flex: none; }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  margin: 14px 0 12px;
}

.section-head p { color: var(--ink-500); font-size: 1.05rem; }

.title-accent { position: relative; white-space: nowrap; }

.title-accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 0.32em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 10 C 60 2, 130 3, 198 8' fill='none' stroke='%23C49464' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  z-index: -1;
}

.lead { font-size: 1.08rem; color: var(--ink-500); }

/* Wavy divider */
.wave-divider {
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 C 240 40 480 0 720 20 C 960 40 1200 0 1440 20 L1440 40 L0 40 Z' fill='%23FFF5EE'/%3E%3C/svg%3E") no-repeat center / cover;
}

/* ---------- 5. Reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

[data-reveal="left"] { transform: translateX(-34px); }
[data-reveal="right"] { transform: translateX(34px); }
[data-reveal="zoom"] { transform: scale(0.94); }

[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: linear-gradient(135deg, var(--lavender-600), var(--lavender-800));
  color: var(--cream-50);
  box-shadow: 0 8px 22px rgba(107, 91, 141, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(107, 91, 141, 0.45);
  background: linear-gradient(135deg, var(--lavender-500), var(--lavender-700));
}

.btn-light {
  background: var(--cream-50);
  color: var(--lavender-800);
  box-shadow: var(--shadow-md);
}

.btn-light:hover { transform: translateY(-2px); background: var(--white); }

.btn-ghost {
  border: 1.5px solid var(--sand-300);
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover { border-color: var(--gold-500); background: var(--white); transform: translateY(-2px); }

.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- 7. Chips & tags ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1.5px solid var(--sand-300);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.chip:hover, .chip.is-active {
  border-color: var(--lavender-600);
  background: var(--lavender-600);
  color: var(--cream-50);
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-pill);
}

.tag-hot    { background: #FBE3DD; color: #A33A24; }
.tag-new    { background: #E3EFE4; color: var(--green-badge); }
.tag-offer  { background: #FBEED8; color: #9A6214; }

/* ---------- 8. Veg / Non-veg badge (FSSAI style) ---------- */
.vn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: none;
}

.vn-badge--veg { border: 2px solid var(--green-badge); }
.vn-badge--veg::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-badge);
}

.vn-badge--nonveg { border: 2px solid var(--red-badge); }
.vn-badge--nonveg::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red-badge);
}

/* ---------- 9. Spice indicator ---------- */
.spice {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.spice svg { width: 15px; height: 15px; }
.spice svg.filled { color: var(--red-badge); }
.spice svg:not(.filled) { color: var(--sand-300); }

.spice-label { font-size: 0.78rem; color: var(--ink-500); margin-left: 6px; }

/* ---------- 10. Quantity stepper ---------- */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--cream-100);
  border: 1.5px solid var(--sand-300);
  border-radius: var(--r-pill);
  padding: 4px;
}

.stepper button {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lavender-800);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.stepper button:hover { background: var(--lavender-600); color: var(--cream-50); }
.stepper span { min-width: 30px; text-align: center; font-weight: 700; color: var(--ink-900); }

/* ---------- 11. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-700);
}

.field label .req { color: var(--red-badge); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--sand-300);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--ink-900);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lavender-500);
  box-shadow: 0 0 0 4px rgba(157, 139, 192, 0.14);
}

.field .hint { font-size: 0.8rem; color: var(--ink-500); }

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--red-badge); }

.field .error-msg {
  display: none;
  font-size: 0.8rem;
  color: var(--red-badge);
}

.field.has-error .error-msg { display: block; }
