/* ENCARGO — site.css
   Palette and type match the printed flyer. No gradients (except the hero rib texture),
   no shadows, no rounded corners, no icons. */

/* ---------- Fonts (self-hosted, subset) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/inter-400.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/inter-500.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/inter-tight-700.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/fonts/inter-tight-800.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212; }
/* Chinese: unicode-range keeps the English page from ever downloading these. */
@font-face { font-family: "Noto Sans SC"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/noto-sans-sc-400.woff2?v=2") format("woff2");
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF; }
@font-face { font-family: "Noto Sans SC"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/noto-sans-sc-700.woff2?v=2") format("woff2");
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF; }

/* ---------- Tokens ---------- */
:root {
  --paper: #F4F1EA;
  --navy: #0B1F3A;
  --red: #D7382F;
  --navy-muted: rgba(11, 31, 58, .65);    /* labels on paper — 5.0:1 (60% is 4.3:1, below AA) */
  --paper-muted: rgba(244, 241, 234, .7); /* labels on navy — 7.7:1 */
  --hairline: 1px solid var(--navy);
  --hairline-inv: 1px solid rgba(244, 241, 234, .3);
  --sans: "Inter", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Inter Tight", "Inter", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --gutter: 1.25rem;
  --header-h: 4rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
:lang(zh-Hans) body, body:lang(zh-Hans) { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 500; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
table { border-collapse: collapse; width: 100%; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--navy); color: var(--paper); padding: .75rem 1rem;
}
.skip:focus { top: .75rem; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow > * { max-width: 46rem; }

/* ---------- Type ---------- */
.label {
  font-family: var(--display);
  font-weight: 700;
  font-size: .8125rem;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy-muted);
}
:lang(zh-Hans) .label { letter-spacing: .08em; font-size: .875rem; }
.section-title, .bond-title, .contact-title, .hero h1 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.05;
}
:lang(zh-Hans) .section-title, :lang(zh-Hans) .bond-title,
:lang(zh-Hans) .contact-title, :lang(zh-Hans) .hero h1 { letter-spacing: 0; line-height: 1.3; }
.section-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); margin-bottom: 2.5rem; max-width: 18ch; }
:lang(zh-Hans) .section-title { max-width: none; }
.fine { font-size: .875rem; color: var(--navy-muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: var(--hairline);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; flex-wrap: wrap; }
.brand img { height: 26px; width: auto; }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1.5rem; padding-block: .5rem; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-nav a { font-weight: 500; font-size: .9375rem; text-decoration: none; padding-block: .25rem; display: inline-block; }
.site-nav a:hover { text-decoration: underline; }
.lang-switch { font-size: .9375rem; display: flex; gap: .5rem; align-items: center; }
.lang-switch [aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.lang-switch span { color: var(--navy-muted); }
/* System CJK font for the "中文" link, so the English page never downloads Noto Sans SC for two glyphs */
.lang-switch [lang="zh-Hans"] { font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
.nav-toggle { display: none; }

/* JS present + small screen: collapse nav behind a toggle. Without JS the nav simply wraps. */
@media (max-width: 959.98px) {
  .js .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; margin-right: -.5rem;
    background: none; border: 0; color: var(--navy); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 1.375rem; height: 2px; background: currentColor; position: relative;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

  .js .site-nav { display: none; }
  .js .site-nav.is-open {
    display: block; flex: 0 0 auto; width: calc(100% + 2 * var(--gutter));
    border-top: var(--hairline); margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 1rem;
  }
  .js .site-nav.is-open ul { display: block; }
  .js .site-nav.is-open li { border-bottom: 1px solid rgba(11, 31, 58, .15); }
  .js .site-nav.is-open li a { display: block; padding-block: .8rem; font-size: 1.0625rem; }
  .js .site-nav.is-open .lang-switch { padding-top: 1rem; font-size: 1.0625rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1875rem; /* 19px bold = WCAG "large text" (paper on vermilion is 4.1:1) */
  line-height: 1.2;
  text-decoration: none;
  padding: .9rem 1.5rem;
  border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn-primary:hover { background: var(--paper); border-color: var(--paper); color: var(--red); }
.btn-outline { border-color: var(--paper); color: var(--paper); }
.btn-outline:hover { background: var(--paper); color: var(--navy); }

/* ---------- 1 · Hero ---------- */
.hero {
  background-color: var(--navy);
  /* vertical ribs, ~4% paper over navy */
  background-image: repeating-linear-gradient(90deg,
    rgba(244, 241, 234, .04) 0 2px, transparent 2px 22px,
    rgba(244, 241, 234, .025) 22px 23px, transparent 23px 41px);
  color: var(--paper);
  padding-block: clamp(3.5rem, 2rem + 8vw, 8rem) clamp(3.5rem, 2rem + 6vw, 6.5rem);
}
.hero-grid { display: grid; gap: 3rem; }
.hero h1 { font-size: clamp(2.375rem, 1.3rem + 4.6vw, 4.75rem); max-width: 15ch; }
:lang(zh-Hans) .hero h1 { max-width: 14em; font-size: clamp(2rem, 1.2rem + 3.6vw, 3.75rem); }
.hero-sub { margin-top: 1.75rem; max-width: 36rem; font-size: 1.125rem; color: var(--paper); }
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .875rem; }
.price-block {
  border-top: 6px solid var(--red); padding-top: 1.25rem; align-self: end;
  min-width: 0;                  /* let the grid item shrink to its columns */
  container-type: inline-size;   /* price size is capped by this block's width (cqi below) */
}
.price-block .label { color: var(--paper-muted); }
.price-figure {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  /* "$11,500" is ~4.02em wide: 23cqi keeps it within ~93% of the block at every width */
  font-size: min(clamp(3rem, 6.5vw, 5.5rem), 23cqi);
  line-height: 1;
  letter-spacing: -.03em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-block: .4rem .6rem;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 2.5rem + 6vw, 7.5rem); border-top: var(--hairline); }
.hero + .section { border-top: 0; }
.section-rule .section-title::before {
  content: ""; display: block; width: 3rem; height: 4px; background: var(--red); margin-bottom: 1.5rem;
}

/* 2 · Why */
.why-grid { display: grid; gap: 2.5rem 2rem; }
.why-grid li { border-top: var(--hairline); padding-top: 1.25rem; }
.why-grid .label, .two-col .label { color: var(--navy); margin-bottom: .75rem; }

/* 3 · Pricing */
.programs { display: grid; gap: 3.5rem 2rem; margin-top: 2.5rem; }
.price-table caption {
  text-align: left;
  font-family: var(--display); font-weight: 800; font-size: 1.625rem; letter-spacing: -.015em; line-height: 1.2;
  padding-bottom: 1.25rem;
}
.price-table caption .label { display: block; margin-bottom: .35rem; letter-spacing: .12em; }
.price-table tr { border-top: var(--hairline); }
.price-table tbody tr:last-child { border-bottom: var(--hairline); }
.price-table th, .price-table td { padding: 1rem 0; vertical-align: baseline; }
.price-table th { text-align: left; font-weight: 400; padding-right: 1rem; }
.price-table td {
  text-align: right; white-space: nowrap;
  font-family: var(--display); font-weight: 700; font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
}
.note { margin-top: 1rem; font-size: .9375rem; color: var(--navy-muted); }
.after-tables { margin-top: 3rem; max-width: 46rem; font-weight: 500; }

/* Stacked rows on narrow screens */
@media (max-width: 479.98px) {
  .price-table tr { display: block; padding-block: .875rem; }
  .price-table th, .price-table td { display: block; padding: 0; text-align: left; }
  .price-table td { margin-top: .15rem; }
}

/* 4 · Included */
.two-col { display: grid; gap: 3rem 2rem; }
.list li { border-top: var(--hairline); padding-block: .9rem; }
.list li:last-child { border-bottom: var(--hairline); }

/* 5 · How */
.steps { display: grid; gap: 2.5rem 2rem; counter-reset: none; }
.steps li { border-top: var(--hairline); padding-top: 1.25rem; }
.step-num {
  display: block;
  font-family: var(--display); font-weight: 800; font-size: 3.5rem; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--red);
  margin-bottom: 1rem;
}
.steps strong { display: block; font-family: var(--display); font-weight: 700; font-size: 1.1875rem; line-height: 1.35; margin-bottom: .35rem; }

/* 6 · Bond */
.bond-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); margin-block: 1rem 1.5rem; }
#guarantee .fine { margin-top: 1.5rem; }

