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

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

:root {
  --navy: #1B3A5C;
  --navy-light: #2A5280;
  --navy-dark: #0F2338;
  --gold: #C8A830;
  --gold-light: #E0C04A;
  --gold-dark: #B8982A;
  --bronze: #9A7D3A;
  --brown: #8B7035;
  --olive: #5B8C5A;
  --cream: #FFF8EE;
  --cream-dark: #F5ECD8;
  --white: #FFFFFF;
  --off-white: #FAF6EF;
  --text-dark: #1E1E1E;
  --text-muted: #6B5E4E;
  --shadow-sm: 0 2px 8px rgba(27, 58, 92, 0.08);
  --shadow-md: 0 4px 20px rgba(27, 58, 92, 0.12);
  --shadow-lg: 0 8px 40px rgba(27, 58, 92, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ───── BACKGROUND TEXTURES ───── */

body {
  font-family: 'Josefin Sans', sans-serif;
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 1px,
      rgba(139, 112, 53, 0.012) 1px,
      rgba(139, 112, 53, 0.012) 2px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139, 112, 53, 0.008) 2px,
      rgba(139, 112, 53, 0.008) 3px
    );
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Palm leaf shadow — top-left corner */
body::before {
  content: '';
  position: fixed;
  top: -60px;
  left: -60px;
  width: 420px;
  height: 420px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cpath d='M200 380 Q210 280 220 200 Q230 140 225 80' stroke='%238B7035' stroke-width='6' fill='none' stroke-linecap='round' opacity='0.15'/%3E%3Cpath d='M225 90 Q180 60 150 70' stroke='%238B7035' stroke-width='5' fill='none' stroke-linecap='round' opacity='0.12'/%3E%3Cpath d='M222 100 Q190 85 160 95' stroke='%238B7035' stroke-width='4.5' fill='none' stroke-linecap='round' opacity='0.12'/%3E%3Cpath d='M224 80 Q200 40 180 20' stroke='%238B7035' stroke-width='4' fill='none' stroke-linecap='round' opacity='0.12'/%3E%3Cpath d='M225 90 Q260 55 285 60' stroke='%238B7035' stroke-width='5' fill='none' stroke-linecap='round' opacity='0.12'/%3E%3Cpath d='M222 100 Q255 80 275 90' stroke='%238B7035' stroke-width='4.5' fill='none' stroke-linecap='round' opacity='0.12'/%3E%3Cpath d='M224 80 Q250 35 265 15' stroke='%238B7035' stroke-width='4' fill='none' stroke-linecap='round' opacity='0.12'/%3E%3C/svg%3E") no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Sand-and-sea wavy horizon — bottom edge */
body::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 50' preserveAspectRatio='none'%3E%3Cpath d='M0 25 Q100 5 200 25 Q300 45 400 25 Q500 5 600 25 Q700 45 800 25 Q900 5 1000 25 Q1100 45 1200 25' stroke='%231B3A5C' stroke-width='2' fill='none' opacity='0.15'/%3E%3Cpath d='M0 35 Q150 18 300 35 Q450 52 600 35 Q750 18 900 35 Q1050 52 1200 35' stroke='%231B3A5C' stroke-width='1.5' fill='none' opacity='0.1'/%3E%3C/svg%3E") repeat-x bottom;
  background-size: 1200px 50px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ───── FIXED TOP BAR ───── */

#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 248, 238, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(27, 58, 92, 0.06);
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#top-bar.visible {
  transform: translateY(0);
}

.top-bar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--navy);
}

.mini-palm {
  width: 22px;
  height: auto;
}

.top-bar-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.top-bar-langs {
  display: flex;
  gap: 0.15rem;
}

.top-lang-btn {
  padding: 0.25rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: var(--transition);
}

.top-lang-btn:hover {
  color: var(--navy);
  border-color: rgba(27, 58, 92, 0.15);
}

.top-lang-btn.active {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
  font-weight: 600;
}

/* ───── SPLASH / COVER ───── */

