/* Frangi onboarding — shared styles for index.html and onboarding.html.
   Colours and fonts match the Frangi admin dashboard tokens. */

:root {
  color-scheme: light;
  --bg: #F5F7F6;
  --bg2: #EEF5F2;
  --panel: #FFFFFF;
  --line: #E3E8E6;
  --line2: #D3DCD9;
  --ink: #10302B;
  --ink2: #3E5A54;
  --muted: #5B726D;
  --green: #0A6B66;
  --green-dark: #085651;
  --red: #B3362C;
  --wa: #128C7E;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1400px 620px at 50% -12%, rgba(147, 162, 160, .3), rgba(147, 162, 160, .08) 45%, transparent 75%),
    var(--bg);
  background-attachment: fixed;
}

button, input { font: inherit; color: inherit; }
a { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--muted); font-weight: 400; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--green-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-wa { background: var(--wa); }
.btn-icon { flex: none; width: 22px; height: 22px; }
.btn-wa:hover { background: #0E7468; }
.btn-link {
  background: none; border: 0; padding: 0;
  color: var(--muted); text-decoration: underline; cursor: pointer;
  font-size: 14px;
}

/* ---------- homepage: access code ---------- */

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.gate-card {
  width: 100%;
  max-width: 380px;
}
.gate-card h1 {
  font-family: var(--head);
  margin: 28px 0 28px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.gate-card p { margin: 0 0 24px; color: var(--ink2); }
.gate-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}
.gate-card input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid var(--line2);
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: .02em;
}
.gate-card input:focus { outline: 0; border-bottom-color: var(--green); }
.gate-card .btn { width: 100%; margin-top: 16px; }
.gate-error {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 14px;
}
.gate-help { margin: 20px 0 0 !important; font-size: 14px; color: var(--muted) !important; }

/* ---------- onboarding page ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 0;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px 80px;
}
.page h1 {
  font-family: var(--head);
  font-weight: 700;
  margin: 0 0 36px;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: -.025em;
}
.steps { border-top: 1px solid var(--line2); }

.step { border-bottom: 1px solid var(--line2); }

.step summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.step summary::-webkit-details-marker { display: none; }
.step summary:hover .step-title { color: var(--green); }

.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg2);
  color: var(--green);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}
.step[open] .step-num { background: var(--green); color: #fff; }

.step-title { flex: 1; font-family: var(--head); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }

.step summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s;
}
.step[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

.step-body {
  padding: 0 0 28px 50px;
  color: var(--ink2);
}
.step-body p { margin: 0 0 14px; }
.step-body ul { margin: 0 0 16px; padding-left: 20px; }
.step-body li { margin-bottom: 6px; }
.step-body .btn { margin-top: 6px; }
.step-note { font-size: 14px; color: var(--muted); }

.page-foot { margin-top: 36px; color: var(--muted); font-size: 14px; }

@media (max-width: 520px) {
  .step-body { padding-left: 0; }
}

/* ---------- WhatsApp result pages ---------- */
.result { text-align: left; }
.result-mark {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-top: 28px;
  border-radius: 50%;
  background: var(--green); color: #fff;
  font-size: 28px; line-height: 1;
}
.result-mark.is-error { background: var(--red); }
.result h1 { margin-top: 20px; margin-bottom: 12px; }
.result .btn { width: auto; margin-top: 4px; }
