/* ============================================================
   Q-LESS — base styles: tokens, reset, chrome, controls
   ============================================================ */

:root {
  --red: #C8102E;
  --red-dark: #9E0B23;
  --red-deep: #7C081B;
  --yellow: #F7D64A;
  --yellow-soft: #FBE27E;
  --yellow-pale: #FDF3C9;
  --yellow-text: #FFE07A;
  --ink: #17181A;
  --ink-2: #3F4146;
  --muted: #6E7178;
  --paper: #FFFFFF;
  --line: rgba(23, 24, 26, 0.1);
  --line-strong: rgba(23, 24, 26, 0.16);
  --gold-ink: #6B4A00;
  --shadow-sm: 0 2px 8px rgba(23, 24, 26, 0.06);
  --shadow-md: 0 12px 30px rgba(23, 24, 26, 0.1);
  --shadow-lg: 0 28px 64px rgba(23, 24, 26, 0.16);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --font-body: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Baloo 2", "Poppins", "Segoe UI", system-ui, sans-serif;
  --header-h: 72px;
  --tabbar-h: 72px;
  --container: 1160px;
  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #eef0f2;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.overlay-open {
  overflow: hidden;
}

h1, h2, h3, p, figure, blockquote {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

input {
  font: inherit;
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

.skip-link {
  position: fixed;
  z-index: 500;
  top: -80px;
  left: 16px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--yellow);
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* Faceted light background, inspired by the Q-LESS mock-ups */
.bg-facets {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #f0f1f3;
  background-image:
    radial-gradient(900px 520px at 50% -8%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0) 72%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0 44px, rgba(255, 255, 255, 0) 44px 116px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.4) 0 28px, rgba(255, 255, 255, 0) 28px 132px),
    linear-gradient(160deg, #fbfbfc 0%, #e8eaee 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(520px 320px at 8% 12%, rgba(247, 214, 74, 0.16), transparent 70%),
    radial-gradient(560px 380px at 96% 4%, rgba(200, 16, 46, 0.07), transparent 72%);
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 40px, 640px);
}

.screen {
  position: relative;
  z-index: 2;
  padding: 30px 0 80px;
}

body.tabbar-on .screen {
  padding-bottom: calc(var(--tabbar-h) + 54px);
}

.screen.is-active {
  animation: screenIn 0.4s var(--ease) both;
}

.screen--immersive {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px 20px 216px;
}

.screen--center {
  text-align: center;
}

.screen--immersion-tight {
  padding-top: 32px;
}

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

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 250, 251, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(23, 24, 26, 0.07);
}

body.header-off .site-header {
  display: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.logo-mark {
  width: 46px;
  height: 46px;
  flex: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

.logo-mark--sm {
  width: 42px;
  height: 42px;
}

.logo-mark--lg {
  width: 108px;
  height: 108px;
}

.logo-mark--xl {
  width: clamp(138px, 22vw, 176px);
  height: auto;
  animation: float 5.5s ease-in-out infinite;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.34rem;
  letter-spacing: 0.025em;
  line-height: 0.95;
}

.brand-tag {
  margin-top: 4px;
  color: var(--red);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.tagline {
  color: var(--red);
  font-size: clamp(0.64rem, 1.5vw, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.tagline--sm {
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  margin-top: 1px;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

body.staff-mode .desktop-nav,
body.staff-mode .cart-btn {
  display: none;
}

.desktop-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.desktop-nav a:hover {
  background: rgba(247, 214, 74, 0.42);
  color: var(--ink);
}

.desktop-nav a.is-active {
  background: var(--ink);
  color: var(--yellow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--red);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(23, 24, 26, 0.06);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.cart-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--red);
  color: var(--yellow);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 0 0 2px #fafafb;
}

.avatar-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--yellow-soft), var(--yellow));
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px rgba(23, 24, 26, 0.1), var(--shadow-sm);
}

/* ------------------------------------------------------------
   Tab bar (mobile / tablet)
   ------------------------------------------------------------ */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: none;
  background: linear-gradient(180deg, var(--red) 0%, #b10d29 100%);
  box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.22);
  padding-bottom: env(safe-area-inset-bottom);
}

body.tabbar-on .tabbar {
  display: block;
}

.tabbar-inner {
  display: flex;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--tabbar-h);
  padding: 10px 4px 12px;
  color: var(--yellow-text);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.82;
  transition: opacity 0.2s, transform 0.2s;
}

.tab:hover {
  opacity: 1;
}

.tab.is-active {
  opacity: 1;
}

.tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 42px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--yellow);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.25s var(--ease);
}

.tab.is-active::before {
  transform: translateX(-50%) scaleX(1);
}

