/* Stamp — paper & stamp design system
   Màu lấy trực tiếp từ Assets.xcassets của app iOS */
:root {
  --brand:        #C1553C;
  --brand-soft:   #D9694E;
  --gold:         #E3B23C;
  --moss:         #7A8B6F;
  --cream:        #F5EDE0;
  --paper:        #FFFAF2;
  --edge:         #E2D5C0;
  --ink:          #2B2724;
  --ink-2:        #7C6F63;
  --shadow:       rgba(43, 39, 36, .12);
  --radius:       18px;
  --maxw:         1120px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand:      #D9694E;
    --brand-soft: #E07C60;
    --gold:       #EFC259;
    --moss:       #94A788;
    --cream:      #17130F;
    --paper:      #221D19;
    --edge:       #3A322B;
    --ink:        #F0E9DF;
    --ink-2:      #B3A596;
    --shadow:     rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(193, 85, 60, .06), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(227, 178, 60, .09), transparent 38%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-soft); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 2.1vw, 1.28rem); color: var(--ink-2); max-width: 46ch; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: clamp(56px, 9vw, 108px) 0; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  border-bottom: 1px solid var(--edge);
}
header.site .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 8px var(--shadow); }
nav.site { margin-left: auto; display: flex; align-items: center; gap: 6px; }
nav.site a { color: var(--ink-2); text-decoration: none; font-size: .94rem; font-weight: 500; padding: 8px 12px; border-radius: 10px; }
nav.site a:hover { color: var(--ink); background: color-mix(in srgb, var(--edge) 45%, transparent); }
@media (max-width: 720px) { nav.site a.hide-sm { display: none; } }
@media (max-width: 560px) {
  nav.site a { display: none; }
  nav.site a.keep-sm { display: inline-block; }
  nav.site { gap: 2px; }
  header.site .wrap { gap: 10px; }
}

.lang {
  display: inline-flex; border: 1px solid var(--edge); border-radius: 999px;
  overflow: hidden; background: var(--paper); margin-left: 6px;
}
.lang button {
  font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: .03em;
  padding: 6px 13px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--brand); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  padding: 14px 26px; border-radius: 14px; border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 32%, transparent); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 38%, transparent); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--edge); }
.btn-ghost:hover { color: var(--ink); transform: translateY(-2px); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.note { font-size: .87rem; color: var(--ink-2); margin-top: 14px; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 84px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600;
  color: var(--ink-2); background: var(--paper); border: 1px solid var(--edge);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--moss); }

