/* ─────────────────────────────────────────────
   khuetran.com — homepage
   Dark theme, vanilla CSS, mobile-first.
   Matches voice + palette của landing /lingo-feeder.
   ───────────────────────────────────────────── */

:root {
  --bg:        #0a0e1a;
  --bg-2:      #0f1424;
  --bg-3:      #141a2e;
  --bg-card:   rgba(15, 20, 36, 0.7);
  --cyan:      #22d3ee;
  --cyan-dim:  rgba(34, 211, 238, 0.15);
  --cyan-strong: rgba(34, 211, 238, 0.45);
  --orange:    #f97316;
  --orange-dim: rgba(249, 115, 22, 0.15);
  --green:     #4ade80;
  --green-dim: rgba(74, 222, 128, 0.12);
  --gold:      #fbbf24;
  --red:       #ef4444;
  --text:      #f1f5f9;
  --text-dim:  #94a3b8;
  --text-very-dim: #64748b;
  --border:    rgba(34, 211, 238, 0.22);

  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --container: 1180px;
  --gutter:    24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient radials + grid background (giống landing) */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 90% 5%, rgba(34, 211, 238, 0.10), transparent 50%),
    radial-gradient(circle at 5% 95%, rgba(249, 115, 22, 0.10), transparent 50%);
  pointer-events: none;
  z-index: -1;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: -1;
}

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

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--orange); }

b, strong { color: var(--text); font-weight: 700; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mono { font-family: var(--font-mono); }
.hl-cyan { color: var(--cyan); }
.hl-orange { color: var(--orange); }
.hl-green { color: var(--green); }
.hl-gold { color: var(--gold); }

/* ─── Nav ─── */
nav.top {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 26, 0.65);
  position: sticky; top: 0; z-index: 100;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--text);
}
.brand .logo {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 800; color: #0a0e1a; font-size: 16px;
  letter-spacing: -0.02em;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand .name { font-size: 18px; font-weight: 800; color: var(--text); }
.brand .sub { font-size: 12.5px; color: var(--text-dim); font-family: var(--font-mono); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-dim); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--cyan); }
.nav-links .nav-cta {
  background: var(--cyan); color: #0a0e1a;
  padding: 9px 20px; border-radius: 999px;
  font-weight: 800; font-size: 14.5px;
}
.nav-links .nav-cta:hover { background: var(--orange); color: #0a0e1a; }
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ─── Sections + shared type ─── */
section { padding: 90px 0; position: relative; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 14px;
}
.eyebrow.orange { color: var(--orange); }

h1, h2, h3 { color: var(--text); line-height: 1.12; letter-spacing: -0.015em; }
h2 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900; margin-bottom: 18px;
}
h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }

.lede { font-size: 18px; color: var(--text-dim); max-width: 760px; }
.lede b { color: var(--text); font-weight: 700; }

/* ─── HERO ─── */
.hero { padding: 80px 0 70px; }
.hero h1 {
  font-size: clamp(40px, 6.2vw, 72px);
  font-weight: 900; line-height: 1.04;
  margin-bottom: 24px; max-width: 17ch;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--gold) 50%, var(--orange) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lede { font-size: 20px; margin-bottom: 36px; max-width: 720px; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.btn {
  padding: 15px 28px; border-radius: 14px;
  font-weight: 800; font-size: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s, box-shadow .2s, background .2s;
  cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #06b6d4);
  color: #0a0e1a;
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 40px rgba(34, 211, 238, 0.55); color: #0a0e1a; }
.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }

.micro-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
  color: var(--text-dim); font-size: 15px;
  font-family: var(--font-mono);
}
.micro-stats b { color: var(--cyan); font-weight: 800; font-size: 17px; }

/* ─── TOOLS (1 row per tool, 3 demos right) ─── */
.tools { background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.03), transparent); }
.tools .lede { margin-bottom: 44px; }

.tool-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tool-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 760px) { .tool-row { padding: 36px; gap: 28px; } }
/* Mobile: bỏ border + background card để không bị box-in-box */
@media (max-width: 600px) {
  .tool-row {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    gap: 22px;
  }
  .tool-rows { gap: 56px; }
}
.tool-row:hover {
  border-color: var(--cyan-strong);
  transition: border-color .2s ease;
}

.tool-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.tool-meta h3 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.tool-meta .tool-tag {
  position: static;
  align-self: flex-start;
  background: rgba(10, 14, 26, 0.6);
}

