/* LuatViet Pro — Classic Formal Legal B2B Theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1c2841;
  --navy-light: #2a3a5c;
  --gold: #b8860b;
  --gold-light: #d4a843;
  --cream: #faf8f3;
  --cream-dark: #f0ebe0;
  --text: #1a1a2e;
  --text-muted: #5a5a6e;
  --white: #ffffff;
  --border-double: 3px double var(--gold);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: "Segoe UI", system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(28, 40, 65, 0.12);
  --radius: 4px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }
body.theme-luatviet {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--navy); line-height: 1.25; }

.container { width: min(1140px, 92vw); margin: 0 auto; }

/* Skip Link */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  background: var(--navy); color: var(--white); padding: 0.75rem 1.25rem;
  border: var(--border-double); font-weight: 600;
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--gold); }

/* Header — Centered Logo */
.header {
  background: var(--navy);
  border-bottom: var(--border-double);
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow var(--transition);
}
.header.is-scrolled { box-shadow: var(--shadow); }
.header__inner {
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem 0 0.75rem; gap: 0.75rem;
}
.header__inner .logo {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  color: var(--white); font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700;
}
.header__inner .logo:hover { color: var(--gold-light); }
.logo__icon {
  width: 52px; height: 52px; border: var(--border-double);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--gold); background: rgba(184, 134, 11, 0.08);
}
.header__row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding-bottom: 0.75rem;
}
.nav__list { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.nav__link { color: rgba(255,255,255,0.85); font-size: 0.9rem; letter-spacing: 0.02em; }
.nav__link:hover { color: var(--gold); }
.header__actions { display: flex; align-items: center; gap: 0.75rem; }
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0.5rem;
}
.menu-toggle__bar { width: 24px; height: 2px; background: var(--white); }
.mobile-nav {
  display: none; background: var(--navy-light); padding: 1rem;
  border-top: 1px solid rgba(184,134,11,0.3);
}
.mobile-nav.is-open { display: block; }
.mobile-nav__list { display: flex; flex-direction: column; gap: 0.75rem; }
.mobile-nav__link { color: var(--white); display: block; padding: 0.5rem; }
.mobile-nav__actions { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.65rem 1.4rem; font-size: 0.9rem; font-weight: 600;
  border-radius: var(--radius); cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition); font-family: var(--font-sans);
}
.btn--primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn--primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy); }
.btn--outline { background: transparent; color: var(--white); border-color: var(--gold); }
.btn--outline:hover { background: rgba(184,134,11,0.15); color: var(--gold-light); }
.btn--lg { padding: 0.85rem 1.75rem; font-size: 1rem; }

/* Hero */
.hero {
  background: var(--cream);
  border-bottom: var(--border-double);
  padding: 4rem 0;
}
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero__badge {
  display: inline-block; padding: 0.35rem 1rem;
  border: 1px solid var(--gold); color: var(--gold);
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
.hero__subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 1.5rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.hero__trust { display: flex; flex-direction: column; gap: 0.75rem; }
.hero__trust-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: var(--text-muted); }
.hero__trust-icon { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; }
.hero__figure { border: var(--border-double); padding: 0.5rem; background: var(--white); }
.hero__caption { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; text-align: center; font-style: italic; }

/* Sections */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--cream-dark); border-top: 1px solid rgba(184,134,11,0.2); border-bottom: 1px solid rgba(184,134,11,0.2); }
.section__header { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section__label {
  display: inline-block; color: var(--gold); font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--gold); padding-bottom: 0.25rem;
}
.section__header h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 0.75rem; }
.section__desc { color: var(--text-muted); }

/* Trust */
.trust__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.5rem; align-items: start; }
.trust__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.trust__stat {
  background: var(--white); border: var(--border-double); padding: 1.25rem; text-align: center;
}
.trust__stat-value { font-family: var(--font-serif); font-size: 2rem; color: var(--navy); }
.trust__stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
.trust__placeholder { font-size: 0.75rem; color: var(--gold); margin-top: 0.35rem; font-style: italic; }
.usecase-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.usecase-card { border: var(--border-double); background: var(--white); overflow: hidden; }
.usecase-card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.usecase-card figcaption { padding: 0.6rem; font-size: 0.85rem; text-align: center; color: var(--navy); font-weight: 600; }
.trust__review {
  background: var(--white); border-left: 4px solid var(--gold);
  padding: 1.25rem; margin-bottom: 1rem;
}
.trust__review-text { font-style: italic; color: var(--text-muted); margin-bottom: 0.5rem; }
.trust__review-meta { font-size: 0.85rem; color: var(--gold); }

/* Features */
.features__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.feature-card {
  background: var(--white); border: var(--border-double); padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-card__icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feature-card__title { font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature-card__desc { font-size: 0.9rem; color: var(--text-muted); }

/* Timeline — How It Works */
.timeline { position: relative; max-width: 680px; margin: 0 auto; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 15px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--gold), var(--navy));
}
.timeline__item { position: relative; padding: 0 0 2.5rem 2rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
  position: absolute; left: -2rem; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-weight: 700; font-size: 0.85rem;
}
.timeline__content {
  background: var(--white); border: var(--border-double); padding: 1.5rem;
}
.timeline__title { font-size: 1.15rem; margin-bottom: 0.5rem; }
.timeline__desc { color: var(--text-muted); font-size: 0.95rem; }