.tab-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transition: background 0.2s;
}

.tab.is-active .tab-icon {
  background: rgba(247, 214, 74, 0.16);
}

.tab-icon svg {
  width: 25px;
  height: 25px;
}

.tab-badge {
  position: absolute;
  top: -2px;
  right: -1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--yellow);
  color: var(--red-dark);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* ------------------------------------------------------------
   Brand waves & overlay mark
   ------------------------------------------------------------ */
.brand-waves {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: none;
  pointer-events: none;
  line-height: 0;
}

body.waves-on .brand-waves {
  display: block;
}

.brand-waves svg {
  width: 100%;
  height: clamp(112px, 17vw, 186px);
  display: block;
}

.wave-brand {
  position: fixed;
  right: max(16px, 4vw);
  bottom: 14px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 8px;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.wavebrand-on .wave-brand {
  display: flex;
}

.wave-brand .logo-mark {
  width: 38px;
  height: 38px;
}

.wave-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.wave-brand__name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.wave-brand__tag {
  margin-top: 3px;
  color: var(--yellow-text);
  font-size: 0.42rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   Buttons & links
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: var(--radius-pill);
  padding: 0.82rem 1.6rem;
  border: 2px solid transparent;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn--lg {
  padding: 0.95rem 1.8rem;
  font-size: 1rem;
  min-height: 52px;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--red);
  color: var(--yellow);
  box-shadow: 0 10px 24px rgba(200, 16, 46, 0.26);
}

.btn--primary:hover {
  background: var(--red-dark);
  box-shadow: 0 14px 30px rgba(200, 16, 46, 0.32);
}

.btn--ghost {
  background: var(--paper);
  border-color: var(--red);
  color: var(--red);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  background: #fff5f6;
}

.btn--outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 0.6rem 1.2rem;
  font-size: 0.82rem;
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.text-link {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--red-dark);
}

.text-link--strong {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  margin: 0 0 6px 16px;
  color: var(--gold-ink);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--paper);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
}

.input-wrap > svg {
  width: 19px;
  height: 19px;
  margin-left: 14px;
  flex: none;
  color: var(--muted);
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  font-size: 0.96rem;
  font-weight: 500;
  outline: none;
}

.input-wrap input[type="email"] {
  font-size: 0.9rem;
}

.input-wrap > svg + input {
  padding-left: 12px;
}

.input-wrap input::placeholder {
  color: #9b9ea5;
  font-weight: 400;
}

.reveal-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-right: 4px;
  border-radius: 50%;
  flex: none;
  color: var(--muted);
}

.reveal-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.reveal-btn svg {
  width: 19px;
  height: 19px;
}

.field-error {
  display: none;
  margin: 6px 0 0 16px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 600;
}

.field.has-error .input-wrap {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.1);
}

.field.has-error .field-error {
  display: block;
}

.input-wrap--phone {
  gap: 4px;
}

.phone-prefix {
  padding-left: 20px;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.96rem;
}

/* ------------------------------------------------------------
   Toast & order overlay
   ------------------------------------------------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
}

body.tabbar-on .toast {
  bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
}

.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  flex: none;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast.is-error::before {
  background: #ff7a8a;
}

.order-overlay {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(800px 480px at 50% 0%, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.9) 60%, rgba(255, 255, 255, 0.94) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0 40px, rgba(235, 237, 240, 0.8) 40px 108px);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.order-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 460px);
  text-align: center;
}

.brand-name--overlay {
  font-size: 2rem;
  margin-top: 4px;
}

.quote-card--small {
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: 22px;
}

.quote-card--small blockquote {
  font-size: 0.85rem;
}

.quote-card--small figcaption {
  font-size: 0.76rem;
}

.spinner {
  position: relative;
  width: 54px;
  height: 54px;
  margin-top: 18px;
  border-radius: 50%;
  background: conic-gradient(var(--red) 0 72%, var(--yellow) 72% 100%);
  animation: spin 1s linear infinite;
}

.spinner span {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  color: var(--red);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: var(--yellow-text);
}

.display-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.005em;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
}

.pagebar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.pagebar--compact {
  margin-bottom: 18px;
}

.pagebar-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.back-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--paper);
  color: var(--red);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(23, 24, 26, 0.06);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.back-btn:hover {
  transform: translateX(-2px);
  box-shadow: var(--shadow-md);
}

.back-btn svg {
  width: 22px;
  height: 22px;
}

.corner-back {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  left: max(18px, 4vw);
  z-index: 6;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--red);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.corner-back svg {
  width: 22px;
  height: 22px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 14px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
}

.section-head > span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.fineprint {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
