/* ============================================
   THE LITERARY ROUNDTABLE — global.css
   ============================================ */

/* ---- DESIGN TOKENS ---- */
:root {
  --bg:           #080808;
  --section:      #121212;
  --card:         #181818;
  --text:         #FAFAFA;
  --accent:       #D4AF37;
  --accent-dim:   rgba(212, 175, 55, 0.08);
  --border:       rgba(255, 255, 255, 0.06);
  --muted:        rgba(255, 255, 255, 0.55);
  --font-head:    'Playfair Display', serif;
  --font-body:    'Inter', sans-serif;
  --ease:         cubic-bezier(0.25, 1, 0.5, 1);
  --transition:   0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --radius:       6px;
  --radius-lg:    16px;
  --shadow-sm:    0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg:    0 24px 64px rgba(0, 0, 0, 0.7);
  --navbar-h:     90px;
  --spacing-unit: 8px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
  max-width: 100%;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: var(--font-head); font-weight: 600;
  line-height: 1.15; color: var(--text);
  letter-spacing: -0.01em;
  word-break: break-word; overflow-wrap: break-word;
}
h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.8rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.75rem); }
h4 { font-size: 1.1rem; font-weight: 500; }
em { font-style: italic; color: var(--accent); font-weight: 400; }
p  { color: var(--muted); font-size: 1.05rem; line-height: 2; overflow-wrap: break-word; }
strong { color: var(--text); font-weight: 500; }

/* ---- LAYOUT ---- */
.container    { max-width: 1240px; margin: 0 auto; padding: 0 2rem; }
.section      { padding: 8rem 0; }
.section-dark { background: var(--section); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.text-center  { text-align: center; }
.grid-2       { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
.gap-large    { gap: 4rem; }
.three-grid   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; margin-top: 5rem; }

/* ---- UTILITIES ---- */
.section-label {
  display: inline-block; font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem;
}
.divider { width: 60px; height: 2px; background: var(--accent); margin: 1.5rem 0 2.5rem; }
.divider.center { margin-left: auto; margin-right: auto; }
.section-header { text-align: center; margin-bottom: 2rem; }
.section-sub { max-width: 700px; margin: 0 auto; color: var(--muted); font-size: 1.1rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.8rem; padding: 1rem 2.5rem;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 40px; transition: all var(--transition);
  position: relative; overflow: hidden; cursor: pointer; white-space: nowrap;
}
.btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.07); opacity: 0; transition: opacity var(--transition); }
.btn:hover::after { opacity: 1; }
.btn:hover  { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(212,175,55,0.4); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: 0 8px 24px rgba(212,175,55,0.2); }
.btn-primary:hover { box-shadow: 0 12px 32px rgba(212,175,55,0.4); color: var(--bg); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm       { padding: 0.75rem 1.8rem; font-size: 0.75rem; border-radius: var(--radius); }
.btn-whatsapp { gap: 0.7rem; }

/* ---- IMAGE FRAME ---- */
.img-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-lg); }
.img-frame::before { content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.1); z-index: 1; pointer-events: none; }

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 999; padding: 1.8rem 0;
  transition: all var(--transition);
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1rem 0;
  border-bottom-color: var(--border);
}
#navbar.menu-open {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(8,8,8,0.98) !important;
}

