/* ============================================
   MONAI DESERTAI — Design System & Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --color-teal: #2B5B5B;
  --color-teal-dark: #1E4040;
  --color-blush: #F5E6E0;
  --color-pink-accent: #D4A0A0;
  --color-cream: #FFF8F5;
  --color-white: #FFFFFF;
  --color-text-dark: #1A1A1A;
  --color-text-light: #FFFFFF;
  --color-text-muted: #6B6B6B;
  --color-gold: #C4A76C;
  --color-overlay: rgba(0, 0, 0, 0.82);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  --section-padding: 100px 0;
  --container-max: 1200px;
  --gap-lg: 80px;
  --gap-md: 40px;
  --gap-sm: 20px;
  --radius: 0;
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-dark);
  background: var(--color-cream);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font-body); }

/* --- Utility --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

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

/* --- Typography --- */
.label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: block;
}
.label--teal { color: var(--color-teal); }
.label--pink { color: var(--color-pink-accent); }
.label--white { color: rgba(255,255,255,0.7); }

.heading {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.heading--xl { font-size: clamp(2.8rem, 5.5vw, 4.5rem); }
.heading--lg { font-size: clamp(2rem, 4vw, 3rem); }
.heading--md { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.heading em, .heading .accent {
  font-style: italic;
  color: var(--color-pink-accent);
}

.body-text {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 520px;
}
.body-text--muted { color: var(--color-text-muted); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 16px 40px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-align: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  border: none;
  line-height: 1;
}
.btn:focus-visible {
  outline: 2px solid var(--color-pink-accent);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-teal);
  color: var(--color-white);
}
.btn--primary:hover { background: var(--color-teal-dark); }

.btn--secondary {
  background: transparent;
  color: var(--color-teal);
  border: 1px solid var(--color-teal);
}
.btn--secondary:hover {
  background: var(--color-teal);
  color: var(--color-white);
}

.btn--light {
  background: var(--color-blush);
  color: var(--color-teal);
}
.btn--light:hover {
  background: var(--color-pink-accent);
  color: var(--color-white);
}

.btn-group { display: flex; flex-wrap: wrap; gap: 16px; }

/* --- Image Placeholders --- */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-teal);
  color: rgba(255,255,255,0.5);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
}

/* ============================================
   SECTION 1: HERO
   ============================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.hero__content {
  background: var(--color-blush);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 5rem 5rem 5rem;
  position: relative;
}
.hero__content::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: -1px;
  width: 1px;
  background: var(--color-teal);
  opacity: 0.12;
}

.hero__label { color: var(--color-pink-accent); margin-bottom: 2rem; }

.hero__heading {
  color: var(--color-teal);
  margin-bottom: 2rem;
}

.hero__body {
  color: var(--color-teal);
  margin-bottom: 2.5rem;
  opacity: 0.85;
}

.hero__image {
  position: relative;
  overflow: hidden;
}
.hero__image .img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 500px;
  aspect-ratio: auto;
}

/* ============================================
   SECTION 2: HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: var(--section-padding);
  background: var(--color-cream);
  text-align: center;
}
.how-it-works .heading { margin-bottom: 4rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  max-width: 960px;
  margin: 0 auto;
}

.step { text-align: center; }

.step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-teal);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.step__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-teal);
  margin-bottom: 0.75rem;
}

.step__text {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 280px;
  margin: 0 auto;
}

/* ============================================
   SECTION 3: DESSERT SELECTOR
   ============================================ */
