
:root {
  --bg: #f4efe5;
  --bg-soft: #eee5d7;
  --text: #3d2c24;
  --text-soft: #7b685e;
  --line: rgba(61, 44, 36, 0.13);
  --accent: #5b4033;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Estedad", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.site-header {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding:
    calc(34px + env(safe-area-inset-top))
    18px
    22px;
}

.brand {
  text-align: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(61, 44, 36, 0.3);
  border-radius: 50%;

  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.brand-name {
  margin: 0;

  font-family: "Cormorant Garamond", serif;
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.05em;
}

.brand-tagline {
  margin: 5px 0 0;

  color: var(--text-soft);
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.search-wrapper {
  margin-top: 28px;
}

.menu-search {
  width: 100%;
  height: 48px;

  padding: 0 16px;

  border: 1px solid var(--line);
  border-radius: 6px;

  background: rgba(255, 255, 255, 0.23);
  color: var(--text);

  outline: none;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.menu-search::placeholder {
  color: #9b8a80;
}

.menu-search:focus {
  border-color: rgba(61, 44, 36, 0.38);
  background: rgba(255, 255, 255, 0.4);
}

.category-nav {
  position: sticky;
  top: 0;
  z-index: 20;

  background: rgba(244, 239, 229, 0.96);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.category-list {
  width: min(100%, var(--max-width));
  margin: 0 auto;

  display: flex;
  gap: 6px;

  overflow-x: auto;
  overscroll-behavior-x: contain;

  padding: 10px 16px;

  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-button {
  flex: 0 0 auto;

  border: 0;
  background: transparent;

  padding: 8px 10px;

  color: var(--text-soft);

  font-size: 13px;
  font-weight: 400;

  white-space: nowrap;

  cursor: pointer;

  border-bottom: 1px solid transparent;

  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.category-button:hover,
.category-button:focus-visible {
  color: var(--text);
}

.category-button.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.menu {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 8px 18px 26px;
}

.menu-section {
  scroll-margin-top: 74px;
  padding: 34px 0 8px;
}

.category-title {
  margin: 0 0 17px;

  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;

  color: var(--text);
}

.menu-items {
  border-top: 1px solid var(--line);
}

.menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;

  padding: 14px 0;

  border-bottom: 1px solid var(--line);
}

.item-name {
  min-width: 0;

  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;

  overflow-wrap: anywhere;
}

.item-price {
  direction: ltr;

  min-width: max-content;

  color: var(--accent);

  font-size: 13.5px;
  font-weight: 500;

  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.empty-state {
  width: min(100%, var(--max-width));

  margin: 0 auto;
  padding: 55px 18px;

  text-align: center;

  color: var(--text-soft);

  font-size: 14px;
}

.site-footer {
  width: min(100%, var(--max-width));

  margin: 10px auto 0;
  padding:
    34px
    18px
    calc(34px + env(safe-area-inset-bottom));

  text-align: center;

  border-top: 1px solid var(--line);
}

.footer-brand {
  margin: 0;

  font-family: "Cormorant Garamond", serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.footer-tagline {
  margin: 3px 0 0;

  color: var(--text-soft);

  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
}

.noscript-message {
  width: min(100%, var(--max-width));

  margin: 20px auto;
  padding: 14px 18px;

  text-align: center;

  color: var(--text);
  background: var(--bg-soft);

  font-size: 13px;
}

.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;
}

[hidden] {
  display: none !important;
}

@media (max-width: 360px) {
  .site-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .menu {
    padding-left: 14px;
    padding-right: 14px;
  }

  .category-list {
    padding-left: 12px;
    padding-right: 12px;
  }

  .menu-item {
    gap: 12px;
  }

  .item-name {
    font-size: 13.5px;
  }

  .item-price {
    font-size: 13px;
  }
}

@media (min-width: 700px) {
  .site-header {
    padding-top: 54px;
  }

  .menu {
    padding-bottom: 44px;
  }

  .menu-section {
    padding-top: 42px;
  }

  .category-title {
    font-size: 21px;
  }

  .menu-item {
    padding: 16px 0;
  }
}
/* =========================================
   PHASE 5 — MOBILE POLISH
========================================= */

@media (max-width: 430px) {

  .site-header {
    padding-top: calc(24px + env(safe-area-inset-top));
    padding-bottom: 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    font-size: 23px;
  }

  .brand-name {
    font-size: 30px;
    letter-spacing: 0.04em;
  }

  .brand-tagline {
    margin-top: 3px;
    font-size: 15px;
  }

  .search-wrapper {
    margin-top: 22px;
  }

  .menu-search {
    height: 46px;
    padding: 0 14px;
    font-size: 14px;
  }

  .category-list {
    gap: 2px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .category-button {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .menu {
    padding-top: 0;
  }

  .menu-section {
    padding-top: 28px;
    scroll-margin-top: 64px;
  }

  .category-title {
    margin-bottom: 14px;
    font-size: 20px;
  }

  .menu-item {
    gap: 14px;
    padding: 13px 0;
  }

  .item-name {
    font-size: 14.5px;
    line-height: 1.75;
  }

  .item-price {
    font-size: 14px;
    line-height: 1.75;
  }
}

/* =========================================
   ACCESSIBILITY — FOCUS & REDUCED MOTION
========================================= */

.menu-search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.category-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}