/* ============================================================
   TIFAA Design System — Website Stylesheet
   Thai-International Football Academy Association
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600;700;800;900&family=Prompt:wght@300;400;500;600;700;800&display=swap');

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg-base:        #0B1C10;
  --bg-surface:     #132518;
  --bg-card:        #1A3322;
  --bg-card-hover:  #1F3D29;
  --bg-input:       #152B1D;

  --accent:         #C8FF3F;
  --accent-hover:   #B0E030;
  --accent-dark:    #8FBF00;
  --accent-subtle:  rgba(200,255,63,0.12);

  --fg1:            #FFFFFF;
  --fg2:            #7A9E8A;
  --fg3:            #4D7A5E;
  --fg-label:       #C8FF3F;
  --fg-on-accent:   #0B1C10;

  --border:         rgba(255,255,255,0.08);
  --border-strong:  rgba(255,255,255,0.16);
  --border-accent:  rgba(200,255,63,0.30);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;
  --radius-pill:9999px;

  --font-display: 'Barlow', 'Prompt', system-ui, sans-serif;
  --font-body:    'Barlow', 'Prompt', system-ui, sans-serif;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 80px rgba(200,255,63,0.12);

  --nav-h: 72px;
  --nav-logo-w: 280px;
  --nav-cta-w: 232px;
  --nav-cta-h: 44px;
  --section-py: 100px;
  --content-w: 1200px;
  --page-px: 80px;
}

/* ─── VIEW TRANSITIONS (Astro ClientRouter) ───────────────── */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(main-content),
  ::view-transition-new(main-content) {
    animation-duration: 0.18s;
    animation-timing-function: ease;
  }
}

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--fg1);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; }

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 3px; }

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  width: 100%;
  height: var(--nav-h);
  background: rgba(11,28,16,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-inner {
  width: min(var(--content-w), calc(100% - (var(--page-px) * 2)));
  max-width: var(--content-w);
  height: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  flex: 0 0 var(--nav-logo-w);
  width: var(--nav-logo-w);
  min-width: var(--nav-logo-w);
  max-width: var(--nav-logo-w);
}
.nav-logo-mark {
  width: 42px; height: 42px; border-radius: 21px;
  background: var(--fg1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 17px;
  color: var(--bg-base); flex-shrink: 0;
}
.nav-logo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.nav-logo-name { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--fg1); letter-spacing: 0.18em; white-space: nowrap; }
.nav-logo-sub  { font-size: 10px; color: var(--fg2); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; gap: 30px; flex: 1; justify-content: center; min-width: 0; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--fg1);
  opacity: 0.8; transition: opacity 0.2s;
}
.nav-link:hover, .nav-link.active { opacity: 1; }
.nav-link.active { color: var(--accent); }
.nav-actions {
  display: flex; align-items: center; gap: 12px;
  flex: 0 0 auto;
}
.site-header {
  position: relative;
  z-index: 200;
  width: 100%;
}