/* Con tem — răng cưa bằng mask */
.stamp {
  position: relative; background: var(--paper); padding: 14px;
  filter: drop-shadow(0 14px 30px var(--shadow));
  --p: 9px;
  -webkit-mask:
    radial-gradient(circle at 50% 0, transparent var(--p), #000 calc(var(--p) + .5px)) 50% 0/22px 100% repeat-x,
    radial-gradient(circle at 50% 100%, transparent var(--p), #000 calc(var(--p) + .5px)) 50% 100%/22px 100% repeat-x,
    radial-gradient(circle at 0 50%, transparent var(--p), #000 calc(var(--p) + .5px)) 0 50%/100% 22px repeat-y,
    radial-gradient(circle at 100% 50%, transparent var(--p), #000 calc(var(--p) + .5px)) 100% 50%/100% 22px repeat-y;
  -webkit-mask-composite: source-in;
          mask:
    radial-gradient(circle at 50% 0, transparent var(--p), #000 calc(var(--p) + .5px)) 50% 0/22px 100% repeat-x,
    radial-gradient(circle at 50% 100%, transparent var(--p), #000 calc(var(--p) + .5px)) 50% 100%/22px 100% repeat-x,
    radial-gradient(circle at 0 50%, transparent var(--p), #000 calc(var(--p) + .5px)) 0 50%/100% 22px repeat-y,
    radial-gradient(circle at 100% 50%, transparent var(--p), #000 calc(var(--p) + .5px)) 100% 50%/100% 22px repeat-y;
  mask-composite: intersect;
}
.stamp-art { aspect-ratio: 1; border-radius: 4px; display: grid; place-items: center; overflow: hidden; }
.stamp-cap {
  font-family: var(--font-display); font-size: .95rem; text-align: center;
  padding-top: 10px; color: var(--ink-2);
}

/* Điện thoại giả lập trong hero */
.phone {
  width: min(300px, 78vw); margin: 0 auto; aspect-ratio: 9/19.5;
  background: #141210; border-radius: 42px; padding: 11px;
  box-shadow: 0 30px 60px var(--shadow), 0 0 0 2px color-mix(in srgb, var(--ink) 22%, transparent);
  position: relative;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 32px; overflow: hidden; position: relative;
  background: linear-gradient(170deg, #1c1917 0%, #141210 55%, #0f0d0b 100%);
  display: flex; flex-direction: column;
}
.phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; border-radius: 999px; background: #000; z-index: 3;
}
.phone-slot {
  height: 30%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px;
}
.phone-slot .slot-line { width: 62%; height: 5px; border-radius: 3px; background: #34302c; }
.phone-view {
  flex: 1; margin: 0 16px 16px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(150deg, var(--brand) 0%, #D07A3C 45%, var(--gold) 100%);
  display: grid; place-items: center; position: relative;
}
.phone-view .lens {
  width: 42%; aspect-ratio: 1; border-radius: 50%; background: #221F1C;
  display: grid; place-items: center;
}
.phone-view .lens i { width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--moss); display: block; position: relative; }
.phone-view .lens i::after {
  content: ""; position: absolute; top: 12%; left: 14%; width: 30%; aspect-ratio: 1;
  border-radius: 50%; background: var(--paper); opacity: .92;
}
.phone-shutter {
  height: 88px; display: grid; place-items: center;
}
.phone-shutter span {
  width: 56px; height: 56px; border-radius: 50%; background: var(--paper);
  box-shadow: 0 0 0 4px rgba(255, 250, 242, .22);
}
.hero-visual { position: relative; }
.hero-stamp {
  position: absolute; width: 132px; right: -6px; top: 4%;
  transform: rotate(7deg); z-index: 4;
}
@media (max-width: 900px) { .hero-stamp { right: 4%; } .hero-stamp-2 { left: 2%; } }
@media (max-width: 520px) { .hero-stamp { width: 104px; } .hero-stamp-2 { width: 92px; } }
.hero-stamp .stamp-art { background: linear-gradient(160deg, var(--gold), var(--brand)); }
.hero-stamp-2 { position: absolute; width: 112px; left: -4px; bottom: 8%; transform: rotate(-8deg); z-index: 4; }
.hero-stamp-2 .stamp-art { background: linear-gradient(160deg, var(--moss), #4E6248); }

/* ---------- Cards / features ---------- */
.grid { display: grid; gap: 20px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cols-3, .cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: 0 2px 0 var(--edge);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); margin: 0; font-size: .97rem; }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); margin-bottom: 16px;
}
.card .ico svg { width: 23px; height: 23px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 60px); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 22px 0 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--ink-2); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 17px; height: 17px;
  background: var(--moss);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 0a8 8 0 100 16A8 8 0 008 0zM6.6 11.5 3.5 8.4l1.1-1.1 2 2 4.8-4.8 1.1 1.1z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 0a8 8 0 100 16A8 8 0 008 0zM6.6 11.5 3.5 8.4l1.1-1.1 2 2 4.8-4.8 1.1 1.1z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.checks li strong { color: var(--ink); font-weight: 600; }

/* Dải tem trang trí */
.stamp-strip { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.stamp-strip .stamp { width: 148px; }
.stamp-strip .stamp:nth-child(1) { transform: rotate(-5deg); }
.stamp-strip .stamp:nth-child(2) { transform: rotate(3deg); }
.stamp-strip .stamp:nth-child(3) { transform: rotate(-2deg); }
.stamp-strip .stamp:nth-child(4) { transform: rotate(6deg); }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 820px; margin: 0 auto; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--radius); padding: 30px 26px; }
.plan.featured { border-color: var(--brand); box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 16%, transparent); position: relative; }
.plan.featured::after {
  content: attr(data-tag); position: absolute; top: -12px; right: 22px;
  background: var(--brand); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.price { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; margin: 6px 0 4px; }
.price small { font-size: .95rem; font-family: var(--font-body); color: var(--ink-2); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--paper); border: 1px solid var(--edge); border-radius: 14px;
  padding: 18px 20px; margin-bottom: 12px;
}
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); font-size: .97rem; }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta .inner {
  background: linear-gradient(140deg, var(--brand) 0%, #C7703C 52%, var(--gold) 100%);
  border-radius: 28px; padding: clamp(40px, 6vw, 68px) 26px; color: #fff;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .9); max-width: 48ch; margin-inline: auto; }
.cta .btn-ghost { background: rgba(255, 255, 255, .96); border-color: transparent; color: #2B2724; }
.cta .btn-ghost:hover { color: #2B2724; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--edge); padding: 40px 0 56px; color: var(--ink-2); font-size: .92rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
footer.site nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 20px; }
footer.site a { color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--brand); }

/* ---------- Trang văn bản (privacy / support) ---------- */
.doc { max-width: 760px; margin: 0 auto; }
.doc h2 { font-size: 1.5rem; margin-top: 2.2em; }
.doc h2:first-of-type { margin-top: 1em; }
.doc ul { padding-left: 20px; color: var(--ink-2); }
.doc li { margin-bottom: 8px; }
.doc .updated { font-size: .9rem; color: var(--ink-2); }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--edge); vertical-align: top; }
.doc th { font-weight: 600; color: var(--ink); }
.doc td { color: var(--ink-2); }
.doc .callout {
  background: var(--paper); border: 1px solid var(--edge); border-left: 4px solid var(--moss);
  border-radius: 12px; padding: 18px 20px; margin: 22px 0;
}
.doc .callout p:last-child { margin-bottom: 0; }

/* ---------- Ngôn ngữ ---------- */
[data-lang-block] { display: none; }
[data-lang-block].on { display: block; }

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

/* ---------- Mục lục trang pháp lý ---------- */
.toc {
  background: var(--paper); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 22px 24px; margin: 26px 0 34px;
}
.toc h2 {
  font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px;
}
.toc ol {
  margin: 0; padding: 0; list-style: none; counter-reset: toc;
  columns: 2; column-gap: 28px;
}
@media (max-width: 620px) { .toc ol { columns: 1; } }
.toc li { counter-increment: toc; margin-bottom: 7px; break-inside: avoid; font-size: .95rem; }
.toc li::before { content: counter(toc) "."; color: var(--brand); font-weight: 600; margin-right: 8px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

.doc h3 { font-size: 1.05rem; margin: 1.8em 0 .5em; color: var(--ink); }
.doc h2[id] { scroll-margin-top: 84px; }
.doc .updated code, .doc code {
  font-size: .9em; background: color-mix(in srgb, var(--edge) 45%, transparent);
  padding: 1px 6px; border-radius: 5px;
}
