/* Lịch Việt – main landing page */
:root {
  /* Tokens shared with the Android app (res/values/colors.xml) */
  --bg: #FFF4D2; --bg-alt: #FFFAEB; --surface: #FFFAEB; --divider: #EBCF8A;
  --text: #3A1F14; --text-2: #7A5A3C; --brand: #D2100D; --brand-dark: #B00505; --link: #A8322D;
  --accent: #EAA034; --accent-text: #9A6208;
  --on-brand: #FFFAEB; --shadow: 0 10px 30px rgba(60, 30, 20, .12);
  --header-bg: rgba(210, 16, 13, .96); --nav-bg: #B00505; --hero-gold: #F2C228;
  --hero-bg: linear-gradient(160deg, #D2100D 0%, #B00505 55%, #780006 100%);
  --cta-bg: linear-gradient(160deg, #D2100D, #780006);
  --footer-bg: #3A1F14;
  --radius: 18px; --max: 1120px;
  --font-body: "Be Vietnam Pro", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Noto Serif", "Times New Roman", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1420; --bg-alt: #131A2A; --surface: #182033; --divider: #2C3752;
    --text: #E8ECF5; --text-2: #9FAAC0; --brand: #B23A32; --brand-dark: #5E1E1A; --link: #FF8A7A;
    --accent: #E6C068; --accent-text: #E6C068;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --header-bg: rgba(24, 32, 51, .96); --nav-bg: #182033; --hero-gold: #E6C068;
    --hero-bg: linear-gradient(160deg, #182033 0%, #131A2A 55%, #0F1420 100%);
    --cta-bg: linear-gradient(160deg, #8E2A22, #182033);
    --footer-bg: #0F1420;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.2; margin: 0; }
.serif { font-family: var(--font-title); }
strong, b, summary, .btn, .eyebrow { font-weight: 500; }
.title, .card h3, .step h3, .article-card h3 { color: var(--accent-text); }
button { font: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 84px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--divider); }
.eyebrow { color: var(--accent-text); font-weight: 500; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px; }
.title { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; }
.lead { color: var(--text-2); font-size: 18px; max-width: 620px; margin: 0 0 40px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px; font-weight: 500;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 16px; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #2B1B08 !important; box-shadow: 0 8px 22px rgba(184, 137, 43, .35); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(184, 137, 43, .5); }
.btn-ghost { color: #FFFBF3 !important; border-color: rgba(255, 251, 243, .45); background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn svg { width: 20px; height: 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #FFFBF3; text-decoration: none; font-weight: 500; font-size: 19px; }
.brand img { border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: rgba(255, 251, 243, .85); text-decoration: none; font-size: 15px; }
.nav a:hover { color: #fff; }
.nav .btn { padding: 9px 18px; font-size: 14px; }
.menu-btn { display: none; background: none; border: 0; color: #FFFBF3; padding: 8px; cursor: pointer; }
.menu-btn svg { width: 26px; height: 26px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #FFFBF3; padding: 72px 0 96px;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(242, 194, 40, .26), transparent 60%),
    radial-gradient(500px 360px at 0% 100%, rgba(242, 194, 40, .14), transparent 60%),
    var(--hero-bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background: repeating-radial-gradient(circle at 80% 30%, #fff 0 1px, transparent 1px 38px);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); margin: 12px 0 18px; }
.hero h1 em { font-style: normal; color: var(--hero-gold); }
.hero p.sub { font-size: 19px; color: rgba(255, 251, 243, .86); max-width: 520px; margin: 0 0 28px; }
.hero .badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); font-size: 14px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; list-style: none; font-size: 14px; color: rgba(255, 251, 243, .82); }
.chips li::before { content: "✓"; color: var(--hero-gold); margin-right: 6px; font-weight: 500; }
.phones { position: relative; height: 520px; }
.phone { position: absolute; width: 230px; border-radius: 32px; padding: 8px; background: #1b1b1f; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .12); }
.phone img { border-radius: 25px; width: 100%; }
.phone.p1 { left: 50%; top: 20px; transform: translateX(-50%); z-index: 3; animation: float 6s ease-in-out infinite; }
.phone.p2 { left: 0; top: 90px; transform: rotate(-9deg); z-index: 1; animation: float2 7s ease-in-out infinite; }
.phone.p3 { right: 0; top: 90px; transform: rotate(9deg); z-index: 2; animation: float2 8s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -14px); } }
@keyframes float2 { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Feature grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); padding: 24px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #FFFBF3; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }

/* Occasions */
.occasions { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.occ { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--divider); }
.occ b { display: block; color: var(--accent-text); }
.occ span { color: var(--text-2); font-size: 14px; }
.occ .dot { flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(168, 50, 45, .18); }

/* Showcase */
.carousel { position: relative; max-width: 100%; margin: 0 auto; }
.shots { display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; max-width: 764px; margin: 0 auto; }
.shots::-webkit-scrollbar { display: none; }
.car-btn { position: absolute; top: 40%; z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--divider); background: var(--surface); color: var(--link); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s, background .2s; }
.car-btn:hover { background: var(--accent); color: #2B1B08; transform: scale(1.06); }
.car-btn svg { width: 22px; height: 22px; }
.car-btn.prev { left: max(0px, calc(50% - 382px - 64px)); }
.car-btn.next { right: max(0px, calc(50% - 382px - 64px)); }
@media (max-width: 960px) { .car-btn.prev { left: 4px; } .car-btn.next { right: 4px; } .car-btn { opacity: .92; } }
.shot { flex: none; width: 240px; margin: 0; scroll-snap-align: start; text-align: center; }
.shot .frame { border-radius: 28px; padding: 7px; background: #1b1b1f; box-shadow: var(--shadow); }
.shot img { border-radius: 22px; width: 100%; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--text-2); }

/* Steps */
.steps { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step { position: relative; padding: 28px 24px 24px; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -18px; left: 22px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #2B1B08; font-weight: 500; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }

/* Articles */
.articles { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.article-card { display: block; text-decoration: none; color: inherit; }
.article-card .tag { color: var(--accent-text); font-size: 13px; font-weight: 500; }
.article-card h3 { font-size: 18px; margin: 6px 0; }
.article-card p { color: var(--text-2); font-size: 14px; margin: 0 0 10px; }
.article-card .more { color: var(--link); font-weight: 500; font-size: 14px; }
.more-link { text-align: center; margin-top: 28px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
details { background: var(--surface); border: 1px solid var(--divider); border-radius: 14px; margin: 0 0 12px; padding: 4px 20px; }
details[open] { border-color: var(--accent); }
summary { cursor: pointer; font-weight: 500; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent-text); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 14px; color: var(--text-2); animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* CTA */
.cta { text-align: center; color: #FFFBF3; background: radial-gradient(500px 300px at 50% 0, rgba(242, 194, 40, .28), transparent 70%), var(--cta-bg); border-radius: 28px; padding: 56px 24px; }
.cta h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 10px; }
.cta p { color: rgba(255, 251, 243, .85); margin: 0 auto 24px; max-width: 520px; }

/* Footer */
.site-footer { background: var(--footer-bg); color: #CDBFAE; padding: 56px 0 24px; margin-top: 84px; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.footer-logo img { height: 40px; width: auto; }
.footer-tagline { margin: 14px 0 18px; color: #B3A592; max-width: 280px; }
.social-links { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #EFE6D6; border: 1px solid rgba(255, 255, 255, .18); text-decoration: none; font-size: 12px; font-weight: 500; transition: background .2s, transform .2s, color .2s; }
.social-links a:hover { background: var(--accent); color: #2B1B08; transform: translateY(-2px); }
.social-links svg { width: 20px; height: 20px; }
.site-footer h4 { color: #FFFBF3; margin: 4px 0 12px; font-size: 15px; }
.site-footer ul.links { list-style: none; padding: 0; margin: 0; }
.site-footer ul.links li { margin: 8px 0; }
.site-footer ul.links a { color: #CDBFAE; text-decoration: none; font-size: 15px; }
.site-footer ul.links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 36px; padding-top: 20px; font-size: 14px; color: #9C8F7E; text-align: center; }
.footer-bottom a { color: #CDBFAE; }

/* Floating buttons */
.fab { position: fixed; right: 18px; z-index: 60; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); text-decoration: none; transition: transform .2s, opacity .3s, visibility .3s; }
.fab:hover { transform: translateY(-3px) scale(1.05); }
.fab svg { width: 26px; height: 26px; }
.fab-wa { bottom: 18px; background: #25D366; color: #fff; }
.fab-wa::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: pulse 2.2s ease-out infinite; }
.fab-top { bottom: 82px; background: var(--brand); color: #FFFBF3; opacity: 0; visibility: hidden; }
.fab-top.show { opacity: 1; visibility: visible; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }

/* Scroll reveal: elements start hidden only when JS is available */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.js .reveal.left { transform: translateX(-36px); }
.js .reveal.right { transform: translateX(36px); }
.js .reveal.zoom { transform: scale(.94); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { height: 440px; }
  .phone { width: 190px; }
  .grid, .articles, .steps, .occasions { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .menu-btn { display: block; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--nav-bg); padding: 8px 20px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; }
  .nav .btn { width: auto; margin-top: 8px; }
  .hero { padding: 48px 0 64px; }
  .phones { height: 400px; }
  .phone.p2, .phone.p3 { display: none; }
  .grid, .articles, .steps, .occasions, .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone, .fab-wa::after { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Google Play badge */
.play-badge { display: inline-block; line-height: 0; transition: transform .2s; }
.play-badge:hover { transform: translateY(-2px); }
.play-badge img { height: 64px; width: auto; margin: -8px; }
.hero .actions { align-items: center; }
.cta .play-badge img { height: 72px; }

.install-steps { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 15px; }
.install-steps li { margin-bottom: 6px; }
.install-grid .card a:not(.btn):not(.play-badge) { color: var(--accent-text); text-decoration: underline; }
.install-grid .play-badge img { height: 56px; width: auto; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
