/* Family AI components layered on the Thiện Quang theme (style.css is a verbatim copy of
   thienquangtech.com's stylesheet — keep product-specific rules here so it can be re-synced). */

.fai-accent { color: var(--gold-light); }
.nav-links a.active { color: var(--gold-light); }
.fai-lang { border: 1px solid var(--border-silver); }
.fai-center { text-align: center; margin-top: 48px; }
.fai-narrow { max-width: 860px; }
.fai-link { color: var(--gold-light); font-size: 0.85rem; display: inline-flex; gap: 6px; align-items: center; }
.fai-link:hover { color: var(--gold-bright); }
a.hero-badge:hover { border-color: var(--gold-light); }

/* ===== PAGE HERO (sub pages) ===== */
.fai-page-hero {
  position: relative;
  overflow: hidden;
  padding: 160px 0 72px;
  text-align: center;
}
.fai-page-hero .container { position: relative; z-index: 1; max-width: 820px; }
.fai-page-hero .hero-title { font-size: clamp(2rem, 4vw, 3.2rem); }
.fai-page-hero .hero-desc { margin: 0 auto; }

/* ===== GRIDS ===== */
.fai-grid-4 { grid-template-columns: repeat(4, 1fr); }
.fai-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; }

/* ===== COUNTDOWN ===== */
.fai-countdown { padding: 80px 0; background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fai-countdown .section-header { margin-bottom: 40px; }
.fai-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}
.fai-countdown-cell {
  background: var(--bg3);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 24px 12px;
  text-align: center;
  box-shadow: var(--shadow-gold);
}
.fai-countdown-num {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fai-countdown-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ===== AI PIPELINE ===== */
.fai-step-human { border-color: var(--border-gold); box-shadow: var(--shadow-gold); }

.fai-example {
  margin-top: 64px;
  background: var(--bg2);
  border: 1px solid var(--border-silver);
  border-radius: var(--radius);
  padding: 32px;
}
.fai-example-title { font-size: 1.2rem; margin-bottom: 24px; }
.fai-example-grid {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr;
  gap: 24px;
  align-items: center;
}
.fai-example-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 12px;
}
.fai-example-input p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--silver-light);
  line-height: 1.7;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}
.fai-example-arrow { color: var(--gold-light); font-size: 1.5rem; }
.fai-task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.fai-task strong { color: var(--text); font-size: 0.95rem; flex-basis: 100%; }
.fai-task i { color: var(--blue-light); margin-right: 4px; }
.fai-tag {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 50px;
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.75rem;
}
.fai-example-note {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.fai-example-note i { color: var(--green); margin-top: 4px; }

.fai-split {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.fai-split-col {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.fai-split-col h3 { font-size: 1.05rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.fai-split-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.fai-split-col li { color: var(--text-muted); font-size: 0.92rem; padding-left: 22px; position: relative; }
.fai-split-col li::before { position: absolute; left: 0; font-weight: 700; }
.fai-does { border-color: rgba(16,185,129,0.35); }
.fai-does h3 i, .fai-does li::before { color: var(--green); }
.fai-does li::before { content: '✓'; }
.fai-doesnot { border-color: var(--border-gold); }
.fai-doesnot h3 i, .fai-doesnot li::before { color: var(--gold-light); }
.fai-doesnot li::before { content: '✕'; }

/* ===== FEATURE CARDS ===== */
.fai-ai-role {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-gold);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.fai-ai-role strong, .fai-ai-role i { color: var(--gold-light); font-weight: 600; }

.fai-feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.fai-feature-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.fai-feature-head .service-icon { flex-shrink: 0; margin-bottom: 0; }
.fai-feature-head h2 { font-size: 1.25rem; margin-bottom: 8px; }
.fai-feature-head p { color: var(--text-muted); font-size: 0.92rem; }

.fai-checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.fai-checklist li { color: var(--text-muted); font-size: 0.9rem; display: flex; gap: 10px; align-items: flex-start; }
.fai-checklist li i { color: var(--green); margin-top: 4px; }
.fai-checklist li.fai-off { opacity: 0.5; }
.fai-checklist li.fai-off i { color: var(--text-dim); }

/* ===== PRICING ===== */
.fai-price { display: flex; flex-direction: column; text-align: left; }
.fai-price .fai-checklist { margin: 20px 0 28px; flex: 1; }
.fai-price-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold-light);
}
.fai-price-amount span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }

/* ===== TEAM ===== */
.fai-team-card { text-align: center; }
.fai-team-card img {
  width: 140px; height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border-gold);
  margin-bottom: 16px;
}
.fai-team-role { display: block; color: var(--gold-light); font-size: 0.85rem; margin-bottom: 10px; }
.fai-team-card a { display: inline-block; margin-top: 14px; color: var(--silver); font-size: 1.2rem; }
.fai-team-card a:hover { color: var(--gold-light); }

/* ===== IMAGES ===== */
.fai-image-frame {
  border: 1px solid var(--border-silver);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg3);
}
.fai-image-frame img { display: block; width: 100%; height: auto; }

