/* coregis.nz marketing site - site.css
   COREGIS brand only (NOT Core Engineering). Palette, fonts, header map-texture,
   card style and "My Login" pill are ported verbatim from the report.coregis.nz
   storefront (retail.css) so the public site mirrors the report product exactly.
   Straight quotes and hyphens only. */

:root {
    /* CoreGIS logo palette (sampled from the globe) */
    --cg-blue:      #1574d6;   /* PRIMARY - bright globe blue */
    --cg-blue-dark: #0d56a8;   /* primary hover / pressed */
    --cg-green:     #1fa64a;   /* ACCENT - globe green */
    --cg-green-dark:#16823a;
    --cg-navy:      #0c2b4e;   /* deep-blue ink on white */
    --cg-ink:       #0c2b4e;
    --cg-muted:     #5b7088;
    --cg-bg:        #eef4fb;
    --cg-bg-card:   #ffffff;
    --cg-border:    #d6e2f2;
    --cg-header:    #0c2b4e;   /* colour behind background.png */
    --cg-radius-md: 10px;
    --cg-radius-lg: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    min-height: 100vh; display: flex; flex-direction: column;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--cg-bg); color: var(--cg-ink);
    line-height: 1.5;
}

/* ── Self-hosted brand fonts (same faces as the report storefront hero + cover) ── */
@font-face {
    font-family: "CG Script";
    font-style: normal; font-weight: 600; font-display: swap;
    src: url("fonts/rr_script.woff2") format("woff2");
}
@font-face {
    font-family: "CG Hand";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("fonts/rr_hand.woff2") format("woff2");
}
.cg-script { font-family: "CG Hand", "Segoe Script", "Brush Script MT", cursive; font-weight: 700; line-height: 1.1; }

/* ── "My Login" pill - top-left on every page (ported .rr-login-pill) ── */
.cg-topleft { position: fixed; top: 14px; left: 16px; z-index: 900; display: flex; align-items: center; }
.cg-login-pill {
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
    padding: 11px 18px; font-weight: 700; font-size: 16px; border-radius: var(--cg-radius-md);
    background: var(--cg-blue); color: #fff; border: 1px solid var(--cg-blue);
    box-shadow: 0 4px 14px rgba(15,39,64,.14);
    transition: background-color .15s ease, color .15s ease;
}
.cg-login-pill:hover, .cg-login-pill:focus-visible { background: #fff; color: var(--cg-blue); }
.cg-login-knob { width: 26px; height: 15px; border-radius: 999px; background: rgba(255,255,255,.5);
    position: relative; flex: 0 0 auto; transition: background .2s ease; }
.cg-login-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .2s ease, background .2s ease; }
.cg-login-pill:hover .cg-login-knob, .cg-login-pill:focus-visible .cg-login-knob { background: rgba(21,116,214,.3); }
.cg-login-pill:hover .cg-login-knob::after, .cg-login-pill:focus-visible .cg-login-knob::after { left: 13px; background: var(--cg-blue); }

/* ── Header (map-texture band) - ported .rr-top ── */
.cg-header {
    position: relative; color: #fff;
    background-image: url("background.png");
    background-size: cover; background-position: center; background-repeat: no-repeat;
    background-color: var(--cg-header);
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    padding: 18px 22px 16px;
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.cg-header-logo { height: 96px; width: auto; max-width: 100%; display: block; filter: drop-shadow(0 3px 6px rgba(8,16,28,.5)); }
.cg-header-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; margin-top: 4px; }
.cg-header-nav a {
    color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
    padding: 8px 16px; border-radius: 999px; letter-spacing: .2px;
    background: rgba(8,16,28,.42);              /* dark pill chip */
    text-shadow: 0 1px 3px rgba(8,16,28,.6);
    transition: background-color .15s ease;
}
.cg-header-nav a:hover, .cg-header-nav a:focus-visible { background: var(--cg-blue); }
.cg-header-nav a[aria-current="page"] { background: var(--cg-blue); }

/* Hero (home only) - big logo, script heading, tagline over the texture band. */
.cg-hero { padding-bottom: 26px; }
.cg-hero .cg-header-logo { height: 132px; }
/* Branding tagline + strapline appear on EVERY page. Base = the smaller INTERNAL-page
   size; the home hero (.cg-hero) scales them up below. */
.cg-hero-script { font-size: 26px; margin: 2px 0 1px; color: #fff;
    text-shadow: 0 1px 4px rgba(8,16,28,.85), 0 2px 10px rgba(8,16,28,.5); }
