/*
 * Same token system and layout scales as the sister store sites (type scale, spacing scale, radii, fixed
 * blurred header, ghost hero, pill buttons, 0fr -> 1fr accordion). The palette is Reampo's light theme
 * (A050 ui/theme/Color.kt: colorBrand #EF0606, brand gradient #FF6364 → #CD0004, text #05141D).
 */

:root {
  /* Type scale */
  --font-size-00: 0.8125rem;
  --font-size-0: 0.9375rem;
  --font-size-1: 1.0625rem;
  --font-size-2: 1.1875rem;
  --font-size-3: 1.3125rem;
  --font-size-4: 1.625rem;
  --font-size-5: 2rem;
  --font-size-6: 2.25rem;
  --font-size-7: 2.5rem;
  --font-size-8: 3rem;
  --font-size-9: 4rem;
  --font-size-fluid-2: clamp(1.625rem, 1.023rem + 3.01vw, 3.25rem);
  --font-size-fluid-4: clamp(2.375rem, 1.523rem + 4.26vw, 4.625rem);

  --line-0: 1.1;
  --line-1: 1.2;
  --line-3: 1.55;
  --line-4: 1.75;
  --tracking-tight: -0.02em;

  /* Spacing */
  --size-1: 0.25rem;
  --size-2: 0.5rem;
  --size-3: 0.75rem;
  --size-4: 1rem;
  --size-5: 1.25rem;
  --size-6: 1.5rem;
  --size-7: 1.75rem;
  --size-8: 2rem;
  --size-10: 2.5rem;
  --size-12: 3rem;
  --size-16: 4rem;
  --size-20: 5rem;
  --size-24: 6rem;
  --size-32: 8rem;
  --size-40: 10rem;

  --radius-1: 0.25rem;
  --radius-2: 0.625rem;
  --radius-3: 1rem;
  --radius-4: 2rem;
  --radius-round: 100vmax;

  /* Surfaces — white, bgSoftSurface #FAFAFA and the pale brand washes (bgBrandSoft, bgBrandPale). */
  --base: #ffffff;
  --raised: #fafafa;
  --panel: #fef4f4;
  --panel-strong: #fde6e6;
  --chip: #f4f4f4;
  --line: rgba(5, 20, 29, 0.08);
  --line-strong: rgba(5, 20, 29, 0.14);

  /* Accents — colorBrand for links and focus, the brand gradient for buttons. */
  --accent: #ef0606;
  --accent-strong: #cd0004;
  --violet: #fcc8c8;
  --violet-deep: #cd0004;

  /* Text — Chữ chính / Chữ phụ. */
  --ink: #05141d;
  --body: #2d2b29;
  --muted: #50545b;
  --muted-deep: #797979;

  --grad-pearl: linear-gradient(180deg, #ff6364 0%, #ef0606 55%, #cd0004 100%);
  --grad-title: linear-gradient(100deg, #cd0004 0%, #ef0606 40%, #ff6364 60%, #ef0606 80%, #cd0004 100%);
  --grad-panel: linear-gradient(135deg, #fde6e6 0%, #fff 60%, #fef4f4 100%);

  --site-width: 73.75rem;
  --layout-y: clamp(4rem, 2.364rem + 8.18vw, 8.5rem);
  --layout-x: var(--size-8);
  --header-height: 5rem;

  --font-body: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 30rem) {
  :root { --layout-x: var(--size-16); }
}
@media (min-width: 48rem) {
  :root { --layout-x: var(--size-24); --header-height: 5.4375rem; }
}
@media (min-width: 64rem) {
  :root { --layout-x: var(--size-32); }
}
@media (min-width: 90rem) {
  :root { --layout-x: var(--size-40); }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  font-family: var(--font-body);
  color: var(--body);
  background-color: var(--base);
  color-scheme: light;
  -webkit-tap-highlight-color: rgb(0 0 0 / 0);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--size-4));
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: var(--line-3);
  min-height: 100%;
}

img, svg, video, canvas, picture { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, li { overflow-wrap: break-word; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); }
em { font-style: italic; }

:focus-visible {
  outline: 0.1875rem solid var(--accent);
  outline-offset: 0.1875rem;
}

::selection { background: var(--violet); color: var(--ink); }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: var(--size-4);
  top: var(--size-4);
  z-index: 10;
  padding: var(--size-3) var(--size-4);
  color: var(--base);
  background: var(--accent);
  border-radius: var(--radius-2);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- header */

.header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  isolation: isolate;
  height: var(--header-height);
  padding: var(--size-2) var(--layout-x);
}
.header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: color-mix(in srgb, var(--base) 82%, transparent);
  backdrop-filter: blur(0.75rem);
  border-bottom: 0.0625rem solid var(--line);
}
.header__content {
  display: flex;
  align-items: center;
  gap: var(--size-4);
  max-width: var(--site-width);
  height: 100%;
  margin: 0 auto;
}
.header-placeholder { height: var(--header-height); }