/* ===== CONTACT ===== */
.fai-contact { position: relative; overflow: hidden; padding-top: 160px; }
.fai-contact .container { position: relative; z-index: 1; }
.fai-contact .contact-item a + span { display: block; color: var(--text-muted); font-size: 0.85rem; }
.fai-alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  gap: 10px;
  align-items: center;
}
.fai-alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.4); color: #6ee7b7; }
.fai-alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }
.fai-field-error { display: block; color: #fca5a5; font-size: 0.8rem; margin-top: 6px; }
.fai-field-error:empty { display: none; }

/* ===== APP SCREENS SLIDESHOW (continuous marquee) ===== */
.fai-shots { background: var(--bg2); overflow: hidden; padding-bottom: 72px; }
.fai-shots .section-header { margin-bottom: 48px; }
.fai-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
/* Two identical lists side by side; shifting by -50% lands exactly on the start of the copy. */
.fai-marquee-track { display: flex; width: max-content; animation: fai-marquee 70s linear infinite; }
.fai-marquee:hover .fai-marquee-track, .fai-marquee.is-paused .fai-marquee-track { animation-play-state: paused; }
@keyframes fai-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.fai-marquee-list { display: flex; gap: 28px; padding: 12px 14px 8px; list-style: none; }
.fai-shot { display: flex; flex-direction: column; align-items: center; gap: 14px; flex-shrink: 0; }
.fai-phone {
  width: 240px;
  padding: 8px;
  border-radius: 38px;
  background: linear-gradient(160deg, #2a3350, #0b0f1c);
  border: 1px solid var(--border-silver);
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(212,160,23,.12);
  transition: transform var(--transition);
}
.fai-phone img { display: block; width: 100%; height: auto; border-radius: 30px; }
.fai-shot:hover .fai-phone { transform: translateY(-6px); }
.fai-shot-caption { font-size: 0.85rem; font-weight: 600; color: var(--silver); }
.fai-shots-foot { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fai-marquee-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-silver); border-radius: 50px;
  padding: 8px 16px; font: inherit; font-size: 0.82rem; cursor: pointer;
}
.fai-marquee-toggle:hover { color: var(--gold-light); border-color: var(--gold-light); }
@media (prefers-reduced-motion: reduce) {
  .fai-marquee { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; }
  .fai-marquee-track { animation: none; }
  .fai-marquee-list[aria-hidden="true"], .fai-marquee-toggle { display: none; }
  .fai-shot { scroll-snap-align: center; }
}

/* ===== ROUTINE-BASED SUGGESTIONS ===== */
.fai-day {
  background: var(--bg);
  border: 1px solid var(--border-silver);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}
.fai-day .fai-example-title { display: flex; gap: 10px; align-items: center; }
.fai-day .fai-example-title i { color: var(--gold-light); }
.fai-timeline { list-style: none; position: relative; display: flex; flex-direction: column; gap: 20px; }
.fai-timeline::before {
  content: '';
  position: absolute;
  left: 34px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--border-gold), var(--border));
}
.fai-timeline-item { display: grid; grid-template-columns: 70px 1fr; gap: 20px; align-items: start; position: relative; }
.fai-timeline-time {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold-light);
  background: var(--bg3);
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  padding: 4px 0;
  text-align: center;
  position: relative;
  z-index: 1;
}
.fai-timeline-event { display: block; color: var(--silver); font-size: 0.9rem; margin: 4px 0 10px; }
.fai-suggestion {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.fai-suggestion .fai-example-label { margin-bottom: 6px; }
.fai-suggestion strong { display: block; color: var(--text); margin-bottom: 4px; }
.fai-suggestion p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.fai-suggestion em { color: var(--blue-light); font-style: normal; font-weight: 600; }
.fai-routine-types { margin-bottom: 0; }
.fai-learn { border-color: rgba(96,165,250,0.35); }
.fai-learn h3 i, .fai-learn li::before { color: var(--blue-light); }
.fai-learn li::before { content: '•'; }

/* ===== HOW WE BUILD IT ===== */
.fai-build-human { margin-top: 32px; justify-content: center; text-align: left; }
.fai-build-human i { color: var(--gold-light); }
.fai-disclaimer { margin-top: 12px; text-align: center; font-size: 0.78rem; color: var(--text-dim); }
.fai-credit { margin-top: 12px; color: var(--gold-light); font-size: 0.9rem; }
.fai-credit a { color: var(--blue-light); margin-left: 6px; }
.fai-credit a:hover, .fai-built-with:hover { text-decoration: underline; }
.fai-built-with { color: var(--text-dim); font-size: 0.8rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .fai-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .fai-example-grid { grid-template-columns: 1fr; }
  .fai-example-arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 768px) {
  .fai-grid-4, .fai-grid-2, .fai-split, .fai-feature-list { grid-template-columns: 1fr; }
  .fai-countdown-grid { grid-template-columns: repeat(2, 1fr); }
  .fai-example, .fai-split-col, .fai-day { padding: 24px 20px; }
  .fai-timeline-item { grid-template-columns: 56px 1fr; gap: 12px; }
  .fai-phone { width: 200px; border-radius: 32px; } .fai-phone img { border-radius: 25px; }
  .fai-marquee-list { gap: 20px; }
  .fai-timeline::before { left: 28px; }
  .fai-page-hero, .fai-contact { padding-top: 120px; }
  .hero-stats { flex-wrap: wrap; }
}
.footer-legal-links span { font-size: 0.85rem; color: var(--text-dim); }