.cg-hero-tagline { margin: 0; font-size: 12.5px; color: #fff; font-weight: 700; max-width: 560px;
    text-shadow: 0 1px 3px rgba(8,16,28,.75); }
.cg-hero .cg-hero-script { font-size: 46px; margin: 4px 0 2px; }
.cg-hero .cg-hero-tagline { font-size: 15px; max-width: 620px; }

/* ── Main content ── */
main { flex: 1 1 auto; width: 100%; max-width: 1000px; margin: 0 auto; padding: 34px 20px 40px; }
.cg-narrow { max-width: 760px; }
h1.cg-h1 { font-size: clamp(24px, 4vw, 32px); margin: 0 0 12px; color: var(--cg-navy); }
h2.cg-h2 { font-size: 22px; margin: 30px 0 10px; color: var(--cg-navy); }
h3.cg-h3 { font-size: 17px; margin: 18px 0 6px; color: var(--cg-navy); }
.cg-lede { font-size: 17px; color: var(--cg-ink); margin: 0 0 18px; }
p { margin: 0 0 14px; }
/* Inline text links (excludes .cg-btn buttons): NO underline, bigger, bolder, with an
   obvious hover colour shift (blue -> green). Consistent treatment on every page. */
main a:not(.cg-btn) {
    color: var(--cg-blue); text-decoration: none;
    font-weight: 800; font-size: 1.06em;
    transition: color .15s ease;
}
main a:not(.cg-btn):hover, main a:not(.cg-btn):focus-visible { color: var(--cg-green); text-decoration: none; }
.cg-section { margin: 30px 0; }
.cg-muted { color: var(--cg-muted); }

/* Card - ported .rr-card box treatment. */
.cg-card {
    background: var(--cg-bg-card); border: 1px solid var(--cg-border);
    border-radius: var(--cg-radius-lg); padding: 26px;
    box-shadow: 0 6px 24px rgba(15,39,64,.06);
}

/* Two product routes side by side (home). */
.cg-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 8px 0 6px; }
.cg-route { display: flex; flex-direction: column; }
.cg-route h2 { margin: 0 0 4px; font-size: 22px; color: var(--cg-navy); }
.cg-route-kicker { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--cg-blue); margin: 0 0 8px; }
.cg-route--commercial .cg-route-kicker { color: var(--cg-green); }
.cg-route p { font-size: 15px; }
.cg-route .cg-btn { margin-top: auto; align-self: flex-start; }