.nav-inner    { display: flex; align-items: center; justify-content: space-between; }
.brand-align  { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.5);
}
.nav-logo {
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 600;
  color: var(--text); letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-logo:hover { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 3rem; }
.nav-link {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
  position: relative; padding-bottom: 4px; white-space: nowrap;
}
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--accent); transition: width var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 6px; padding: 4px; z-index: 1001; flex-shrink: 0; }
.nav-toggle span { display: block; width: 28px; height: 1px; background: var(--text); transition: all var(--transition); }
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
  position: relative; min-height: 72vh;
  display: flex; align-items: flex-end; overflow: hidden;
  padding-top: var(--navbar-h); padding-bottom: 5rem;
}
.page-hero-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.3); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,8,0.6) 0%, rgba(8,8,8,0.25) 50%, rgba(8,8,8,0.9) 100%); }
.page-hero-content { position: relative; z-index: 1; }
.page-hero-content h1 { margin-bottom: 0.5rem; }
.page-hero-content .hero-sub { margin-top: 1rem; max-width: 650px; color: rgba(255,255,255,0.75); font-size: 1.1rem; line-height: 1.9; }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--bg); border-top: 1px solid var(--border); padding: 8rem 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1.4fr 1fr;
  gap: 4rem; padding-bottom: 5rem; border-bottom: 1px solid var(--border);
}
.footer-about-logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; text-decoration: none; }
.footer-about-logo:hover .footer-logo-text { color: var(--accent); }
.footer-col-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 0.8rem; }
.footer-col-rule  { width: 40px; height: 2px; background: var(--accent); margin-bottom: 2rem; }
.footer-logo-icon { width: 50px; height: 50px; background: var(--accent); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.footer-logo-icon svg { width: 28px; height: 28px; fill: var(--bg); }
.footer-logo-text { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--text); line-height: 1.25; transition: color var(--transition); }
.footer-logo-text span { display: block; font-size: 0.7rem; font-family: var(--font-body); font-weight: 400; color: var(--accent); letter-spacing: 0.2em; text-transform: uppercase; margin-top: 4px; }
.footer-about-text { font-size: 0.95rem; color: var(--muted); line-height: 1.9; }
.footer-links { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links a { display: flex; align-items: center; gap: 0.8rem; font-size: 0.9rem; color: var(--muted); transition: color var(--transition), gap var(--transition); }
.footer-links a::before { content: '»'; font-size: 1.1rem; color: var(--accent); opacity: 0.5; transition: all var(--transition); }
.footer-links a:hover { color: var(--accent); gap: 1rem; }
.footer-links a:hover::before { opacity: 1; transform: translateX(5px); }
.footer-contact-list { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.footer-contact-icon { width: 36px; height: 36px; background: var(--accent-dim); border: 1px solid rgba(212,175,55,0.15); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.footer-contact-detail strong { display: block; font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.2rem; }
.footer-contact-detail p,
.footer-contact-detail a { font-size: 0.95rem; color: var(--muted); line-height: 1.7; }
.footer-contact-detail a:hover { color: var(--accent); }

/* ---- SOCIAL GRID — equal-size fix ---- */
.footer-social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.footer-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0;
  height: 88px;            /* fixed height — every box identical, no collapsing */
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all var(--transition);
}
.footer-social-btn svg    { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.footer-social-btn:hover  { border-color: var(--accent); color: var(--accent); background: rgba(212,175,55,0.1); transform: translateY(-3px); }

.footer-newsletter p { font-size: 0.85rem; margin-bottom: 1rem; color: var(--muted); }
.footer-newsletter-form { display: flex; }
.footer-newsletter-form input {
  flex: 1; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text); font-family: var(--font-body); font-size: 0.85rem;
  padding: 0.8rem 1rem; outline: none; transition: border-color var(--transition);
}
.footer-newsletter-form input:focus { border-color: var(--accent); }
.footer-newsletter-form button {
  background: var(--accent); color: var(--bg); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 0.8rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0; white-space: nowrap;
  transition: box-shadow var(--transition);
}
.footer-newsletter-form button:hover { box-shadow: 0 8px 20px rgba(212,175,55,0.3); }
.footer-newsletter-msg { min-height: 1.5rem; font-size: 0.8rem; margin-top: 0.8rem; border-radius: var(--radius); }
.footer-newsletter-msg.msg-success { color: #6fcf97; background: rgba(111,207,151,0.08); border: 1px solid rgba(111,207,151,0.2); padding: 0.5rem 0.75rem; }
.footer-newsletter-msg.msg-error   { color: #e07070; background: rgba(224,112,112,0.08); border: 1px solid rgba(224,112,112,0.2); padding: 0.5rem 0.75rem; }
.footer-bottom { padding: 2rem 0; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.2); white-space: nowrap; }
.footer-bottom-links { display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap; }
.footer-bottom-links a { font-size: 0.78rem; color: rgba(255,255,255,0.3); letter-spacing: 0.08em; transition: color var(--transition); white-space: nowrap; }
.footer-bottom-links a:hover { color: var(--accent); }

/* ============================================
   ANIMATIONS & SPACING HELPERS
   ============================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.25s; }
.reveal-delay-3 { transition-delay: 0.35s; }
.mt-2 { margin-top:    calc(var(--spacing-unit) * 2); }
.mb-4 { margin-bottom: calc(var(--spacing-unit) * 4); }
.mb-5 { margin-bottom: calc(var(--spacing-unit) * 5); }
.mb-6 { margin-bottom: calc(var(--spacing-unit) * 6); }
.mb-7 { margin-bottom: calc(var(--spacing-unit) * 7); }
.mb-8 { margin-bottom: calc(var(--spacing-unit) * 8); }

/* ============================================
   GLOBAL RESPONSIVE
   ============================================ */
@media (min-width: 1201px) {
  .container { max-width: 1300px; }
}

@media (max-width: 1200px) {
  .section     { padding: 7rem 0; }
  .grid-2      { gap: 4rem; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; }
}

@media (max-width: 1024px) {
  .section     { padding: 6rem 0; }
  .grid-2      { gap: 3rem; }
  .three-grid  { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  :root { --navbar-h: 70px; }

  .section { padding: 4.5rem 0; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(8,8,8,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    z-index: 1000;
    overscroll-behavior: contain;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 1.1rem; letter-spacing: 0.12em; }

  .brand-logo-img { width: 36px; height: 36px; }
  .nav-logo { font-size: 1.1rem; }

  .page-hero { min-height: 62vh; padding-bottom: 3.5rem; }
  .page-hero-content .hero-sub { font-size: 1rem; }

  .grid-2, .three-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .footer        { padding-top: 5rem; }
  .footer-grid   { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-bottom-links { justify-content: center; gap: 1.5rem; }

  /* Social: 2 × 2 on tablet */
  .footer-social-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .container { padding: 0 1.2rem; }
  .section   { padding: 4rem 0; }
  .page-hero { min-height: 58vh; padding-bottom: 2.5rem; }

  /* Social: 2 × 2 on mobile, slightly shorter */
  .footer-social-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .footer-social-btn  { height: 76px; font-size: 0.65rem; }
  .footer-social-btn svg { width: 20px; height: 20px; }

  .footer-newsletter-form input  { font-size: 0.8rem; padding: 0.7rem 0.8rem; }
  .footer-newsletter-form button { padding: 0.7rem 1rem; font-size: 0.75rem; }
  .btn    { padding: 0.9rem 2rem; font-size: 0.8rem; }
  .btn-sm { padding: 0.7rem 1.4rem; }
}

@media (max-width: 360px) {
  .nav-logo { font-size: 0.95rem; }
  .brand-logo-img { width: 30px; height: 30px; }
  .page-hero { min-height: 55vh; }
  .footer-social-grid { gap: 0.6rem; }
  .footer-social-btn  { height: 70px; }
}
