/* ============================================================
   DR9X Revolution Academy — global styles
   Minimal Modern Luxury + Technology, Dark-led
   Tokens: base #0B0B0D · surface #F7F6F3 · gold #C9A36A
           cyan #22D3EE · violet #7C5CFF · gray #9CA3AF
   ============================================================ */

:root {
  --base: #0B0B0D;
  --bg: #08080A;
  --surface: #F7F6F3;
  --gold: #C9A36A;
  --cyan: #22D3EE;
  --violet: #7C5CFF;
  --gray: #9CA3AF;
  --content: 1280px;                 /* max readable content width */
  /* responsive horizontal gutter: sections stay full-bleed, content centers within --content */
  --gx: max(20px, calc((100% - var(--content)) / 2));
  --font-display: 'Space Grotesk', 'Anuphan', sans-serif;
  --font-body: 'Inter', 'IBM Plex Sans Thai', sans-serif;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--surface); font-family: var(--font-body); }
img { max-width: 100%; display: block; }
::selection { background: var(--cyan); color: var(--base); }
input, select, textarea, button { font-family: inherit; }
textarea { resize: vertical; }
a { color: inherit; }

/* ---------- keyframes ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes glowPulse { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes heroRise { 0% { opacity: 0; transform: translateY(24px); filter: blur(7px); } 55% { filter: blur(0); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes heroGridDrift { from { background-position: 0 0, 0 0; } to { background-position: 48px 48px, 48px 48px; } }
@keyframes auroraSpin { 0%, 100% { transform: translateX(-50%) rotate(0deg) scale(1); opacity: .5; } 50% { transform: translateX(-50%) rotate(180deg) scale(1.12); opacity: .82; } }
@keyframes orbFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-26px, 30px); } }
@keyframes orbFloat2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -24px); } }
@keyframes gradShift { 0% { background-position: 0% 50%; } 100% { background-position: 220% 50%; } }
@keyframes dotPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .55); } 70% { box-shadow: 0 0 0 9px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
@keyframes scrollCue { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(8px); opacity: 1; } }
@keyframes sheen { 0% { left: -65%; } 28% { left: 135%; } 100% { left: 135%; } }
@keyframes heroIcoA { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(6px, -30px) rotate(11deg); } }
@keyframes heroIcoB { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-8px, 26px) rotate(-12deg); } }
@keyframes heroIcoC { 0%, 100% { transform: translate(0, 0) rotate(-6deg); } 50% { transform: translate(20px, -14px) rotate(9deg); } }
@keyframes heroIcoGlow { 0%, 100% { opacity: .13; } 50% { opacity: .4; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fabIn { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- reveal-on-scroll ---------- */
main section[data-reveal] {
  transition: opacity .85s cubic-bezier(.2, .7, .2, 1), transform .85s cubic-bezier(.2, .7, .2, 1);
  opacity: 0;
  transform: translateY(30px);
}
main section[data-reveal][data-shown] { opacity: 1; transform: none; }

.dr-rise { animation: heroRise .75s cubic-bezier(.2, .7, .2, 1) both; }
.dr-rise-float { animation: heroRise .8s cubic-bezier(.2, .7, .2, 1) .25s both, floaty 7s ease-in-out 1s infinite; }
.dr-d1 { animation-delay: .1s; }
.dr-d2 { animation-delay: .2s; }
.dr-d3 { animation-delay: .3s; }
.dr-d4 { animation-delay: .5s; }
.dr-marquee:hover .dr-track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main section[data-reveal], .dr-rise, .dr-rise-float { opacity: 1 !important; transform: none !important; transition: none; animation: none !important; }
  .dr-track, .hero-ico-layer * { animation: none !important; }
}

/* ---------- hover interactions (replaces the prototype's style-hover) ---------- */
.dr-cta-gold { transition: transform .2s, box-shadow .2s; }
.dr-cta-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(201, 163, 106, .45); }
.dr-cta-gold-sm { transition: transform .2s, box-shadow .2s; }
.dr-cta-gold-sm:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201, 163, 106, .4); }
.dr-cta-outline { transition: border-color .2s, color .2s, background .2s; }
.dr-cta-outline:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(34, 211, 238, .06); }
.dr-cta-cyan { transition: background .2s, transform .2s; }
.dr-cta-cyan:hover { background: rgba(34, 211, 238, .18); }
.dr-card { transition: transform .3s, border-color .3s, box-shadow .3s; }
.dr-card:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, .4); box-shadow: 0 24px 50px rgba(0, 0, 0, .4), 0 0 40px rgba(34, 211, 238, .06); }
.dr-card-gold { transition: border-color .3s; }
.dr-card-gold:hover { border-color: rgba(201, 163, 106, .4); }
.dr-card-cyan { transition: transform .3s, border-color .3s; }
.dr-card-cyan:hover { transform: translateY(-5px); border-color: rgba(34, 211, 238, .35); }
.dr-link { transition: color .2s; }
.dr-link:hover { color: var(--surface); }
.dr-book { transition: border-color .2s, color .2s; }
.dr-book:hover { border-color: var(--gold); color: var(--gold); }
.dr-pkg-btn { transition: background .2s; }
.dr-pkg-btn:hover { background: rgba(201, 163, 106, .22); }
.dr-chip-cyan { transition: background .2s; }
.dr-chip-cyan:hover { background: rgba(34, 211, 238, .08); }
.dr-lift { transition: transform .2s; }
.dr-lift:hover { transform: translateY(-2px); }
.dr-fab-line { transition: transform .2s; }
.dr-fab-line:hover { transform: translateY(-3px) scale(1.05); }
.dr-fab-cta { transition: transform .2s; }
.dr-fab-cta:hover { transform: translateY(-3px); }
.dr-close { transition: background .2s; }
.dr-close:hover { background: rgba(201, 163, 106, .25); }
.dr-field { transition: border-color .2s; }
.dr-field:focus { border-color: var(--cyan); }
.dr-nav-cta { transition: transform .2s, box-shadow .2s; }
.dr-nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201, 163, 106, .4); }

/* ---------- shell ---------- */
/* Full-bleed: #site spans the whole viewport so section backgrounds reach edge-to-edge.
   Inner content is kept centered/readable by the per-section --gx horizontal padding. */
#site {
  width: 100%;
  background: var(--base);
  color: var(--surface);
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ---------- accessibility & polish ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}
:focus:not(:focus-visible) { outline: none; }

button, a, input, select, textarea, [role="button"] { touch-action: manipulation; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[data-countup], .dr-tnum { font-variant-numeric: tabular-nums; }

/* skip-to-content link for keyboard users */
.dr-skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 200;
  background: var(--gold);
  color: var(--base);
  padding: 11px 18px;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  font-family: var(--font-display);
  transition: top .2s ease;
}
.dr-skip:focus { top: 0; }

/* keep #main focusable target tidy */
#main:focus { outline: none; }

/* ---------- responsive nav ---------- */
.dr-hamburger { display: none; min-width: 44px; min-height: 44px; }
@media (max-width: 920px) {
  .dr-desktop-nav { display: none !important; }
  .dr-nav-cta { display: none !important; }
  .dr-hamburger { display: flex !important; }
}
@media (min-width: 921px) {
  #mobile-menu { display: none !important; }
}
