/* ============================================================
   SabaïdiSpeak — Main Stylesheet
   © 2025 François Phothirath — www.sabaidispeak.com
   ============================================================ */

:root {
  --lao-red:   #CE1126;
  --lao-blue:  #002868;
  --lao-white: #F5F0E8;
  --gold:      #C9A84C;
  --gold-light:#E8C96A;
  --dark:      #06090F;
  --dark-2:    #0B1020;
  --dark-3:    #101828;
  --text:      #C8CEDD;
  --text-muted:#5A6278;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--text);
  font-family: 'Noto Sans Lao', 'Sarabun', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* ── LANG SWITCHER ── */
.lang-switcher {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 30px;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
}
.lang-btn {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: none; background: transparent;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem; letter-spacing: 0.1em;
  cursor: pointer; transition: all 0.25s;
  text-transform: uppercase; font-weight: 600;
}
.lang-btn .flag { font-size: 1.1rem; line-height: 1; }
.lang-btn.active { background: var(--lao-red); color: #fff; box-shadow: 0 2px 12px rgba(206,17,38,0.4); }
.lang-btn:hover:not(.active) { color: var(--gold); }

[data-lang="en"] { display: none; }
html[lang="en"] [data-lang="en"] { display: initial; }
html[lang="en"] [data-lang="fr"] { display: none; }
div[data-lang="en"], p[data-lang="en"], h2[data-lang="en"], li[data-lang="en"], span[data-lang="en"] { display: none; }
html[lang="en"] div[data-lang="en"],
html[lang="en"] p[data-lang="en"],
html[lang="en"] h2[data-lang="en"],
html[lang="en"] li[data-lang="en"],
html[lang="en"] span[data-lang="en"] { display: block; }
html[lang="en"] a[data-lang="en"] { display: inline-block; }
a[data-lang="en"] { display: none; }

/* ── NAV ── */
nav, .site-header {
  position: fixed; top: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 4rem;
  background: linear-gradient(to bottom, rgba(6,9,15,0.96), transparent);
  backdrop-filter: blur(4px);
}
.nav-logo { font-family: 'Cinzel', serif; font-size: 1.1rem; letter-spacing: 0.2em; color: var(--lao-white); text-decoration: none; }
.nav-logo .r { color: var(--lao-red); }
.nav-logo .b { color: #4a7ad4; }
.nav-logo .w { color: #ffffff; }
nav ul, .nav-menu { list-style: none; display: flex; gap: 2.5rem; }
nav a, .nav-menu a { color: var(--text-muted); text-decoration: none; font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; transition: color 0.3s; }
nav a:hover, .nav-menu a:hover { color: var(--gold); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 0 1rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, rgba(0,40,104,0.3) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(206,17,38,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 40% 60% at 80% 50%, rgba(201,168,76,0.07) 0%, transparent 60%);
}
.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute; width: 2px; height: 2px;
  background: var(--gold); border-radius: 50%; opacity: 0;
  animation: float-up var(--dur) var(--delay) infinite ease-in;
}
@keyframes float-up {
  0% { opacity: 0; transform: translateY(0) scale(1); }
  20% { opacity: 0.6; }
  80% { opacity: 0.2; }
  100% { opacity: 0; transform: translateY(-120px) scale(0); }
}
.hero-content { text-align: center; position: relative; z-index: 2; max-width: 900px; width: 100%; }
.lao-greeting { font-family: 'Noto Sans Lao', sans-serif; font-size: clamp(1.2rem, 3vw, 1.8rem); color: var(--text-muted); letter-spacing: 0.2em; margin-bottom: 1.5rem; animation: fade-down 1s ease both; }

.hero-logo-ring { width: 160px; height: 160px; margin: 0 auto 2rem; position: relative; animation: fade-in 1.2s ease both 0.3s; }
.ring-outer {
  width: 100%; height: 100%; border-radius: 50%;
  background: conic-gradient(var(--lao-red) 0% 20%, var(--lao-blue) 20% 80%, var(--lao-red) 80% 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 60px rgba(206,17,38,0.3), 0 0 120px rgba(0,40,104,0.25);
  animation: spin-slow 20s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.ring-inner {
  width: 78%; height: 78%; background: var(--dark); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  animation: spin-slow 20s linear infinite reverse;
}
.ring-inner .lao-word { font-family: 'Noto Sans Lao', sans-serif; font-size: 1.3rem; color: var(--lao-white); }
.sound-bars { display: flex; gap: 3px; align-items: flex-end; height: 16px; margin-top: 4px; }
.bar { width: 3px; background: var(--lao-red); border-radius: 2px; animation: bounce var(--d) ease-in-out infinite alternate; }
.bar:nth-child(2) { background: #fff; }
.bar:nth-child(3) { background: var(--lao-blue); }
@keyframes bounce { from { height: 4px; } to { height: 14px; } }

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 7vw, 5.5rem);
  font-weight: 600; letter-spacing: 0.05em; line-height: 1;
  margin-bottom: 0.5rem; animation: fade-up 1s ease both 0.5s; white-space: nowrap;
}
.hero-title .S1, .hero-title .S2 { color: var(--lao-red); }
.hero-title .rest { color: var(--lao-white); }
.hero-title .accent { color: #4a7ad4; }

.hero-sub { font-size: 0.75rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2.5rem; animation: fade-up 1s ease both 0.7s; }
.hero-sub::before, .hero-sub::after { content: ''; display: inline-block; width: 40px; height: 1px; background: var(--lao-red); vertical-align: middle; margin: 0 1rem; }
.hero-tagline { font-family: 'Playfair Display', serif; font-size: clamp(1.1rem, 2.5vw, 1.6rem); font-style: italic; color: var(--gold-light); margin-bottom: 3rem; animation: fade-up 1s ease both 0.9s; }
.hero-btns { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; animation: fade-up 1s ease both 1.1s; }

.btn-primary { padding: 1rem 2.5rem; background: var(--lao-red); color: #fff; border: none; border-radius: 2px; font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: all 0.3s; box-shadow: 0 0 30px rgba(206,17,38,0.35); }
.btn-primary:hover { background: #e8112a; box-shadow: 0 0 50px rgba(206,17,38,0.55); transform: translateY(-2px); }
.btn-secondary { padding: 1rem 2.5rem; background: transparent; color: var(--gold); border: 1px solid var(--gold); border-radius: 2px; font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: all 0.3s; }
.btn-secondary:hover { background: rgba(201,168,76,0.1); box-shadow: 0 0 30px rgba(201,168,76,0.2); transform: translateY(-2px); }

.scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; animation: fade-in 2s ease both 2s; }
.scroll-hint span { font-size: 0.65rem; letter-spacing: 0.2em; color: var(--text-muted); }
.scroll-line { width: 1px; height: 60px; background: linear-gradient(to bottom, var(--gold), transparent); animation: scroll-pulse 2s ease-in-out infinite; }
@keyframes scroll-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ── DIVIDER ── */
.divider { display: flex; align-items: center; gap: 1.5rem; padding: 0 4rem; margin: 1rem 0; }
.divider-line { flex: 1; height: 1px; background: rgba(201,168,76,0.15); }
.divider-ornament { color: var(--gold); font-size: 1.2rem; opacity: 0.5; }

/* ── SECTION BASE ── */
section { padding: 8rem 4rem; max-width: 1300px; margin: 0 auto; }
.section-tag { font-size: 0.65rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--lao-red); margin-bottom: 1rem; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; color: var(--lao-white); margin-bottom: 1.5rem; line-height: 1.2; }
.section-title em { font-style: italic; color: var(--gold-light); }

/* ── BOOK ── */
#livre { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
.book-visual { position: relative; overflow: visible; }
.book-cover { width: 100%; max-width: 520px; border-radius: 8px; box-shadow: -15px 20px 60px rgba(0,0,0,0.6), 0 0 60px rgba(206,17,38,0.15); transition: transform 0.5s ease, box-shadow 0.5s ease; display: block; position: relative; z-index: 1; }
.book-cover:hover { transform: scale(1.02); box-shadow: -15px 25px 80px rgba(0,0,0,0.7), 0 0 80px rgba(206,17,38,0.25); }
.book-badge { position: absolute; top: -1rem; right: 1rem; background: var(--lao-red); color: #fff; font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.1em; padding: 0.5rem 1rem; border-radius: 2px; box-shadow: 0 4px 20px rgba(206,17,38,0.4); z-index: 10; }
.book-spine { position: absolute; left: -12px; top: 2%; bottom: 2%; width: 12px; background: linear-gradient(to right, #0a0a0a, #1a1a1a); border-radius: 2px 0 0 2px; }
.book-info p { font-size: 1.05rem; line-height: 1.9; color: var(--text); margin-bottom: 1.5rem; }
.book-info .author-sig { font-family: 'Playfair Display', serif; font-style: italic; color: var(--gold-light); font-size: 1.1rem; margin-top: 2rem; }

.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.feature-item { display: flex; align-items: flex-start; gap: 0.8rem; padding: 1rem; background: rgba(201,168,76,0.05); border: 1px solid rgba(201,168,76,0.1); border-radius: 4px; transition: all 0.3s; }
.feature-item:hover { background: rgba(201,168,76,0.1); border-color: rgba(201,168,76,0.25); }
.feature-icon { font-size: 1.3rem; }
.feature-text { font-size: 0.85rem; color: var(--text); line-height: 1.5; }
.feature-text strong { display: block; color: var(--lao-white); font-weight: 600; margin-bottom: 0.2rem; }

/* ── AUTEUR ── */
#auteur { background: linear-gradient(135deg, rgba(0,40,104,0.1) 0%, rgba(6,9,15,0) 60%); border-top: 1px solid rgba(201,168,76,0.1); border-bottom: 1px solid rgba(201,168,76,0.1); padding: 6rem 4rem; max-width: 100%; }
.auteur-inner { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 5rem; align-items: center; }
.auteur-photo-wrap { position: relative; }
.auteur-photo { width: 280px; height: 280px; border-radius: 50%; object-fit: cover; object-position: center; border: 3px solid var(--gold); box-shadow: 0 0 60px rgba(201,168,76,0.2); display: block; }
.auteur-ring { position: absolute; inset: -18px; border-radius: 50%; border: 1px solid rgba(201,168,76,0.3); animation: rotate-ring 15s linear infinite; }
.auteur-ring::before { content: '✦'; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); color: var(--gold); font-size: 0.8rem; }
@keyframes rotate-ring { to { transform: rotate(360deg); } }
.auteur-name { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--lao-white); margin-bottom: 0.3rem; }
.auteur-title { font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.5rem; }
.auteur-bio { font-size: 1rem; line-height: 1.9; color: var(--text); max-width: 640px; }
.auteur-bio + .auteur-bio { margin-top: 1rem; }
.auteur-heritage { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.heritage-pill { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.2rem; border: 1px solid rgba(201,168,76,0.2); border-radius: 20px; font-size: 0.8rem; color: var(--gold-light); }

/* ── APP ── */
#application { padding: 8rem 4rem; max-width: 1300px; margin: 0 auto; }
.app-header { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; margin-bottom: 5rem; }
.app-phones { display: flex; justify-content: center; align-items: flex-start; position: relative; }
.phone-frame { width: 200px; border-radius: 28px; border: 2px solid rgba(255,255,255,0.1); box-shadow: 0 30px 80px rgba(0,0,0,0.5); overflow: hidden; position: relative; transition: transform 0.4s ease; flex-shrink: 0; }
.phone-frame:nth-child(1) { transform: perspective(600px) rotateY(8deg) translateX(20px); z-index: 1; }
.phone-frame:nth-child(2) { transform: perspective(600px) rotateY(-3deg) scale(1.05); z-index: 3; box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 40px rgba(206,17,38,0.15); }
.phone-frame:nth-child(3) { transform: perspective(600px) rotateY(-8deg) translateX(-20px); z-index: 1; }
.phone-frame:hover { transform: perspective(600px) rotateY(0) scale(1.02) !important; z-index: 10; }
.phone-frame img { width: 100%; display: block; }
.app-developer { display: flex; align-items: center; gap: 0.8rem; margin: 1.5rem 0; padding: 1rem 1.5rem; background: rgba(0,40,104,0.15); border: 1px solid rgba(0,40,104,0.3); border-radius: 6px; }
.dev-icon { width: 40px; height: 40px; background: var(--lao-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.dev-label { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.dev-name { font-size: 1rem; color: var(--lao-white); font-weight: 600; }
.app-description { font-size: 1rem; line-height: 1.9; color: var(--text); margin-bottom: 2rem; }

.app-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 4rem; }
.app-card { padding: 2rem 1.5rem; background: var(--dark-2); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; transition: all 0.3s; position: relative; overflow: hidden; }
.app-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--card-color, var(--lao-red)); transition: opacity 0.3s; opacity: 0; }
.app-card:hover::before { opacity: 1; }
.app-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.1); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.card-icon { font-size: 2rem; margin-bottom: 1rem; }
.card-title { font-family: 'Cinzel', serif; font-size: 0.95rem; font-weight: 600; color: var(--lao-white); margin-bottom: 0.5rem; }
.card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.card-count { font-family: 'Cinzel', serif; font-size: 2rem; color: var(--gold); opacity: 0.3; position: absolute; bottom: 1rem; right: 1.5rem; }

/* ── LAOS ── */
#carte { background: linear-gradient(to bottom, rgba(0,40,104,0.1), transparent); padding: 6rem 4rem; max-width: 100%; border-top: 1px solid rgba(0,40,104,0.2); }
.carte-inner { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.carte-inner img { width: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(0,40,104,0.2); border: 1px solid rgba(255,255,255,0.06); }
.carte-text p { font-size: 1rem; line-height: 1.9; color: var(--text); margin-bottom: 1.2rem; }
.lao-words { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.lao-word-pill { padding: 0.4rem 1rem; border: 1px solid rgba(206,17,38,0.35); border-radius: 20px; font-family: 'Noto Sans Lao', sans-serif; font-size: 1rem; color: var(--lao-white); background: rgba(206,17,38,0.08); }
.lao-word-pill span { display: block; font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.1em; }

/* ── CTA ── */
#cta { text-align: center; padding: 8rem 4rem; max-width: 900px; margin: 0 auto; }
.cta-lao { font-family: 'Noto Sans Lao', sans-serif; font-size: 2.5rem; color: rgba(255,255,255,0.06); letter-spacing: 0.3em; margin-bottom: -1.5rem; display: block; }
#cta .section-title { font-size: 2.5rem; margin-bottom: 1rem; }
#cta p { font-size: 1.05rem; line-height: 1.9; color: var(--text); margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-btns { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }

.btn-google-play { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 2rem; background: var(--dark-3); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; color: #fff; text-decoration: none; transition: all 0.3s; }
.btn-google-play:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }
.play-icon { font-size: 2rem; }
.play-name { font-size: 1rem; font-weight: 600; }
.btn-amazon { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 2rem; background: #FF9900; border-radius: 8px; color: #111; text-decoration: none; font-weight: 600; transition: all 0.3s; }
.btn-amazon:hover { background: #ffad33; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,153,0,0.3); }

/* ── SEO TEXT BLOCK ── */
.seo-block { background: rgba(0,0,0,0.3); padding: 3rem 4rem; max-width: 1300px; margin: 0 auto; border-top: 1px solid rgba(201,168,76,0.1); }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; color: var(--text-muted); font-size: 0.85rem; line-height: 1.8; }
.seo-block h2 { color: var(--gold); font-family: 'Cinzel', serif; font-size: 0.9rem; letter-spacing: 0.2em; margin-bottom: 1rem; }
.seo-block strong { color: var(--text); }

/* ── FAQ ── */
.faq-section { margin-top: 3rem; border-top: 1px solid rgba(201,168,76,0.1); padding-top: 2rem; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.faq-item h3 { color: var(--lao-white); font-size: 0.85rem; margin-bottom: 0.5rem; font-family: 'Cinzel', serif; }
.faq-item p { font-size: 0.8rem; line-height: 1.7; color: var(--text-muted); }

/* ── FOOTER ── */
footer, .site-footer { padding: 3rem 4rem; border-top: 1px solid rgba(201,168,76,0.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: 'Cinzel', serif; font-size: 1.2rem; color: var(--gold); }
.footer-logo span { color: var(--lao-red); }
.footer-tagline { font-size: 0.9rem; color: var(--text-muted); letter-spacing: 0.15em; margin-top: 0.3rem; }
.footer-credits { font-size: 0.75rem; color: var(--text-muted); text-align: right; line-height: 1.7; }
.footer-lao { font-family: 'Noto Sans Lao', sans-serif; font-size: 1.1rem; letter-spacing: 0.2em; color: var(--text-muted); }

/* ── ANIMATIONS ── */
@keyframes fade-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav, .site-header { padding: 1rem 1.5rem; }
  nav ul, .nav-menu { display: none; }
  section { padding: 5rem 1.5rem; }
  #livre { grid-template-columns: 1fr; gap: 3rem; }
  .book-cover { max-width: 320px; margin: 0 auto; }
  .app-header { grid-template-columns: 1fr; }
  .app-phones { display: none; }
  .app-features { grid-template-columns: 1fr 1fr; }
  .carte-inner { grid-template-columns: 1fr; }
  .auteur-inner { grid-template-columns: 1fr; text-align: center; }
  .auteur-photo-wrap { margin: 0 auto; }
  .auteur-heritage { justify-content: center; }
  footer, .site-footer { flex-direction: column; text-align: center; }
  .footer-credits { text-align: center; }
  #auteur, #carte { padding: 5rem 1.5rem; }
  #cta { padding: 5rem 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .seo-block { padding: 2rem 1.5rem; }
}
@media (max-width: 600px) {
  .app-features { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(1.5rem, 9vw, 3rem); letter-spacing: 0.03em; white-space: nowrap; }
}
