/* ============================================================
   NGUYEN SINH BISTRO — Shared Website Styles
   Vintage 1940s Saigon Aesthetic
   ============================================================ */

:root {
  --primary: #805600;
  --secondary: #7f5445;
  --tertiary: #a43b32;
  --surface: #fff8ef;
  --surface-container: #f7edd4;
  --on-surface: #2a1f0e;
  --border: #d4c4a8;
  --muted: #6b5c46;
}

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

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

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--surface);
  color: var(--on-surface);
  line-height: 1.7;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.font-mono, .font-label, label, .label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

/* --- No Rounded Corners (global override) --- */
img, button, input, select, textarea, div, section, article {
  border-radius: 0.125rem !important;
}

/* ============================================================
   FILM GRAIN OVERLAY
   ============================================================ */
.grain-overlay {
  position: relative;
}

.grain-overlay::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ============================================================
   TORN PAPER EDGE
   ============================================================ */
.mask-torn-paper {
  position: relative;
}

.mask-torn-paper::before,
.mask-torn-paper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
  background: var(--surface);
  z-index: 2;
}

.mask-torn-paper::before {
  top: -1px;
  clip-path: polygon(
    0% 100%, 2% 60%, 5% 90%, 8% 50%, 12% 80%, 15% 40%, 18% 70%,
    22% 30%, 26% 65%, 30% 45%, 34% 75%, 38% 35%, 42% 70%, 46% 25%,
    50% 60%, 54% 40%, 58% 80%, 62% 30%, 66% 70%, 70% 50%, 74% 85%,
    78% 35%, 82% 65%, 86% 45%, 90% 80%, 94% 50%, 97% 75%, 100% 100%
  );
}

.mask-torn-paper::after {
  bottom: -1px;
  clip-path: polygon(
    0% 0%, 3% 55%, 7% 20%, 11% 65%, 15% 30%, 19% 70%, 23% 15%,
    27% 55%, 31% 35%, 35% 75%, 39% 20%, 43% 60%, 47% 30%, 51% 70%,
    55% 15%, 59% 55%, 63% 40%, 67% 80%, 71% 25%, 75% 60%, 79% 35%,
    83% 75%, 87% 20%, 91% 55%, 95% 40%, 98% 70%, 100% 0%
  );
}

/* ============================================================
   PAPER TEXTURE
   ============================================================ */
.paper-texture {
  background-color: var(--surface);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(128, 86, 0, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(127, 84, 69, 0.04) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ============================================================
   ROTATION CLASSES
   ============================================================ */
.rotate-slight {
  transform: rotate(-1.5deg);
}

.rotate-slight-right {
  transform: rotate(1.5deg);
}

.rotate-slight:hover,
.rotate-slight-right:hover {
  transform: rotate(0deg);
  transition: transform 0.4s ease;
}

/* ============================================================
   OIL BLUR GLASSMORPHISM
   ============================================================ */
.oil-blur {
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(255, 248, 239, 0.72);
  border: 1px solid rgba(128, 86, 0, 0.12);
  box-shadow: 0 4px 30px rgba(128, 86, 0, 0.06);
}

/* ============================================================
   VINTAGE FORM INPUTS (dotted-line bottom border, no box)
   ============================================================ */
.vintage-input,
.dotted-input {
  background: transparent;
  border: none;
  border-bottom: 2px dotted var(--primary);
  padding: 0.5rem 0.25rem;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1rem;
  color: var(--on-surface);
  outline: none;
  transition: border-color 0.3s ease;
  width: 100%;
}

.vintage-input:focus,
.dotted-input:focus {
  border-bottom-color: var(--tertiary);
  border-bottom-style: solid;
}

.vintage-input::placeholder,
.dotted-input::placeholder {
  color: #b8a088;
  font-style: italic;
}

/* ============================================================
   POLAROID CARD
   ============================================================ */
.polaroid {
  background: #fffdf7;
  padding: 0.75rem 0.75rem 2.5rem;
  box-shadow:
    2px 4px 12px rgba(0, 0, 0, 0.12),
    0 6px 20px rgba(128, 86, 0, 0.06);
  transform: rotate(-1deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.polaroid:nth-child(even) { transform: rotate(1.5deg); }

.polaroid:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 12px 40px rgba(128, 86, 0, 0.08);
}

.polaroid img {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(0.15) contrast(1.05) brightness(0.98);
}

.polaroid-caption {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: #5a4a32;
  text-align: center;
  padding-top: 0.75rem;
}

/* ============================================================
   PRINT / STAMP BADGE
   ============================================================ */
.stamp-badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--tertiary);
  border: 2px solid var(--tertiary);
  padding: 0.35rem 0.75rem;
  transform: rotate(-4deg);
  position: relative;
  opacity: 0.85;
}

.stamp-badge::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(164, 59, 50, 0.3);
}