/* Benefits */
.benefits__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.benefit-item {
  display: flex; gap: 1rem; padding: 1.25rem;
  background: var(--white); border: 1px solid rgba(184,134,11,0.3);
  border-left: 4px solid var(--gold);
}
.benefit-item__check { width: 24px; height: 24px; color: var(--gold); flex-shrink: 0; margin-top: 0.15rem; }
.benefit-item__title { font-size: 1rem; margin-bottom: 0.35rem; }
.benefit-item__desc { font-size: 0.9rem; color: var(--text-muted); }

/* Comparison Table */
.comparison-table-wrapper { overflow-x: auto; border: var(--border-double); background: var(--white); }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.comparison-table th, .comparison-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--cream-dark); }
.comparison-table thead th { background: var(--navy); color: var(--white); font-family: var(--font-serif); }
.comparison-table .col-highlight { background: rgba(184,134,11,0.08); font-weight: 600; }
.comparison-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 1rem; font-style: italic; }

/* FAQ Accordion */
.faq__list { max-width: 800px; margin: 0 auto; }
.faq__item { border: var(--border-double); margin-bottom: 0.75rem; background: var(--white); }
.faq__question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1.15rem 1.25rem; background: none; border: none; cursor: pointer;
  font-family: var(--font-serif); font-size: 1rem; color: var(--navy); text-align: left;
}
.faq__question:hover { color: var(--gold); }
.faq__icon { width: 20px; height: 20px; flex-shrink: 0; transition: transform var(--transition); }
.faq__item.is-open .faq__icon { transform: rotate(180deg); }
.faq__answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq__item.is-open .faq__answer { max-height: 500px; }
.faq__answer p { padding: 0 1.25rem 1.15rem; color: var(--text-muted); font-size: 0.95rem; }

/* About */
.about__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; align-items: start; }
.about__figure { border: var(--border-double); margin-bottom: 1.25rem; }
.about__caption { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; font-style: italic; }
.about__content p { margin-bottom: 1rem; color: var(--text-muted); }
.about__value {
  padding: 1.25rem; border: var(--border-double); background: var(--white); margin-bottom: 1rem;
}
.about__value h3 { font-size: 1rem; margin-bottom: 0.35rem; color: var(--gold); }
.about__value p { font-size: 0.9rem; color: var(--text-muted); }

/* CTA Banner */
.cta-banner {
  background: var(--navy); color: var(--white); text-align: center;
  padding: 4rem 0; border-top: var(--border-double); border-bottom: var(--border-double);
}
.cta-banner h2 { color: var(--white); font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 0.75rem; }
.cta-banner__desc { color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; max-width: 560px; margin-left: auto; margin-right: auto; }

/* Contact */
.contact__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; }
.contact__item { margin-bottom: 1.5rem; }
.contact__item h3 { font-size: 0.95rem; color: var(--gold); margin-bottom: 0.35rem; }
.contact__item p { color: var(--text-muted); font-size: 0.95rem; }
.contact-form { background: var(--white); border: var(--border-double); padding: 2rem; }
.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--navy); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--cream-dark);
  border-radius: var(--radius); font-family: var(--font-sans); font-size: 0.95rem;
  background: var(--cream); transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--gold);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }
.form-success {
  display: none; background: rgba(46,125,50,0.1); border: 1px solid #2e7d32;
  color: #1b5e20; padding: 1rem; margin-bottom: 1rem; border-radius: var(--radius);
}
.form-success.is-visible { display: block; }

/* Footer */
.footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 3rem 0 1.5rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer .logo { color: var(--white); margin-bottom: 0.75rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.footer__brand p { font-size: 0.9rem; line-height: 1.6; }
.footer__col h4 { color: var(--gold); font-family: var(--font-serif); margin-bottom: 0.75rem; font-size: 0.95rem; }
.footer__links li { margin-bottom: 0.4rem; }
.footer__links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer__links a:hover { color: var(--gold); }
.footer__bottom { border-top: 1px solid rgba(184,134,11,0.3); padding-top: 1.5rem; }
.footer__bottom p { font-size: 0.85rem; margin-bottom: 0.5rem; }
.footer__legal { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-top: 1rem; }

/* Legal Pages */
.legal-page { padding: 3rem 0 4rem; }
.legal-page h1 { font-size: 2rem; margin-bottom: 0.5rem; border-bottom: var(--border-double); padding-bottom: 0.75rem; }
.legal-updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; color: var(--gold); }
.legal-page p, .legal-page li { color: var(--text-muted); margin-bottom: 0.75rem; }
.legal-page ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }

/* LuatViet — Extended formal decorative elements */
.header::before {
  content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--navy), var(--gold));
}
.hero__content { position: relative; padding-left: 1rem; }
.hero__content::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}
.section__header::after {
  content: "§"; display: block; font-family: var(--font-serif);
  color: var(--gold); font-size: 1.25rem; margin-top: 0.75rem; opacity: 0.5;
}
.feature-card::before {
  content: ""; display: block; width: 40px; height: 2px;
  background: var(--gold); margin-bottom: 0.75rem;
}
.timeline__content::after {
  content: ""; display: block; width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-top: 1rem; opacity: 0.4;
}
.comparison-table tbody tr:hover td { background: rgba(184,134,11,0.04); }
.comparison-table tbody tr:hover .col-highlight { background: rgba(184,134,11,0.14); }
.faq__item.is-open { border-color: var(--gold); }
.faq__item.is-open .faq__question { color: var(--gold); background: rgba(184,134,11,0.05); }
.about__value:hover { box-shadow: var(--shadow); }
.contact-form .btn--primary { width: 100%; }
.cta-banner .btn--primary { background: var(--gold); color: var(--navy); border: 2px solid var(--gold); }
.cta-banner .btn--primary:hover { background: var(--gold-light); }
.trust__stat:hover { transform: translateY(-2px); transition: transform var(--transition); }
.usecase-card:hover img { transform: scale(1.03); transition: transform 0.4s ease; }
.usecase-card img { transition: transform 0.4s ease; }
.hero__figure:hover { box-shadow: 0 8px 40px rgba(28,40,65,0.18); }
.logo__icon { transition: transform var(--transition); }
.logo:hover .logo__icon { transform: scale(1.05); }
.form-group input:invalid:not(:placeholder-shown) { border-color: #c0392b; }
.form-group input:valid:not(:placeholder-shown) { border-color: var(--green-light, #4caf50); }
.mobile-nav__link:hover { background: rgba(184,134,11,0.1); border-radius: var(--radius); }
.footer__col h4::after { content: ""; display: block; width: 24px; height: 2px; background: var(--gold); margin-top: 0.35rem; }
.legal-page a { text-decoration: underline; text-underline-offset: 2px; }
.legal-page h2::before { content: "◆ "; color: var(--gold); font-size: 0.75em; }
.benefit-item:hover { border-left-width: 6px; transition: border-left-width var(--transition); }
.step__number { box-shadow: 0 2px 8px rgba(184,134,11,0.3); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .header, .footer, .cta-banner, .contact-form, .menu-toggle, .mobile-nav { display: none !important; }
  body.theme-luatviet { background: white; color: black; }
  .section { page-break-inside: avoid; }
}

/* LuatViet — Typography & spacing refinements */
.hero h1 { letter-spacing: -0.01em; }
.section__header h2 { letter-spacing: -0.015em; }
.feature-card__title { font-family: var(--font-serif); }
.timeline__title { font-family: var(--font-serif); }
.contact__item a { font-weight: 600; }
.nav__link { position: relative; padding-bottom: 0.25rem; }
.nav__link::after {
  content: ""; position: absolute; bottom: 0; left: 50%; width: 0; height: 1px;
  background: var(--gold); transition: all var(--transition); transform: translateX(-50%);
}
.nav__link:hover::after { width: 100%; }
.btn { letter-spacing: 0.03em; text-transform: none; }
.btn--primary:focus-visible, .btn--outline:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.faq__question:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.form-group select { cursor: pointer; appearance: auto; }
.trust__reviews { max-width: 100%; }
.about__grid .about__values { position: sticky; top: 100px; }
@media (max-width: 992px) { .about__grid .about__values { position: static; } }
.comparison-table-wrapper:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.hero__badge { font-family: var(--font-serif); font-style: italic; }
.footer__brand .logo { flex-direction: column; align-items: flex-start; }
.cta-banner .container { max-width: 720px; }
.section:nth-of-type(even) { position: relative; }
.mobile-nav__actions .btn { width: 100%; justify-content: center; }
.contact-form textarea { font-family: var(--font-sans); }
.legal-page .container { max-width: 800px; }
.legal-page h1 + p { max-width: 680px; }

/* Responsive */
@media (max-width: 992px) {
  .hero__grid, .trust__grid, .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav, .header__actions .btn { display: none; }
  .menu-toggle { display: flex; }
  .header__row { justify-content: space-between; }
  .features__grid, .benefits__grid, .trust__stats { grid-template-columns: 1fr; }
  .usecase-gallery { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 0; }
  .section { padding: 3rem 0; }
  .timeline { padding-left: 1.5rem; }
  .timeline__marker { left: -1.75rem; width: 28px; height: 28px; font-size: 0.75rem; }
}
@media (max-width: 480px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .trust__stat-value { font-size: 1.6rem; }
  .cta-banner { padding: 2.5rem 0; }
  .header__inner .logo { font-size: 1.25rem; }
  .logo__icon { width: 44px; height: 44px; }
  .contact-form { padding: 1.25rem; }
  .footer__grid { gap: 1.25rem; }
}

/* LuatViet — Utility & accessibility helpers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: rgba(184,134,11,0.25); color: var(--navy); }
