/* Reachout public pages — same indigo/violet identity as the app. AA contrast everywhere. */
:root {
  --bg: #fbfaf7;
  --bg-subtle: #f4f2ec;       /* sidebar, table heads, page wells */
  --bg-muted: #ece9e1;        /* hover, chips */
  --text: #17191c;            /* 17.9:1 on white */
  --text-2: #33373d;          /* 10.4:1 */
  --text-3: #52575e;          /* 7.6:1  — secondary copy */
  --text-4: #6f747b;          /* 4.8:1  — hints, placeholders, meta */
  --border: #e6e3db;
  --border-strong: #d3cfc4;
  --accent: #0f6b54;          /* 6.4:1 on white */
  --accent-2: #c2410c;
  --accent-hover: #0b5643;
  --accent-soft: #e4f1ec;
  --accent-text: #0b5643;     /* 7.3:1 on accent-soft */
  --grad: linear-gradient(var(--accent), var(--accent));
  --glow: 0 1px 2px rgba(23, 25, 28, .12);
  --success: #15803d;  --success-soft: #f0fdf4; --success-border: #bbf7d0;
  --danger: #b91c1c;   --danger-soft: #fef2f2;  --danger-border: #fecaca;
  --warning: #a16207;  --warning-soft: #fefce8; --warning-border: #fde68a;
  --wa: #16a34a; --wa-bubble: #d9fdd3; --wa-bg: #efeae2; --wa-header: #008069;
  --shadow-xs: 0 1px 2px rgba(23, 25, 28, .05);
  --shadow-sm: 0 1px 3px rgba(23, 25, 28, .08), 0 1px 2px rgba(23, 25, 28, .04);
  --shadow-md: 0 4px 12px -2px rgba(23, 25, 28, .08), 0 2px 4px -2px rgba(23, 25, 28, .05);
  --shadow-lg: 0 20px 40px -12px rgba(23, 25, 28, .18), 0 4px 10px -4px rgba(23, 25, 28, .06);
  --ring: 0 0 0 3px rgba(15, 107, 84, .22);
  --r-sm: 6px; --r: 8px; --r-lg: 12px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d0f0e;
  --bg-subtle: #141716;
  --bg-muted: #1d2220;
  --text: #eceeec;
  --text-2: #d0d5d2;
  --text-3: #b2b9b5;
  --text-4: #8a918d;
  --border: #232927;
  --border-strong: #313935;
  --accent: #1e8c6a;
  --accent-2: #f08a4b;
  --accent-hover: #27a47d;
  --accent-soft: #13271f;
  --accent-text: #6fd6b4;
  --grad: linear-gradient(var(--accent), var(--accent));
  --glow: 0 1px 2px rgba(0, 0, 0, .5);
  --success: #4ade80;  --success-soft: #052e16; --success-border: #14532d;
  --danger: #f87171;   --danger-soft: #2a0f12;  --danger-border: #7f1d1d;
  --warning: #facc15;  --warning-soft: #281f05; --warning-border: #713f12;
  --wa-bubble: #005c4b; --wa-bg: #0b141a; --wa-header: #1f2c34;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, .5);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(111, 214, 180, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(15, 107, 84, .2); }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; color: var(--text); letter-spacing: -.02em; text-wrap: balance; }
p { text-wrap: pretty; }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--ring); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: var(--r); z-index: 200; }
.skip:focus { top: 12px; }