/* Buttons - ported .rr-btn family. */
.cg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 12px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
    border: 1px solid transparent; border-radius: var(--cg-radius-md);
    background: #eef2f7; color: var(--cg-ink);
    transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cg-btn--primary { background: var(--cg-blue); color: #fff; }
.cg-btn--primary:hover { background: var(--cg-blue-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(13,86,168,.34); }
.cg-btn--accent { background: var(--cg-green); color: #fff; }
.cg-btn--accent:hover { background: var(--cg-green-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(22,130,58,.30); }
.cg-btn--ghost { background: #fff; color: var(--cg-blue); border-color: var(--cg-blue); }
.cg-btn--ghost:hover { background: var(--cg-blue); color: #fff; }
.cg-btn--lg { padding: 14px 26px; font-size: 16px; }

/* Step / feature rows. */
.cg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 10px 0; }
.cg-step { background: var(--cg-bg-card); border: 1px solid var(--cg-border); border-radius: var(--cg-radius-md); padding: 18px; }
.cg-step-n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--cg-blue); color: #fff; font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.cg-step h3 { margin: 0 0 4px; font-size: 16px; color: var(--cg-navy); }
.cg-step p { margin: 0; font-size: 14px; color: var(--cg-muted); }

.cg-list { margin: 0 0 14px; padding-left: 20px; }
.cg-list li { margin: 0 0 8px; }

/* Contact rows. */
.cg-contact-row { margin: 0 0 10px; font-size: 16px; }
.cg-contact-row strong { color: var(--cg-navy); }

/* Terms page. */
.cg-terms { font-size: 15px; }
.cg-terms h2 { font-size: 18px; margin: 24px 0 8px; color: var(--cg-navy); }
.cg-terms ul { padding-left: 20px; }
.cg-terms li { margin: 0 0 6px; }
.cg-terms .cg-effective { font-weight: 700; color: var(--cg-navy); }
.cg-terms .cg-defn { margin: 0 0 6px; }

/* ── Footer ── */
.cg-foot { background: var(--cg-navy); color: #cdd8e6; margin-top: 20px; }
.cg-foot-inner { max-width: 1000px; margin: 0 auto; padding: 26px 20px; text-align: center; }
.cg-foot-logo { height: 40px; width: auto; margin: 0 auto 12px; display: block; }
.cg-foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; margin: 0 0 14px; }
/* Footer nav: same PILL treatment as the top nav (dark chip, bigger), kept consistent. */
.cg-foot-links a { color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 16px; border-radius: 999px; background: rgba(8,16,28,.42); transition: background-color .15s ease; }
.cg-foot-links a:hover, .cg-foot-links a:focus-visible { background: var(--cg-blue); }
.cg-foot-lead { max-width: 620px; margin: 0 auto 12px; font-size: 13px; color: #aebccd; line-height: 1.55; }
.cg-foot-copy { font-size: 12px; color: #8ea0b6; margin: 0; }

/* ── PIN gate (whole-site pre-launch wall) ──────────────────────────────────
   Entirely blank screen, ONE unlabelled input, nothing else. Mirrors the retail
   storefront's .rr-gate-body / .rr-gate treatment (centred single input). */
.cg-gate-body { min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center; background: var(--cg-bg); }
.cg-gate { margin: 0; }
.cg-gate-input {
    width: 220px; max-width: 80vw; text-align: center; letter-spacing: 6px;
    padding: 14px 16px; font-size: 20px; border-radius: var(--cg-radius-md);
    border: 1px solid var(--cg-border); background: #fff; color: var(--cg-ink);
    box-shadow: 0 6px 24px rgba(15,39,64,.08); outline: none;
}
.cg-gate-input:focus { border-color: var(--cg-blue); box-shadow: 0 0 0 3px rgba(21,116,214,.18); }

/* ── Enquiry / sign-up forms (contact + commercial) ─────────────────────────── */
.cg-form { display: grid; gap: 16px; margin: 6px 0 4px; }
.cg-form-row { display: grid; gap: 16px; }
@media (min-width: 620px) { .cg-form-row.cg-form-row--2 { grid-template-columns: 1fr 1fr; } }
.cg-field { display: flex; flex-direction: column; gap: 6px; }
.cg-label { font-size: 13px; font-weight: 700; color: var(--cg-navy); }
.cg-req { color: var(--cg-blue); }
.cg-input, .cg-select, .cg-textarea {
    width: 100%; box-sizing: border-box; padding: 11px 14px; font: inherit; font-size: 15px;
    color: var(--cg-ink); background: #fff; border: 1px solid var(--cg-border);
    border-radius: var(--cg-radius-md); outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cg-textarea { min-height: 120px; resize: vertical; }
.cg-input:focus, .cg-select:focus, .cg-textarea:focus { border-color: var(--cg-blue); box-shadow: 0 0 0 3px rgba(21,116,214,.16); }
/* Inline validation: invalid field ring + per-field message, no native dialogs. */
.cg-field.is-invalid .cg-input,
.cg-field.is-invalid .cg-select,
.cg-field.is-invalid .cg-textarea { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214,69,69,.14); }
.cg-field-err { font-size: 12.5px; font-weight: 700; color: #b3261e; min-height: 0; display: none; }
.cg-field.is-invalid .cg-field-err { display: block; }
/* Form-level status banner (error + success states). */
.cg-form-msg { display: none; border-radius: var(--cg-radius-md); padding: 12px 14px; font-size: 14.5px; font-weight: 600; }
.cg-form-msg.is-error   { display: block; background: #fdecec; border: 1px solid #f4c7c7; color: #b3261e; }
.cg-form-msg.is-success { display: block; background: #e7f6ec; border: 1px solid #b9e3c6; color: #14663a; }
.cg-form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cg-btn[disabled] { opacity: .6; cursor: default; transform: none; box-shadow: none; }
/* Commercial sign-up panel: toggled open by the "Sign up" button (in-page, no dialog). */
.cg-signup-panel { margin-top: 18px; }
.cg-signup-panel[hidden] { display: none; }

/* ── Responsive ── */
@media (max-width: 760px) {
    .cg-routes { grid-template-columns: 1fr; }
    .cg-steps { grid-template-columns: 1fr; }
    .cg-hero .cg-header-logo { height: 96px; }
    .cg-hero .cg-hero-script { font-size: 34px; }
    .cg-login-pill { padding: 7px 12px; font-size: 13px; }   /* mirrors report pill scaling */
    .cg-login-txt { display: none; }   /* knob-only on phones, matches storefront */
}
@media (max-width: 520px) {
    .cg-header-logo { height: 76px; }
    .cg-login-pill { padding: 6px 10px; font-size: 12px; }   /* mirrors report pill scaling */
}