#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-dark) 40%, #E8DCC8 100%);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  text-align: center;
  max-width: 480px;
  padding: 2rem;
  animation: splashFadeIn 1.2s ease forwards;
  position: relative;
}

.splash-inner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(200, 168, 48, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.palm-logo {
  width: 100px;
  height: auto;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(139, 112, 53, 0.3));
}

.brand-name {
  font-size: 4rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.4rem;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
}

.brand-name .ka {
  color: var(--navy);
}

.brand-name .tarti {
  color: var(--gold-dark);
  font-style: italic;
}

.tagline {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--bronze);
  margin-bottom: 1.5rem;
  font-weight: 300;
  position: relative;
  z-index: 1;
}

.wave-divider {
  max-width: 200px;
  margin: 0 auto 0.8rem;
  position: relative;
  z-index: 1;
}

.wave-divider svg {
  width: 100%;
  height: auto;
}

.sea-tagline {
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  color: var(--navy-light);
  opacity: 0.7;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

/* Splash Language Buttons */

.splash-lang-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
}

.splash-lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border: 1.5px solid var(--gold);
  border-radius: 100px;
  background: transparent;
  color: var(--navy);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
}

.splash-lang-btn:hover,
.splash-lang-btn:focus-visible {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200, 168, 48, 0.25);
}

.splash-lang-btn:active {
  transform: translateY(0);
}

/* ───── MAIN MENU ───── */

#menu {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
  position: relative;
  z-index: 1;
}

#menu.hidden {
  display: none;
}

/* Category Navigation */

#cat-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 238, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 0 -1.5rem 2rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(27, 58, 92, 0.08);
}

.cat-nav-inner {
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cat-nav-inner::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cat-btn:hover {
  color: var(--navy);
  background: rgba(27, 58, 92, 0.06);
}

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

.cat-btn.active {
  color: var(--navy);
  font-weight: 600;
  background: rgba(200, 168, 48, 0.15);
  box-shadow: inset 0 -2px 0 var(--gold);
}

/* Section Headers */

.menu-section {
  display: block;
  margin-bottom: 3.5rem;
  animation: sectionFadeIn 0.5s ease;
  padding-top: 100px;
  scroll-margin-top: 100px;
}

.menu-section + .menu-section {
  margin-top: -100px;
}

.section-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gold);
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gold-dark);
}

.section-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon svg {
  width: 28px;
  height: 28px;
}

.section-header .section-title-langs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.12em;
  font-family: 'Cormorant Garamond', serif;
}

/* ───── THREE-LANGUAGE LAYOUT ───── */

.lang-primary {
  display: inline;
  font-size: inherit;
  color: inherit;
}

.lang-sub {
  display: none;
  font-size: 0.72em;
  color: var(--text-muted);
  font-weight: 300;
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.02em;
  margin-left: 0.3rem;
}

.section-title-langs .lang-sub {
  display: none;
}

.section-title-langs .lang-primary {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.12em;
}

/* Item Groups */

.item-group {
  margin-bottom: 1.5rem;
}

.item-group:last-child {
  margin-bottom: 0;
}

.sub-heading {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--bronze);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed rgba(154, 125, 58, 0.3);
  letter-spacing: 0.04em;
}

.sub-heading .lang-sub {
  font-size: 0.7em;
}

/* Menu Items */

.menu-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(27, 58, 92, 0.05);
  transition: background var(--transition), padding var(--transition);
  border-radius: 4px;
  gap: 0.3rem 0.75rem;
}

.menu-item:last-of-type {
  border-bottom: none;
}

