/* BrewLink Premium Landing Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&family=Oswald:wght@500;700&display=swap');

:root {
  --bg-dark: #191210;
  --bg-panel: #241916;
  --bg-card: #2d1f1c;
  --text-primary: #f3ece3;
  --text-muted: #b0a496;
  --accent-gold: #c8a27a;
  --accent-gold-hover: #dbb38a;
  --btn-light: #ece2d7;
  --btn-light-text: #191210;
  --border-subtle: rgba(236, 226, 215, 0.12);
  --font-heading: 'Bebas Neue', 'Oswald', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}
a, button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* Page Loading Screen / Splash */
.page-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background-color: var(--bg-dark);
  background: radial-gradient(circle at center, #271a17 0%, #191210 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}

.page-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
}

.preloader-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: preloaderLogoPulse 2s ease-in-out infinite;
}

.preloader-logo img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.preloader-brand-mark {
  width: 68px;
  height: 68px;
  background: var(--accent-gold);
  color: #191210;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(200, 162, 122, 0.3);
}

.preloader-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preloader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  display: inline-block;
  animation: preloaderDotBounce 1.4s ease-in-out infinite both;
}

.preloader-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.preloader-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.preloader-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes preloaderDotBounce {
  0%, 80%, 100% {
    transform: scale(0.5);
    opacity: 0.3;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes preloaderLogoPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Header Navigation */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(25, 18, 16, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  padding-bottom: 1rem;
  padding-left: calc(2rem + env(safe-area-inset-left, 0px));
  padding-right: calc(2rem + env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.brand-container > img {
  flex-shrink: 0;
  height: 42px;
  width: auto;
  border-radius: 10px;
}
.brand-mark-logo {
  width: 42px;
  height: 42px;
  background: var(--accent-gold);
  color: #191210;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
}
.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}
.btn-nav {
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid transparent;
}
.btn-login {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(243, 236, 227, 0.25);
}
.btn-login:hover {
  background: rgba(243, 236, 227, 0.1);
  border-color: var(--text-primary);
}
.btn-app {
  background: var(--btn-light);
  color: var(--btn-light-text);
}
.btn-app:hover {
  background: var(--accent-gold);
  color: #191210;
  transform: translateY(-1px);
}

/* Hero Section (Matching Reference Image) */
.hero-wrapper {
  max-width: 1280px;
  margin: calc(6.5rem + env(safe-area-inset-top, 0px)) auto 3rem;
  padding: 0 1.5rem;
}
.hero-card {
  background: radial-gradient(circle at 65% 50%, #2f201c 0%, #1c1210 80%);
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  padding: 3.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(4.5rem, 8vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 2rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-weight: 300;
}
.hero-cta-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.btn-primary-hero {
  padding: 0.9rem 2rem;
  border-radius: 999px;
  background: var(--accent-gold);
  color: #191210;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(200, 162, 122, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-primary-hero:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(200, 162, 122, 0.35);
}
.btn-secondary-hero {
  padding: 0.9rem 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-secondary-hero:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-primary);
}
.btn-primary-hero svg, .btn-secondary-hero svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}
.hero-img-wrap {
  width: 100%;
  max-width: 480px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotate(1deg);
  transition: transform 0.4s ease;
}
.hero-img-wrap:hover {
  transform: rotate(0deg) scale(1.02);
}
.hero-img-wrap img {
  display: block;
  width: 100%;
  height: 480px;
  object-fit: cover;
}

/* Badge Detail (Top Right in Ref) */
.hero-badge-tag {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  opacity: 0.85;
}
.hero-badge-tag svg {
  writing-mode: horizontal-tb;
  width: 24px;
  height: 24px;
  fill: var(--accent-gold);
  margin-bottom: 0.3rem;
}

/* Menu Preview Section */
.section-wrapper {
  max-width: 1280px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  text-transform: uppercase;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.menu-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
}
.menu-card-img {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-panel);
  margin-bottom: 1rem;
}
.menu-card-img.placeholder {
  display: grid;
  place-items: center;
  color: var(--accent-gold);
  font-size: 2.5rem;
  font-weight: 700;
}
.menu-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.menu-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}
.menu-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.menu-card-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold);
}
.btn-order-card {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
}
.btn-order-card:hover {
  background: var(--accent-gold);
  color: #191210;
}

/* Features Highlight */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.feature-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
}
.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(200, 162, 122, 0.12);
  color: var(--accent-gold);
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
}
.feature-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Download App Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-close:hover { color: var(--text-primary); }
.qr-modal-img {
  width: 180px;
  height: 180px;
  background: #fff;
  padding: 10px;
  border-radius: 16px;
  margin: 1.5rem auto;
}

