/* SafeNet public page — visual style after design/webapplication-design.md (near-black, hairlines, yellow→teal gradient).
   Deviations on purpose: no Google Fonts (CSP + GDPR: Inter is used only if installed locally), no placeholder brand logos,
   no attachment/microphone buttons (privacy), quick exit and emergency numbers are never hidden by the entrance. */
body.landing {
  --bg: #0c0c0c; --box: #111111; --hairline: rgba(255,255,255,0.065); --heading: #fafafa; --subtitle: #9e9e9e; --nav: #bcbcbc;
  --placeholder: #aeaeae; --chip-fill: rgba(255,255,255,0.028); --chip-border: rgba(255,255,255,0.30); --icon: #e8e8e8; --strip: #8a8a8a;
  --grad: linear-gradient(90deg, rgba(255,232,120,0) 0%, #ffe776 6%, #ffd400 26%, #ffd000 42%, #c9c93c 60%, #86ca8a 74%, #78d0cd 88%, rgba(120,208,205,0.55) 100%);
  --grad-solid: linear-gradient(90deg, #ffe776 0%, #ffd400 22%, #ffd000 40%, #c9c93c 60%, #86ca8a 76%, #78d0cd 100%);
  --chip-edge: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.94) 22%, rgba(255,255,255,0.44) 38%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0.11) 63%, rgba(255,255,255,0.04) 75%, rgba(255,255,255,0.02) 100%);
  --REVEAL: cubic-bezier(0.16, 1, 0.3, 1);
  /* shared/style.css tokens, re-pointed to the dark palette for cards/directory below the hero */
  --white: #111111; --text: #eeeeee; --text-s: #9e9e9e; --border: rgba(255,255,255,0.08); --gray-l: #161616; --teal: #78d0cd;
  --green-l: #12241a; --green: #86ca8a; --amber-l: #2a2410; --amber: #ffd76a; --red-l: #2a1414; --red: #f08a8a; --teal-l: #12302f;
  background: #0c0c0c; color: #fff; font-family: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif; font-size: 16px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } body.landing *, body.landing *::before, body.landing *::after { transition: none !important; animation: none !important; } }