.stamp-badge--brown {
  color: var(--primary);
  border-color: var(--primary);
}

.stamp-badge--brown::before {
  border-color: rgba(128, 86, 0, 0.3);
}

/* Larger stamp variant */
.stamp {
  border: 3px solid var(--tertiary);
  padding: 0.4rem 1rem;
  color: var(--tertiary);
  font-family: 'Newsreader', serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-5deg);
  opacity: 0.8;
  display: inline-block;
}

/* ============================================================
   SEPIA IMAGE TREATMENT
   ============================================================ */
.img-vintage {
  filter: sepia(25%) contrast(1.05) brightness(0.95);
  transition: filter 0.5s ease;
}

.img-vintage:hover {
  filter: sepia(0) contrast(1) brightness(1);
}

/* ============================================================
   TAPED NOTE (Testimonials)
   ============================================================ */
.taped-note {
  background: #fffdf5;
  padding: 1.5rem;
  position: relative;
  box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.06);
  transform: rotate(-1deg);
}

.taped-note::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 18px;
  background: rgba(200, 180, 140, 0.55);
  z-index: 1;
}

.taped-note:nth-child(even) {
  transform: rotate(1.2deg);
}

.taped-note:nth-child(3n) {
  transform: rotate(-0.5deg);
}

/* ============================================================
   TICKET / RESERVATION CARD
   ============================================================ */
.ticket {
  background: #fffdf5;
  border: 2px dashed rgba(128, 86, 0, 0.3);
  padding: 1.5rem;
  position: relative;
}

.ticket::before,
.ticket::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--surface);
  border-radius: 50% !important;
  top: 50%;
  transform: translateY(-50%);
}

.ticket::before {
  left: -12px;
  border-right: 2px dashed rgba(128, 86, 0, 0.3);
}

.ticket::after {
  right: -12px;
  border-left: 2px dashed rgba(128, 86, 0, 0.3);
}

/* ============================================================
   MENU CARD
   ============================================================ */
.menu-card {
  background: #fffdf7;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(128, 86, 0, 0.12);
}

.menu-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: sepia(0.12) contrast(1.05);
  transition: filter 0.4s ease;
}