.logo {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--size-3);
  font-family: var(--font-display);
  font-size: var(--font-size-3);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.logo__mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-2);
}

.menu-button {
  cursor: pointer;
  z-index: 2;
  margin-left: auto;
  margin-right: calc(var(--size-4) * -1);
  padding: var(--size-4);
  background: transparent;
  border: 0;
}
.menu-button__line {
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  margin-top: 0.3125rem;
  background: var(--ink);
  border-radius: var(--radius-3);
  transform-origin: center;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-button__line:last-child { margin-bottom: 0.3125rem; }
.menu-button[aria-expanded="true"] .menu-button__line:first-child { transform: translateY(0.4375rem) rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-button__line:nth-child(2) { opacity: 0; transform: scale(0.7); }
.menu-button[aria-expanded="true"] .menu-button__line:last-child { transform: translateY(-0.4375rem) rotate(-45deg); }

.nav { display: none; }
.nav.is-open {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--size-1);
  padding: calc(var(--header-height) + var(--size-6)) var(--size-6) var(--size-16);
  overflow-y: auto;
  background: var(--base);
}
.nav__link {
  display: block;
  padding: var(--size-4) var(--size-2);
  font-size: var(--font-size-3);
  color: var(--muted);
  text-align: center;
  transition: color 0.3s;
}
.nav__link--active { color: var(--ink); font-weight: 600; }
.nav__cta { margin-top: var(--size-4); }

@media (min-width: 64rem) {
  .menu-button { display: none; }
  .nav {
    display: flex;
    align-items: center;
    gap: var(--size-1);
    margin-left: auto;
  }
  .nav__link {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    padding: var(--size-3) var(--size-3);
    font-size: var(--font-size-0);
  }
  /* Reserve the bold width up front so the active state never nudges the row. */
  .nav__link::after {
    content: attr(data-text);
    height: 0;
    overflow: hidden;
    font-weight: 600;
    visibility: hidden;
    pointer-events: none;
  }
  .nav__link:not(.nav__link--active):hover { color: var(--ink); }
  .nav__cta { margin: 0 0 0 var(--size-3); }
}

/* --------------------------------------------------------------- buttons */

.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--size-2);
  padding: var(--size-4) var(--size-6);
  font-size: var(--font-size-0);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  border: 0.0625rem solid transparent;
  border-radius: var(--radius-round);
  transition: box-shadow 0.3s, transform 0.3s, background-color 0.3s, color 0.3s;
}
.button--dark { color: #fff; background: var(--grad-pearl); border-color: transparent; font-weight: 600; box-shadow: 0 10px 24px rgba(239, 6, 6, 0.28); }
.button--dark:hover { box-shadow: rgb(201 214 242 / 0.3) 0 0 0 0.25rem; transform: translateY(-1px); }
.button--brand { color: #fff; background: var(--grad-pearl); border-color: transparent; font-weight: 600; box-shadow: 0 10px 24px rgba(239, 6, 6, 0.28); }
.button--brand:hover { box-shadow: rgb(201 214 242 / 0.3) 0 0 0 0.25rem; }
.button--small { padding: var(--size-2) var(--size-4); }

.link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.0625rem;
}
.link:hover { color: var(--ink); }

/* -------------------------------------------------------------- sections */

.section { padding: var(--layout-y) var(--layout-x); }
/* A section right under the page banner already has the banner's breathing room above it, and the
   last one already has the footer's own top padding below it — otherwise the gaps stack twice. */
.page-title + .section { padding-top: var(--size-16); }
main > .section:last-child { padding-bottom: var(--size-16); }
.section--alt { background: var(--raised); }
.section__container { max-width: var(--site-width); margin: 0 auto; }
.section__container--narrow { max-width: 48rem; }

.eyebrow {
  margin-bottom: var(--size-3);
  font-size: var(--font-size-00);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.section__title {
  font-size: var(--font-size-fluid-2);
  font-weight: 700;
  line-height: var(--line-1);
  letter-spacing: var(--tracking-tight);
}
.section__title--center { text-align: center; }
.section__title--small { margin-top: var(--size-16); font-size: var(--font-size-4); }
.section__lead {
  max-width: 42rem;
  margin-top: var(--size-4);
  font-size: var(--font-size-2);
  color: var(--muted);
}
.section__more { margin-top: var(--size-8); }

/* ------------------------------------------------------------------- faq */

.faq { display: flex; flex-direction: column; gap: var(--size-4); margin-top: var(--size-10); }
.faq__item {
  overflow: hidden;
  background: var(--panel);
  border: 0.0625rem solid var(--line-strong);
  border-radius: var(--size-3);
  transition: border-color 0.2s ease;
}
.faq__item--open { border-color: var(--accent); }
.faq__question { margin: 0; }
.faq__button {
  cursor: pointer;
  display: flex;
  gap: var(--size-4);
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--size-5) var(--size-6);
  font-family: var(--font-display);
  font-size: var(--font-size-1);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
}
.faq__icon {
  flex-shrink: 0;
  font-size: var(--font-size-4);
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.32s ease;
}
.faq__item--open .faq__icon { transform: rotate(45deg); }
.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}
.faq__item--open .faq__answer { grid-template-rows: 1fr; }
.faq__answer-inner { overflow: hidden; padding: 0 var(--size-6); }
.faq__item--open .faq__answer-inner { padding-bottom: var(--size-6); }
.faq__answer-inner p { color: var(--muted); }