/* 7 · FAQ */
.faq { max-width: 52rem; border-bottom: var(--hairline); }
.faq details { border-top: var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  font-family: var(--display); font-weight: 700; font-size: 1.1875rem; line-height: 1.35;
  padding: 1.25rem 2.5rem 1.25rem 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: 1.1rem;
  font-family: var(--display); font-weight: 400; font-size: 1.625rem; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 1.5rem; max-width: 44rem; }

/* ---------- 8 · Contact ---------- */
.contact { background: var(--navy); color: var(--paper); padding-block: clamp(4rem, 2.5rem + 6vw, 7.5rem); }
.contact-title { font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); max-width: 20ch; margin-bottom: 3rem; }
:lang(zh-Hans) .contact-title { max-width: 16em; }
.contact .label { color: var(--paper-muted); }
.tiles { display: grid; gap: 2rem; }
.tile { border-top: var(--hairline-inv); padding-top: 1.25rem; }
.tile-value { font-family: var(--display); font-weight: 700; font-size: 1.25rem; margin-top: .35rem; overflow-wrap: anywhere; }
.tile-value a { text-decoration-color: var(--red); }
.qr-img { width: 220px; height: 220px; margin-top: 1rem; } /* ≥180px keeps it scannable */
.tile-caption { margin-top: .75rem; font-size: .9375rem; color: var(--paper-muted); max-width: 22rem; }
.brochure { margin-top: 3rem; font-family: var(--display); font-weight: 700; font-size: 1.125rem; }
.brochure a::after { content: " \2192"; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.5rem 3rem; border-top: var(--hairline); }
.footer-id { font-size: .9375rem; margin-bottom: .75rem; }
.footer-id strong { font-family: var(--display); font-weight: 700; }
.footer-id a { white-space: nowrap; }
.site-footer .fine + .fine { margin-top: .5rem; }

/* ---------- Grid breakpoints (12-col at desktop) ---------- */
@media (min-width: 640px) {
  :root { --gutter: 2rem; }
  .why-grid, .tiles, .steps { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  body { font-size: 1.125rem; }
  .site-nav { padding-block: 0; }
  .hero-grid, .programs, .two-col { grid-template-columns: repeat(12, 1fr); column-gap: 2rem; }
  .hero-copy { grid-column: 1 / span 8; }
  .price-block { grid-column: 9 / span 4; }
  .program:first-child { grid-column: 1 / span 6; }
  .program:last-child { grid-column: 7 / span 6; }
  .two-col > :first-child { grid-column: 1 / span 7; }
  .two-col > :last-child { grid-column: 8 / span 5; }
  .why-grid, .tiles, .steps { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1100px) {
  .program:last-child { grid-column: 8 / span 5; }
}
