@import url("https://fonts.googleapis.com/css2?family=Spectral:wght@400;500;600&family=Hanken+Grotesk:wght@400;500;600&display=swap");

:root {
  --mist: #f2f4f5;
  --paper: #ffffff;
  --ink: #1c2733;
  --muted: #56636f;
  --spruce: #14453f;
  --spruce-deep: #0d302c;
  --brass: #a9823a;
  --rule: #d3dadf;
  --serif: "Spectral", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--spruce); text-underline-offset: 3px; }
a:hover { color: var(--spruce-deep); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }

/* Thanh trên cùng */
.bar { max-width: 1120px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.brand span { font-family: var(--sans); font-size: .8rem; font-weight: 500; letter-spacing: .02em; color: var(--muted); margin-left: 8px; }
.bar nav { display: flex; gap: 22px; font-size: .95rem; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover { color: var(--ink); }

/* Hero */
.hero { background: var(--spruce); color: #e9efed; }
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 72px 24px 120px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); color: #fff; max-width: 15ch; }
.hero .lede { font-size: 1.12rem; max-width: 46ch; margin: 22px 0 0; color: #c9d6d3; }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.18); }
.facts li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.18); display: flex; justify-content: space-between; gap: 16px; font-size: .95rem; color: #c9d6d3; }
.facts b { color: #fff; font-weight: 500; text-align: right; }

/* Rate card */
.rate { max-width: 1120px; margin: -72px auto 0; padding: 0 24px; }
.rate-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 30px 60px -40px rgba(13, 48, 44, .45); }
.step { padding: 32px 40px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.step-head { display: flex; gap: 14px; align-items: baseline; }
.step-num { font-family: var(--serif); font-size: 1.5rem; color: var(--brass); line-height: 1; }
.step-head h2 { font-size: 1.35rem; }
.email input, .custom-amt input { font: inherit; color: var(--ink); width: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); }
.email input:focus, .custom-amt input:focus { border-color: var(--spruce); outline: 2px solid rgba(20, 69, 63, .15); outline-offset: 0; }
.email { max-width: 460px; }
.hint { font-size: .88rem; color: var(--muted); margin: 8px 0 0; }

.packages { list-style: none; margin: 0; padding: 0; }
.pkg { display: grid; grid-template-columns: minmax(0, 1.25fr) 170px 120px 150px; gap: 24px; align-items: center; padding: 22px 40px; border-bottom: 1px solid var(--rule); }
.pkg:last-child { border-bottom: 0; }
.pkg h3 { font-size: 1.25rem; }
.pkg p { margin: 4px 0 0; font-size: .92rem; color: var(--muted); max-width: 52ch; }
.slots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.slots i { display: block; height: 14px; border-radius: 1px; background: #e5eaed; }
.slots i.on { background: var(--spruce); }
.slots-label { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.price { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; text-align: right; }
.price small { display: block; font-family: var(--sans); font-size: .75rem; color: var(--muted); }
.pkg.featured { background: #f7f9f8; }
.pkg.featured .price { color: var(--brass); }

.btn { font: 600 .95rem var(--sans); cursor: pointer; border: 1px solid var(--spruce); background: var(--spruce); color: #fff; padding: 12px 16px; border-radius: 3px; width: 100%; transition: background-color .15s; }
.btn:hover { background: var(--spruce-deep); }
.btn.ghost { background: var(--paper); color: var(--spruce); }
.btn.ghost:hover { background: var(--spruce); color: #fff; }

.custom { padding: 28px 40px 32px; background: var(--mist); border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.custom h3 { font-size: 1.25rem; margin-bottom: 6px; }
.custom p { font-size: .92rem; color: var(--muted); max-width: 60ch; }
.custom p:last-child { margin-bottom: 0; }
.custom-amt { display: flex; align-items: center; gap: 0; }
.custom-amt span { padding: 12px 12px; border: 1px solid var(--rule); border-right: 0; border-radius: 3px 0 0 3px; background: #e9edef; color: var(--muted); font-weight: 600; }
.custom-amt input { border-radius: 0 3px 3px 0; font-size: 1.1rem; }
.custom-pay { display: flex; flex-direction: column; gap: 10px; }

/* Nội dung dưới */
.section { max-width: 1120px; margin: 0 auto; padding: 88px 24px 0; }
.section > h2 { font-size: 2rem; margin-bottom: 28px; }
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: s; }
.process li { border-top: 2px solid var(--spruce); padding-top: 18px; counter-increment: s; }
.process li::before { content: counter(s); font-family: var(--serif); font-size: 2.4rem; color: var(--brass); display: block; line-height: 1; margin-bottom: 12px; }
.process h3 { font-size: 1.2rem; margin-bottom: 8px; }
.process p { color: var(--muted); font-size: .95rem; margin: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; }
.policy p { color: #34414d; max-width: 64ch; }
.policy p:first-child { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); line-height: 1.45; }
.contact { border-left: 1px solid var(--rule); padding-left: 32px; font-size: .98rem; }
.contact h3 { font-size: 1.2rem; margin-bottom: 12px; }
.contact address { font-style: normal; color: #34414d; margin-bottom: 16px; }
.contact p { color: var(--muted); }

.foot { max-width: 1120px; margin: 96px auto 0; padding: 28px 24px 40px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; font-size: .87rem; color: var(--muted); }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* Trang văn bản (terms, privacy) và trang Worker (thanks, checkout) */
.sheet .bar { border-bottom: 1px solid var(--rule); max-width: none; }
.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 0; }
.doc h1 { font-size: 2.4rem; margin-bottom: 6px; }
.doc h2 { font-size: 1.3rem; margin: 36px 0 8px; }
.doc p, .doc li { color: #34414d; font-size: 1rem; line-height: 1.7; }
.doc .updated { color: var(--muted); font-size: .9rem; margin-bottom: 32px; }

.receipt { max-width: 640px; margin: 56px auto; padding: 40px; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; }
.receipt h1 { font-size: 2rem; margin-bottom: 14px; }
.receipt p { color: #34414d; }
.receipt table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.receipt th, .receipt td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: .95rem; }
.receipt th { color: var(--muted); font-weight: 400; width: 38%; }
.receipt td { font-weight: 600; word-break: break-all; }
.ref { background: var(--spruce); color: #c9d6d3; border-radius: 3px; padding: 20px; margin: 20px 0; text-align: center; }
.ref span { display: block; font-size: .9rem; }
.ref b { display: block; color: #fff; font-family: var(--serif); font-size: 2.2rem; font-weight: 500; letter-spacing: .08em; }

.order { max-width: 1080px; margin: 24px auto 0; padding: 0 24px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.order span { font-family: var(--serif); font-size: 1.3rem; }
.order b { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--brass); }
#checkout { max-width: 1080px; margin: 16px auto 48px; padding: 0 16px; }
#err { display: none; max-width: 600px; margin: 40px auto; padding: 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 24px 104px; gap: 36px; }
  .step { grid-template-columns: 1fr; gap: 16px; padding: 28px 24px; }
  .pkg { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; padding: 22px 24px; }
  .pkg .slots-wrap { grid-column: 1 / -1; grid-row: 2; }
  .pkg .btn { grid-column: 1 / -1; }
  .custom { grid-template-columns: 1fr; padding: 24px; gap: 20px; }
  .process { grid-template-columns: 1fr; gap: 28px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .contact { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 28px; }
  .receipt { margin: 24px 16px; padding: 28px 22px; }
  .bar nav { display: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.hero .brand { color: #fff; }
.hero .brand span { color: #9fb5b0; }
.hero .bar nav a { color: #c9d6d3; }
.hero .bar nav a:hover { color: #fff; }

/* Link dự phòng Square dưới khung Stripe */
.alt { max-width: 1080px; margin: -24px auto 56px; padding: 0 24px; text-align: center; font-size: .92rem; color: var(--muted); }
.alt button { font: inherit; color: var(--spruce); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