.menu-item:hover {
  background: rgba(200, 168, 48, 0.04);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.item-name-langs {
  display: inline;
  line-height: 1.5;
}

.item-name-langs .lang-primary {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.item-name-langs .lang-sub {
  font-family: 'Josefin Sans', sans-serif;
}

.menu-item.signature {
  border-left: 3px solid var(--olive);
  padding-left: 0.75rem;
  margin-left: -0.75rem;
  background: linear-gradient(90deg, rgba(91, 140, 90, 0.04) 0%, transparent 60%);
  border-radius: 0 4px 4px 0;
}

.menu-item.signature:hover {
  background: rgba(91, 140, 90, 0.06);
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}

.menu-item.signature .item-name-langs .lang-primary {
  font-weight: 600;
  color: var(--navy);
}

.sig-star {
  color: var(--brown);
  margin-right: 0.3rem;
  font-size: 0.85em;
}

.item-price {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.add-on {
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.item-desc-langs {
  width: 100%;
  line-height: 1.5;
  margin-top: 0.15rem;
  font-weight: 300;
}

.item-desc-langs .lang-primary {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.item-desc-langs .lang-sub {
  font-size: 0.72em;
}

/* Allergen Icons */

.allergen-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

.allergen-icons svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.55;
  transition: opacity var(--transition);
}

.allergen-icons svg:hover {
  opacity: 1;
}

/* Variants (single/double etc) */

.has-variants {
  flex-wrap: wrap;
}

.item-variants {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.variant {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.variant strong {
  color: var(--navy);
  font-weight: 600;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.9rem;
}

.variant-sep {
  color: rgba(27, 58, 92, 0.15);
  font-weight: 300;
  margin: 0 0.1rem;
}

/* Build-Your-Own Ingredients */

.build-own {
  background: linear-gradient(135deg, var(--cream) 0%, var(--off-white) 100%);
  border: 1px dashed rgba(200, 168, 48, 0.3);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0;
}

.build-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.ingredient-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ingredient {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 300;
  transition: var(--transition);
}

.ingredient.free {
  background: rgba(27, 58, 92, 0.06);
  color: var(--navy);
  border: 1px solid rgba(27, 58, 92, 0.1);
}

.ingredient.free:hover {
  background: rgba(27, 58, 92, 0.1);
}

.ingredient.premium {
  background: rgba(200, 168, 48, 0.1);
  color: var(--navy);
  border: 1px solid rgba(200, 168, 48, 0.25);
}

.ingredient.premium:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.add-price {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--bronze);
  font-family: 'Josefin Sans', sans-serif;
}

.ingredient.premium:hover .add-price {
  color: rgba(255, 255, 255, 0.85);
}

/* Add-on chips (desserts) */

.add-ons-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.add-on-chip {
  padding: 0.25rem 0.7rem;
  background: rgba(200, 168, 48, 0.08);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid rgba(200, 168, 48, 0.15);
}

/* ───── RESPONSIVE ───── */

#top-bar.visible ~ #menu #cat-nav {
  top: 48px;
}

@media (max-width: 768px) {
  .brand-name {
    font-size: 2.8rem;
  }

  .palm-logo {
    width: 80px;
  }

  #top-bar .top-bar-inner {
    padding: 0.5rem 1rem;
  }

  .top-bar-name {
    font-size: 1.1rem;
  }

  .mini-palm {
    width: 18px;
  }

  #menu {
    padding: 0 1rem 4rem;
  }

  #cat-nav {
    margin: 0 -1rem 1.5rem;
    padding: 0 1rem;
  }

  .cat-btn {
    font-size: 0.7rem;
    padding: 0.4rem 0.75rem;
  }

  .section-header h2 {
    font-size: 1.3rem;
  }

  .section-card {
    padding: 1rem;
  }

  .item-name-langs .lang-primary {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body::before {
    width: 260px;
    height: 260px;
    top: -40px;
    left: -40px;
  }

  body::after {
    height: 30px;
    background-size: 800px 30px;
  }

  .brand-name {
    font-size: 2.2rem;
  }

  .palm-logo {
    width: 70px;
  }

  .top-bar-name {
    font-size: 1rem;
  }

  .top-lang-btn {
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
  }

  .menu-item {
    padding: 0.6rem 0;
  }

  .menu-item:hover {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .section-header h2 {
    font-size: 1.1rem;
  }

  .lang-sub {
    font-size: 0.65em;
  }
}

.site-footer {
  text-align: center;
  padding: 1.2rem 1rem;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(139, 112, 53, 0.15);
  margin-top: 1.5rem;
}

.footer-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--brown);
  text-decoration: underline;
}