/* entiloom.io: product website. Same language as the login page and portal: Inter, deep navy with the weave,
   white and light grey surfaces, one blue accent from the logo. No inline styles (strict CSP). */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.ttf") format("truetype"); }
@font-face { font-family: Inter; font-weight: 500 600; font-display: swap; src: url("../fonts/Inter-SemiBold.ttf") format("truetype"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url("../fonts/Inter-Bold.ttf") format("truetype"); }

:root {
  --accent: #355CFF;
  --accent-ink: #2448E0;
  --accent-soft: #EEF2FF;
  --navy: #090F24;
  --on-navy: #C9D2E8;
  --on-navy-2: #D5DCEE;
  --on-navy-mute: #8C98B8;
  --ink: #101828;
  --ink-2: #344054;
  --text: #475467;
  --muted: #5A6372;
  --bg: #F5F6F8;
  --line: #E2E5EA;
  --line-soft: #EEF0F3;
  --ok: #18794E; --ok-bg: #E7F5EE;
  --warn: #8A5A00; --warn-bg: #FFF4DB;
  --bad: #B42318; --bad-bg: #FDECEA;
  --mint: #8FE3B8;
  --sky: #9DB4FF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; color: var(--ink); background: #FFFFFF; }
a { color: var(--accent-ink); }
a:hover { color: #1A36B0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: #FFFFFF; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 96px; padding-bottom: 96px; }
.section-grey { background: var(--bg); }
.section-navy { position: relative; overflow: hidden; background: var(--navy); color: #FFFFFF; }
.stack { display: flex; flex-direction: column; gap: 48px; }
.head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.head-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.head-center { align-items: center; text-align: center; margin: 0 auto; max-width: 760px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.section-navy .eyebrow { color: var(--sky); }
.h1 { font-size: 56px; line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.h1-page { font-size: 48px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.h2 { font-size: 40px; line-height: 1.15; font-weight: 700; }
.h2-sm { font-size: 32px; line-height: 1.2; font-weight: 700; }
.lead { font-size: 18px; line-height: 1.6; color: var(--text); }
.section-navy .lead { color: var(--on-navy-2); }
.note { font-size: 13px; color: var(--on-navy-mute); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: 600 15px Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-lg { min-height: 52px; padding: 0 24px; border-radius: 12px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-ink); color: #FFFFFF; }
.btn-ghost { color: var(--ink-2); font-weight: 500; }
.btn-ghost:hover { color: var(--ink); background: var(--bg); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.28); color: #FFFFFF; font-weight: 500; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.btn-outline { border-color: #D0D5DD; background: #FFFFFF; color: var(--ink); }
.btn-outline:hover { background: var(--bg); color: var(--ink); }
.btn-white { background: #FFFFFF; color: var(--ink); }
.btn-white:hover { background: #F2F4F7; color: var(--ink); }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(180%) blur(8px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; }
/* The logo file has built-in margins: a taller box with negative margins keeps the header height. */
.brand img { height: 46px; width: auto; display: block; margin: -8px 0 -8px -6px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: #475467; text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; min-height: 44px; min-width: 44px; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; cursor: pointer; align-items: center; justify-content: center; }

/* Hero */
.hero-weave { position: absolute; left: -180px; bottom: -260px; width: 760px; max-width: 90%; height: auto; opacity: 0.35; pointer-events: none; }
.hero { position: relative; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 96px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); font-size: 13px; color: var(--on-navy); }
.pill .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }
.hero .lead { font-size: 19px; max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: #AEB9D6; }

.hero-visual { flex: 1 1 420px; min-width: 0; position: relative; min-height: 440px; }
.mock { background: #FFFFFF; color: var(--ink); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.mock-rules { position: absolute; right: 0; top: 0; width: 88%; overflow: hidden; }
.mock-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.mock-head strong { font-weight: 600; }
.mock-head span { color: var(--muted); }
.mock-list { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; }
.mock-row div { display: flex; flex-direction: column; gap: 2px; }
.mock-row strong { font-weight: 600; }
.mock-row span { color: var(--muted); }
.mock-apps { position: absolute; left: 0; bottom: 0; width: 62%; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.mock-user { display: flex; align-items: center; gap: 10px; }
.mock-avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.mock-user div { display: flex; flex-direction: column; line-height: 1.3; }
.mock-user strong { font-size: 14px; }
.mock-user span { font-size: 12px; color: var(--muted); }
.mock-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mock-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 1px solid var(--line-soft); border-radius: 10px; font-size: 11px; text-align: center; }
.mock-ok { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ok); }

.tile { width: 32px; height: 32px; border-radius: 8px; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tone-0 { background: var(--accent-soft); color: var(--accent-ink); }
.tone-1 { background: var(--ok-bg); color: var(--ok); }
.tone-2 { background: var(--warn-bg); color: var(--warn); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.b-info { background: var(--accent-soft); color: #1A36B0; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-mute { background: #EEF0F3; color: #475467; }
.b-warn { background: var(--warn-bg); color: var(--warn); }

/* Cards and grids */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.card-soft { padding: 28px; border-radius: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.card { padding: 28px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.card h3, .card-soft h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.card p, .card-soft p { color: var(--text); }
.step-no { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.feature { background: #FFFFFF; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.feature p { font-size: 15px; color: var(--text); }
.icon { width: 40px; height: 40px; border-radius: 10px; background: #F2F4F7; color: var(--ink-2); display: flex; align-items: center; justify-content: center; }

/* Roles */
.seg { align-self: flex-start; display: inline-flex; flex-wrap: wrap; padding: 4px; border-radius: 12px; background: #E8EBF0; }
.seg button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: #475467; font: 500 15px Inter, system-ui, sans-serif; cursor: pointer; }
.seg button[aria-selected="true"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.role-panel { display: flex; flex-wrap: wrap; gap: 32px; padding: 40px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); }
.role-panel[hidden] { display: none; }
.role-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.role-text h3 { font-size: 26px; line-height: 1.2; font-weight: 700; }
.role-text p { font-size: 17px; color: var(--text); }
.checks { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.checks svg { flex: none; margin-top: 2px; color: var(--ok); }

/* Security */
.reg { padding: 24px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); display: flex; flex-direction: column; gap: 10px; }
.reg .ref { font-size: 13px; font-weight: 600; color: var(--sky); }
.reg h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.reg p { font-size: 15px; color: var(--on-navy); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-dark { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 14px; color: #E4E9F5; }
.chip-dark svg { color: var(--mint); }
.chip { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--line); font-size: 15px; font-weight: 500; }

/* Meaning */
.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.weave-card { position: relative; border-radius: 24px; background: var(--navy); overflow: hidden; min-height: 360px; display: flex; align-items: flex-end; padding: 32px; }
.weave-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.word-row { position: relative; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: #FFFFFF; font-weight: 600; }
.word { padding: 8px 14px; border-radius: 999px; background: rgba(9, 15, 36, 0.85); font-size: 15px; }
.prose { display: flex; flex-direction: column; gap: 16px; }
.prose p { font-size: 17px; line-height: 1.7; color: var(--text); }

/* CTA band */
.cta { position: relative; overflow: hidden; border-radius: 24px; background: var(--accent); color: #FFFFFF; padding: 56px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.cta div { display: flex; flex-direction: column; gap: 12px; max-width: 620px; }
.cta h2 { font-size: 36px; line-height: 1.15; font-weight: 700; }
.cta p { font-size: 17px; color: #E6ECFF; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 24px; padding: 32px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); }
.plan h2 { font-size: 22px; font-weight: 700; }
.plan .desc { font-size: 15px; line-height: 1.5; color: var(--text); margin-top: 8px; }
.plan .price { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; display: block; }
.plan .unit { font-size: 14px; color: var(--text); }
.plan .checks { flex: none; gap: 12px; font-size: 15px; }
.plan-featured { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.plan-featured .desc, .plan-featured .unit { color: var(--on-navy); }
.plan-featured .checks svg { color: var(--mint); }
.plan-flag { position: absolute; top: -13px; left: 32px; display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 12px; font-weight: 600; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.compare { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.compare thead th { background: #FAFBFC; font-weight: 600; border-bottom-color: var(--line); }
.compare th[scope="row"], .compare thead th:first-child { text-align: left; }
.compare th[scope="row"] { font-weight: 400; color: var(--ink-2); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.faq { border-top: 1px solid var(--line); max-width: 880px; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 17px; font-weight: 600; min-height: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--muted); transition: transform 0.15s; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq p { margin-top: 12px; color: var(--text); line-height: 1.7; }

/* Forms */
.form-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 72px; padding-bottom: 96px; }
.form-layout > .form-aside { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.form-layout > .form-main { flex: 1 1 480px; min-width: 0; }
.form-card { padding: 32px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.input { height: 48px; width: 100%; border: 1px solid #D0D5DD; border-radius: 10px; padding: 0 14px; background: #FFFFFF; color: var(--ink); font: 16px Inter, system-ui, sans-serif; }
textarea.input { height: auto; min-height: 112px; padding: 12px 14px; resize: vertical; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.next-steps { display: flex; flex-direction: column; gap: 20px; }
.next-steps li { display: flex; gap: 16px; align-items: flex-start; }
.next-steps .num { width: 36px; height: 36px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.next-steps div { display: flex; flex-direction: column; gap: 4px; }
.next-steps strong { font-weight: 600; }
.next-steps span { font-size: 15px; color: var(--text); }
.contact-box { padding: 20px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.contact-box span { color: var(--text); }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 15px; }
.alert-err { background: var(--bad-bg); color: var(--bad); }
.alert[hidden] { display: none; }
.done-card { padding: 40px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; max-width: 640px; margin: 0 auto; }
.done-icon { width: 52px; height: 52px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.narrow-center { max-width: 560px; margin: 0 auto; }

/* Docs-like pages */
.doc { max-width: 820px; display: flex; flex-direction: column; gap: 20px; }
.doc h2 { font-size: 26px; font-weight: 700; margin-top: 24px; }
.doc p, .doc li { color: var(--ink-2); line-height: 1.7; }
.doc ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
/* Long URLs and claim names wrap instead of widening the page on phones */
.doc th, .doc td { overflow-wrap: anywhere; }
.doc th { background: #FAFBFC; font-weight: 600; }
.doc code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; background: #F2F4F7; padding: 1px 5px; border-radius: 4px; }
.doc pre { margin: 0; padding: 16px 18px; border-radius: 12px; background: var(--navy); color: #E4E9F5; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.doc pre code { background: none; padding: 0; color: inherit; }

/* Footer */
.site-footer { background: var(--navy); color: var(--on-navy); }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-top: 56px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; flex: 1 1 280px; max-width: 360px; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: #FFFFFF; font-size: 20px; font-weight: 700; }
.footer-logo img { width: 28px; height: 28px; }
.footer-brand em { color: #FFFFFF; }
.footer-brand p { font-size: 14px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-col h2 { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-navy-mute); }
.footer-col a { color: #E4E9F5; text-decoration: none; }
.footer-col a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; margin-top: 40px; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; color: var(--on-navy-mute); }
.footer-bottom a { color: var(--on-navy); }
.footer-bottom nav { display: flex; gap: 20px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav, .header-actions { display: none; width: 100%; }
  .site-header.open .site-nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; order: 3; }
  .site-header.open .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .site-header.open .header-actions { display: flex; order: 4; padding-bottom: 8px; }
  .site-header.open .header-actions .btn { flex: 1; }
}

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .hero { padding-top: 48px; padding-bottom: 56px; gap: 40px; }
  .h1 { font-size: 38px; }
  .h1-page { font-size: 34px; }
  .h2 { font-size: 28px; }
  .h2-sm { font-size: 26px; }
  .hero-visual { min-height: 420px; }
  .mock-rules { width: 100%; }
  .mock-apps { width: 80%; }
  .role-panel, .cta, .form-card, .done-card { padding: 24px; }
  .cta h2 { font-size: 28px; }
}

/* ---------------------------------------------------------------- v3: visual refresh */

/* Hero weave: threads draw in, then the crossings settle (inline SVG, see index.html) */
.hero-weave .w-h path, .hero-weave .w-v path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: weave-draw 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.hero-weave .w-v path { animation-duration: 2s; animation-delay: 0.3s; }
.hero-weave .w-h path:nth-child(2) { animation-delay: 0.08s; }
.hero-weave .w-h path:nth-child(3) { animation-delay: 0.16s; }
.hero-weave .w-h path:nth-child(4) { animation-delay: 0.24s; }
.hero-weave .w-h path:nth-child(5) { animation-delay: 0.32s; }
.hero-weave .w-h path:nth-child(6) { animation-delay: 0.40s; }
.hero-weave .w-h path:nth-child(7) { animation-delay: 0.48s; }
.hero-weave .w-v path:nth-child(2) { animation-delay: 0.38s; }
.hero-weave .w-v path:nth-child(3) { animation-delay: 0.46s; }
.hero-weave .w-v path:nth-child(4) { animation-delay: 0.54s; }
.hero-weave .w-v path:nth-child(5) { animation-delay: 0.62s; }
.hero-weave .w-v path:nth-child(6) { animation-delay: 0.70s; }
.hero-weave .w-v path:nth-child(7) { animation-delay: 0.78s; }
.hero-weave .w-x { opacity: 0; animation: weave-fade 0.6s ease-out 2.2s forwards; }
.hero-weave { animation: weave-drift 16s ease-in-out 2.8s infinite alternate; }
@keyframes weave-draw { to { stroke-dashoffset: 0; } }
@keyframes weave-fade { to { opacity: 1; } }
@keyframes weave-drift { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(18px, -10px) rotate(1.5deg); } }
.hero-visual .mock { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-visual .mock-apps { animation-delay: 0.25s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Before and after */
.versus { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.vs { padding: 32px; border-radius: 20px; display: flex; flex-direction: column; gap: 20px; }
.vs-before { background: var(--bg); }
.vs-after { background: var(--navy); color: #FFFFFF; }
.vs-art { height: 96px; border-radius: 14px; overflow: hidden; }
.vs-before .vs-art { background: #FFFFFF; border: 1px solid var(--line); }
.vs-after .vs-art { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); }
.vs-art svg { width: 100%; height: 100%; display: block; }
.vs h3 { font-size: 22px; font-weight: 700; }
.vs-list { display: flex; flex-direction: column; gap: 16px; }
.vs-list li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.55; }
.vs-list svg { flex: none; margin-top: 3px; }
.vs-before .vs-list li { color: var(--text); }
.vs-before .vs-list strong { color: var(--ink); }
.vs-before .vs-list svg { color: var(--bad); }
.vs-after .vs-list li { color: var(--on-navy); }
.vs-after .vs-list strong { color: #FFFFFF; }
.vs-after .vs-list svg { color: var(--mint); }

/* How it works: each step carries a small picture of that step */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.step { padding: 28px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.step h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.step p { color: var(--text); }
.step-top { display: flex; align-items: center; gap: 12px; }
.step-art { margin-bottom: 8px; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); font-size: 12px; min-height: 184px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.mini-head { padding: 0 10px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; display: flex; justify-content: space-between; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; background: #FFFFFF; border: 1px solid var(--line-soft); }
.mini-row b { font-weight: 600; color: var(--ink); }
.mini-row span { color: var(--muted); }
.mini-row.flag { border-color: #F5C2BD; background: var(--bad-bg); }
.mini-row.flag span { color: var(--bad); }
.mini-hint { padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-weight: 500; }
.mini-app { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #FFFFFF; border: 1px solid var(--line-soft); }
.mini-app > div { display: flex; align-items: center; gap: 10px; }
.mini-app b { font-size: 13px; display: block; }
.mini-app small { display: block; color: var(--muted); font-size: 11px; }
.switch { width: 30px; height: 18px; border-radius: 999px; background: #D0D5DD; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 999px; background: #FFFFFF; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(12px); }
.mini-login { padding: 12px; border-radius: 10px; background: #FFFFFF; border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.mini-field { height: 28px; border-radius: 6px; border: 1px solid #D0D5DD; padding: 0 8px; display: flex; align-items: center; color: var(--ink-2); }
.otp { display: flex; gap: 4px; }
.otp span { flex: 1; height: 28px; border-radius: 6px; border: 1px solid #D0D5DD; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--ink); background: #FFFFFF; }
.mini-btn { height: 28px; border-radius: 6px; background: var(--accent); color: #FFFFFF; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.mini-apps { display: flex; gap: 6px; }
.mini-apps span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; height: 28px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); font-weight: 600; }

/* Feature bento */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bento-item { padding: 28px; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.bento-item h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.bento-item p { font-size: 15px; color: var(--text); }
.bento-wide { grid-column: span 2; }
.bento-dark { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.bento-dark p { color: var(--on-navy); }
.bento-dark .icon { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
.bento-art { margin-top: auto; padding-top: 8px; }
.sso-art { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sso-user { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 13px; font-weight: 600; }
.sso-user .mock-avatar { width: 28px; height: 28px; font-size: 11px; }
.sso-line { flex: 1 1 32px; min-width: 32px; height: 2px; background: repeating-linear-gradient(90deg, var(--sky) 0 6px, transparent 6px 12px); }
.sso-apps { display: flex; gap: 8px; flex-wrap: wrap; }
.sso-apps span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: #FFFFFF; color: var(--ink); font-size: 13px; font-weight: 600; }
.sso-apps svg { color: var(--ok); }
.otp-art .otp span { height: 40px; font-size: 18px; border-color: var(--line); background: var(--bg); }
.otp-timer { margin-top: 10px; height: 4px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.otp-timer i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; animation: otp-tick 30s linear infinite; }
@keyframes otp-tick { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.tree { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.tree-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--bg); }
.tree-row.sub { margin-left: 18px; background: #FFFFFF; border: 1px solid var(--line-soft); }
.tree-row b { font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; }
.bars i { flex: 1; border-radius: 4px 4px 0 0; background: var(--accent-soft); }
.bars i:nth-child(even) { background: #C7D3FF; }
.bars i:last-child { background: var(--accent); }
.b1 { height: 30%; } .b2 { height: 45%; } .b3 { height: 38%; } .b4 { height: 62%; } .b5 { height: 55%; } .b6 { height: 78%; } .b7 { height: 92%; }

/* Roles: text on the left, the screen that role uses on the right */
.role-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; }
.role-side { display: flex; flex-direction: column; gap: 24px; }
.role-side .role-text, .role-panel .checks { flex: none; }
.frame { border-radius: 14px; border: 1px solid var(--line); background: #FFFFFF; box-shadow: 0 18px 48px rgba(16, 24, 40, 0.12); overflow: hidden; font-size: 13px; }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F2F4F7; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 9px; height: 9px; border-radius: 999px; background: #D0D5DD; flex: none; }
.frame-bar span { margin-left: 10px; flex: 1; min-width: 0; height: 22px; border-radius: 6px; background: #FFFFFF; border: 1px solid var(--line); color: var(--muted); font-size: 11px; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.frame-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.frame-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.frame-title b { font-size: 15px; }
.frame-btn { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 7px; background: var(--accent); color: #FFFFFF; font-size: 12px; font-weight: 600; white-space: nowrap; }
.frame-btn.ghost { background: #FFFFFF; color: var(--ink-2); border: 1px solid var(--line); }
.f-table { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.f-tr { display: grid; grid-template-columns: 1.6fr 1.4fr 0.9fr 0.7fr; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line-soft); }
.f-tr:first-child { border-top: 0; background: #FAFBFC; font-size: 11px; font-weight: 600; color: var(--muted); }
.f-tr b { font-weight: 600; display: block; }
.f-tr small { color: var(--muted); font-size: 11px; }
.f-scope { padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); color: #1A36B0; font-weight: 500; }
.f-person { display: flex; align-items: center; gap: 10px; }
.f-person div { display: flex; flex-direction: column; line-height: 1.35; }
.f-person small { color: var(--muted); }
.f-props { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; }
.f-props dt { color: var(--muted); }
.f-props dd { margin: 0; font-weight: 500; }
.f-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.phone { width: 260px; max-width: 100%; margin: 0 auto; border-radius: 34px; padding: 10px; background: #1D2433; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.25); }
.phone-screen { border-radius: 26px; background: #F5F6F8; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 20px; font-size: 12px; }
.phone-notch { width: 70px; height: 6px; border-radius: 999px; background: #D0D5DD; margin: -6px auto 4px; }
.phone-card { padding: 12px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; }
.phone .mock-tiles { gap: 6px; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.code { border-radius: 14px; background: var(--navy); color: #E4E9F5; overflow: hidden; box-shadow: 0 18px 48px rgba(16, 24, 40, 0.18); }
.code .frame-bar { background: rgba(255, 255, 255, 0.06); border-bottom-color: rgba(255, 255, 255, 0.08); }
.code .frame-bar i { background: rgba(255, 255, 255, 0.25); }
.code .frame-bar span { background: transparent; border: 0; color: var(--on-navy-mute); }
.code pre { margin: 0; padding: 16px 18px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; line-height: 1.7; overflow-x: auto; }
.code .k { color: var(--sky); }
.code .s { color: var(--mint); }
.code .c { color: var(--on-navy-mute); }

/* Sticky call to action on phones, shown after the hero */
.mobile-cta { display: none; }

/* Reveal on scroll (only when the script runs and motion is welcome) */
.reveal-on .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal-on .reveal.in { opacity: 1; transform: none; }
.reveal-on .reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal-on .reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal-on .reveal:nth-child(4) { transition-delay: 0.21s; }

@media (hover: hover) {
  .card, .step, .bento-item, .reg { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.6s ease-out; }
  .card:hover, .step:hover, .bento-item:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(16, 24, 40, 0.08); border-color: #D0D5DD; }
  .bento-dark:hover { border-color: var(--navy); }
  .reg:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.28); }
  .btn { transition: background 0.15s, transform 0.15s; }
  .btn-primary:hover { transform: translateY(-1px); }
}

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-panel { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento-wide { grid-column: auto; }
  .vs { padding: 24px; }
  .f-tr { grid-template-columns: 1.6fr 1fr 0.8fr; }
  .f-tr > :nth-child(3) { display: none; }
  .mobile-cta { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 6; transform: translateY(140%); transition: transform 0.3s ease; }
  .mobile-cta .btn { flex: 1; box-shadow: 0 10px 30px rgba(9, 15, 36, 0.3); }
  .mobile-cta.show { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-weave .w-h path, .hero-weave .w-v path { stroke-dashoffset: 0; }
  .hero-weave .w-x { opacity: 1; }
  .reveal-on .reveal { opacity: 1; transform: none; }
}
