/* DigiBrain UK client accounts
   Colours and type from digibrain.cc: slate on near-white, Space Grotesk headings, Inter text.
   One dark band (the payments section) borrowed from algobit.co.uk. */

@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-2: #eef2f3;
  --ink: #1f282e;
  --ink-2: #34424b;
  --text-2: #52636d;
  --tone: #5b7684;
  --slate: #8da4b0;
  --slate-soft: #dbe4e8;
  --line: #dce2e5;
  --line-2: #e7ecee;

  --ok-bg: #e7f5ec; --ok: #1d6b3d;
  --warn-bg: #fdf1df; --warn: #8a5300;
  --err-bg: #fbe9e9; --err: #9b2222;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(31, 40, 46, 0.05);
  --shadow-lift: 0 1px 2px rgba(31, 40, 46, 0.04), 0 12px 32px -12px rgba(31, 40, 46, 0.18);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (pointer: fine) { html { overscroll-behavior: none; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font: 400 1rem/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--slate-soft); color: var(--ink); }
input, textarea, button { font: inherit; color: inherit; }
input, textarea { caret-color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); line-height: 1.1; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.2vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--slate); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: text-decoration-color 150ms ease, color 150ms ease; }
a:hover { text-decoration-color: currentColor; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.tone { color: var(--tone); }
.muted { color: var(--text-2); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus-visible { top: 12px; outline-color: var(--slate); }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 48px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  font-weight: 600; font-size: 0.9375rem; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--r-sm);
  text-decoration: none; cursor: pointer; touch-action: manipulation; user-select: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { cursor: progress; opacity: 0.7; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-2); border-color: #cdd6da; color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.875rem; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { width: auto; mix-blend-mode: multiply; }
.logo-md { height: 46px; }
.logo-sm { height: 36px; }
.logo-text { font: 700 1.25rem var(--display); letter-spacing: -0.02em; color: var(--ink); }
.region { font-size: 0.8125rem; font-weight: 600; color: var(--text-2); padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.2; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-spacer { margin-left: auto; }
.nav-link { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: var(--r-sm); font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-account { display: flex; align-items: center; gap: 8px; }

.demo-bar { background: var(--warn-bg); color: var(--warn); font-size: 0.875rem; padding: 8px 0; }
.flash { padding: 12px 0; font-size: 0.9375rem; font-weight: 500; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-err { background: var(--err-bg); color: var(--err); }

/* ---------- hero ---------- */
.hero { padding: 96px 0 104px; }
@media (min-width: 961px) and (min-height: 700px) {
  .hero { min-height: calc(100svh - var(--header-h)); display: grid; align-content: center; padding: 64px 0 80px; }
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 72px; align-items: center; }
.hero h1 { max-width: 15ch; }
.lead { margin-top: 24px; font-size: 1.1875rem; line-height: 1.55; color: var(--text-2); max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.fine { display: flex; align-items: flex-start; gap: 8px; margin-top: 24px; font-size: 0.875rem; color: var(--text-2); }
.fine svg { flex: none; margin-top: 3px; }

/* product preview: the real account screen, simplified */
.preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lift); padding: 8px 24px 20px; }
.preview-head { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.preview-title { font: 700 1.125rem var(--display); letter-spacing: -0.01em; }
.preview-sub { font-size: 0.875rem; color: var(--text-2); }
.preview-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.preview-label { display: block; font-size: 0.875rem; color: var(--text-2); margin-bottom: 4px; }
.preview-amount { display: block; font: 700 1.75rem/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.preview-amount small { font: 500 0.875rem var(--font); color: var(--text-2); margin-left: 2px; letter-spacing: 0; }
.preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; font-size: 0.875rem; color: var(--text-2); }
.preview-btn { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 600; color: var(--ink); }

/* hero entrance: once, on load */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] { animation: enter 700ms var(--ease-out) both; }
  .preview[data-enter] { animation-delay: 120ms; }
  @keyframes enter { from { opacity: 0; transform: translateY(12px); } }
}

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section-surface { background: var(--surface); border-top: 1px solid var(--line); }
.section-lead { margin-top: 16px; font-size: 1.0625rem; color: var(--text-2); max-width: 36rem; }

/* the one dark band */
.band { background: var(--ink); color: #c9d4d9; padding: 104px 0; }
.band h2, .band h3 { color: #fff; }
.band .section-lead { color: #a9b8bf; }
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { padding-top: 24px; border-top: 1px solid rgba(201, 212, 217, 0.22); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(201, 212, 217, 0.35); font-size: 0.8125rem; font-weight: 600; color: #fff; margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.steps p { margin-top: 10px; color: #a9b8bf; }

/* questions */
.faq-list { border-top: 1px solid var(--line); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--ink-2); }
.chevron { flex: none; color: var(--text-2); transition: transform 200ms var(--ease-out); }
.faq[open] .chevron { transform: rotate(180deg); }
.faq p { padding: 0 0 22px; color: var(--text-2); max-width: 62ch; }

/* two-column sections: heading left, content right */
.split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 72px; align-items: start; }
.contact-email { margin-top: 28px; font-size: 1.125rem; font-weight: 500; }

/* ---------- forms ---------- */
.panel { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); }
.section-surface .panel { background: var(--bg); box-shadow: none; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }
label { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.optional { font-weight: 400; color: var(--text-2); }
input, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--surface); border: 1px solid #cfd8dc; border-radius: var(--r-sm);
  font-size: 1rem; line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input::placeholder, textarea::placeholder { color: #7d8d96; }
input:hover, textarea:hover { border-color: #b7c4ca; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px var(--slate-soft); }
textarea { resize: vertical; }
.notice { padding: 12px 14px; border-radius: var(--r-sm); font-size: 0.9375rem; font-weight: 500; }
.notice-ok { background: var(--ok-bg); color: var(--ok); }
.notice-err { background: var(--err-bg); color: var(--err); }

/* ---------- auth & results ---------- */
.auth { display: grid; place-items: center; padding: 88px 24px 112px; }
.auth-panel { width: min(420px, 100%); padding: 36px; display: grid; gap: 14px; }
.auth-panel h1 { font-size: 2rem; }
.auth-panel .form { margin: 10px 0 4px; }
.auth-panel.center { justify-items: center; }
.demo-hint { padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); color: var(--ink-2); }
.result-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); margin-bottom: 4px; }
.result-icon.is-ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- account & admin ---------- */
.page-head { padding: 56px 0 32px; }
.page-head h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }
.page-head .muted { margin-top: 8px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.crumb { font-size: 0.875rem; margin-bottom: 10px; }
.section-tight { padding-bottom: 96px; }
.section-tight .wrap { display: grid; gap: 20px; }
.section-tight .wrap.grid-2 { display: grid; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.grid-wide-left { grid-template-columns: 1.35fr 1fr; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { font-size: 1.125rem; letter-spacing: -0.01em; }
.pay-form { margin-top: auto; padding-top: 24px; }
.amount { font: 700 2.25rem/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.amount small { font: 500 1rem var(--font); color: var(--text-2); letter-spacing: 0; margin-left: 2px; }
.subhead { margin: 28px 0 8px; font-size: 1rem; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-neutral { background: var(--surface-2); color: var(--text-2); }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: left; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .num { text-align: left; }
.cell-sub { display: block; font-size: 0.8125rem; color: var(--text-2); }
.messages { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.messages li { padding-top: 16px; border-top: 1px solid var(--line-2); overflow-wrap: anywhere; }
.messages time { font-size: 0.8125rem; color: var(--text-2); }
.messages p { margin-top: 4px; white-space: pre-wrap; }
.panel-head + .messages { margin-top: 0; }
.panel-head + .messages li:first-child { border-top: 0; padding-top: 0; }
.facts { margin: 0 0 20px; display: grid; gap: 12px; }
.facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.facts dt { font-size: 0.875rem; color: var(--text-2); }
.facts dd { margin: 0; text-align: right; }
.panel .form + .form { margin-top: 18px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 32px; font-size: 0.875rem; color: var(--text-2); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-2); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { padding: 64px 0 80px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .preview { max-width: 480px; }
  .steps { grid-template-columns: 1fr; gap: 36px; margin-top: 40px; }
  .section, .band { padding: 80px 0; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .wrap, .narrow { width: calc(100% - 40px); }
  .nav { display: none; }
  .nav-account { margin-left: auto; }
  .nav-account .nav-link { display: none; }
  .logo-md { height: 40px; }
  .hero { padding: 48px 0 64px; }
  .lead { font-size: 1.0625rem; }
  .actions .btn { width: 100%; }
  .grid-2, .grid-wide-left, .field-row, .field-row.three { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .panel { padding: 22px; }
  .auth { padding: 48px 20px 72px; }
  .auth-panel { padding: 28px 22px; }
  .section, .band { padding: 64px 0; }
  .footer-legal { flex-direction: column; }
}