.selector {
  padding: var(--section-padding);
  background: var(--color-white);
}
.selector__header {
  text-align: center;
  margin-bottom: 3rem;
}
.selector__subtext {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.category-tab {
  padding: 12px 28px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-teal);
  border: 1px solid var(--color-teal);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.category-tab:hover {
  background: var(--color-blush);
}
.category-tab.active {
  background: var(--color-teal);
  color: var(--color-white);
}
.category-tab:focus-visible {
  outline: 2px solid var(--color-pink-accent);
  outline-offset: 2px;
}

/* Items List */
.items-list {
  max-width: 800px;
  margin: 0 auto;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background var(--transition);
}
.item-row:first-child { border-top: 1px solid rgba(0,0,0,0.06); }
.item-row.selected {
  background: rgba(43,91,91,0.04);
  border-left: 3px solid var(--color-teal);
  padding-left: 17px;
}

.item-info { flex: 1; margin-right: 20px; }
.item-name {
  font-size: 1rem;
  color: var(--color-text-dark);
  margin-bottom: 2px;
}
.item-price {
  font-size: 0.9rem;
  color: var(--color-gold);
  font-weight: 500;
}
.item-unit {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

/* Quantity Controls */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
}

.qty-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-teal);
  border: 1px solid rgba(43,91,91,0.25);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
  user-select: none;
}
.qty-btn:hover {
  background: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
}
.qty-btn:focus-visible {
  outline: 2px solid var(--color-pink-accent);
  outline-offset: 1px;
}

.qty-value {
  width: 44px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-dark);
  border-top: 1px solid rgba(43,91,91,0.25);
  border-bottom: 1px solid rgba(43,91,91,0.25);
  background: var(--color-cream);
}

/* ============================================
   STICKY BAR
   ============================================ */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-teal);
  color: var(--color-white);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
}
.sticky-bar.visible { transform: translateY(0); }

.sticky-bar__summary {
  font-size: 0.95rem;
  font-weight: 400;
}
.sticky-bar__price {
  font-weight: 500;
  font-size: 1.1rem;
}
.sticky-bar__dot {
  opacity: 0.4;
  margin: 0 4px;
}

.sticky-bar__btn {
  padding: 12px 32px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--color-blush);
  color: var(--color-teal);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.sticky-bar__btn:hover {
  background: var(--color-pink-accent);
  color: var(--color-white);
}
.sticky-bar__btn:focus-visible {
  outline: 2px solid var(--color-blush);
  outline-offset: 2px;
}

/* ============================================
   SECTION 4: MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: auto;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--color-white);
  max-width: 580px;
  width: 100%;
  padding: 3rem 2.5rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(30px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition);
  background: none;
  border: none;
}
.modal__close:hover { color: var(--color-teal); }
.modal__close:focus-visible {
  outline: 2px solid var(--color-pink-accent);
  outline-offset: 2px;
}

.modal .label { margin-bottom: 0.8rem; }
.modal .heading { margin-bottom: 0.6rem; color: var(--color-teal); }
.modal__subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Order Summary in Modal */
.order-summary {
  background: var(--color-cream);
  padding: 20px;
  margin-bottom: 2rem;
  border: 1px solid rgba(0,0,0,0.05);
}

.order-summary__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-teal);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.order-summary__toggle:focus-visible {
  outline: 2px solid var(--color-pink-accent);
}
.order-summary__arrow {
  font-size: 0.7rem;
  transition: transform var(--transition);
}
.order-summary__arrow.open { transform: rotate(180deg); }

.order-summary__list {
  margin-top: 16px;
  display: none;
}
.order-summary__list.open { display: block; }

.order-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.order-line:last-child { border-bottom: none; }
.order-line__name { color: var(--color-text-dark); flex: 1; }
.order-line__qty { color: var(--color-text-muted); margin: 0 12px; white-space: nowrap; }
.order-line__total { font-weight: 500; color: var(--color-teal); white-space: nowrap; }

.order-grand-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid rgba(43,91,91,0.2);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-teal);
}

/* Form Fields */
.form-group { margin-bottom: 1.2rem; }

.form-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  border: 1px solid rgba(43,91,91,0.2);
  background: var(--color-white);
  color: var(--color-text-dark);
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-teal);
}
.form-input.error,
.form-textarea.error {
  border-color: #c0392b;
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-error {
  font-size: 0.78rem;
  color: #c0392b;
  margin-top: 4px;
  display: none;
}
.form-error.visible { display: block; }

.form-submit {
  width: 100%;
  margin-top: 0.5rem;
}

/* Success State */
.modal-success {
  text-align: center;
  padding: 2rem 0;
  display: none;
}
.modal-success.show { display: block; }

.modal-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-teal);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-success h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--color-teal);
  margin-bottom: 1rem;
}

