@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');
@import "tailwindcss";

/* ── Design tokens ────────────────────────────────────────────── */
:root {
  --font-geist-sans: 'Inter', system-ui, sans-serif;
  --font-playfair: 'Playfair Display', Georgia, "Times New Roman", serif;

  --bg: #faf9f6;
  --bg-dark: #0c0c0a;
  --surface: #f0ede8;
  --surface-dark: #161614;
  --border: #ccc9c0;
  --border-dark: #2e2e2a;
  --text: #1a1816;
  --text-muted: #5a5550;
  --text-dim: #9a9590;
  --text-light: #f0ede8;
  --text-light-muted: #888480;
  --highlight: #f5e642;

  --space-section: 100px;

  /* ── Typography spacing tokens ── */
  --lh-body: 1.75;
  --lh-heading: 1.15;
  --lh-display: 1;
  --lh-tight: 0.95;

  --ls-body: 0.01em;
  --ls-heading: -0.02em;
  --ls-display: -0.03em;
  --ls-display-large: -0.04em;
  --ls-nav: 0.02em;
  --ls-btn: 0.04em;
  --ls-eyebrow: 0.16em;
  --ls-label: 0.12em;
}

/* ── Custom scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover { background: var(--highlight); }
* { scrollbar-width: thin; scrollbar-color: var(--border-dark) var(--bg-dark); }

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: auto;
  overflow-x: clip;
  max-width: 100%;
}
body {
  background-color: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-geist-sans), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  overflow-x: clip;
  max-width: 100%;
}
body.nav-open { overflow: hidden; }
::selection { background: var(--highlight); color: var(--text); }

/* ── Display font ─────────────────────────────────────────────── */
.display {
  font-family: var(--font-playfair), Georgia, "Times New Roman", serif;
}

/* ── Highlighted text (yellow like The Pub) ───────────────────── */
:root { --highlight-padding: 0 3px; }
.highlighted-text {
  background: var(--highlight);
  padding: var(--highlight-padding);
  color: var(--text);
}

/* ── Layout ───────────────────────────────────────────────────── */
.section { padding: var(--space-section) 0; }
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 640px) {
  .container { padding: 0 24px; }
  :root { --space-section: 64px; }
}

/* ── Header ───────────────────────────────────────────────────── */
.pub-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  height: 64px;
}

.pub-logo {
  font-family: var(--font-playfair), Georgia, serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: var(--ls-heading);
  color: #fff;
  text-decoration: none;
}