.menu-card:hover img {
  filter: sepia(0) contrast(1);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary,
.btn-vintage {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.btn-primary:hover,
.btn-vintage:hover {
  background: #5a3d00;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  color: var(--primary);
  padding: 0.7rem 1.7rem;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-link,
.nav-link-item {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5a4a32;
  text-decoration: none;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after,
.nav-link-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-link-item:hover,
.nav-link-item.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after,
.nav-link-item:hover::after,
.nav-link-item.active::after {
  width: 100%;
}

/* ============================================================
   DIVIDERS
   ============================================================ */
.divider-dots {
  border: none;
  border-top: 2px dotted rgba(128, 86, 0, 0.25);
  margin: 2rem 0;
}

.divider-ornament {
  text-align: center;
  overflow: visible;
  border: none;
  height: 1px;
  position: relative;
  margin: 3rem 0;
}

.divider-ornament::before {
  content: '\2766';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  padding: 0 1rem;
  color: rgba(128, 86, 0, 0.4);
  font-size: 1.25rem;
}

.vintage-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.vintage-divider::before,
.vintage-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* ============================================================
   MOBILE NAV
   ============================================================ */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 239, 0.97);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav .nav-link {
  font-size: 1.25rem;
  letter-spacing: 0.12em;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 101;
  background: none;
  border: none;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--on-surface);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   STAMP NUMBERS (for process steps)
   ============================================================ */
.stamp-number {
  width: 3.5rem;
  height: 3.5rem;
  border: 2px solid var(--primary);
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
}

.stamp-number::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed var(--primary);
  border-radius: 50% !important;
  opacity: 0.5;
}

/* ============================================================
   HANGING WOODEN SIGN TABS
   ============================================================ */
.hanging-sign {
  background: linear-gradient(180deg, #6b4226 0%, #4a2c17 100%);
  color: #faecd4;
  padding: 0.6rem 1.4rem;
  font-family: 'Newsreader', serif;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 0.95rem;
}

.hanging-sign::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: #8b6914;
}

.hanging-sign:hover,
.hanging-sign.active {
  background: linear-gradient(180deg, #805600 0%, #5a3a10 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(128, 86, 0, 0.3);
}

/* ============================================================
   DOTTED TABLE ROWS
   ============================================================ */
.dotted-row {
  border-bottom: 1.5px dotted var(--border);
}

/* ============================================================
   PRESS CLIPPING & POSTCARD
   ============================================================ */
.press-clip {
  background: #faf5eb;
  border: 1px solid #c9b99a;
  padding: 1.5rem;
  position: relative;
}

.press-clip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 1.7rem, rgba(0,0,0,0.03) 1.7rem, rgba(0,0,0,0.03) 1.75rem);
  pointer-events: none;
}

.postcard {
  background: #fffdf7;
  border: 2px solid #c9b99a;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   HERO OVERLAY
   ============================================================ */
.hero-overlay {
  background: linear-gradient(180deg, rgba(42,26,10,0.55) 0%, rgba(128,86,0,0.3) 100%);
}

/* ============================================================
   PARCHMENT SURFACE
   ============================================================ */
.parchment {
  background: linear-gradient(135deg, #fff8ef 0%, #f5e6d0 50%, #fff8ef 100%);
  border: 1px solid #d4b896;
  box-shadow: 2px 3px 12px rgba(128,86,0,0.1);
}

/* ============================================================
   LINK VINTAGE
   ============================================================ */
.link-vintage {
  position: relative;
  text-decoration: none;
  color: var(--primary);
}

.link-vintage::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  transition: width 0.3s;
}

.link-vintage:hover::after {
  width: 100%;
}

/* ============================================================
   MODAL OVERLAY
   ============================================================ */
.modal-overlay {
  background: rgba(42, 26, 10, 0.6);
  backdrop-filter: blur(4px);
}

/* ============================================================
   FILTER PILLS
   ============================================================ */
.filter-pill {
  padding: 0.4rem 1.2rem;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill.active,
.filter-pill:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================
   LAZY IMAGE
   ============================================================ */
img[data-src] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[data-src].loaded {
  opacity: 1;
}

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

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .nav-links { display: none !important; }
  .nav-mobile-btn { display: flex !important; }

  .polaroid {
    padding: 0.5rem 0.5rem 1.75rem;
  }

  .stamp-badge {
    font-size: 0.55rem;
    padding: 0.25rem 0.5rem;
  }

  .taped-note {
    padding: 1rem;
  }

  .ticket::before,
  .ticket::after {
    display: none;
  }
}

@media (min-width: 769px) {
  .nav-mobile-btn { display: none !important; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .btn-primary,
  .btn-vintage,
  .btn-outline {
    padding: 0.6rem 1.2rem;
    font-size: 0.7rem;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-balance {
  text-wrap: balance;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

::selection {
  background: rgba(128, 86, 0, 0.15);
  color: var(--on-surface);
}