.modal-success p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   SECTION 5: CRAFT STORY
   ============================================ */
.craft {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.craft__image { position: relative; overflow: hidden; }
.craft__image .img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 500px;
  background: var(--color-teal-dark);
  filter: grayscale(0.3);
}

.craft__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem;
  background: var(--color-cream);
}
.craft__content .heading { color: var(--color-teal); margin-bottom: 1.5rem; }
.craft__content .body-text { color: var(--color-text-muted); }

/* ============================================
   SECTION 6: FOOTER CTA
   ============================================ */
.footer-cta {
  padding: 100px 0;
  background: var(--color-blush);
  text-align: center;
}
.footer-cta .heading {
  color: var(--color-teal);
  margin-bottom: 1.5rem;
}
.footer-cta .body-text {
  margin: 0 auto 2.5rem;
  color: var(--color-teal);
  opacity: 0.8;
  text-align: center;
  max-width: 560px;
}
.footer-cta .btn-group { justify-content: center; }

/* ============================================
   SECTION 7: FOOTER
   ============================================ */
.footer {
  background: var(--color-teal-dark);
  color: var(--color-white);
  padding: 4rem 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--color-blush);
  text-transform: lowercase;
}

.footer__contact {
  font-size: 0.9rem;
  line-height: 2;
  color: rgba(255,255,255,0.75);
}
.footer__contact a {
  color: rgba(255,255,255,0.75);
  transition: color var(--transition);
}
.footer__contact a:hover { color: var(--color-pink-accent); }

.footer__links {
  font-size: 0.85rem;
  line-height: 2;
  color: rgba(255,255,255,0.6);
}
.footer__links a {
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--color-blush); }

.footer__copyright {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.35);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.25s; }
.fade-up-d3 { animation-delay: 0.4s; }
.fade-up-d4 { animation-delay: 0.55s; }
.fade-up-d5 { animation-delay: 0.7s; }

/* ============================================
   RESPONSIVE — Tablet (< 1200px)
   ============================================ */
@media (max-width: 1199px) {
  .container { padding: 0 28px; }
  .hero__content { padding: 4rem 3rem; }
  .craft__content { padding: 3.5rem; }
}

/* ============================================
   RESPONSIVE — Mobile (< 768px)
   ============================================ */
@media (max-width: 767px) {
  :root { --section-padding: 64px 0; }
  .container { padding: 0 20px; }

  /* Hero */
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero__content {
    padding: 5rem 1.5rem 3rem;
    order: 1;
  }
  .hero__content::after { display: none; }
  .hero__image { order: 0; }
  .hero__image .img-placeholder { min-height: 300px; aspect-ratio: 4/3; }

  .heading--xl { font-size: 2.4rem; }
  .heading--lg { font-size: 1.8rem; }

  .btn { padding: 14px 28px; font-size: 0.72rem; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; }

  /* Steps */
  .steps { grid-template-columns: 1fr; gap: 36px; }

  /* Selector */
  .category-tabs { gap: 6px; }
  .category-tab { padding: 10px 18px; font-size: 0.7rem; }
  .item-row { padding: 14px 12px; flex-wrap: wrap; gap: 10px; }
  .item-info { margin-right: 0; min-width: 100%; }
  .qty-controls { margin-left: auto; }

  /* Sticky bar */
  .sticky-bar { padding: 12px 16px; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
  .sticky-bar__summary { font-size: 0.85rem; }

  /* Modal */
  .modal { padding: 2rem 1.5rem; max-height: 100vh; height: 100%; }
  .modal-overlay { padding: 0; }

  /* Craft */
  .craft { grid-template-columns: 1fr; }
  .craft__image .img-placeholder { min-height: 280px; }
  .craft__content { padding: 3rem 1.5rem; }

  /* Footer */
  .footer__inner { flex-direction: column; gap: 24px; }
}