.pub-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Desktop nav links ────────────────────────────────────────── */
.pub-desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.pub-desktop-link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: var(--ls-nav);
  color: var(--text-light-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.pub-desktop-link:hover,
.pub-desktop-link.active { color: #fff; }

.pub-hamburger.pub-mobile-only { display: none; }

@media (max-width: 767px) {
  .pub-desktop-nav { display: none; }
  .pub-hamburger.pub-mobile-only { display: flex; }
}

.pub-btn {
  display: inline-block;
  padding: 8px 22px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: var(--ls-btn);
  color: #000;
  background: #fff;
  text-decoration: none;
  border: 2px solid #fff;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.pub-btn:hover { opacity: 0.75; }

.pub-btn-outline {
  display: inline-block;
  padding: 8px 22px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: var(--ls-btn);
  color: #fff;
  background: transparent;
  text-decoration: none;
  border: 2px solid #fff;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.pub-btn-outline:hover { opacity: 0.75; }

.pub-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.pub-line {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}

@media (max-width: 767px) {
  .pub-header-right .pub-btn,
  .pub-header-right .pub-btn-outline { display: none; }
}

/* ── Full overlay navigation ──────────────────────────────────── */
.pub-nav {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg-dark);
  color: var(--text-light);
  padding-top: 64px;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.pub-nav.open { transform: translateX(0); }

.pub-nav-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}
.pub-nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.pub-nav-toggle-text {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-light-muted);
}

.pub-nav-links {
  display: flex;
  flex-direction: column;
  margin-bottom: auto;
}

.pub-big-link {
  font-family: var(--font-playfair), Georgia, serif;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  border-bottom: 1px solid var(--border-dark);
  padding: 12px 0;
  transition: color 0.2s, padding-left 0.2s;
  display: block;
}
.pub-big-link:hover { color: var(--highlight); padding-left: 8px; }
.pub-big-link.active { color: var(--highlight); }

.pub-nav-misc {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 40px;
  border-top: 1px solid var(--border-dark);
  margin-top: 40px;
}

.pub-text-link {
  font-size: 0.875rem;
  color: var(--text-light-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.pub-text-link:hover { color: var(--text-light); }

/* ── Page heading with divider ────────────────────────────────── */
.page-heading-parent {
  margin-bottom: 40px;
}
.page-heading-parent h1,
.page-heading-parent h2 {
  font-family: var(--font-playfair), Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: var(--ls-heading);
  margin: 0 0 12px;
}
.line-grey {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}
.line-dark {
  height: 1px;
  background: var(--border-dark);
  border: none;
  margin: 0;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  padding: 32px;
  background: transparent;
}
.card-dark {
  border: 1px solid var(--border-dark);
  padding: 32px;
  background: transparent;
}

/* ── Buttons (page-level, light bg context) ───────────────────── */
.btn-primary {
  display: inline-block;
  padding: 12px 30px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: var(--ls-btn);
  color: var(--bg);
  background: var(--text);
  text-decoration: none;
  border: 2px solid var(--text);
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.75; }

.btn-ghost {
  display: inline-block;
  padding: 12px 30px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: var(--ls-btn);
  border: 2px solid var(--text);
  color: var(--text);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: var(--text); color: var(--bg); }

/* ── Global typography consistency ───────────────────────────── */
p {
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  word-spacing: 0.02em;
}
h1, h2, h3, h4, h5, h6 {
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  word-spacing: normal;
}
.display {
  letter-spacing: var(--ls-display);
  line-height: var(--lh-display);
  word-spacing: normal;
}

/* ── Eyebrow ──────────────────────────────────────────────────── */
.eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}
.footer-bg-text {
  position: absolute;
  bottom: -24px;
  left: -8px;
  font-family: var(--font-playfair), Georgia, serif;
  font-size: clamp(7rem, 18vw, 18rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.035);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display-large);
}

/* ── Uniform section spacing on mobile ───────────────────────── */
/* Targets only sections that use the .section-pad utility (not hero/sticky) */
@media (max-width: 767px) {
  .section-pad { padding-top: 72px !important; padding-bottom: 72px !important; }
}
@media (max-width: 640px) {
  .section { padding-top: 56px !important; padding-bottom: 56px !important; }
  .section-pad { padding-top: 56px !important; padding-bottom: 56px !important; }
}

/* ── Footer mobile ────────────────────────────────────────────── */
.footer-inner {
  padding-top: 80px;
  padding-bottom: 60px;
}
@media (max-width: 767px) {
  .footer-inner { padding-top: 56px !important; padding-bottom: 48px !important; }
  .footer-grid { margin-bottom: 40px !important; }
}
@media (max-width: 640px) {
  .footer-inner { padding-top: 48px !important; padding-bottom: 40px !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  .footer-bottom-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  .footer-bottom-links {
    gap: 12px !important;
  }
}

/* ── Hide reCAPTCHA badge (disclosure shown inline on contact form) ── */
.grecaptcha-badge { visibility: hidden !important; }

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroTitleUp {
  from { opacity: 0; transform: translateY(80px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up   { animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-up-1 { animation: fadeUp 0.6s 0.08s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-up-2 { animation: fadeUp 0.6s 0.16s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-up-3 { animation: fadeUp 0.6s 0.24s cubic-bezier(0.16,1,0.3,1) both; }

/* ── Hero scroll-driven animation (The Pub style) ─────────────── */
.hero-intro-section {
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-image-parent {
  will-change: transform;
}
.hero-items {
  will-change: transform;
}

/* ── Scroll reveal (tilted → straight) ───────────────────────── */
.sr-hidden {
  opacity: 0;
  transform: rotate(-1.8deg) translateY(48px);
  transition:
    opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.sr-visible {
  opacity: 1;
  transform: rotate(0deg) translateY(0px);
}

/* ── Nav / dropdown (legacy compatibility) ────────────────────── */
.nav-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
  display: inline-block;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 600; }

/* ── Auth screen (login) — built only from tokens above ─────────── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  background: var(--bg-dark);
}

.auth-banner {
  position: relative;
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  padding: 64px;
  background: var(--surface-dark);
  border-right: 1px solid var(--border-dark);
  overflow: hidden;
}
.auth-banner-text { position: relative; z-index: 1; max-width: 460px; }
.auth-banner-text h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--text-light);
  margin: 16px 0 20px;
}
.auth-banner-text p {
  color: var(--text-light-muted);
  font-size: 1rem;
  max-width: 400px;
}

.auth-form-side {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

@media (max-width: 900px) {
  .auth-screen { flex-direction: column; }
  .auth-banner { flex: 0 0 auto; padding: 48px 32px; border-right: none; border-bottom: 1px solid var(--border-dark); }
  .auth-form-side { flex: 1 1 auto; padding: 40px 24px; }
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  padding: 40px 36px;
}

.auth-logo {
  font-family: var(--font-playfair), Georgia, serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: var(--ls-heading);
  color: var(--text-light);
  text-align: center;
  margin-bottom: 6px;
}
.auth-subtitle {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light-muted);
  margin-bottom: 32px;
}
.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-light-muted);
  margin-bottom: 8px;
}
.auth-field input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-light);
  padding: 12px 14px;
  font-size: 0.9rem;
  font-family: var(--font-geist-sans), system-ui, sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.auth-field input::placeholder { color: var(--text-light-muted); }
.auth-field input:focus { border-color: var(--highlight); }
.auth-error {
  font-size: 0.78rem;
  min-height: 18px;
  margin-bottom: 10px;
  color: #ef4444;
}
.auth-error.success { color: var(--highlight); }
.auth-submit {
  width: 100%;
  display: block;
  padding: 13px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: var(--ls-btn);
  text-align: center;
  color: var(--bg-dark);
  background: var(--highlight);
  border: 2px solid var(--highlight);
  cursor: pointer;
  transition: opacity 0.2s;
}
.auth-submit:hover { opacity: 0.85; }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-light-muted);
}
.auth-switch a {
  color: var(--highlight);
  text-decoration: none;
  font-weight: 700;
}
.auth-switch a:hover { opacity: 0.8; }
