/* ==========================================================================
   Dollars Cafe — global.css
   Reusable foundation: design tokens, reset, typography, buttons,
   utilities, utility bar, header navigation, footer.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand palette */
  --primary-blue:  #003DA5;
  --royal-blue:    #0B56D0;
  --gold:          #D4AF37;
  --gold-hi:       #F7D774;
  --bg-dark:       #07111F;
  --bg-secondary:  #0F1B2D;
  --white:         #FFFFFF;
  --gray-soft:     #B8C2D1;

  /* Derived surfaces */
  --bg-elev:       #122236;
  --line:          rgba(184, 194, 209, 0.14);
  --line-strong:   rgba(184, 194, 209, 0.26);

  /* Gradients */
  --grad-gold:   linear-gradient(135deg, var(--gold-hi) 0%, var(--gold) 55%, #b8902a 100%);
  --grad-blue:   linear-gradient(135deg, var(--royal-blue) 0%, var(--primary-blue) 100%);
  --grad-text:   linear-gradient(100deg, var(--gold-hi) 0%, var(--gold) 50%, var(--royal-blue) 130%);
  --grad-cta:    linear-gradient(115deg, #04356b 0%, var(--primary-blue) 38%, var(--gold) 130%);

  /* Glass */
  --glass-bg:    rgba(255, 255, 255, 0.045);
  --glass-brd:   rgba(255, 255, 255, 0.10);
  --glass-blur:  16px;

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shadows */
  --shadow-sm:  0 4px 16px rgba(0, 0, 0, 0.30);
  --shadow-md:  0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 14px 38px rgba(212, 175, 55, 0.28);

  /* Layout */
  --container:  1240px;
  --gutter:     clamp(20px, 5vw, 56px);
  --radius:     18px;
  --radius-sm:  12px;
  --radius-lg:  28px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
svg { fill: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input { font: inherit; }

/* ---------- Accessibility helpers ---------- */
.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;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--gold); color: #1a1306; padding: 10px 18px;
  border-radius: 8px; font-weight: 600; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.section-lead {
  color: var(--gray-soft);
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  max-width: 60ch;
  margin-top: 18px;
}
.section-lead--center { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gold);
}
.eyebrow__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 12px var(--gold);
}

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head--row {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.section-head .section-title { margin-top: 14px; }

/* ---------- Glass surface ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

/* ---------- Buttons ---------- */
.btn {
  --btn-py: 13px; --btn-px: 26px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--btn-py) var(--btn-px);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn .ico { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; }

.btn--lg { --btn-py: 17px; --btn-px: 34px; font-size: 1.02rem; }

.btn--gold {
  background: var(--grad-gold);
  color: #1c1402;
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover { transform: translateY(-3px); box-shadow: 0 20px 48px rgba(212,175,55,0.42); }

.btn--primary {
  background: var(--grad-blue);
  color: var(--white);
  box-shadow: 0 12px 32px rgba(11, 86, 208, 0.35);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(11, 86, 208, 0.5); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  color: var(--white);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
  transform: translateY(-3px);
}

/* Ripple */
.ripple .ripple__wave {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  animation: ripple 0.6s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---------- Utility / Top bar ---------- */
.utility-bar {
  background: linear-gradient(90deg, #051024, #0a1c33);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--gray-soft);
  position: relative;
  z-index: 60;
}
.utility-bar__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; gap: 24px;
}
.utility-bar__contact { display: flex; gap: 26px; flex-wrap: wrap; }
.utility-bar__contact li { display: flex; }
.utility-bar__contact a, .utility-bar__hours {
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.25s var(--ease);
}
.utility-bar__contact a:hover { color: var(--gold-hi); }
.utility-bar .ico {
  width: 15px; height: 15px; stroke: var(--gold); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.utility-bar__social { display: flex; gap: 8px; }
.utility-bar__social a {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line);
  transition: all 0.25s var(--ease);
}
.utility-bar__social svg { width: 15px; height: 15px; fill: var(--gray-soft); }
.utility-bar__social a:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
}
.utility-bar__social a:hover svg { fill: var(--gold-hi); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 80;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease),
              border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
      background: #1111118a;
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: var(--header-h);
}
.header__logo img { 
  height: 80px; 
  width: auto; transition: height 0.4s var(--ease); }

/* Scrolled state (toggled in global.js) */
.header.is-scrolled {
  background: rgba(7, 17, 31, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.header.is-scrolled .header__logo img { height: 80px; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav__list { display: flex; gap: 30px; }
.nav__link {
  position: relative;
  font-size: 0.94rem; font-weight: 500;
  color: var(--white);
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; transform: scaleX(0);
  transform-origin: left;
  background: var(--grad-gold);
  transition: transform 0.3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--white); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__cta, .nav__close { display: none; }

.header__actions { display: flex; align-items: center; gap: 16px; }

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column; gap: 5px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
}
.nav__toggle span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--white); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-overlay {
  position: fixed; inset: 0; z-index: 79;
  background: rgba(3, 8, 16, 0.6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.nav-overlay.is-open { opacity: 1; }

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #060d18 100%);
  border-top: 1px solid var(--line);
  padding-top: 80px;
  margin-top: 0;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.footer__brand img { height: 50px; width: auto; margin-bottom: 20px; }
.footer__brand p { color: var(--gray-soft); font-size: 0.95rem; max-width: 34ch; }
.footer__social { display: flex; gap: 10px; margin-top: 22px; }
.footer__social a {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: all 0.25s var(--ease);
}
.footer__social svg { width: 17px; height: 17px; fill: var(--gray-soft); }
.footer__social a:hover { border-color: var(--gold); background: rgba(212,175,55,0.1); transform: translateY(-3px); }
.footer__social a:hover svg { fill: var(--gold-hi); }

.footer__col h3 {
  font-family: var(--font-body);
  font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--white); margin-bottom: 20px;
}
.footer__col ul { display: grid; gap: 12px; }
.footer__col a {
  color: var(--gray-soft); font-size: 0.94rem;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.footer__col a:hover { color: var(--gold-hi); padding-left: 5px; }

.footer__newsletter p { color: var(--gray-soft); font-size: 0.92rem; margin-bottom: 16px; }
.newsletter__field {
  display: flex; gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
}
.newsletter__field input {
  flex: 1; min-width: 0; border: none; background: none;
  color: var(--white); font-size: 0.92rem;
}
.newsletter__field input::placeholder { color: rgba(184,194,209,0.6); }
.newsletter__field input:focus { outline: none; }
.newsletter__field .btn { --btn-py: 10px; --btn-px: 20px; font-size: 0.88rem; }
.newsletter__msg { font-size: 0.84rem; margin-top: 10px; min-height: 1em; color: var(--gold-hi); }

.footer__contact { display: grid; gap: 6px; margin-top: 22px; font-style: normal; }
.footer__contact a { color: var(--gray-soft); font-size: 0.92rem; transition: color 0.2s var(--ease); }
.footer__contact a:hover { color: var(--gold-hi); }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding: 26px 0 34px;
  color: var(--gray-soft); font-size: 0.85rem;
}
.footer__legal { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__legal a { transition: color 0.2s var(--ease); }
.footer__legal a:hover { color: var(--gold-hi); }

/* ---------- Reveal animation base (driven by global.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal[data-reveal="left"]  { transform: translateX(-48px); }
.reveal[data-reveal="right"] { transform: translateX(48px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