/* Footer */
.landing-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem 2rem;
  background: #140d0b;
  margin-top: 5rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-copy {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-admin-link {
  color: var(--accent-gold);
  font-size: 0.88rem;
  font-weight: 500;
}
.footer-admin-link:hover { text-decoration: underline; }

/* Responsive adjustments (Mobile & Tablet Optimization) */
@media (max-width: 1024px) {
  .nav-header {
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.85rem;
    padding-left: calc(1.5rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1.5rem + env(safe-area-inset-right, 0px));
  }
  .hero-wrapper {
    margin-top: calc(5.8rem + env(safe-area-inset-top, 0px));
  }
  .hero-card { 
    grid-template-columns: 1fr; 
    padding: 3rem 2.25rem; 
    text-align: center;
    gap: 2rem;
  }
  .hero-content {
    align-items: center;
  }
  .hero-title {
    font-size: clamp(3.2rem, 7vw, 5.5rem);
    margin-bottom: 1.5rem;
  }
  .hero-subtitle { 
    margin-left: auto; 
    margin-right: auto; 
    font-size: 1.05rem;
  }
  .hero-cta-group { 
    justify-content: center; 
  }
  .hero-badge-tag {
    position: relative;
    top: auto;
    right: auto;
    writing-mode: horizontal-tb;
    flex-direction: row;
    margin: 0 auto 1rem;
    background: rgba(200, 162, 122, 0.12);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(200, 162, 122, 0.25);
  }
  .hero-badge-tag svg {
    margin-bottom: 0;
  }
  .hero-img-wrap {
    max-width: 420px;
    transform: none;
  }
  .hero-img-wrap img {
    height: 360px;
  }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-header { flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
}

@media (max-width: 768px) {
  .nav-header {
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.75rem;
    padding-left: calc(1rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1rem + env(safe-area-inset-right, 0px));
    gap: 0.5rem;
  }
  .brand-container {
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .brand-title {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }
  .btn-nav { 
    padding: 0.45rem 0.8rem; 
    font-size: 0.82rem; 
    white-space: nowrap; 
    gap: 0.35rem;
    min-height: 38px;
  }
  .btn-nav svg { width: 15px; height: 15px; }
  .hero-wrapper {
    margin-top: calc(5.2rem + env(safe-area-inset-top, 0px));
    padding: 0 0.85rem;
  }
  .hero-card { padding: 2rem 1.25rem; border-radius: 20px; }
  .hero-title { font-size: clamp(2.4rem, 10vw, 3.8rem); line-height: 0.95; margin-bottom: 1rem; }
  .hero-subtitle { font-size: 0.95rem; margin-bottom: 1.75rem; }
  .hero-img-wrap { max-width: 100%; }
  .hero-img-wrap img { height: 260px; }
  .section-wrapper { padding: 0 0.85rem; margin: 3rem auto; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
  .features-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
}

@media (max-width: 480px) {
  .nav-header {
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.65rem;
    padding-left: calc(0.75rem + env(safe-area-inset-left, 0px));
    padding-right: calc(0.75rem + env(safe-area-inset-right, 0px));
    gap: 0.4rem;
  }
  .brand-container {
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .brand-mark-logo {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .brand-container > img {
    height: 34px;
    width: auto;
    max-width: 34px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .brand-title {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .nav-actions {
    display: flex !important;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }
  
  /* Prominent, touch-friendly Login and Download App buttons */
  .btn-nav {
    padding: 0.42rem 0.65rem; 
    font-size: 0.78rem;
    gap: 0.3rem;
    min-height: 36px;
    border-radius: 999px;
  }
  .nav-actions .btn-login { 
    display: inline-flex !important;
    align-items: center;
    background: rgba(243, 236, 227, 0.08);
    border: 1px solid rgba(243, 236, 227, 0.28);
    color: var(--text-primary);
  }
  .nav-actions .btn-login .nav-btn-text {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    overflow: visible;
    white-space: nowrap;
  }
  .nav-actions .btn-app { 
    display: inline-flex !important;
    align-items: center;
  }
  .btn-nav svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  .btn-text-full {
    display: none;
  }

  .hero-wrapper {
    margin-top: calc(4.8rem + env(safe-area-inset-top, 0px));
    padding: 0 0.85rem;
  }
  .hero-card { padding: 1.75rem 1rem; border-radius: 18px; }
  .hero-cta-group { flex-direction: column; width: 100%; gap: 0.75rem; }
  .btn-primary-hero, .btn-secondary-hero {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.85rem 1.25rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .section-title { font-size: 2rem; }
  .menu-card { padding: 0.9rem; }
  .modal-card { padding: 1.5rem 1rem; width: 94vw; border-radius: 18px; }
  .modal-close {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
  }
  .qr-modal-img { width: 150px; height: 150px; }
}

@media (max-width: 360px) {
  .nav-header {
    padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.5rem;
    padding-left: calc(0.45rem + env(safe-area-inset-left, 0px));
    padding-right: calc(0.45rem + env(safe-area-inset-right, 0px));
    gap: 0.3rem;
  }
  .brand-container {
    gap: 0.35rem;
  }
  .brand-mark-logo {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    border-radius: 6px;
  }
  .brand-container > img {
    height: 28px;
    max-width: 28px;
    border-radius: 6px;
  }
  .brand-title {
    max-width: 80px;
    font-size: 0.78rem;
  }
  .nav-actions {
    gap: 0.25rem;
  }
  .btn-nav {
    padding: 0.35rem 0.48rem;
    font-size: 0.72rem;
    gap: 0.25rem;
    min-height: 32px;
  }
  .btn-nav svg {
    width: 12px;
    height: 12px;
  }
  .hero-wrapper {
    margin-top: calc(4.4rem + env(safe-area-inset-top, 0px));
    padding: 0 0.5rem;
  }
  .hero-card {
    padding: 1.5rem 0.75rem;
    border-radius: 16px;
  }
  .hero-title {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }
  .hero-subtitle {
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
  }
  .btn-primary-hero, .btn-secondary-hero {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    min-height: 42px;
  }
}
