/* Kolsift marketing site. Plain CSS, system fonts, no build step.
   Contrast: text/background pairs below are >= 4.5:1 (WCAG AA) in both schemes. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #5f5f64;          /* 6.3:1 on #fff, 5.7:1 on #f5f5f7 */
  --line: #d2d2d7;
  --accent: #0060df;          /* 6.1:1 on #fff */
  --accent-hover: #004fb8;
  --on-accent: #ffffff;
  --good: #1a7f37;
  --warn: #9a5b00;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.06);
  --nav-bg: rgba(255,255,255,.78);
  --radius: 22px;
  --radius-sm: 12px;
  --maxw: 1080px;
  --maxw-text: 720px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;        /* 7.9:1 on #000, 6.4:1 on #1c1c1e */
    --line: #3a3a3c;
    --accent: #2f9bff;        /* 7.3:1 on #000 */
    --accent-hover: #6ab6ff;
    --on-accent: #001a33;
    --good: #4cd964;
    --warn: #ffb340;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.5);
    --nav-bg: rgba(0,0,0,.72);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--bg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.container-text { width: min(100% - 40px, var(--maxw-text)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 19px; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 26px; height: 26px; }
.nav-wrap { display: contents; }
.footer-tag { margin-top: 12px; max-width: 34ch; }
.nav-links { display: flex; gap: 4px; margin: 0 auto 0 8px; padding: 0; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--text-2); text-decoration: none; font-size: 14px; border-radius: 8px;
}
.nav-links a { white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav-cta { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text);
  border-radius: 10px; cursor: pointer;
}
.nav-toggle svg { margin: auto; width: 22px; height: 22px; }

