/* =========================================================
   Bảng giá (bang-gia.html) — light page, loaded after style.css
   ========================================================= */


/* ---------- Hero ---------- */
.p-hero {
  position: relative; overflow-x: clip;
  padding: 116px var(--pad-x) 0;
  background: linear-gradient(100deg, #fafdff 0%, #edf5ff 48%, #dcebff 100%);
}
.p-hero-bg {
  position: absolute; top: 0; right: 0; bottom: 0; width: 64%;
  background:
    linear-gradient(0deg, rgba(234,244,255,.95), rgba(234,244,255,0) 45%),
    url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1800&q=80') center / cover;
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
  opacity: .92;
}
.p-hero-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; min-height: 500px; }
.p-hero-copy { padding-bottom: 60px; }
.p-hero h1 {
  font-size: clamp(34px, 3.35vw, 52px); line-height: 1.16; font-weight: 700; letter-spacing: -.035em;
  color: var(--ink-2); margin: 0 0 20px;
}
.p-hero h1 em {
  font-style: normal; white-space: nowrap;
  background: linear-gradient(90deg, #0a5ce6, #0a8ff5 60%, #12b8f2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.p-hero-copy > p { max-width: 540px; color: #33485f; font-size: 16px; margin: 0; }
.p-hero-art { position: relative; height: 500px; perspective: 1400px; }
.p-stage { position: absolute; inset: 0; }
[data-devices="hero"] .dv-laptop { left: 14%; width: 64%; bottom: 84px; }
[data-devices="hero"] .dv-phone { right: 4%; width: 15%; bottom: 70px; transform: translateZ(60px); }
[data-devices="hero"] .dv { animation: float 7s ease-in-out infinite; }
[data-devices="hero"] .dv-phone { animation-delay: -3s; }

.glass-tag {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 14px;
  background: rgba(255,255,255,.74); border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(20,70,130,.16);
  font-size: 12.5px; font-weight: 600; line-height: 1.4; color: #1a2d45;
  translate: calc(var(--px, 0) * -22px) calc(var(--py, 0) * -14px);
  transition: translate .5s cubic-bezier(.2,.8,.2,1);
  animation: tag-bob 6s ease-in-out infinite;
}
.gt-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 21px;
  background: linear-gradient(145deg, #eaf4ff, #d8eaff); color: var(--blue);
}
.glass-tag.t1 { left: 4%; top: 12%; }
.glass-tag.t2 { left: -3%; bottom: 24%; animation-delay: -2s; }
.glass-tag.t3 { right: -2%; top: 20%; animation-delay: -1s; }
.glass-tag.t4 { right: -2%; top: 36%; animation-delay: -3s; }
@keyframes tag-bob { 50% { transform: translateY(-8px); } }
.p-hero-art .hand-note { right: 18%; top: 1%; }

/* Trust bar overlapping the hero edge */
.trust-bar {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 0 0 -48px;
  background: #fff; border: 1px solid #e5edfb; border-radius: 18px;
  box-shadow: 0 20px 44px rgba(20,60,110,.12);
}
.trust-item { position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 26px; }
.trust-item + .trust-item::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: #dde7f2; }
.trust-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 25px;
  background: #eaf3ff; color: var(--blue);
}
.trust-item strong { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.03em; color: var(--ink-2); line-height: 1.1; }
.trust-item small { display: block; font-size: 12.5px; color: #5b6b7e; margin-top: 3px; }

/* ---------- Plans ---------- */
.plans { padding-top: 130px; background: linear-gradient(180deg, #fff, #f5f9ff); }
.plans .section-heading h2 { color: var(--ink-2); }
.plans-aside { display: flex; align-items: center; gap: 28px; max-width: 520px; }
.plans-aside p { color: var(--muted); font-size: 14px; margin: 0; }
.plan-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch;
  perspective: 1400px; padding-top: 16px;
}
.plan-card {
  --cf: translateZ(0);
  position: relative; display: flex; flex-direction: column;
  padding: 30px 28px 32px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: 0 14px 34px rgba(21,66,117,.07);
  transform: var(--cf);
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s, opacity .85s;
}
.plan-card.reveal:not(.in) { transform: translateY(46px); }
.plan-card:not(.is-tilting):hover { transform: translateY(-8px); box-shadow: 0 28px 56px rgba(11,90,162,.14); }
.plan-card.is-tilting { transition: transform .08s linear, box-shadow .3s; box-shadow: 0 30px 60px rgba(11,90,162,.18); }
.plan-card .glare {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.55), transparent 45%);
  opacity: 0; transition: opacity .4s; mix-blend-mode: soft-light;
}
.plan-card.is-tilting .glare { opacity: 1; }
.plan-card.featured {
  border: 2px solid #1685ff;
  background: linear-gradient(180deg, #f3f9ff, #fff 38%);
  box-shadow: 0 22px 54px rgba(9,118,248,.16);
}
.popular {
  position: absolute; left: 50%; top: -15px; transform: translateX(-50%);
  padding: 7px 18px; border-radius: 99px; white-space: nowrap;
  background: linear-gradient(90deg, #0865e8, #0aa5ec); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(11,126,235,.35);
}
.tier {
  align-self: flex-start;
  padding: 5px 12px; border-radius: 99px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: #eef2f7; color: #3a4b5c;
}
.featured .tier { background: #e2efff; color: #075ed2; }
#premium .tier { background: #efeafb; color: #4b3f8f; }
.plan-card h3 {
  font-size: clamp(22px, 1.9vw, 27px); line-height: 1.22; font-weight: 700; letter-spacing: -.025em;
  color: var(--ink-2); margin: 16px 0 10px; min-height: 2.44em;
}
.plan-card h3 em {
  font-style: normal;
  background: linear-gradient(90deg, #0a5ce6, #0a9af5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plan-desc { font-size: 14px; color: #52617a; margin: 0 0 20px; min-height: 4.95em; }
/* Height follows the card width so the devices (sized in %) always fit inside */
.plan-preview { position: relative; aspect-ratio: 2.15 / 1; margin: 26px 0 20px; perspective: 900px; }
.plan-card > .pill { position: relative; z-index: 2; }
.plan-preview .dv-laptop { left: 17%; width: 66%; bottom: 8px; }
.plan-preview .dv-tablet { left: 0; width: 23%; bottom: 8px; transform: translateZ(30px); }
.plan-preview .dv-phone { right: 1%; width: 14%; bottom: 8px; transform: translateZ(40px); }
.plan-preview .dv-stage { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.plan-card:hover .plan-preview .dv-stage { transform: rotateX(8deg) translateY(-6px) scale(1.04); }
.features { list-style: none; padding: 0; margin: 0; }
.features li { position: relative; padding: 7px 0 7px 30px; font-size: 14px; line-height: 1.5; color: #3c4f66; }
.features li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 19px; height: 19px; border-radius: 50%;
  background: #7d8ea4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.featured .features li::before { background-color: var(--blue); }
.plan-card.spotlight { animation: spotlight 1.4s ease-out; }
@keyframes spotlight {
  0% { box-shadow: 0 0 0 0 rgba(8,125,245,.55), 0 14px 34px rgba(21,66,117,.07); }
  100% { box-shadow: 0 0 0 22px rgba(8,125,245,0), 0 14px 34px rgba(21,66,117,.07); }
}

/* ---------- Comparison ---------- */
.compare {
  position: relative; overflow: hidden;
  padding: 90px var(--pad-x);
  background:
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(29,91,148,.35), transparent 70%),
    radial-gradient(ellipse 40% 50% at 100% 0%, rgba(8,125,245,.18), transparent 70%),
    linear-gradient(110deg, #07203d, #0c2d52 55%, #061a33);
}
.compare-inner { position: relative; display: grid; grid-template-columns: .8fr 2.2fr; gap: 50px; align-items: start; }
.compare-intro h2 { font-size: clamp(30px, 2.8vw, 42px); line-height: 1.15; font-weight: 700; letter-spacing: -.03em; margin: 0 0 18px; color: #fff; }
.compare-intro p { color: #c5d4e4; font-size: 14.5px; margin: 0; }
.table-wrap { overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: 0 24px 50px rgba(2,12,26,.4); }
.compare-table { width: 100%; min-width: 700px; border-collapse: separate; border-spacing: 0; font-size: 14px; color: #25384f; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: center; border-bottom: 1px solid #edf1f6; transition: background .2s; }
.compare-table thead th { background: #f1f6fc; font-family: var(--display); font-weight: 700; color: var(--ink-2); font-size: 14.5px; }
.compare-table thead th.hl { background: linear-gradient(110deg, #0759e9, #09a6f4); color: #fff; }
.compare-table tbody th { text-align: left; font-weight: 600; color: var(--ink-2); }
.compare-table td.hl { background: #eef6ff; font-weight: 600; color: #0b56c9; }
.compare-table tbody tr:hover th, .compare-table tbody tr:hover td:not(.hl) { background: #f7faff; }
.compare-table .col-hover:not(.hl) { background: #f3f8ff; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table .support-row th, .compare-table .support-row td { color: #0067d8; font-weight: 700; }

/* ---------- Process ---------- */
.p-process { display: grid; grid-template-columns: 1fr 2.3fr; gap: 50px; align-items: center; }
.p-process h2, .p-faq h2 { font-size: clamp(28px, 2.6vw, 42px); line-height: 1.15; color: var(--ink-2); margin: 0 0 16px; }
.p-process-title p, .p-faq-intro p { color: var(--muted); font-size: 14.5px; margin: 0; }
.p-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.p-step { position: relative; }
/* Chevron sits on the step-number line, vertically centred with "01", "02"… */
.p-step:not(:last-child) b::after {
  content: ""; position: absolute; right: -15px; top: 50%; width: 8px; height: 8px;
  border-top: 2px solid var(--blue); border-right: 2px solid var(--blue);
  transform: translateY(-50%) rotate(45deg);
}
.p-step-icon {
  width: 54px; height: 54px; border-radius: 15px;
  display: grid; place-items: center; font-size: 25px; margin-bottom: 16px;
  border: 1px solid #bcdcff; background: linear-gradient(145deg, #f5faff, #e7f2ff); color: var(--blue);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s, background .45s, color .45s;
}
.p-step:hover .p-step-icon { transform: translateY(-5px) rotate(-6deg); background: var(--grad); color: #fff; box-shadow: 0 14px 28px rgba(8,125,245,.3); }
.p-step b { position: relative; display: block; line-height: 20px; font-family: var(--display); font-size: 13px; color: var(--blue); }
.p-step h3 { font-size: 15px; line-height: 1.35; margin: 6px 0 8px; color: var(--ink-2); }
.p-step p { font-size: 13px; color: #65768d; margin: 0; line-height: 1.6; }

/* ---------- FAQ ---------- */
.p-faq { display: grid; grid-template-columns: .9fr 1.6fr; gap: 60px; padding-top: 30px; }
.p-faq-intro .pill { margin-top: 26px; }
.faq-list details {
  border: 1px solid #e0ebf7; border-radius: 14px; background: #fff; margin-bottom: 12px;
  transition: box-shadow .3s, border-color .3s;
}
.faq-list details:hover { border-color: #bcd6f3; }
.faq-list details[open] { box-shadow: 0 14px 30px rgba(13,112,199,.08); border-color: #bcd6f3; }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 18px 22px; font-size: 15px; font-weight: 600; color: var(--ink-2);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-plus { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-plus::before, .faq-plus::after {
  content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; border-radius: 2px;
  background: var(--blue); transition: transform .3s;
}
.faq-plus::after { transform: rotate(90deg); }
details[open] .faq-plus::after { transform: rotate(0); }
.faq-a { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 22px 20px; color: #526b86; font-size: 14.5px; }

/* ---------- CTA ---------- */
.p-cta-wrap { padding: 20px var(--pad-x) 90px; }
.p-cta {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  min-height: 300px; padding: 50px 56px; border-radius: 24px; color: #fff;
  background: linear-gradient(100deg, #061d38, #0d3a66);
  box-shadow: 0 30px 60px rgba(6,29,56,.25);
}
.p-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 70% 30%, rgba(21,119,202,.35), transparent 45%), radial-gradient(circle at 0% 100%, rgba(35,215,241,.12), transparent 40%);
}
.p-cta-copy { position: relative; z-index: 2; }
.p-cta h2 { font-size: clamp(26px, 2.4vw, 36px); line-height: 1.2; font-weight: 700; letter-spacing: -.03em; margin: 0 0 12px; }
.p-cta p { color: #cfe0f2; font-size: 15px; margin: 0 0 24px; }
.p-cta-art { position: relative; height: 250px; perspective: 1200px; }
[data-devices="cta"] .dv-laptop { left: 0; width: 64%; bottom: -34px; transform: rotateY(-12deg) rotateX(4deg); }
.p-cta .hand-note { right: 3%; top: 22%; font-size: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .p-hero-inner { grid-template-columns: 1fr; }
  .p-hero-copy { padding: 10px 0 0; }
  .p-hero-bg { width: 100%; opacity: .35; mask-image: linear-gradient(180deg, transparent 20%, #000 70%); }
  .p-hero-art { height: 440px; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(3)::before { display: none; }
  .plan-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 2);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 20px 4px 24px; margin: 0 -4px;
  }
  .plan-grid::-webkit-scrollbar { display: none; }
  .plan-card { scroll-snap-align: start; }
  .compare-inner, .p-process, .p-faq { grid-template-columns: 1fr; gap: 32px; }
  .p-steps { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .p-step:nth-child(3) b::after { display: none; }
  .p-cta { grid-template-columns: 1fr; }
  .p-cta .hand-note { display: none; }
}

@media (max-width: 860px) {
  .plans-aside { margin-top: 22px; max-width: none; justify-content: space-between; }
}

@media (max-width: 640px) {
  .p-hero h1 em { white-space: normal; }
  .p-hero { padding-top: 92px; }
  .p-hero h1 { font-size: 33px; }
  .p-hero-copy > p { font-size: 15px; }
  .p-hero-art { height: 290px; }
  [data-devices="hero"] .dv-laptop { left: 2%; width: 78%; bottom: 60px; }
  [data-devices="hero"] .dv-phone { right: 0; width: 20%; bottom: 52px; }
  .glass-tag { display: none; }
  .p-hero-art .hand-note { display: none; }
  .trust-item { padding: 16px 14px; gap: 10px; }
  .trust-icon { width: 40px; height: 40px; font-size: 20px; border-radius: 11px; }
  .trust-item strong { font-size: 19px; }
  .trust-item small { font-size: 11.5px; }
  .trust-item:nth-child(odd)::before { display: none; }
  .plans { padding-top: 100px; }
  .plan-grid { grid-auto-columns: 88%; gap: 16px; }
  .plan-card { padding: 26px 22px 28px; }
  .compare { padding: 70px var(--pad-x); }
  .p-steps { grid-template-columns: 1fr 1fr; }
  .p-step b::after { display: none; }
  .p-cta-wrap { padding-bottom: 70px; }
  .p-cta { padding: 34px 24px 0; }
  .p-cta-art { height: 190px; }
  [data-devices="cta"] .dv-laptop { left: 6%; width: 88%; bottom: -26px; }
}

@media (prefers-reduced-motion: reduce) {
  .glass-tag, [data-devices="hero"] .dv { animation: none; }
  .plan-card.reveal:not(.in) { transform: none; }
}

/* =========================================================
   Scroll transitions — only at the start and the end of the page, so the
   pricing content in between stays calm and easy to scan.
   html.fx-on is set by pricing.js.
   --in  : 0→1 while a section enters the viewport
   --out : 0→1 while the next section covers it
   ========================================================= */
html.fx-on main { overflow-x: clip; } /* clip (not hidden) keeps sticky working */

/* Start: hero content drifts down and fades while the photo slowly zooms in */
html.fx-on .p-hero-inner { transform: translateY(calc(var(--out, 0) * 140px)) scale(calc(1 - var(--out, 0) * .06)); opacity: calc(1 - var(--out, 0) * .8); }
html.fx-on .p-hero-bg { transform: scale(calc(1 + var(--out, 0) * .18)); }

/* End: FAQ sticks and tips backwards; the CTA card slides over it and flips up out of depth */
html.fx-on .p-faq, html.fx-on .p-cta-wrap { position: sticky; will-change: transform; }
html.fx-on .p-faq { z-index: 1; background: #fff; transform-origin: 50% 100%; transform: perspective(1400px) rotateX(calc(var(--out, 0) * 16deg)); }
html.fx-on .p-faq::after {
  content: ""; position: absolute; inset: 0; z-index: 20; pointer-events: none;
  background: #020d18; opacity: calc(var(--out, 0) * .55);
}
html.fx-on .p-cta-wrap { z-index: 2; background: #fff; border-radius: 34px 34px 0 0; box-shadow: 0 -26px 60px rgba(8,30,60,.16); }
html.fx-on .p-cta {
  transform-origin: 50% 100%;
  transform: perspective(1400px) rotateX(calc((1 - var(--in, 1)) * 28deg)) scale(calc(.8 + var(--in, 1) * .2));
}
html.fx-on .footer { position: relative; z-index: 3; }
@media (max-width: 640px) {
  html.fx-on .p-cta-wrap { border-radius: 24px 24px 0 0; }
}