/* ---------- brand ---------- */
.brand-mark { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; color: var(--text); text-decoration: none !important; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); }
.logo svg { width: 18px; height: 18px; stroke-width: 2.6; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font: 500 14px/1 var(--font); cursor: pointer;
  white-space: nowrap; text-decoration: none !important; box-shadow: var(--shadow-xs);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.btn:active { background: var(--bg-muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-primary:hover { filter: brightness(1.08); border-color: transparent; }
.btn-primary:active { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-3); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger-border); }
.btn-danger-solid { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-danger-solid:hover { background: #991b1b; border-color: #991b1b; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: var(--r); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font: 14px/1.4 var(--font); box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.textarea { height: auto; min-height: 280px; padding: 12px; resize: vertical; line-height: 1.6; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.help { font-size: 13px; color: var(--text-4); }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s ease; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; background: var(--bg-muted); border-radius: var(--r); }
.seg label { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 12px; border-radius: var(--r-sm); cursor: pointer; font-weight: 500; color: var(--text-3); transition: background .15s, color .15s; text-align: center; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:hover { color: var(--text); }
.seg label:has(input:checked) { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.seg label:has(input:focus-visible) { box-shadow: var(--ring); }
.seg span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- surfaces ---------- */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); min-height: 54px; }
.card-head h3 { font-size: 14px; font-weight: 600; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--bg-muted); color: var(--text-3); border: 1px solid var(--border); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.badge.bad { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.badge.warn { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.badge.brand { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge.plain::before { display: none; }

.alert { display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--r); font-size: 13.5px; align-items: flex-start; border: 1px solid; }
.alert .i { margin-top: 2px; }
.alert.warn { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.alert.info { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.alert.bad { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- toast + modal ---------- */
.toasts { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 120; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--bg); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-weight: 500; animation: rise .2s ease-out; }
.toast .i { color: var(--success); }
.toast.err .i { color: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }

.modal-backdrop { position: fixed; inset: 0; background: rgba(23, 25, 28, .45); display: grid; place-items: center; z-index: 110; padding: 16px; animation: fade .15s; }
.modal { width: min(440px, 100%); background: var(--bg); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 22px; animation: rise .18s ease-out; border: 1px solid var(--border); }
.modal h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.modal p { margin: 0 0 16px; color: var(--text-3); }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- validation ---------- */
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }
.field-error { display: flex; align-items: flex-start; gap: 5px; font-size: 13px; color: var(--danger); margin-top: 2px; animation: rise .15s ease-out; }
[data-group] > .field-error { margin-top: 12px; }
.form-error { padding: 10px 12px; border-radius: var(--r); background: var(--danger-soft); border: 1px solid var(--danger-border); color: var(--danger); font-size: 13.5px; margin: 12px 0 0; }
.opt { font-weight: 400; color: var(--text-4); }
.counter { font-variant-numeric: tabular-nums; margin-right: 8px; }
.counter.near { color: var(--warning); font-weight: 500; }
.code-input { font: 600 22px/1 var(--mono); letter-spacing: .4em; text-align: center; height: 52px; padding-left: calc(12px + .4em); }

/* ---------- loading ---------- */
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; }
.sk { display: inline-block; height: 12px; width: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--bg-muted) 25%, color-mix(in srgb, var(--bg-muted) 55%, var(--bg)) 50%, var(--bg-muted) 75%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; vertical-align: middle; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { cursor: default; }

/* ---------- enquiry form + pop-up ---------- */
.enq-form, .enq-page-form { display: grid; gap: 14px; }
.enq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.enq-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.enq-label-row label, .label-row label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.enq-form .textarea, .enq-page-form .textarea { min-height: 110px; }
.enq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enq-done { text-align: center; padding: 28px 8px; }
.enq-done-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; margin: 0 auto 14px; }
.enq-done-ic .i { width: 22px; height: 22px; stroke-width: 2.5; }
.enq-done h3 { font-size: 17px; margin-bottom: 6px; }
.enq-done p { color: var(--text-3); margin: 0; }
.enq-fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 80; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 16px; border: 0; border-radius: 99px; background: var(--accent); color: #fff; font: 600 14.5px/1 var(--font); box-shadow: 0 10px 30px -8px rgba(37, 99, 235, .55), var(--shadow-md); cursor: pointer; transition: transform .15s, background-color .15s; }
.enq-fab:hover { background: var(--accent-hover); transform: translateY(-1px); }
.enq-fab .i { width: 18px; height: 18px; }
.enq-panel { position: fixed; right: 20px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 81; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 110px); overflow: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.enq-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 18px 0 20px; }
.enq-head h2 { font-size: 18px; letter-spacing: -.02em; }
.enq-head p { margin: 4px 0 0; color: var(--text-3); font-size: 13.5px; }
.enq-head .btn { margin-left: auto; flex: none; }
.enq-panel .enq-form { padding: 16px 20px 20px; }
@media (max-width: 520px) {
  .enq-grid { grid-template-columns: 1fr; }
  .enq-fab span { display: none; }
  .enq-fab { width: 52px; padding: 0; justify-content: center; right: 16px; }
  .enq-panel { right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
