/* ============================================
   The Hanoi Social Club — Global Styles
   Bohemian, warm, Vietnamese cafe aesthetic
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --color-cream: #F5F0E8;
  --color-cream-light: #FAF8F3;
  --color-brown-deep: #3C2415;
  --color-brown: #5C3D2E;
  --color-brown-light: #8B6F5E;
  --color-terracotta: #C4603A;
  --color-terracotta-light: #D4805E;
  --color-sage: #7A8B6F;
  --color-sage-light: #A3B396;
  --color-gold: #B8963E;
  --color-gold-light: #D4B86A;
  --color-charcoal: #2C2C2C;
  --color-text: #3A3A3A;
  --color-text-light: #6B6B6B;
  --color-border: #E0D8CC;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1200px;
  --nav-height: 72px;
  --transition: 0.3s ease;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

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

a {
  color: var(--color-terracotta);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-brown-deep);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-brown-deep);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1rem, 2.5vw, 1.25rem); }

p {
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.5rem;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--color-cream-light);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1.5rem;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.text-center { text-align: center; }
.text-center .section-intro { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--color-terracotta);
  color: #fff;
  border-color: var(--color-terracotta);
}

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

.btn--outline {
  background: transparent;
  color: var(--color-brown-deep);
  border-color: var(--color-brown-deep);
}

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

.btn--ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(245, 240, 232, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: all var(--transition);
}

.nav.scrolled,
.nav.nav--scrolled {
  box-shadow: 0 2px 20px rgba(60, 36, 21, 0.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-brown-deep);
  text-decoration: none;
  line-height: 1.1;
}

.nav__logo span {
  display: block;
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-top: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-brown);
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-terracotta);
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__links a.active {
  color: var(--color-terracotta);
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-brown-deep);
  transition: all var(--transition);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--nav-height);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero--short {
  min-height: 50vh;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(44, 44, 44, 0.3) 0%,
    rgba(60, 36, 21, 0.7) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 2rem 1.5rem;
  max-width: 800px;
}

.hero__content h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero__content p {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  opacity: 0.95;
  margin-bottom: 2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  font-weight: 400;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(60, 36, 21, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(60, 36, 21, 0.12);
}

.card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card__body {
  padding: 1.5rem;
}

.card__body h3 {
  margin-bottom: 0.75rem;
}

.card__body p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-terracotta);
}

.card__link:hover {
  gap: 0.6rem;
}

/* ---------- Embed containers ---------- */
.embed-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 1.5rem auto;
}

.embed-container iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 8px;
}

.embed-container--map iframe {
  aspect-ratio: 4/3;
  max-width: 100%;
}

.embed-container--spotify iframe {
  aspect-ratio: auto;
  height: 152px;
  border-radius: 12px;
}

.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.embed-grid .embed-container {
  margin: 0;
  max-width: 100%;
}

/* ---------- Pull Quotes ---------- */
.pull-quote {
  border-left: 4px solid var(--color-terracotta);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: rgba(196, 96, 58, 0.05);
  border-radius: 0 8px 8px 0;
}

.pull-quote p {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--color-brown-deep);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.pull-quote cite {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-text-light);
}

/* ---------- Photo Grid / Gallery ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.photo-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform var(--transition);
  cursor: pointer;
}

.photo-grid img:hover {
  transform: scale(1.03);
}

/* ---------- Info Table ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.info-table th {
  font-weight: 600;
  color: var(--color-brown-deep);
  width: 35%;
  font-size: 0.9rem;
}

.info-table td {
  color: var(--color-text);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-brown-deep);
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer p,
.footer a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
}

.footer a:hover {
  color: var(--color-gold-light);
}

.footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  transition: all var(--transition);
}

.footer__social a:hover {
  background: var(--color-terracotta);
  color: #fff;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
}

.footer__bottom a {
  color: var(--color-gold-light);
}

/* ---------- Chat Widget FAB ---------- */
.chat-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-terracotta);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(196, 96, 58, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all var(--transition);
}

.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(196, 96, 58, 0.5);
}

.chat-panel {
  display: none;
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 520px;
  max-height: calc(100vh - 8rem);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  z-index: 998;
  overflow: hidden;
}

.chat-panel.open,
.chat-panel.chat-panel--open {
  display: flex;
  flex-direction: column;
}

.chat-panel iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-cream);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  }

  .nav__links.open,
  .nav__links.nav__links--open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    min-height: 70vh;
  }

  .hero--short {
    min-height: 40vh;
  }

  .hero__content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .section {
    padding: 3rem 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .chat-panel {
    right: 0.5rem;
    bottom: 5rem;
    width: calc(100vw - 1rem);
    height: calc(100vh - 7rem);
    border-radius: 12px;
  }
}

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

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

/* ---------- Texture overlay (subtle paper grain) ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