.tool-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tool-header h3 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.tool-header .tool-tag {
  position: static;
  align-self: flex-start;
  background: rgba(10, 14, 26, 0.6);
}
.tool-desc {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Order: header → desc → demos → links */
.tool-header { order: 1; }
.tool-desc   { order: 2; }
.tool-demos  { order: 3; }
.tool-links  { order: 4; }

.tool-tag {
  background: rgba(10, 14, 26, 0.85);
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-family: var(--font-mono);
  display: inline-block;
}
.tag-green { color: var(--green); border-color: rgba(74, 222, 128, 0.4); }
.tag-orange { color: var(--orange); border-color: rgba(249, 115, 22, 0.4); }

.tool-pitch { color: var(--text-dim); font-size: 16px; line-height: 1.6; }
.tool-niche {
  font-size: 14.5px;
  color: var(--text-dim);
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.06);
  border-left: 3px solid var(--cyan);
}
.niche-label {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: 11.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.tool-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 15px;
  font-weight: 700;
}

/* Demo grid — 3 thumbs on desktop, 1 column on mobile for readable phone-shape */
.tool-demos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  min-width: 0;
  width: 100%;
}
@media (max-width: 600px) {
  .tool-demos { grid-template-columns: 1fr; gap: 16px; }
  .tool-demos .demo-item { width: 100%; max-width: none; }
}

.demo-item {
  position: relative;
  aspect-ratio: 9 / 16;
  background:
    radial-gradient(circle at 30% 30%, var(--cyan-dim), transparent 60%),
    radial-gradient(circle at 70% 80%, var(--orange-dim), transparent 60%),
    var(--bg-2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.demo-item:hover { transform: translateY(-2px); border-color: rgba(34, 211, 238, 0.4); }
.demo-item.demo-16x9 { aspect-ratio: 16 / 9; }
.demos-mixed .demo-item:first-child { grid-column: 1 / -1; }
.demos-mixed .demo-item { aspect-ratio: 9 / 16; }
.demos-mixed .demo-item.demo-16x9 { aspect-ratio: 16 / 9; }

.demo-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.demo-item .play-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 5;
  transition: transform .15s ease, filter .15s ease;
  pointer-events: none;
}
.demo-item:hover .play-overlay {
  transform: translate(-50%, -50%) scale(1.1);
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.4));
}
.demo-item.playing .play-overlay,
.demo-item.playing .demo-label { display: none; }

.demo-label {
  position: absolute;
  bottom: 8px; left: 8px;
  background: rgba(10, 14, 26, 0.7);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  z-index: 4;
}

.demo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-very-dim);
  font-family: var(--font-mono);
}
.demo-placeholder span { font-size: 36px; opacity: 0.5; }
.demo-placeholder small { font-size: 11px; letter-spacing: 0.06em; }

.tool-row-coming { opacity: 0.85; }
.coming-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  padding: 5px 14px;
  border: 1px dashed var(--orange);
  border-radius: 999px;
  font-family: var(--font-mono);
}

/* ─── INTERNAL TOOLS LIST ─── */
.internal {
  background: var(--bg-2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.internal .lede { margin-bottom: 48px; }

.internal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 900px) {
  .internal-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
}
.internal-group {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 26px 24px 24px;
  backdrop-filter: blur(8px);
}
.group-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  letter-spacing: 0;
}
.tool-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tool-list li {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}
.tool-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.7;
}
.tool-list li b {
  color: var(--text);
  font-weight: 700;
}
.tools-footnote {
  margin-top: 32px;
  color: var(--text-very-dim);
  font-size: 14.5px;
  text-align: center;
  font-family: var(--font-mono);
}

/* ─── ABOUT ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 72ch;
}
.about p { color: var(--text-dim); font-size: 17px; line-height: 1.7; }

/* ─── CONTACT ─── */
.contact { padding-bottom: 60px; }
.contact .lede { margin-bottom: 36px; }
.contact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 720px;
}
@media (min-width: 600px) {
  .contact-row { grid-template-columns: repeat(2, 1fr); }
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
  transition: border-color .15s, transform .15s, background .15s;
}
.contact-card:hover {
  border-color: var(--cyan-strong);
  transform: translateY(-2px);
  color: var(--text);
  background: rgba(34, 211, 238, 0.05);
}
.contact-channel {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  font-weight: 700;
}
.contact-value { font-size: 18px; font-weight: 700; color: var(--text); }

/* ─── Footer ─── */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-very-dim);
  font-size: 14px;
  font-family: var(--font-mono);
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--cyan); }
.site-footer .row { gap: 8px 24px; }

/* ─── Misc ─── */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
