/* Hoanio Studio — hoanio.com */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --ink: #0b0d17;
  --ink-2: #666978;
  --line: #e8e8ed;
  --brand: #0b4ea6;
  --accent: #ff8a1f;
  --max: 1120px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-2: #111114;
    --ink: #f5f5f7;
    --ink-2: #9a9cab;
    --line: #26262c;
    --brand: #8ab4f8;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
/* keep anchored sections clear of the sticky header */
[id] { scroll-margin-top: 76px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
}
.nav { display: flex; align-items: center; height: 60px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 14px; }
.nav ul a { color: var(--ink-2); transition: color .2s; white-space: nowrap; }
/* Vietnamese diacritics need a little more line height */
:lang(vi) .hero h1, :lang(vi) .title h2, :lang(vi) .easy h2, :lang(vi) .contact h2 { line-height: 1.14; }
.nav ul a:hover { color: var(--ink); }
.lang { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lang:hover { color: var(--ink); }

/* Links & buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 16px;
  transition: transform .2s ease;
}
.btn:hover { transform: scale(1.03); }
.more { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 500; font-size: 18px; }
.more::after { content: "›"; font-size: 1.3em; line-height: 1; transition: transform .2s; }
.more:hover::after { transform: translateX(3px); }

/* Hero */
.hero { text-align: center; padding: 120px 0 0; overflow: hidden; }
.hero h1 { font-size: clamp(44px, 8vw, 96px); font-weight: 700; letter-spacing: -.045em; line-height: 1.02; }
.hero h1 span { color: var(--ink-2); }
.hero p { font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); max-width: 560px; margin: 28px auto 40px; line-height: 1.5; }
.hero .actions { display: flex; gap: 28px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* Icon stage */
.stage { position: relative; margin-top: 64px; height: 280px; }
.stage::before {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(1100px, 140%); height: 260px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent);
}
.row { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 2vw, 24px); height: 100%; padding-bottom: 40px; }
.row img {
  width: var(--s, 96px); height: var(--s, 96px); border-radius: 23%;
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 20px 40px -12px rgba(15, 23, 60, .28);
  transform: translateY(var(--y, 0px));
  animation: rise .9s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: var(--d, 0s);
}
@keyframes rise { from { transform: translateY(calc(var(--y, 0px) + 24px)) scale(.96); } }

/* Sections */
section { padding: 140px 0; }
.title { text-align: center; max-width: 760px; margin: 0 auto 64px; }
.title h2 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.title p { margin-top: 20px; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); }

