/* ============================================================================
 * site.css — the Survey Office website.
 *
 * Colours are the application's own (src/ui/app-theme.ts): terracotta accent on
 * a warm cream ground, so the site and the software look like one product. No
 * framework and no build step: these pages are served straight off the licence
 * server, and a toolchain for eight static files would be its own maintenance.
 * ============================================================================ */

:root {
  --accent: #c4561f;
  --accent-deep: #a7471a;
  --ink: #2b2620;
  --sub: #6b6256;
  --bg: #faf6ee;
  --panel: #fffdf8;
  --line: #e4dccd;
  --line-soft: #efe8da;
  --shadow: 0 18px 48px rgba(60, 45, 25, 0.10);
  --radius: 12px;
  --wide: 1060px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #efe7d9;
    --sub: #a79c8b;
    --bg: #1d1b18;
    --panel: #272420;
    --line: #3b362e;
    --line-soft: #322e28;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.62 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }

/* ---- header -------------------------------------------------------------- */

header.top {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; color: var(--accent); text-decoration: none; font-size: 17px; letter-spacing: -0.2px; }
.brand img { display: block; width: 26px; height: 26px; border-radius: 5px; }
nav.top-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
nav.top-nav a { color: var(--sub); text-decoration: none; font-size: 14.5px; }
nav.top-nav a:hover { color: var(--ink); }

/* ---- type ---------------------------------------------------------------- */

h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.14; letter-spacing: -0.6px; margin: 0 0 14px; }
h2 { font-size: clamp(22px, 3vw, 29px); line-height: 1.22; letter-spacing: -0.3px; margin: 0 0 10px; }
h3 { font-size: 17px; margin: 0 0 6px; letter-spacing: -0.1px; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--sub); max-width: 62ch; }
.sub { color: var(--sub); }
.small { font-size: 13.5px; }
a { color: var(--accent); }

section { padding: 56px 0; }
section.tight { padding: 34px 0; }
section + section { border-top: 1px solid var(--line-soft); }

/* ---- buttons ------------------------------------------------------------- */

.btn {
  display: inline-block; padding: 11px 20px; border-radius: 9px; font-size: 15px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  cursor: pointer; transition: box-shadow .18s, transform .06s;
}
.btn:hover { box-shadow: 0 3px 14px rgba(60, 45, 25, .12); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn[disabled], .btn.off { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; margin-top: 22px; }

/* ---- cards and grids ----------------------------------------------------- */

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px;
}
.card h3 { color: var(--ink); }
.card p:last-child { margin-bottom: 0; }

.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 30px; font-weight: 650; letter-spacing: -0.8px; margin: 6px 0 2px; }
.plan .per { color: var(--sub); font-size: 13.5px; }
.plan .seats { color: var(--sub); font-size: 14px; margin-top: 10px; }
.plan .btn { margin-top: auto; text-align: center; }
.plan.unset .price { font-size: 19px; color: var(--sub); font-weight: 500; }

ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { padding-left: 24px; position: relative; margin-bottom: 7px; }
ul.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 11px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(42deg);
}

/* ---- forms --------------------------------------------------------------- */

form.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 460px; }
label { display: block; font-size: 13.5px; color: var(--sub); margin: 12px 0 5px; }
input[type=email], input[type=text], input[type=password] {
  width: 100%; padding: 10px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink);
}
input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.msg { margin-top: 14px; padding: 11px 13px; border-radius: 9px; font-size: 14.5px; }
.msg.ok { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border: 1px solid var(--accent); }
.msg.bad { background: color-mix(in srgb, #c0392b 9%, var(--panel)); border: 1px solid #c0392b; }
.msg[hidden] { display: none; }

/* ---- notices ------------------------------------------------------------- */

.notice {
  border: 1px dashed var(--accent); border-radius: var(--radius); padding: 14px 16px;
  background: color-mix(in srgb, var(--accent) 7%, var(--panel)); font-size: 14.5px;
}

/* ---- footer -------------------------------------------------------------- */

footer.bottom { border-top: 1px solid var(--line); padding: 30px 0 46px; color: var(--sub); font-size: 14px; }
footer.bottom .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
footer.bottom a { color: var(--sub); text-decoration: none; }
footer.bottom a:hover { color: var(--ink); text-decoration: underline; }
footer.bottom .spacer { flex: 1; }

@media (max-width: 620px) {
  header.top .wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
  nav.top-nav { margin-left: 0; width: 100%; gap: 16px; }
  section { padding: 40px 0; }
}