/* min-width:0 lets grid children shrink; keep container max-width (--content-w) */
.section .container {
  min-width: 0;
}
.nav-cta {
  flex: 0 0 var(--nav-cta-w);
  width: var(--nav-cta-w);
  min-width: var(--nav-cta-w);
  max-width: var(--nav-cta-w);
  height: var(--nav-cta-h);
  min-height: var(--nav-cta-h);
  max-height: var(--nav-cta-h);
  justify-content: center;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
  line-height: 1;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lang-btn {
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill); padding: 6px 14px;
  font-size: 12px; font-weight: 600; color: var(--fg2);
  cursor: pointer; transition: all 0.2s; letter-spacing: 0.05em;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn.active { background: var(--accent); border-color: var(--accent); color: var(--fg-on-accent); }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--radius-pill); font-weight: 700;
  cursor: pointer; border: none; transition: all 0.2s;
  white-space: nowrap; font-family: var(--font-body);
}
.btn-primary {
  background: var(--accent); color: var(--fg-on-accent);
  padding: 13px 26px; font-size: 14px;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-card); color: var(--fg1);
  padding: 13px 26px; font-size: 14px;
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-outline {
  background: transparent; color: var(--fg1);
  padding: 13px 26px; font-size: 14px;
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  color: var(--fg-label); letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 18px;
}
.display {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(52px, 7vw, 108px); line-height: 0.95;
  letter-spacing: -0.02em; color: var(--fg1);
}
.h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(40px, 5vw, 72px); line-height: 1.0;
  letter-spacing: -0.02em; color: var(--fg1);
}
.h2 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(32px, 3.5vw, 52px); line-height: 1.05;
  letter-spacing: -0.01em; color: var(--fg1);
}
.h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(20px, 2vw, 26px); line-height: 1.2; color: var(--fg1);
}
.body-lg { font-size: 18px; line-height: 1.7; color: var(--fg2); }
.body-md { font-size: 15px; line-height: 1.7; color: var(--fg2); }
.body-sm { font-size: 13px; line-height: 1.6; color: var(--fg2); }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.page-wrap { padding-top: var(--nav-h); }
.section { padding: var(--section-py) var(--page-px); }
.section-surface { background: var(--bg-surface); }
.container { max-width: var(--content-w); margin: 0 auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.split-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border-radius: var(--radius-xl);
  border: 1px solid var(--border); padding: 32px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.card-sm { border-radius: var(--radius-lg); padding: 22px 26px; }

/* ─── ICON BOX ────────────────────────────────────────────── */
.icon-box {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.icon-box svg { width: 24px; height: 24px; stroke: var(--fg-on-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── PILL / BADGE ────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-pill);
  padding: 10px 20px; color: var(--fg1); font-size: 14px; font-weight: 500;
  background: rgba(255,255,255,0.03);
}
.badge {
  display: inline-flex; align-items: center;
  border-radius: var(--radius-pill); padding: 5px 12px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
}
.badge-lime { background: rgba(200,255,63,0.15); color: var(--accent); }
.badge-white { background: rgba(255,255,255,0.1); color: var(--fg1); }

/* ─── FORM ────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--fg2); }
.input, .select, .textarea {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--fg1);
  font-family: var(--font-body); font-size: 14px; outline: none;
  transition: border-color 0.2s; width: 100%;
}
.input, .select { padding: 13px 16px; }
.textarea { padding: 13px 16px; resize: none; min-height: 110px; }
.input::placeholder, .textarea::placeholder { color: var(--fg3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--border-accent); }
.select { appearance: none; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ─── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: 28px var(--page-px);
}
.footer-inner {
  max-width: var(--content-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-mark {
  width: 32px; height: 32px; border-radius: 16px; background: var(--fg1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 13px; color: var(--bg-base);
}
.footer-name { font-weight: 700; font-size: 13px; letter-spacing: 0.14em; color: var(--fg1); }
.footer-links { display: flex; gap: 24px; }
.footer-link { font-size: 13px; color: var(--fg3); transition: color 0.2s; }
.footer-link:hover { color: var(--fg2); }
.footer-copy { font-size: 12px; color: var(--fg3); }

/* ─── STAT CARD ───────────────────────────────────────────── */
.stat-num {
  font-family: var(--font-display); font-weight: 900;
  font-size: 48px; line-height: 1; color: var(--accent); margin-bottom: 6px;
}
.stat-label { font-size: 13px; color: var(--fg2); }

/* ─── SECTION DIVIDER ────────────────────────────────────── */
.section-number {
  font-family: var(--font-display); font-weight: 900;
  font-size: 22px; color: var(--accent); margin-bottom: 10px;
}

/* ─── HERO GEO BG ────────────────────────────────────────── */
.geo-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.15;
}
.hero-glow {
  position: absolute; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100,200,50,0.18) 0%, transparent 70%);
}

/* ─── ANIMATION STATES ────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero elements — animate immediately on load, no scroll trigger needed */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-anim   { animation: heroFadeUp 0.8s ease both; }
.hero-anim-1 { animation: heroFadeUp 0.8s 0.1s ease both; }
.hero-anim-2 { animation: heroFadeUp 0.8s 0.25s ease both; }
.hero-anim-3 { animation: heroFadeUp 0.8s 0.4s ease both; }

/* ─── PARTNER LOGO GRID ──────────────────────────────────── */
.partner-logo-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  height: 80px; padding: 16px 24px;
  transition: background 0.2s, border-color 0.2s;
}
.partner-logo-box:hover { background: var(--bg-card-hover); border-color: var(--border-accent); }
.partner-logo-text {
  font-family: var(--font-display); font-weight: 700;
  font-size: 15px; color: var(--fg3); letter-spacing: 0.05em;
}

/* ─── PHOTO CARD ─────────────────────────────────────────── */
.photo-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.photo-initials {
  width: 72px; height: 72px; border-radius: 36px;
  background: var(--accent-subtle);
  border: 2px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900;
  font-size: 24px; color: var(--accent);
}

/* ─── NEWS CARD IMAGE ────────────────────────────────────── */
.news-img {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-surface);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.news-img-meta {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center;
}

/* Responsive: see src/styles/responsive.css (imported in BaseLayout) */

.hidden { display: none !important; }