/* Language switch (EN / VI). Needs JavaScript, so it stays hidden without it. */
.lang-switch { display: none; order: 5; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.js .lang-switch { display: inline-flex; }
.lang-switch button {
  display: inline-flex; align-items: center; gap: 6px; min-width: 36px; height: 28px; padding: 0 10px 0 8px; border: 0; border-radius: 999px; background: transparent;
  color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .04em; cursor: pointer;
}
.lang-switch img { display: block; height: 12px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(128,128,128,.45); opacity: .7; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button:hover img { opacity: 1; }
.lang-switch button[aria-pressed="true"] img { opacity: 1; box-shadow: 0 0 0 1px rgba(128,128,128,.6); }
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav-cta { order: 6; }
.lang-notice { margin-top: 12px; }
/* Vietnamese readers: hold the page back for a moment so English never flashes. A script removes the class. */
html.i18n-wait body { visibility: hidden; }

@media (max-width: 1160px) { .nav-cta { display: none; } }
@media (max-width: 880px) {
  .nav { gap: 12px; flex-wrap: wrap; }
  .nav-cta { display: none; }
  .nav-links { flex-basis: 100%; margin: 0; flex-wrap: wrap; padding-bottom: 8px; }
  .js .nav-toggle { display: inline-flex; margin-left: 0; }
  .lang-switch { order: 0; margin-left: auto; }
  .js .nav-links { display: none; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .js .nav-links.open { display: flex; }
  .js .nav-links a { font-size: 17px; width: 100%; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 48px; }
}

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -.022em; line-height: 1.08; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6.5vw, 4.5rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.4; color: var(--text-2); max-width: 40ch; }
.eyebrow { font-size: .85rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; }
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 8vw, 96px); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.page-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(32px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); margin-bottom: 18px; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Buttons / badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border-radius: 980px; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { color: var(--accent); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 22px 8px 18px;
  background: var(--text); color: var(--bg); border-radius: 14px; text-decoration: none; cursor: default;
}
.store-badge svg { width: 24px; height: 24px; flex: none; }
.store-badge small { display: block; font-size: .72rem; opacity: .85; line-height: 1.1; }
.store-badge strong { display: block; font-size: 1.05rem; line-height: 1.2; letter-spacing: -.01em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }
.pill { display: inline-block; font-size: .75rem; font-weight: 650; padding: 3px 10px; border-radius: 980px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.section-alt .card { border-color: transparent; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); margin-bottom: 18px; }
.icon svg { width: 24px; height: 24px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; padding: 0; margin: 0; list-style: none; grid-template-columns: repeat(4, 1fr); }
.steps li { counter-increment: step; padding-top: 18px; border-top: 2px solid var(--line); }
.steps li::before { content: counter(step); display: block; font-size: .85rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps p { color: var(--text-2); font-size: .95rem; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Photos ---------- */
/* Hero with a photo background. A dark overlay keeps at least 62% black over every pixel, so white text
   stays above 4.5:1 (WCAG AA) even over the brightest part of the picture, in light and dark mode. */
.hero-photo { position: relative; isolation: isolate; background: #000; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; z-index: -2; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.74) 50%, rgba(0,0,0,.64) 100%);
}
@media (max-width: 880px) { .hero-photo::after { background: rgba(0,0,0,.74); } }
.on-photo { --text: #ffffff; --text-2: #e8e8ed; --bg: #000000; --accent: #ffffff; --accent-hover: #e8e8ed; --on-accent: #000000; --line: rgba(255,255,255,.6); }
.on-photo { color: var(--text); }
.on-photo .eyebrow { color: #ffffff; }
.hero-photo .sample-note { color: #e8e8ed; }
.photo { margin: 0; }
.photo img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--bg-alt); }
.photo-wide img { aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 40%; }
.photo-portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 35%; }
.photo figcaption { font-size: .78rem; color: var(--text-2); margin-top: 10px; }
.photo-band { padding: 0 0 clamp(40px, 7vw, 88px); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split.flip .split-text { order: 2; }
.split-text h2 { margin-bottom: 18px; }
.page-hero-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 880px) {
  .split, .page-hero-split { grid-template-columns: 1fr; }
  .split.flip .split-text { order: 0; }
  .photo-portrait img { aspect-ratio: 4 / 3; object-position: 50% 30%; }
}
.photo-card { padding: 0; overflow: hidden; }
.photo-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.photo-card .card-body { padding: 26px 28px 30px; }
@media (prefers-color-scheme: dark) { .photo img, .photo-card img { filter: brightness(.92); } }

/* ---------- Illustrative phone ---------- */
.phone {
  width: min(100%, 330px); margin-inline: auto; padding: 12px; border-radius: 46px; background: #1d1d1f;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}
.phone-screen { background: var(--bg-alt); border-radius: 36px; padding: 22px 16px 18px; min-height: 520px; }
.phone-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; margin: 6px 4px 14px; color: var(--text); }
.kol {
  background: var(--surface); border-radius: 18px; padding: 14px; margin-bottom: 12px; border: 1px solid var(--line);
}
.kol-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #5e5ce6, #0a84ff); flex: none; }
.avatar.b { background: linear-gradient(135deg, #30b0c7, #34c759); }
.avatar.c { background: linear-gradient(135deg, #ff9f0a, #ff375f); }
.kol-name { font-weight: 650; font-size: .95rem; line-height: 1.2; color: var(--text); }
.kol-meta { font-size: .78rem; color: var(--text-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .75rem; font-weight: 600; padding: 4px 9px; border-radius: 980px; background: var(--bg-alt); color: var(--text); }
.chip b { font-weight: 700; }
.chip.ok b { color: var(--good); }
.sample-note { font-size: .78rem; color: var(--text-2); text-align: center; margin-top: 14px; }
.skeleton { height: 12px; border-radius: 6px; background: var(--line); margin: 6px 0; }
.skeleton.w60 { width: 60%; } .skeleton.w40 { width: 40%; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; background: var(--bg-alt); }
tr:last-child td { border-bottom: 0; }
caption { text-align: left; padding: 0 0 10px; color: var(--text-2); font-size: .9rem; caption-side: top; }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border: 2px solid var(--accent); }
.price-card .tag { position: absolute; top: -13px; left: 28px; }
.price { font-size: 3rem; font-weight: 700; letter-spacing: -.035em; line-height: 1; margin: 14px 0 4px; }
.price small { font-size: 1rem; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.price-card ul { padding: 0; margin: 20px 0 0; list-style: none; }
.price-card li { padding: 8px 0 8px 28px; position: relative; border-top: 1px solid var(--line); font-size: .95rem; }
.price-card li::before {
  content: ""; position: absolute; left: 2px; top: 14px; width: 14px; height: 8px;
  border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg);
}

/* ---------- Prose (legal) ---------- */
.prose { padding-bottom: 96px; }
.prose h2 { font-size: 1.6rem; margin: 2.2em 0 .6em; letter-spacing: -.02em; }
.prose h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose .table-wrap { margin: 1.2em 0 1.6em; }
.toc { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 20px 24px; margin: 28px 0 8px; }
.toc p { margin: 0 0 8px; font-weight: 650; }
.toc ol { margin: 0; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.callout { border-left: 4px solid var(--accent); background: var(--bg-alt); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.4em 0; }
.callout p:last-child { margin: 0; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; font-size: 1.1rem; position: relative; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -8px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 0 22px; color: var(--text-2); max-width: 62ch; }
.faq .answer p:last-child { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 56px 0 36px; font-size: .875rem; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-grid h2 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-bottom: 12px; font-weight: 650; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a { display: inline-block; padding: 6px 0; min-height: 32px; color: var(--text-2); text-decoration: none; }
.footer-grid li a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { border-top: 1px solid var(--line); padding-top: 22px; display: grid; gap: 8px; }
.footer-legal p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Motion (only when JS is on and the user allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .btn, .card, .nav-links a { transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
  .card.lift:hover { transform: translateY(-3px); }
  @keyframes shimmer { 0% { opacity: .5; } 50% { opacity: 1; } 100% { opacity: .5; } }
  .skeleton { animation: shimmer 1.8s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

@media (forced-colors: active) { .btn-primary, .store-badge { border: 1px solid ButtonText; } }
@media print { .site-header, .site-footer, .skip-link { display: none; } body { font-size: 11pt; } }

/* ---------- Small utilities (no inline styles: the CSP forbids them) ---------- */
.note-top { margin-top: 20px; }
.grow { flex: 1; }
.cta-center { justify-content: center; }
.h3-like { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.015em; }
.faq-title { margin-bottom: 24px; }
.prose-title { margin-bottom: 8px; }
.price-card .tag { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); top: -14px; }

/* Contact form (support page). Hidden without JavaScript: the mailto fallback shows instead. */
.contact-form { display: none; margin-top: 24px; }
.js .contact-form { display: block; }
.contact-nojs { margin-top: 16px; }
.js .contact-nojs { display: none; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.contact-form label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.contact-form input, .contact-form select, .contact-form textarea {
  display: block; width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input:focus-visible, .contact-form select:focus-visible, .contact-form textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.contact-form button[disabled] { opacity: .6; cursor: progress; }
/* Honeypot: off screen, not display:none, so simple bots still fill it. People and screen readers never reach it. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-status { margin-top: 16px; min-height: 1.5em; }
.contact-msg { margin: 0; font-size: 15px; }
.contact-msg.ok { color: var(--good); font-weight: 600; }
.contact-msg.err { color: var(--warn); }
#contact h2 { margin-bottom: 12px; }
