/**
 * Lyly Bakery — design tokens, layout, bakery-forward UI
 * Typography: Fraunces (display) + Nunito Sans (body)
 * Brand: retail red #C62828, butter yellow #FBC02D
 */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,500;0,6..12,600;0,6..12,700;1,6..12,400&display=swap');

:root {
  /* Brand */
  --color-primary: #c62828;
  --color-primary-hover: #a71e24;
  --color-secondary: #fbc02d;
  --color-secondary-hover: #f9a825;
  --color-accent: #ffffff;

  /* Surfaces (light) */
  --surface: #fffbf5;
  --surface-card: #ffffff;
  --surface-muted: #fff3e0;
  --text: #1a0a0a;
  --text-muted: #5c4033;
  --border: rgba(198, 40, 40, 0.12);
  --border-strong: rgba(198, 40, 40, 0.22);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 12px rgba(26, 10, 10, 0.06);
  --shadow-md: 0 12px 32px rgba(26, 10, 10, 0.1);
  --transition: 0.2s ease;
  /* Header min-height: fits vertical logo (321×383) at scaled height */
  --nav-h: 88px;
}

/* Dark theme */
[data-theme='dark'] {
  --surface: #1c1212;
  --surface-card: #261a1a;
  --surface-muted: #2d1f1f;
  --text: #fef6f0;
  --text-muted: #c4a99a;
  --border: rgba(251, 192, 45, 0.15);
  --border-strong: rgba(251, 192, 45, 0.28);
  --shadow-sm: 0 2px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --surface: #1c1212;
    --surface-card: #261a1a;
    --surface-muted: #2d1f1f;
    --text: #fef6f0;
    --text-muted: #c4a99a;
    --border: rgba(251, 192, 45, 0.15);
    --border-strong: rgba(251, 192, 45, 0.28);
    --shadow-sm: 0 2px 16px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-8);
  }
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface-card) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--nav-h);
  padding-block: var(--space-3);
}

.navbar-brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

/* Official stacked logo: chef hat + wheat; keep readable without dominating nav */
.navbar-brand-logo {
  height: 52px;
  width: auto;
  max-width: min(200px, 44vw);
  object-fit: contain;
  display: block;
}

@media (min-width: 900px) {
  .navbar-brand-logo {
    height: 64px;
    max-width: 220px;
  }
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 899px) {
  .nav-backdrop {
    display: block;
  }
}

.nav-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  cursor: pointer;
  z-index: 101;
}

.nav-menu-toggle:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.nav-menu-toggle__bars span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
}

@media (max-width: 899px) {
  .nav-menu-toggle {
    display: flex;
  }
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

@media (max-width: 899px) {
  .nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100vh;
    background: var(--surface-card);
    flex-direction: column;
    align-items: stretch;
    padding: calc(var(--nav-h) + var(--space-4)) var(--space-6) var(--space-6);
    box-shadow: var(--shadow-md);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 99;
  }
  .nav-panel.is-open {
    transform: translateX(0);
  }
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  align-items: center;
}

@media (max-width: 899px) {
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-primary);
  border-bottom-color: var(--color-secondary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

@media (max-width: 899px) {
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: auto;
    padding-top: var(--space-6);
  }
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
}

.theme-toggle-option {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.theme-toggle-option:hover {
  color: var(--text);
}

.theme-toggle-option.is-active {
  background: var(--color-primary);
  color: var(--color-accent);
}

.theme-toggle-option:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s ease, box-shadow var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-secondary);
  color: #3e2723;
}

.btn-secondary:hover {
  background: var(--color-secondary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

/* —— Hero —— */
.hero {
  position: relative;
  padding: var(--space-12) 0 var(--space-16);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, rgba(251, 192, 45, 0.35) 0%, transparent 55%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-12);
  }
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-secondary) 45%, transparent);
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: var(--space-4);
  color: var(--text);
}

.hero h1 em {
  font-style: italic;
  color: var(--color-primary);
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 36ch;
  margin-bottom: var(--space-6);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

/* Hero trust line (HALAL, jam, rentang harga Google) */
.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin-bottom: var(--space-4);
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.trust-strip strong {
  color: var(--text);
}

.hero-delivery a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-delivery a:hover {
  color: var(--color-primary-hover);
}

.hero-visual {
  position: relative;
  min-height: 280px;
}

@media (min-width: 900px) {
  .hero-visual {
    min-height: 360px;
  }
}

.hero-bread-stack {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bread-illustration {
  width: min(100%, 340px);
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface-card) 0%, var(--surface-muted) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  position: relative;
}

.bread-illustration svg {
  width: 72%;
  height: auto;
  opacity: 0.92;
}

.floating-chip {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 700;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.floating-chip--1 {
  top: 12%;
  left: -4%;
  animation: float 4s ease-in-out infinite;
}

.floating-chip--2 {
  bottom: 18%;
  right: -6%;
  background: var(--color-secondary);
  color: #3e2723;
  animation: float 5s ease-in-out infinite 0.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* —— Sections —— */
.section {
  padding: var(--space-16) 0;
}

.section--muted {
  background: var(--surface-muted);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-10);
}

.section-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: var(--space-3);
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Product grids */
.product-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}

.product-card .price {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 0.95rem;
}

.product-card p.desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* Dense price list */
.price-list {
  list-style: none;
  columns: 1;
  gap: var(--space-2);
}

@media (min-width: 600px) {
  .price-list {
    columns: 2;
    column-gap: var(--space-8);
  }
}

@media (min-width: 900px) {
  .price-list {
    columns: 3;
  }
}

.price-list li {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}

.price-list .item-name {
  font-weight: 600;
  text-transform: capitalize;
}

.price-list .item-price {
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.premium-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .premium-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .premium-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.premium-card {
  background: linear-gradient(180deg, var(--surface-card) 0%, var(--surface-muted) 100%);
  border: 2px solid var(--color-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: center;
}

.premium-card .pkg-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.premium-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.premium-card .pkg-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  min-height: 2.8em;
}

.premium-card .pkg-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-block {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.contact-block h3 {
  font-family: var(--font-display);
  margin-bottom: var(--space-4);
}

.contact-list {
  list-style: none;
}

.contact-list li {
  margin-bottom: var(--space-3);
}

.contact-list a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-list--platforms li {
  margin-bottom: var(--space-4);
}

.contact-subhead {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: var(--space-6) 0 var(--space-3);
}

.text-muted-inline {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Lokasi / Google local-style cards */
.location-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 720px) {
  .location-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.location-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.location-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
  line-height: 1.25;
}

.location-type {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.location-rating {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.location-reviews {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.location-hours {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: var(--space-4);
}

.location-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 1px;
}

.location-link:hover {
  color: var(--color-primary-hover);
}

.location-more {
  text-align: center;
  margin-top: var(--space-8);
  font-size: 0.95rem;
}

.location-more a {
  color: var(--color-primary);
  font-weight: 700;
}

.payment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  list-style: none;
  padding: 0;
}

.payment-tags li {
  font-size: 0.8rem;
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Footer */
.site-footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer strong {
  color: var(--text);
}