/* ----------------------------------------------------------------- facts */

.facts {
  margin-top: var(--size-10);
  background: var(--panel);
  border: 0.0625rem solid var(--line-strong);
  border-radius: var(--radius-3);
  overflow: hidden;
}
.facts__row {
  display: grid;
  gap: var(--size-1);
  padding: var(--size-4) var(--size-6);
  border-bottom: 0.0625rem solid var(--line);
}
.facts__row:last-child { border-bottom: 0; }
.facts__row dt { font-size: var(--font-size-0); font-weight: 600; color: var(--muted-deep); }
.facts__row dd { margin: 0; color: var(--body); overflow-wrap: anywhere; }
@media (min-width: 40rem) {
  .facts__row { grid-template-columns: 14rem 1fr; align-items: baseline; gap: var(--size-6); }
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-6);
  margin-top: var(--size-12);
  padding: var(--size-8);
  color: var(--ink);
  background: var(--grad-panel);
  border: 0.0625rem solid var(--violet);
  border-radius: var(--radius-3);
}
.cta--soft { background: var(--panel); border-color: var(--line-strong); }
.cta__title { font-size: var(--font-size-4); font-weight: 700; letter-spacing: var(--tracking-tight); }
.cta__body { margin-top: var(--size-2); opacity: 0.85; }

.prose-list {
  margin-top: var(--size-6);
  padding-left: var(--size-6);
  display: grid;
  gap: var(--size-3);
  color: var(--muted);
}
.prose-list strong { color: var(--ink); }

/* ------------------------------------------------------------ page title */

.page-title {
  padding: var(--size-16) var(--layout-x);
  background: linear-gradient(94.67deg, var(--panel-strong), rgb(255 255 255 / 0) 96.68%, var(--panel-strong));
  border-bottom: 0.0625rem solid var(--line);
}
.page-title__container { max-width: var(--site-width); margin: 0 auto; }
.page-title__title {
  font-size: var(--font-size-fluid-4);
  font-weight: 700;
  line-height: var(--line-0);
  letter-spacing: var(--tracking-tight);
}
.page-title__description { margin-top: var(--size-6); max-width: 46rem; font-size: var(--font-size-2); color: var(--muted); }
.page-title__meta { margin-top: var(--size-4); font-size: var(--font-size-0); color: var(--muted-deep); }

@media (max-width: 47.99rem) {
  .page-title { padding-top: var(--size-10); padding-bottom: var(--size-10); }
  .page-title__description { margin-top: var(--size-4); font-size: var(--font-size-1); }
}

/* ------------------------------------------------------------- not found */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--size-4);
  min-height: 60vh;
  padding: var(--size-16) var(--layout-x);
  text-align: center;
}
.not-found__title {
  font-family: var(--font-display);
  font-size: var(--font-size-9);
  font-weight: 700;
  line-height: var(--line-0);
  color: var(--accent);
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.not-found__subtitle { font-family: var(--font-display); font-size: var(--font-size-fluid-2); font-weight: 700; color: var(--ink); }
.not-found__description { max-width: 30rem; color: var(--muted); }
.not-found .button { margin-top: var(--size-4); }

/* ---------------------------------------------------------------- footer */

.footer { padding: var(--size-20) var(--layout-x) var(--size-8); background: var(--raised); border-top: 0.0625rem solid var(--line); }
.footer__container {
  display: grid;
  gap: var(--size-12);
  max-width: var(--site-width);
  margin: 0 auto;
}
@media (min-width: 56rem) { .footer__container { grid-template-columns: 1.2fr 2fr; } }
.footer__pitch { margin-top: var(--size-4); max-width: 26rem; font-size: var(--font-size-0); color: var(--muted); }
.footer__links { display: grid; gap: var(--size-8); grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.footer__group { display: grid; gap: var(--size-2); align-content: start; }
.footer__group a { font-size: var(--font-size-0); color: var(--muted); }
.footer__group a:hover { color: var(--accent); }
.footer__group-title { font-size: var(--font-size-00); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }

.footer__note {
  max-width: var(--site-width);
  margin: var(--size-12) auto 0;
  font-size: var(--font-size-00);
  line-height: var(--line-4);
  color: var(--muted-deep);
}

.copyright {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-2) var(--size-6);
  justify-content: space-between;
  max-width: var(--site-width);
  margin: var(--size-6) auto 0;
  padding-top: var(--size-6);
  font-size: var(--font-size-00);
  color: var(--muted-deep);
  border-top: 0.0625rem solid var(--line-strong);
}
