/* ================================================================
   TestWeb.AI — Landing Page
   Editorial & Bold direction, built on Innocom Design System tokens
   ================================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-primary), 'Montserrat', system-ui, sans-serif;
  background: var(--color-surface-cream);
  color: var(--color-text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Selection */
::selection { background: var(--tw-secondary); color: #fff; }

/* Accent — Innocom crimson on light bg, sky blue on dark.
   Solid bold (no italic) so Vietnamese diacritics stay legible. */
.italic-accent {
  font-style: normal;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--tw-secondary);
}
.section-dark .italic-accent { color: var(--tw-accent); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-surface-cream); }
::-webkit-scrollbar-thumb { background: #cdc9bf; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ── Tokens we extend ── */
:root {
  --tw-primary: #0246A8;
  --tw-secondary: #DC143C;
  --tw-accent: #B7E4FF;
  --tw-cream: #FAF9F5;
  --tw-cream-deep: #F2EFE6;
  --tw-ink: #0A0A0A;
  --tw-ink-soft: #4A4A4A;
  --tw-navy: #00214E;
  --tw-navy-deep: #041434;
  --tw-success: #1A8754;
  --tw-warn: #E6A817;
  --tw-error: #DC143C;
  --tw-border: #E0DDD6;
  --tw-grid: rgba(2, 70, 168, 0.07);
  --tw-radius: 14px;
  --max-w: 1240px;
}

/* ── Layout helpers ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

.section {
  position: relative;
  padding: 120px 0;
}
@media (max-width: 720px) { .section { padding: 72px 0; } }

.section-light { background: transparent; color: var(--tw-ink); }
.section-white { background: rgba(255,255,255,0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--tw-ink); }
.section-dark  { background: var(--tw-navy-deep); color: #fff; }

/* ── Editorial type system ── */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tw-primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  background: currentColor;
  display: inline-block;
}
.section-dark .eyebrow { color: var(--tw-accent); }

.display {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-size: clamp(44px, 6.6vw, 88px);
  text-wrap: balance;
}
.display-md {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(32px, 4.2vw, 56px);
  text-wrap: balance;
}
.display-sm {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.1;
  font-size: clamp(22px, 2.6vw, 32px);
  text-wrap: balance;
}
.lead {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--tw-ink-soft);
  font-weight: 400;
  max-width: 620px;
  text-wrap: pretty;
}
.section-dark .lead { color: rgba(255,255,255,0.7); }

.serif-italic {
  font-family: 'Montserrat', serif;
  font-style: italic;
  font-weight: 200;
}

/* Word-by-word reveal */
.reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  filter: blur(6px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1),
              transform 700ms cubic-bezier(.2,.7,.2,1),
              filter 700ms cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal-word.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Section reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms cubic-bezier(.2,.7,.2,1),
              transform 800ms cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 200ms cubic-bezier(.34,1.56,.64,1),
              box-shadow 200ms ease,
              background 150ms ease,
              color 150ms ease;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--tw-primary);
  color: #fff;
  box-shadow: 0 4px 18px -4px rgba(2,70,168,0.4);
}
.btn-primary:hover { background: #023A8C; transform: translateY(-1px); box-shadow: 0 8px 24px -6px rgba(2,70,168,0.5); }
.btn-ghost {
  background: transparent;
  color: var(--tw-ink);
  border: 1.5px solid var(--tw-border);
}
.btn-ghost:hover { background: #fff; border-color: var(--tw-ink); }
.section-dark .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}
.section-dark .btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }
.btn-arrow { display: inline-block; transition: transform 250ms cubic-bezier(.2,.7,.2,1); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* Chip / pill */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(2,70,168,0.08);
  color: var(--tw-primary);
  border: 1px solid rgba(2,70,168,0.15);
}
.chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tw-success);
  box-shadow: 0 0 0 4px rgba(26,135,84,0.18);
  animation: tw-pulse 1.6s ease-in-out infinite;
}
@keyframes tw-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ── Reusable card ── */
.card {
  background: #fff;
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius);
  padding: 28px;
  transition: transform 250ms cubic-bezier(.2,.7,.2,1), box-shadow 250ms ease, border-color 250ms ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px -16px rgba(0,0,0,0.18); border-color: rgba(2,70,168,0.18); }

/* ── Grid overlay (editorial) ── */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--tw-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--tw-grid) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 50%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 50%, transparent 100%);
}
.section-dark .grid-bg {
  background-image:
    linear-gradient(rgba(183,228,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183,228,255,0.06) 1px, transparent 1px);
}

/* ── Mouse spotlight ── */
.spotlight-host {
  position: relative;
  isolation: isolate;
}
.spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(2,70,168,0.10),
    transparent 60%
  );
  transition: opacity 200ms ease;
  z-index: 0;
}
.section-dark .spotlight {
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(183,228,255,0.12),
    transparent 60%
  );
}

/* ── Marquee ── */
@keyframes tw-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  gap: 64px;
  animation: tw-marquee 36s linear infinite;
  width: max-content;
}
.marquee-host:hover .marquee { animation-play-state: paused; }

/* ── Utility ── */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-xs { gap: 8px; }
.gap-sm { gap: 12px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.gap-xl { gap: 40px; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.muted { color: var(--tw-ink-soft); }
.section-dark .muted { color: rgba(255,255,255,0.7); }
.mono { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; }

/* Asymmetric utilities */
.tilt-r { transform: rotate(2deg); }
.tilt-l { transform: rotate(-2deg); }

/* Big number style */
.bignum {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* Marker between sections */
.section-marker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tw-ink-soft);
  opacity: 0.5;
}

/* Misc */
hr.rule { border: none; border-top: 1px solid var(--tw-border); margin: 0; }
.section-dark hr.rule { border-color: rgba(255,255,255,0.12); }

a { color: inherit; text-decoration: none; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-word, .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}
