/* Elros - public onboarding site. Brand system shared with the self-management
   console (src/elros/ui/console/app.css): teal accent, neutral surfaces, mono+sans. */

:root {
  --ground: #EDF0F3;
  --surface: #FBFCFD;
  --surface-2: #F2F5F8;
  --ink: #161B22;
  --ink-soft: #41505F;
  --muted: #76828F;
  --faint: #9AA5B1;
  --line: #DCE2E8;
  --line-strong: #C7D0D8;
  --accent: #0E7F8C;
  --accent-deep: #0A5A63;
  --accent-soft: #DCEEF0;
  --accent-line: #BFE0E3;
  --ok: #2E7D52;
  --ok-soft: #DBEEE2;
  --shadow: rgba(20, 27, 34, .06);
  --shadow-lg: rgba(20, 27, 34, .10);
  --btn-bg: #FFFFFF;
  --code-bg: #0E131A;
  --code-ink: #C9D5DE;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --maxw: 1080px;
}

:root[data-theme="dark"] {
  --ground: #0E131A;
  --surface: #161D26;
  --surface-2: #1B232E;
  --ink: #E7ECF1;
  --ink-soft: #B3BECA;
  --muted: #818E9C;
  --faint: #5E6B79;
  --line: #283340;
  --line-strong: #36434F;
  --accent: #36AEBB;
  --accent-deep: #7FD6DE;
  --accent-soft: #123139;
  --accent-line: #1E4A53;
  --ok: #58B888;
  --ok-soft: #15301F;
  --shadow: rgba(0, 0, 0, .3);
  --shadow-lg: rgba(0, 0, 0, .45);
  --btn-bg: #1E2731;
  --code-bg: #0A0E14;
  --code-ink: #C9D5DE;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E131A;
    --surface: #161D26;
    --surface-2: #1B232E;
    --ink: #E7ECF1;
    --ink-soft: #B3BECA;
    --muted: #818E9C;
    --faint: #5E6B79;
    --line: #283340;
    --line-strong: #36434F;
    --accent: #36AEBB;
    --accent-deep: #7FD6DE;
    --accent-soft: #123139;
    --accent-line: #1E4A53;
    --ok: #58B888;
    --ok-soft: #15301F;
    --shadow: rgba(0, 0, 0, .3);
    --shadow-lg: rgba(0, 0, 0, .45);
    --btn-bg: #1E2731;
    --code-bg: #0A0E14;
    --code-ink: #C9D5DE;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a { color: var(--accent-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 5vw, 40px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 680; font-size: 18px; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.mark { width: 30px; height: 30px; border-radius: 8px; flex: none; overflow: hidden; box-shadow: 0 1px 3px var(--shadow-lg); }
.mark img { width: 100%; height: 100%; display: block; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-links a { font-size: 14px; color: var(--ink-soft); text-decoration: none; padding: 7px 11px; border-radius: 7px; font-weight: 520; }
.nav-links a:hover { color: var(--accent-deep); background: var(--surface-2); }
.nav-cta { color: #fff !important; background: var(--accent); }
.nav-cta:hover { background: var(--accent-deep) !important; color: #fff !important; }
:root[data-theme="dark"] .nav-cta, :root[data-theme="dark"] .nav-cta:hover { color: #06181c !important; }
.theme-toggle { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); background: var(--btn-bg); border: 1px solid var(--line-strong); border-radius: 7px; padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-deep); }
@media (max-width: 640px) { .nav-links .nav-hide { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 10vw, 108px) 0 clamp(40px, 7vw, 72px); text-align: center; }
.hero h1 {
  font-size: clamp(34px, 6.2vw, 62px);
  line-height: 1.03;
  letter-spacing: -.03em;
  font-weight: 720;
  margin: 20px auto 0;
  max-width: 16ch;
  text-wrap: balance;
}
.hero h1 .grad { background: linear-gradient(115deg, var(--accent) 10%, var(--accent-deep) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { margin: 22px auto 0; max-width: 60ch; font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-soft); text-wrap: pretty; }
.hero .cta-row { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .aside { margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.hero .aside code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--ink-soft); }

.btn { font-family: var(--sans); font-size: 15px; font-weight: 560; color: var(--ink-soft); background: var(--btn-bg); border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: all .14s ease; }
.btn:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.primary:hover { color: #06181c; }
.btn svg { width: 16px; height: 16px; }

/* ---------- section scaffolding ---------- */
section { padding: clamp(40px, 7vw, 80px) 0; }
.section-head { text-align: center; max-width: 62ch; margin: 0 auto clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.025em; font-weight: 680; margin: 12px 0 0; line-height: 1.1; text-wrap: balance; }
.section-head p { margin: 14px 0 0; color: var(--ink-soft); font-size: 17px; text-wrap: pretty; }

/* ---------- value cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 26px 24px; box-shadow: 0 1px 2px var(--shadow); }
.card .ic { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; place-items: center; color: var(--accent-deep); margin-bottom: 16px; }
.card .ic svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 640; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card p + p { margin-top: 10px; }
.card em { color: var(--ink); font-style: normal; font-weight: 600; }

.aside-note { text-align: center; margin: 30px auto 0; max-width: 60ch; color: var(--muted); font-size: 14.5px; }
.aside-note b { color: var(--ink-soft); font-weight: 600; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 24px 22px 22px; }
.step .num { font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-line); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 17px; font-weight: 620; }
.step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.step p code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--ink-soft); word-break: break-all; }

/* ---------- setup ---------- */
.setup { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.tab { font-family: var(--sans); font-size: 14px; font-weight: 550; color: var(--ink-soft); background: var(--btn-bg); border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 16px; cursor: pointer; transition: all .14s ease; }
.tab:hover { border-color: var(--accent); color: var(--accent-deep); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .tab[aria-selected="true"] { color: #06181c; }

.panel { display: none; max-width: 760px; margin: 0 auto; }
.panel[data-active="true"] { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-intro { text-align: center; color: var(--ink-soft); margin: 0 auto 26px; max-width: 56ch; }

.stepcard { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 4px 22px; box-shadow: 0 1px 2px var(--shadow); }
.stepline { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.stepline:last-child { border-bottom: 0; }
.stepline .sn { font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-line); width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; }
.stepline .st { min-width: 0; }
.stepline .st h4 { margin: 2px 0 4px; font-size: 15.5px; font-weight: 620; }
.stepline .st p { margin: 0 0 10px; font-size: 14.5px; color: var(--ink-soft); }
.stepline .st p:last-child { margin-bottom: 0; }
.stepline .st p code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--ink-soft); word-break: break-word; }

/* code block with copy */
.code { position: relative; background: var(--code-bg); border: 1px solid var(--line-strong); border-radius: 10px; margin: 4px 0 2px; }
.code pre { margin: 0; padding: 14px 46px 14px 15px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--code-ink); white-space: pre-wrap; word-break: break-word; }
.code .copy { position: absolute; top: 8px; right: 8px; font-family: var(--mono); font-size: 11px; color: #9fb0bd; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: 4px 8px; cursor: pointer; transition: all .14s ease; }
.code .copy:hover { color: #fff; background: rgba(255,255,255,.12); }
.code .copy.done { color: var(--ok); border-color: var(--ok); }

.dl { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.callout { display: flex; gap: 11px; align-items: flex-start; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 11px; padding: 14px 16px; font-size: 14px; color: var(--ink-soft); margin: 18px auto 0; max-width: 760px; }
.callout svg { width: 18px; height: 18px; flex: none; color: var(--accent-deep); margin-top: 2px; }
.callout b { color: var(--ink); font-weight: 640; }
.callout code { font-family: var(--mono); font-size: 12.5px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: 5px; padding: 1px 6px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 2px 18px; box-shadow: 0 1px 2px var(--shadow); }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent-deep); font-size: 20px; font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 16px; color: var(--ink-soft); font-size: 14.5px; }
.faq .a code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 34px 0; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.foot-inner a { color: var(--ink-soft); text-decoration: none; }
.foot-inner a:hover { color: var(--accent-deep); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