/* Easy showcase */
.easy { background: #0a0f24; color: #fff; border-radius: 36px; overflow: hidden; position: relative; text-align: center; padding: 96px 32px 0; }
.easy::before {
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -40%; height: 80%;
  background: radial-gradient(closest-side, rgba(47, 100, 240, .55), transparent);
}
.easy > * { position: relative; }
.easy .label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: #ffb06b; letter-spacing: .02em; }
.easy .label i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.easy h2 { font-size: clamp(36px, 5.6vw, 68px); font-weight: 700; letter-spacing: -.04em; line-height: 1.04; margin-top: 18px; }
.easy p { color: #aab3d4; font-size: clamp(18px, 2vw, 21px); max-width: 600px; margin: 22px auto 34px; }
.easy .more { color: #8fb0ff; }
.easy-icon { width: 168px; height: 168px; border-radius: 38px; margin: 72px auto 0; box-shadow: 0 30px 80px rgba(47, 100, 240, .55); }
.easy-stats { display: flex; justify-content: center; gap: clamp(32px, 7vw, 96px); padding: 56px 0 72px; flex-wrap: wrap; }
.easy-stats b { display: block; font-size: clamp(32px, 4vw, 48px); font-weight: 700; letter-spacing: -.03em; }
.easy-stats span { color: #aab3d4; font-size: 15px; }

/* App library */
.library { display: grid; grid-template-columns: repeat(8, 1fr); gap: 40px 16px; list-style: none; padding: 0; margin: 0; }
.library a { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.library img { width: 88px; height: 88px; border-radius: 23%; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 24px -10px rgba(15,23,60,.3); transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.library a:hover img { transform: translateY(-6px) scale(1.04); }
.library span { font-size: 13px; font-weight: 500; line-height: 1.3; }

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 24px; }
.numbers b { display: block; font-size: clamp(48px, 7vw, 88px); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.numbers span { display: block; margin-top: 12px; color: var(--ink-2); font-size: 17px; }

/* Contact */
.contact { text-align: center; }
.contact h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; letter-spacing: -.04em; }
.contact .mail { display: inline-block; margin-top: 18px; font-size: clamp(20px, 2.4vw, 26px); color: var(--brand); font-weight: 500; }

/* Coming next (upcoming apps) */
.next-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.next-apps li { background: var(--bg-2); border-radius: 28px; padding: 28px 24px; text-align: center; }
.next-apps img { width: 88px; height: 88px; border-radius: 23%; margin: 0 auto 18px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 28px -12px rgba(15,23,60,.35); }
.next-apps b { display: block; font-size: 18px; letter-spacing: -.01em; }
.next-apps span { display: block; color: var(--ink-2); font-size: 15px; margin-top: 6px; line-height: 1.45; }
.next-apps em { display: inline-block; margin-top: 14px; font-style: normal; font-size: 13px; font-weight: 600; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); padding: 4px 10px; border-radius: 999px; }
.center-link { text-align: center; margin-top: 40px; }

/* Phone frames with real screenshots */
.devices { display: flex; justify-content: center; align-items: flex-end; }
.device { flex: none; width: 210px; aspect-ratio: 9 / 20; border: 7px solid #0b0d17; border-radius: 34px; overflow: hidden; background: #0b0d17; box-shadow: 0 30px 60px -20px rgba(15, 23, 60, .45); }
.device img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.devices .device.back { margin-right: -64px; transform: rotate(-5deg) scale(.9); transform-origin: bottom center; }
.devices .device.front { position: relative; z-index: 1; transform: rotate(4deg); }

/* Contact cards */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 960px; margin: 40px auto 0; text-align: left; }
.contact-card { display: flex; flex-direction: column; gap: 6px; background: var(--bg-2); border-radius: 24px; padding: 28px; color: var(--ink); transition: transform .2s ease; }
.contact-card:hover { transform: translateY(-3px); }
.contact-card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--bg); margin-bottom: 10px; }
.contact-card .ic svg { width: 22px; height: 22px; }
.contact-card b { font-size: 18px; letter-spacing: -.01em; }
.contact-card span { color: var(--ink-2); font-size: 15px; }
.contact-card em { font-style: normal; color: var(--brand); font-weight: 600; margin-top: auto; padding-top: 12px; overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--ink-2); }
.foot { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.foot ul { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.foot a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .library { grid-template-columns: repeat(4, 1fr); }
  .next-apps { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: 1fr; max-width: 520px; }
  section { padding: 104px 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav ul { gap: 18px; }
  .hide-sm { display: none !important; }
  .hero { padding-top: 72px; }
  .hero h1 { font-size: 40px; }
  :lang(vi) .hero h1 { font-size: 34px; }
  .nav { gap: 16px; }
  .stage { margin-top: 40px; height: 116px; }
  .stage::before { height: 140px; }
  .row img { width: calc(var(--s, 96px) * .5); height: calc(var(--s, 96px) * .5); }
  .row { padding-bottom: 24px; gap: 8px; }
  section { padding: 88px 0; }
  .easy { border-radius: 28px; padding: 64px 20px 0; }
  .easy-icon { width: 128px; height: 128px; border-radius: 29px; margin-top: 48px; }
  .library { gap: 28px 8px; }
  .library img { width: 64px; height: 64px; }
  .library span { font-size: 12px; }
  .numbers { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .numbers b { font-size: 34px; }
  .numbers span { font-size: 14px; margin-top: 6px; }
  .title { margin-bottom: 48px; }
  .next-apps li { padding: 22px 14px; border-radius: 22px; }
  .next-apps img { width: 68px; height: 68px; }
  .next-apps span { font-size: 14px; }
  .device { width: 150px; border-width: 5px; border-radius: 26px; }
  .story-art { min-height: 0; padding-top: 64px; }
  .devices .device.back { margin-right: -48px; }
  .foot ul { gap: 10px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== Subpages ===== */
.page-hero { text-align: center; padding: 104px 0 64px; }
.page-hero .eyebrow { display: inline-block; font-size: 15px; font-weight: 600; color: var(--brand); margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; }
:lang(vi) .page-hero h1 { line-height: 1.14; }
.page-hero p { font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); max-width: 640px; margin: 24px auto 0; }
.page-hero .updated { font-size: 15px; margin-top: 18px; }

/* Long-form text */
.prose { max-width: 720px; font-size: 18px; line-height: 1.7; }
.prose h2 { font-size: 28px; letter-spacing: -.02em; line-height: 1.25; margin: 56px 0 14px; scroll-margin-top: 84px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; color: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { color: var(--ink); }
.prose .lead { font-size: 21px; color: var(--ink); }
.callout { background: var(--bg-2); border-radius: 18px; padding: 20px 24px; margin: 24px 0; }
.callout p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 20px 0 24px; border: 1px solid var(--line); border-radius: 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg-2); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

/* Document layout with sticky table of contents */
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 64px; align-items: start; padding-bottom: 120px; }
.toc { position: sticky; top: 92px; font-size: 14px; }
.toc b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-2); }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }

/* About */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.story h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.story p { color: var(--ink-2); font-size: 19px; margin-top: 18px; }
.story-art { background: radial-gradient(70% 60% at 50% 100%, color-mix(in srgb, var(--brand) 22%, transparent), transparent), var(--bg-2); border-radius: 32px; padding: 48px 24px 0; display: grid; place-items: end center; position: relative; overflow: hidden; min-height: 460px; }
.story-art .old { position: absolute; left: 24px; top: 24px; font-size: 14px; color: var(--ink-2); background: var(--bg); padding: 8px 14px; border-radius: 999px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principle { background: var(--bg-2); border-radius: 28px; padding: 36px 32px; }
.principle .n { font-size: 15px; font-weight: 600; color: var(--brand); }
.principle h3 { font-size: 24px; letter-spacing: -.02em; margin: 14px 0 10px; }
.principle p { color: var(--ink-2); }
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; letter-spacing: -.04em; }
.cta-band p { color: var(--ink-2); font-size: 19px; margin: 16px auto 32px; max-width: 520px; }
.cta-band .actions { display: flex; gap: 28px; justify-content: center; align-items: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; }
  .story { grid-template-columns: 1fr; gap: 40px; }
  .principles { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-hero { padding: 64px 0 40px; }
  :lang(vi) .page-hero h1 { font-size: 36px; }
  .doc .toc { display: none; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 24px; margin-top: 44px; }
  .principle { padding: 28px 24px; }
}
@media print {
  .site-header, .site-footer, .toc { display: none; }
  .doc { display: block; }
}