body.landing.menu-open { overflow: hidden; }
.landing a { color: inherit; }
.landing .noscript { padding: 1rem; }
.landing .demo-banner { background: #1a1608; color: #ffd76a; border-bottom: 1px solid var(--hairline); }

/* entrance states (armed by boot.js only when motion is welcome) */
html.entrance .section-one [data-enter], html.entrance .section-one .hl-line { opacity: 0; }
html.entrance .section-one .hl-mask { overflow: hidden; }
html.entrance-s2 .section-two [data-enter], html.entrance-s2 .section-two .hl-line { opacity: 0; }
html.entrance-s2 .section-two .hl-mask { overflow: hidden; }

/* ---------- SECTION 1: hero ---------- */
.section-one { min-height: 100dvh; background: var(--bg); }
.page { min-height: 100dvh; display: flex; flex-direction: column; padding: clamp(14px,1.55vw,26px) clamp(16px,1.7vw,28px) 0; }
.nav-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: #f4f4f4; justify-self: start; }
.logo svg { width: clamp(34px,3.1vw,52px); height: auto; display: block; }
.logo span { font-weight: 600; font-size: clamp(1rem,1.2vw,1.2rem); letter-spacing: -0.01em; }
.nav-links { display: flex; gap: clamp(1.6rem,2.63vw,2.75rem); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--nav); text-decoration: none; font-weight: 400; font-size: clamp(1rem,1.2vw,1.2rem); letter-spacing: 0.005em; transition: color .18s ease; }
.nav-links a:hover, .nav-links a:focus-visible { color: #f2f2f2; }
.nav-right { justify-self: end; display: flex; align-items: center; gap: .6rem; }
.cta { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 500; font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap;
  padding: clamp(0.55em,0.9vw,0.62em) clamp(1.1em,2vw,1.35em); font-size: clamp(.95rem,1.05vw,1.05rem); transition: background .18s ease, transform .1s ease; min-height: 44px; }
.cta.white { background: #ffffff; color: #0c0c0c; border: 0; }
.cta.white:hover { background: #ededed; } .cta:active { transform: scale(.98); }
.cta.ghost { background: var(--chip-fill); color: #e8e8e8; border: 1px solid var(--chip-border); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.burger i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: #e8e8e8; border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.burger i:nth-child(1) { top: 15px; } .burger i:nth-child(2) { top: 21.5px; } .burger i:nth-child(3) { top: 28px; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: clamp(2rem,6vh,4.5rem) 0 clamp(1.5rem,4vh,3rem); }
.hero h1 { font-weight: 500; color: var(--heading); line-height: 1.04; letter-spacing: -0.021em; font-size: clamp(2rem,5.263vw,5.5rem); margin: 0; }
@media (min-width: 1025px) { .hero h1 { font-size: clamp(3.25rem,4.6vw,4.75rem); } }
.hl-mask { display: block; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.hl-line { display: block; }
.hero .subtitle { color: var(--subtitle); font-weight: 400; font-size: clamp(0.95rem,1.435vw,1.5rem); line-height: 1.3; letter-spacing: 0.004em; margin: clamp(1.1rem,2.9vw,3rem) 0 0; }
@media (max-width: 680px) { .hero .subtitle br { display: none; } .hero .subtitle { width: min(100%,22rem); } }

/* emergency numbers: always visible, high contrast */
.emerg-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: clamp(1rem,2.2vw,2rem); }
.emerg-chip { display: inline-flex; align-items: baseline; gap: .55rem; text-decoration: none; color: #fff; background: rgba(179,38,30,.16); border: 1px solid rgba(240,138,138,.55);
  border-radius: 999px; padding: .5rem 1rem; min-height: 44px; }
.emerg-chip strong { font-size: 1.15rem; font-weight: 600; letter-spacing: .01em; }
.emerg-chip span { color: #f1c7c7; font-size: .85rem; }
.emerg-chip.help { background: rgba(255,212,0,.08); border-color: rgba(255,212,0,.5); } .emerg-chip.help span { color: #f5e7a6; }
.emerg-note { color: var(--subtitle); font-size: .82rem; margin-top: .6rem; }

/* composer = the AI explanation box */
.composer-shell { width: 100%; display: flex; justify-content: center; isolation: isolate; transform: translate3d(0,0,0); }
.composer { position: relative; width: clamp(300px,55vw,913px); margin-top: clamp(1.2rem,2.9vw,3.05rem); text-align: left;
  background: linear-gradient(180deg,rgba(255,255,255,0.028),rgba(255,255,255,0) 42%), #111111; border: 1px solid var(--hairline);
  border-radius: clamp(14px,1.32vw,22px); box-shadow: 0 2px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
  padding: clamp(16px,1.9vw,32px); min-height: clamp(150px,17.2vw,288px); display: flex; flex-direction: column; }
@media (min-width: 1025px) { .composer { width: clamp(560px,52vw,820px); min-height: clamp(170px,15vw,250px); } }
@media (max-width: 1024px) and (min-width: 681px) { .composer { width: clamp(320px,72vw,760px); } }
@media (max-width: 680px) { .composer { width: 100%; } }
.composer-glow { position: absolute; left: 0; right: 0; top: 0; bottom: calc(-1 * clamp(3px,0.35vw,6px)); border-radius: inherit; background: var(--grad-solid); filter: blur(0.4px); opacity: 0.95; z-index: -1; }
.landing .composer-input { width: 100%; background: transparent; border: 0; border-radius: 0; min-height: 2.2em; outline: none; color: #f2f2f2; font: inherit; font-size: clamp(0.95rem,1.435vw,1.5rem); padding: 0; min-height: 2.2em; }
.composer-input::placeholder { color: var(--placeholder); }
.composer-input:focus-visible { outline: none; }
.composer:focus-within { border-color: rgba(255,255,255,0.16); }
.controls { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; gap: clamp(8px,1.08vw,18px); }
.cchip { position: relative; display: inline-flex; align-items: center; gap: .5rem; height: clamp(38px,3.23vw,54px); border-radius: 999px; padding: 0 clamp(12px,1.4vw,23px);
  background: var(--chip-fill); color: #fff; font-size: clamp(0.85rem,1.1vw,1.1rem); border: 1px solid var(--chip-border); }
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  .cchip { border-color: transparent; }
  .cchip::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--chip-edge);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }
}
.cchip:hover { background: rgba(255,255,255,0.06); }
.cchip svg { width: 1.1em; height: 1.1em; color: var(--icon); flex: none; }
.spacer-flex { flex: 1; }
.send { --send-ring: clamp(1.1px,0.092vw,1.53px); position: relative; width: clamp(44px,3.35vw,56px); height: clamp(44px,3.35vw,56px); border-radius: 50%; border: 0; cursor: pointer;
  padding: var(--send-ring); background: var(--grad-solid); display: flex; overflow: hidden; flex: none; }
.send::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--grad-solid); }
.send-inner { position: relative; flex: 1; border-radius: 50%; background: #141414; display: grid; place-items: center; }
.send-inner svg { width: 44%; height: 44%; }
.send:hover { filter: brightness(1.08); } .send:active { transform: scale(.95); }
html.hero-ready .send::before { animation: send-ring-sweep 10s linear infinite; }
@keyframes send-ring-sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.ai-out { margin-top: .9rem; width: clamp(300px,55vw,913px); max-width: 100%; text-align: left; }
@media (min-width: 1025px) { .ai-out { width: clamp(560px,52vw,820px); } }
.ai-out .notice { background: #111; border: 1px solid var(--hairline); color: #e8e8e8; }
.ai-note { color: var(--subtitle); font-size: .8rem; margin-top: .7rem; max-width: 46rem; }

/* service tiles in the hero (where the design has its brand strip) */
.svc-title { color: var(--strip); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; margin: clamp(1.6rem,3.5vw,3rem) 0 .8rem; }
.landing .services { width: min(100%, 980px); display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.landing .svc { display: flex; align-items: center; gap: .8rem; text-align: left; text-decoration: none; color: #e8e8e8; background: var(--chip-fill); border: 1px solid var(--hairline);
  border-radius: 16px; padding: .8rem 1rem; min-height: 64px; transition: border-color .18s ease, background .18s ease; }
.landing .svc:hover, .landing .svc:focus-visible { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.22); outline: none; }
.landing .svc:focus-visible { box-shadow: 0 0 0 2px #ffd400; }
.landing .svc svg { width: 28px; height: 28px; color: #bcbcbc; flex: none; }
.landing .svc strong { display: block; color: #fafafa; font-weight: 500; font-size: 1rem; }
.landing .svc span { display: block; color: var(--subtitle); font-size: .82rem; }
.landing .svc.help { background: linear-gradient(180deg, rgba(255,212,0,.10), rgba(120,208,205,.06)); border-color: rgba(255,212,0,.45); }
.landing .svc.help svg { color: #ffd400; }
@media (max-width: 860px) { .landing .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .landing .services { grid-template-columns: 1fr; } }

/* mobile nav overlay */
.nav-overlay { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; padding: 1.2rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom));
  background: radial-gradient(120% 70% at 10% 0%, rgba(255,212,0,.10), transparent 55%), radial-gradient(120% 70% at 100% 100%, rgba(120,208,205,.10), transparent 55%), linear-gradient(180deg, rgba(12,12,12,.94), rgba(12,12,12,.97));
  backdrop-filter: blur(22px) saturate(120%); -webkit-backdrop-filter: blur(22px) saturate(120%); opacity: 0; visibility: hidden; transition: opacity .34s ease, visibility 0s linear .34s; }
.nav-overlay.open { opacity: 1; visibility: visible; transition: opacity .34s ease; }
.nav-overlay .ov-head { display: flex; justify-content: space-between; align-items: center; }
.nav-overlay ul { list-style: none; margin: auto 0; padding: 0; display: grid; gap: .4rem; }
.nav-overlay li { opacity: 0; transform: translateY(12px); transition: opacity .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1); }
.nav-overlay.open li { opacity: 1; transform: none; }
.nav-overlay.open li:nth-child(1) { transition-delay: .08s; } .nav-overlay.open li:nth-child(2) { transition-delay: .14s; }
.nav-overlay.open li:nth-child(3) { transition-delay: .20s; } .nav-overlay.open li:nth-child(4) { transition-delay: .26s; }
.nav-overlay a.big { display: inline-block; font-size: clamp(2rem,9vw,3.4rem); font-weight: 500; color: #fafafa; text-decoration: none; letter-spacing: -0.02em; position: relative; }
.nav-overlay a.big::after { content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--grad); transition: width .35s ease; }
.nav-overlay a.big:hover::after, .nav-overlay a.big:focus-visible::after { width: 100%; }
.nav-overlay .ov-foot { display: grid; gap: .8rem; }
.nav-overlay .bar { height: 2px; background: var(--grad); border-radius: 2px; }
.nav-overlay .cta { width: 100%; }

@media (max-width: 1024px) {
  .nav-top { grid-template-columns: 1fr auto; }
  .nav-links, .nav-right .hide-sm { display: none; }
  .burger { display: inline-block; }
}

/* ---------- SECTION 2: how it works ---------- */
.section-two { min-height: 100dvh; background: var(--bg); padding: clamp(20px,3.2vh,42px) clamp(16px,6vw,91px) clamp(16px,2.4vh,32px);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif; }
@media (min-width: 1025px) { .section-two { padding-top: clamp(130px,12.6vw,210px); } }
.s2-wrap { max-width: 1300px; margin: 0 auto; }
.section-two h2 { font-weight: 400; letter-spacing: -0.02em; font-size: clamp(1.6rem,4.1vw,3.3rem); line-height: 1.11; color: #fff; margin: 0; }
.section-two .subhead { color: #8b8b8d; font-size: clamp(0.82rem,1.25vw,1.125rem); margin: 1rem 0 clamp(1.4rem,3vw,2.4rem); line-height: 1.45; }
@media (max-height: 520px) { .section-two .subhead { display: none; } }
.panel { position: relative; overflow: hidden; border-radius: clamp(10px,1vw,14px); padding: clamp(14px,2.4vw,40px);
  background: radial-gradient(120% 150% at 9% 52%, #d2ae1a 0%, #bf9f28 22%, rgba(175,155,55,0) 56%),
              radial-gradient(120% 150% at 95% 50%, #64a3a2 0%, #4d9494 34%, rgba(70,140,140,0) 64%),
              radial-gradient(80% 110% at 42% 6%, rgba(150,160,55,.55) 0%, rgba(150,160,60,0) 42%),
              linear-gradient(96deg, #c6a119 0%, #b0972a 32%, #7ba184 62%, #509393 100%); }
.panel::after { content: ''; position: absolute; inset: 0; background: radial-gradient(135% 120% at 50% 50%, transparent 58%, rgba(0,0,0,.30) 100%); pointer-events: none; }
.live { position: relative; z-index: 1; display: flex; align-items: center; gap: .55rem; color: #0b0c07; font-weight: 600; font-size: .9rem; margin: 0 auto .9rem; max-width: 814px; }
.live i { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle, #6bff72 0%, #23d92c 60%); box-shadow: 0 0 6px rgba(45,220,55,.65); }
.section-two .chat { max-height: none; overflow: visible; flex-direction: column; position: relative; z-index: 1; max-width: 814px; margin: 0 auto; background: #0d0d0d; border-radius: clamp(12px,1.4vw,18px); padding: clamp(14px,2vw,28px); display: grid; gap: .9rem; }
.msg { display: flex; gap: .7rem; align-items: flex-end; }
.msg.user { justify-content: flex-end; } .msg.user .avatar { order: 2; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: #1c1c1c; }
.avatar.ai { background: linear-gradient(105deg,#f5c40a 0%,#dcae3f 40%,#6ac6a0 62%,#22c0cf 100%); }
.avatar svg { width: 18px; height: 18px; }
.section-two .bubble { overflow-wrap: normal; background: #1c1c1c; color: #efefef; border-radius: clamp(11px,1.1vw,15px); max-width: 78%; font-size: clamp(0.85rem,1.12vw,1.06rem); line-height: 1.42; padding: .7rem .95rem; }
.bubble p { margin: 0; } .bubble p + p { margin-top: .75em; } .bubble ul { list-style: none; margin: .5em 0 0; padding: 0; }
.who-label { display: block; font-size: .72rem; color: #8b8b8d; margin-bottom: .2rem; }
.inputbar { display: flex; align-items: center; gap: .6rem; background: #fdfdfd; border-radius: 999px; height: clamp(44px,4.4vh,48px); padding: 0 .35rem 0 1.1rem; color: #6b6b6d; font-size: .95rem; }
.inputbar span { flex: 1; } .inputbar i { width: 34px; height: 34px; border-radius: 50%; background: #0c0c0c; display: grid; place-items: center; }
.inputbar svg { width: 16px; height: 16px; }
.example-note { position: relative; z-index: 1; max-width: 814px; margin: .8rem auto 0; color: #0b0c07; font-size: .8rem; font-weight: 500; }

/* ---------- content below (directory, help for others, privacy): dark cards ---------- */
.content { max-width: 1180px; margin: 0 auto; padding: clamp(2rem,5vw,4rem) clamp(16px,2vw,28px) 3rem; }
.landing .card { background: #111111; border: 1px solid var(--hairline); border-radius: 18px; }
.landing .card h2 { font-weight: 500; font-size: 1.15rem; letter-spacing: -0.01em; color: #fafafa; }
.landing .rc { background: #0e0e0e; border: 1px solid var(--hairline); }
.landing input, .landing select { background: #0e0e0e; color: #eee; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; min-height: 44px; padding: .5rem .8rem; }
.landing .tag.b { background: rgba(120,208,205,.12); color: #9fe0dc; }
.landing .footer { color: var(--subtitle); font-size: .82rem; border-top: 1px solid var(--hairline); padding-top: 1.2rem; margin-top: 1rem; }
.landing .footer a { color: #bcbcbc; }
.landing .quick-exit-float { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; box-shadow: 0 6px 22px rgba(0,0,0,.5); }
@media (min-width: 1025px) { .landing .quick-exit-float { display: none; } }

/* the [hidden] attribute must win over display rules (floating quick exit, menu overlay) */
.landing [hidden] { display: none !important; }
