/* ============== Shared nav (head.html) + footer (bottom.html) ============== */
html { scroll-behavior: smooth; }

/* ---------- Navbar ---------- */
.navbar { background: var(--dark); height: 56px; position: sticky; top: 0; z-index: 50; }
.nav-inner { max-width: 1200px; margin: 0 auto; height: 100%;
             display: flex; align-items: center; padding: 0 32px; }
.logo { display: flex; align-items: center; gap: 8px;
        color: #fff; font-weight: 600; font-size: 16px; }
.logo-icon { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 56px; margin-left: 80px; align-items: center; }
.nav-links a { color: #cbd5e1; font-size: 14px; transition: color 0.15s; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #3B78F6; font-weight: 500; }

/* ---------- Language dropdown ---------- */
.lang { margin-left: auto; position: relative; }
.lang-toggle { color: #cbd5e1; font-size: 14px; cursor: pointer; user-select: none;
               display: flex; align-items: center; gap: 4px; padding: 8px 4px; }
.lang-toggle:hover { color: #fff; }
.lang-dropdown { position: absolute; top: calc(100% + 10px); left: 4px;
                 background: #fff; border-radius: 12px;
                 box-shadow: 0 12px 32px rgba(15,23,42,0.18);
                 padding: 8px 0; min-width: 180px; z-index: 100;
                 opacity: 0; visibility: hidden; transform: translateY(6px);
                 transition: all 0.18s; }
.lang-dropdown::before { content: ""; position: absolute; top: -6px; left: 26px; transform: translateX(-50%);
                        width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
                        border-bottom: 6px solid #fff;
                        filter: drop-shadow(0 -1px 1px rgba(15,23,42,0.06)); }
.lang-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown a { display: block; padding: 10px 20px; font-size: 13px;
                   color: var(--text); transition: background 0.12s; }
.lang-dropdown a:first-child { padding-top: 14px; }
.lang-dropdown a:last-child { padding-bottom: 14px; }
.lang-dropdown a:hover { background: #f1f5f9; }

/* ---------- Contact hover popup ---------- */
.contact-item { position: relative; }
.contact-popup { position: absolute; top: calc(100% + 10px); left: 0; transform: translateY(6px);
                 background: #fff; color: var(--text); border-radius: 12px;
                 box-shadow: 0 12px 32px rgba(15,23,42,0.18); padding: 18px 22px;
                 min-width: 260px; opacity: 0; visibility: hidden; transition: all 0.18s; z-index: 100; }
.contact-popup::before { content: ""; position: absolute; top: -6px; left: 24px; transform: translateX(-50%);
                         width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
                         border-bottom: 6px solid #fff;
                         filter: drop-shadow(0 -1px 1px rgba(15,23,42,0.06)); }
.contact-item:hover .contact-popup { opacity: 1; visibility: visible; transform: translateY(0); }
.contact-popup .cp-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #475569; padding: 8px 0; }
.contact-popup .cp-row + .cp-row { border-top: 1px solid #EEF1F5; padding-top: 12px; margin-top: 4px; }
.contact-popup .cp-row .ic { width: 18px; height: 18px; flex: 0 0 18px; display: flex; align-items: center; justify-content: center; }
.contact-popup .cp-row .ic img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Footer ---------- */
footer { background: var(--dark); color: #cbd5e1; padding: 56px 24px 0; }
.footer-inner { max-width: 1200px; margin: 0 auto;
                display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13px; color: #94a3b8; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-col .info { font-size: 13px; color: #94a3b8; line-height: 1.9; }
.footer-bottom { max-width: 1200px; margin: 44px auto 0; padding: 20px 0;
                 border-top: 1px solid #1e293b;
                 display: flex; justify-content: center; align-items: center;
                 font-size: 12px; color: #64748b; flex-wrap: wrap; gap: 12px; }
.footer-bottom .links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-bottom .links a { color: #64748b; }
.footer-bottom .links a:hover { color: #94a3b8; }
.footer-bottom .links .sep { color: #3d4a5c; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============== Production polish, responsive navigation, GEO FAQ, legal pages ============== */
:root { --primary: #2473F6; --dark: #0d1b2a; --text: #1f2937; --text-gray: #6b7280; }
body { overflow-x: hidden; }
body.legal-page { margin: 0; min-height: 100vh; color: var(--text); background: #fff; }
body.legal-page *, body.legal-page *::before, body.legal-page *::after { box-sizing: border-box; }
body.legal-page .navbar, body.legal-page footer { background: #0d1b2a; }
body.legal-page a { text-decoration: none; }
body.legal-page img { display: block; max-width: 100%; }
.skip-link { position: fixed; top: 10px; left: 12px; z-index: 999; padding: 10px 16px; border-radius: 8px; color: #fff; background: #2473F6; transform: translateY(-160%); transition: transform .18s; }
.skip-link:focus { transform: translateY(0); }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; padding: 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; background: rgba(255,255,255,.06); cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; border-radius: 2px; background: #fff; }
.hero-text h1 { text-wrap: balance; }
.pay-head h2 { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: .5px; line-height: 1.4; }
.hero-text p, .section-desc, .translate-desc, .archive-desc { text-wrap: pretty; }
.hero-pill .lbl { max-width: 120px; white-space: nowrap !important; text-align: center; line-height: 1.25; }
.lang-toggle .lang-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid rgba(91,158,255,.5); outline-offset: 3px; }
.geo-faq .faq-grid { max-width: 900px; margin: 36px auto 0; display: grid; gap: 12px; }
.geo-faq details { border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; box-shadow: 0 4px 16px rgba(15,23,42,.04); }
.geo-faq summary { position: relative; padding: 18px 52px 18px 20px; color: #0d1b2a; font-weight: 600; cursor: pointer; list-style: none; }
.geo-faq summary::-webkit-details-marker { display: none; }
.geo-faq summary::after { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: #2473F6; font-size: 22px; content: "+"; }
.geo-faq details[open] summary::after { content: "–"; }
.geo-faq details p { margin: 0; padding: 0 20px 20px; color: #6b7280; font-size: 14px; line-height: 1.75; }
.legal-hero { padding: 72px 24px 58px; color: #fff; background: linear-gradient(135deg, #0d1b2a, #173e78); }
html[lang="en-US"] body.legal-page,
html[lang="en-US"] body.legal-page button,
html[lang="en-US"] body.legal-page input,
html[lang="en-US"] body.legal-page select,
html[lang="en-US"] body.legal-page textarea { font-family: Arial, Helvetica, sans-serif; }
.legal-hero-inner, .legal-layout { width: min(1120px, 100%); margin: 0 auto; }
.legal-breadcrumb { margin-bottom: 20px; color: rgba(255,255,255,.7); font-size: 13px; }
.legal-breadcrumb a:hover { color: #fff; }
.legal-hero h1 { margin: 0; max-width: 850px; font-size: clamp(36px, 6vw, 64px); line-height: 1.05; letter-spacing: -.035em; }
.legal-hero p { max-width: 760px; margin: 18px 0 0; color: rgba(255,255,255,.78); }
.legal-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; color: rgba(255,255,255,.6); font-size: 13px; }
.legal-main { padding: 72px 24px 96px; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 760px); gap: 64px; align-items: start; }
.legal-toc { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 12px; }
.legal-toc strong { display: block; margin-bottom: 12px; color: #0d1b2a; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.legal-toc a { display: block; padding: 6px 0; color: #6b7280; font-size: 13px; line-height: 1.35; }
.legal-toc a:hover { color: #2473F6; }
.legal-copy h2 { margin: 52px 0 18px; scroll-margin-top: 90px; color: #0d1b2a; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.legal-copy h2:first-child { margin-top: 0; }
.legal-copy p { margin: 0 0 15px; color: #40536a; line-height: 1.75; }
.legal-copy p.clause { padding-left: 3.2em; text-indent: -3.2em; }
.legal-copy a { color: #2473F6; text-decoration: underline; text-underline-offset: 3px; }
.legal-note { margin-bottom: 32px; padding: 18px 20px; border: 1px solid #e5e7eb; border-radius: 12px; color: #475569; background: #f6f8fb; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .lang { margin-left: 0; }
  .lang-dropdown { right: 0; left: auto; }
  .lang-dropdown::before { right: 18px; left: auto; transform: none; }
  .nav-links { position: fixed; inset: 56px 0 auto; margin: 0; padding: 18px 24px 26px; display: grid; gap: 0; background: rgba(13,27,42,.98); box-shadow: 0 20px 40px rgba(0,0,0,.2); transform: translateY(-130%); opacity: 0; visibility: hidden; transition: transform .2s, opacity .2s, visibility .2s; }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  body.nav-open { overflow: hidden; }
  .legal-layout { grid-template-columns: 1fr; gap: 28px; }
  .legal-toc { position: static; max-height: none; columns: 2; padding-bottom: 24px; border-bottom: 1px solid #e5e7eb; }
  .legal-toc strong { column-span: all; }
}
@media (max-width: 600px) {
  .container { padding-left: 18px; padding-right: 18px; }
  .hero { padding-top: 54px; }
  .hero-text h1 { font-size: 38px; }
  .hero-cta { width: 100%; flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .feature-trio, .digit-cards, .ai-feature-cards, .translate-cards, .archive-cards, .channels, .plans { grid-template-columns: 1fr !important; }
  .trio-card { height: auto; min-height: 140px; }
  .ai-pdf-scene { padding: 28px 20px; }
  .pay-wrap { padding-left: 16px; padding-right: 16px; }
  .pay-card-body { padding-left: 16px; padding-right: 16px; }
  .benefits { overflow-x: auto; }
  .benefits-table { min-width: 640px; }
  .legal-main, .legal-hero { padding-left: 18px; padding-right: 18px; }
  .legal-toc { columns: 1; }
  .legal-copy p.clause { padding-left: 0; text-indent: 0; }
  .hero-feature-pills { width: 100%; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 12px; }
  .hero-pill { min-width: 0; padding: 10px 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
