/* ============================================================
   CLOUDPANG — global styles
   palette: white canvas, obsidian structure, signal red accent
   entertainment cluster overrides accent to volt yellow
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@300;400;500;600&family=Sarabun:wght@400;500;700&family=IBM+Plex+Sans+Thai:wght@400;500;600&family=Anuphan:wght@500;700;900&display=swap');

:root {
  /* reading canvas */
  --bg-canvas: #FFFFFF;
  --text-primary: #0A0A0B;
  --text-body: #1C1C1F;
  --text-secondary: #6B6B70;
  --text-muted: #A8A8AD;
  --hairline: #E8E8EA;
  --hover-mist: #F4F4F6;

  /* structural surface */
  --bg-obsidian: #0F1115;
  --bg-steel: #1F232B;
  --bg-slate: #2A2F38;
  --border-pearl: #3D434E;

  /* accent — signal red sitewide */
  --accent: #FF2D2D;
  --accent-hover: #E61F1F;

  /* entertainment cluster override — volt yellow */
  --accent-ent: #E5FF00;
  --accent-ent-hover: #CCE600;

  /* functional */
  --score-positive: #00C896;
  --score-negative: #FF4757;

  /* typography */
  --font-display: 'Fraunces', 'Sarabun', Georgia, serif;
  --font-body: 'Inter', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --font-thai-display: 'Anuphan', 'Sarabun', sans-serif;
  --font-thai-body: 'IBM Plex Sans Thai', 'Sarabun', sans-serif;
}

/* entertainment + sub-categories use volt yellow */
[data-accent="volt"] {
  --accent: var(--accent-ent);
  --accent-hover: var(--accent-ent-hover);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===== HEADER / NAV ===== */
.site-header {
  background: var(--bg-obsidian);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-pearl);
}

.nav-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.brand .pang-mark {
  color: var(--accent);
  margin-left: 1px;
}

.brand .thai {
  font-family: var(--font-thai-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 8px;
}

.primary-nav {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
}

.primary-nav a {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  font-weight: 400;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.primary-nav a:hover { color: var(--accent); }

.primary-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

/* dropdown for entertainment */
.has-dropdown {
  position: relative;
}

.has-dropdown > a::after {
  content: '·';
  margin-left: 6px;
  color: var(--accent-ent);
  font-weight: 700;
}

.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: -16px;
  background: var(--bg-steel);
  border: 1px solid var(--border-pearl);
  min-width: 180px;
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li { padding: 0; }

.dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  color: #FFFFFF;
  letter-spacing: 0.02em;
}

.dropdown a:hover {
  background: var(--bg-slate);
  color: var(--accent-ent);
}

/* mobile nav */
.menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: #FFFFFF;
  transition: all 0.25s ease;
}

.menu-toggle span:nth-child(1) { top: 10px; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 10px; }

.menu-toggle.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-obsidian);
  color: #FFFFFF;
  padding: 60px 32px 32px;
  margin-top: 100px;
}

.footer-wrap {
  max-width: 1440px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-pearl);
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.footer-brand h3 .pang-mark { color: var(--accent); }

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: #FFFFFF;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ===== UTILITY ===== */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.tagline-en {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
}

.tagline-th {
  font-family: var(--font-thai-body);
  color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav-wrap { padding: 16px 20px; }
  .menu-toggle { display: block; }

  .primary-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-obsidian);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 32px 40px;
    gap: 0;
    border-bottom: 1px solid var(--border-pearl);
    transform: translateY(-100%);
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .primary-nav.open {
    transform: translateY(0);
    visibility: visible;
  }

  .primary-nav li {
    width: 100%;
    border-bottom: 1px solid var(--border-pearl);
  }

  .primary-nav a {
    padding: 16px 0;
    display: block;
    font-size: 15px;
  }

  .has-dropdown > a::after { content: ' ↓'; }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    padding: 0 0 12px 16px;
    display: none;
  }

  .has-dropdown.open .dropdown { display: block; }

  .dropdown a { padding: 8px 0; font-size: 13px; }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .container, .container-narrow { padding: 0 20px; }
  .footer-top { grid-template-columns: 1fr; }
  .site-footer { padding: 48px 20px 24px; }
}
