/* SecretDoor website: a dark, "digital vault" look. Colors come from the app icon:
   steel black, amber light and a cool cyan counter-accent. No scripts, no external fonts. */
:root {
  color-scheme: dark;
  --bg: #06080c;
  --bg-2: #0b0f15;
  --panel: rgba(18, 24, 33, .72);
  --panel-solid: #111823;
  --border: rgba(148, 170, 200, .16);
  --border-hot: rgba(255, 170, 40, .45);
  --text: #e9eef5;
  --muted: #98a4b5;
  --amber: #ffab2e;
  --amber-2: #ff7a18;
  --cyan: #38d6ff;
  --green: #3ddc97;
  --link: #ffc15e;
  --code-bg: rgba(56, 214, 255, .08);
  --radius: 16px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(255, 140, 20, .16), transparent 60%),
    radial-gradient(900px 520px at 6% 12%, rgba(56, 214, 255, .09), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 17px/1.7 var(--sans);
  -webkit-text-size-adjust: 100%;
  position: relative;
}
/* faint circuit grid behind everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 160, 210, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 210, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 25%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 25%, #000 25%, transparent 78%);
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-color: rgba(255, 193, 94, .4); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 171, 46, .35); }
code {
  background: var(--code-bg); color: #bfeeff; padding: .12em .4em; border-radius: 6px;
  font: .88em var(--mono); border: 1px solid rgba(56, 214, 255, .14);
}
pre { background: #0a1018; border: 1px solid var(--border); padding: 14px 16px; border-radius: 12px; overflow-x: auto; }
pre code { padding: 0; background: none; border: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #1a1000; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- Header / footer ---------- */
.bar { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(6, 8, 12, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.brand img { border-radius: 9px; box-shadow: 0 0 18px rgba(255, 140, 20, .45); }
.site-header nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .95rem;
  transition: color .2s, background .2s;
}
.site-header nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.site-header nav a[aria-current="page"] { color: var(--amber); background: rgba(255, 171, 46, .1); box-shadow: inset 0 0 0 1px rgba(255, 171, 46, .3); }
.site-header nav a.ext::after { content: " \2197"; opacity: .6; }

.site-footer { margin-top: 96px; border-top: 1px solid var(--border); background: linear-gradient(#080b10, #05070a); padding: 32px 0 44px; color: var(--muted); font-size: .88rem; }
.site-footer p { margin: .55em 0; max-width: 860px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--amber); }

/* ---------- Layout ---------- */
main { max-width: 820px; margin: 0 auto; padding: 36px 20px 0; }
main.wide { max-width: 1120px; }
section { margin: 96px 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: .25em 0 .35em; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 2.2em 0 .6em; font-weight: 750; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
section > h2:first-child { margin-top: 0; }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .78rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin: 0 0 6px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 2.4s ease-in-out infinite; }
.glow-text {
  background: linear-gradient(95deg, var(--amber) 0%, var(--amber-2) 45%, #ff4d6d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head { max-width: 40em; margin-bottom: 32px; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--muted); margin: 0; }
.kicker { font: 600 .78rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin: 0 0 8px; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 12px; text-decoration: none; font-weight: 650; font-size: .98rem;
  color: var(--text); background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
  transition: transform .15s, border-color .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(56, 214, 255, .55); box-shadow: 0 8px 28px rgba(56, 214, 255, .14); }
.btn.primary { color: #1a0f00; border-color: transparent; background: linear-gradient(135deg, var(--amber), var(--amber-2)); box-shadow: 0 6px 28px rgba(255, 130, 20, .35); }
.btn.primary:hover { box-shadow: 0 10px 38px rgba(255, 130, 20, .55); border-color: transparent; }
.btn.ghost { background: transparent; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; margin: 28px 0 56px; min-height: 480px; }
.hero h1 { font-size: clamp(2.4rem, 6.2vw, 4rem); }
.hero .lead { margin-top: 0; }
.orb { position: relative; width: min(380px, 80%); aspect-ratio: 1; margin: 0 auto; }
.orb::before { /* spinning light ring */
  content: ""; position: absolute; inset: -6%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, var(--amber) 75%, var(--cyan) 90%, transparent 100%);
  filter: blur(22px); opacity: .75; animation: spin 9s linear infinite;
}
.orb::after { /* hairline ring */
  content: ""; position: absolute; inset: -4%; border-radius: 50%; border: 1px solid rgba(56, 214, 255, .35);
  box-shadow: 0 0 0 14px rgba(56, 214, 255, .035), 0 0 0 15px rgba(56, 214, 255, .12);
}
.orb img { position: relative; z-index: 1; width: 100%; border-radius: 50%; display: block; box-shadow: 0 0 80px rgba(255, 130, 20, .35); animation: float 7s ease-in-out infinite; }
.chip {
  position: absolute; z-index: 2; font: 600 .72rem var(--mono); letter-spacing: .06em; color: var(--text);
  padding: 7px 12px; border-radius: 999px; background: rgba(10, 16, 24, .8); border: 1px solid var(--border);
  backdrop-filter: blur(8px); box-shadow: 0 6px 20px rgba(0, 0, 0, .4); white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.chip b { color: var(--green); margin-right: 5px; }
.chip.c1 { top: 6%; left: -6%; animation-delay: -1s; }
.chip.c2 { top: 30%; right: -10%; animation-delay: -2.5s; }
.chip.c3 { bottom: 20%; left: -12%; animation-delay: -4s; }
.chip.c4 { bottom: 4%; right: -2%; animation-delay: -3s; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(10px); overflow: hidden; margin: 0; }
.stat { padding: 22px 18px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font: 800 2.1rem/1.1 var(--mono); color: var(--amber); text-shadow: 0 0 24px rgba(255, 150, 30, .5); }
.stat span { color: var(--muted); font-size: .88rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card {
  position: relative; padding: 24px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--border); backdrop-filter: blur(8px); overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card::before { /* top highlight line */
  content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 171, 46, .7), transparent); opacity: .5; transition: opacity .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-hot); box-shadow: 0 14px 40px rgba(255, 120, 20, .12); }
.card:hover::before { opacity: 1; }
.card h3 { margin: 14px 0 .35em; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--amber);
  background: rgba(255, 171, 46, .08); border: 1px solid rgba(255, 171, 46, .28); box-shadow: inset 0 0 18px rgba(255, 171, 46, .08);
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card.cyan .icon { color: var(--cyan); background: rgba(56, 214, 255, .07); border-color: rgba(56, 214, 255, .3); box-shadow: inset 0 0 18px rgba(56, 214, 255, .08); }

/* ---------- Encryption flow ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; align-items: stretch; counter-reset: step; }
.step {
  position: relative; padding: 18px 16px 18px; border: 1px solid var(--border); background: var(--panel);
  border-radius: 14px; margin: 0 14px; text-align: center; counter-increment: step;
}
.step::before { content: "0" counter(step); display: block; font: 700 .72rem var(--mono); color: var(--cyan); letter-spacing: .14em; margin-bottom: 8px; }
.step:not(:last-child)::after { /* the wire to the next step */
  content: ""; position: absolute; top: 50%; right: -29px; width: 28px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber)); box-shadow: 0 0 10px rgba(56, 214, 255, .7);
}
.step strong { display: block; font-size: 1rem; }
.step span { display: block; color: var(--muted); font-size: .84rem; margin-top: 4px; line-height: 1.45; }
.step.end { border-color: var(--border-hot); box-shadow: 0 0 40px rgba(255, 140, 20, .16); }
.flow-note { margin-top: 22px; padding: 14px 18px; border-radius: 12px; border: 1px dashed rgba(61, 220, 151, .45); background: rgba(61, 220, 151, .05); color: #c8f5df; }

/* ---------- Screenshots ---------- */
.shots { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; padding: 10px 0 0; }
.shot { margin: 0; }
.phone {
  position: relative; padding: 7px; border-radius: 34px; width: 240px; max-width: 100%;
  background: linear-gradient(160deg, #2b3442, #0c1118 55%, #202938);
  border: 1px solid rgba(160, 190, 230, .25);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .6), 0 0 50px rgba(255, 130, 20, .12);
  transition: transform .3s, box-shadow .3s;
}
.phone::before { /* camera dot */
  content: ""; position: absolute; top: 14px; left: 50%; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%;
  background: #05070a; box-shadow: 0 0 0 2px rgba(255, 255, 255, .06); z-index: 2;
}
.phone img { display: block; width: 100%; border-radius: 27px; }
.shots .shot:nth-child(odd) .phone { transform: translateY(14px); }
.shot:hover .phone { transform: translateY(-6px) !important; box-shadow: 0 28px 70px rgba(0, 0, 0, .65), 0 0 70px rgba(255, 130, 20, .28); }
.shot figcaption { color: var(--muted); font-size: .85rem; margin-top: 12px; text-align: center; max-width: 240px; }
.shots .shot:nth-child(odd) figcaption { margin-top: 26px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.panel h2 { margin-top: 0; font-size: 1.4rem; }
.panel.hot { border-color: var(--border-hot); background: linear-gradient(160deg, rgba(255, 140, 20, .1), var(--panel) 60%); }

.cta-band {
  text-align: center; padding: 48px 24px; border-radius: 22px; border: 1px solid var(--border-hot);
  background: radial-gradient(600px 220px at 50% 0, rgba(255, 140, 20, .2), transparent 70%), var(--panel);
}
.cta-band h2 { margin-top: 0; }
.badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.badge { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .04); font-weight: 600; }
.badge small { display: block; font: 500 .7rem var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Documents (manual, privacy, support) ---------- */
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: .2em; }
.doc h2 { padding-top: .4em; border-top: 1px solid var(--border); margin-top: 2.6em; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin: .4em 0; }
.doc li::marker { color: var(--amber); }
.crumbs { color: var(--muted); font: .82rem var(--mono); margin: 0; }
.crumbs a { color: var(--muted); }
.back { margin-top: 56px; }
.toc {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 22px; margin: 26px 0;
}
.toc strong { font: 600 .78rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.toc ol { margin: .5em 0 0; columns: 2; column-gap: 32px; }
.toc li { margin: .2em 0; }
.note, .note.warn { border: 1px solid rgba(255, 171, 46, .35); border-left: 4px solid var(--amber); background: rgba(255, 171, 46, .07); padding: 14px 18px; border-radius: 4px 12px 12px 4px; margin: 22px 0; }
.note.warn { border-color: rgba(255, 90, 90, .4); border-left-color: #ff5a5a; background: rgba(255, 90, 90, .07); }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: rgba(255, 255, 255, .04); font: 600 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.topics { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.topics li { margin: 0; }
.topics a {
  display: block; height: 100%; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel);
  text-decoration: none; color: var(--text); font-weight: 650; transition: border-color .2s, transform .2s;
}
.topics a:hover { border-color: var(--border-hot); transform: translateY(-2px); }
.topics a span { display: block; color: var(--muted); font-weight: 400; font-size: .9rem; margin-top: 2px; }
h2[id], h3[id] { scroll-margin-top: 84px; }

.side { display: grid; grid-template-columns: 240px 1fr; gap: 34px; align-items: start; margin: 22px 0 10px; }
.side > div > :first-child { margin-top: 0; }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  main.wide section, .doc h2, .side { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero { margin-top: 8px; min-height: 0; }
  .orb { order: -1; width: min(260px, 70%); margin-bottom: 14px; }
  .chip.c1, .chip.c3 { left: -2%; } .chip.c2, .chip.c4 { right: -2%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .flow { grid-template-columns: 1fr; gap: 26px; }
  .step { margin: 0; }
  .step:not(:last-child)::after { top: auto; bottom: -27px; right: 50%; width: 2px; height: 26px; background: linear-gradient(var(--cyan), var(--amber)); }
  .side { grid-template-columns: 1fr; }
  .side .shot { justify-self: center; }
  .toc ol { columns: 1; }
  .shots .shot .phone, .shots .shot:nth-child(odd) .phone { transform: none; }
  .shots .shot:nth-child(odd) figcaption { margin-top: 12px; }
  section { margin: 64px 0; }
  body { font-size: 16.5px; }
}
@media print {
  body, body::before { background: #fff !important; color: #000; }
  .site-header, .site-footer { display: none; }
  a { color: #000; }
}
