/* ============================================================
   WaterTrust — sleek modern tech aesthetic
   Brand blue (#024E9C) + deep navy. Type & colour, no photos.
   ============================================================ */

:root {
  --ink:        #06223f;   /* deep brand-navy base */
  --ink-2:      #0a2d50;   /* raised panel */
  --ink-3:      #143a63;   /* hairlines on dark */
  --brand:      #024e9c;   /* WaterTrust brand blue */
  --brand-deep: #013a76;   /* darker, hovers */
  --brand-lift: #1f6fc4;   /* brighter blue for accents on dark */
  --brand-glow: rgba(2,78,156,0.14);
  --paper:      #f5f8fb;   /* light page */
  --white:      #ffffff;
  --line:       #e1e8ef;   /* hairline on light */
  --text:       #06223f;   /* body on light */
  --muted:      #5a6b7b;   /* secondary on light */
  --muted-d:    #9db4cc;   /* secondary on dark */
  --good:       #16b97f;
  --warn:       #e0603a;
  --r:          14px;
  --r-sm:       10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top bar (dark) ---------- */
.wt-topbar {
  background: var(--ink);
  border-bottom: 1px solid var(--ink-3);
}
.wt-topbar-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.wt-logo {
  display: flex; align-items: center;
}
.wt-logo img { height: 26px; width: auto; display: block; }
.wt-nav-link { color: var(--muted-d); font-size: 0.9rem; font-weight: 500; }
.wt-nav-link:hover { color: var(--white); text-decoration: none; }

/* ---------- Hero (dark band) ---------- */
.wt-herowrap {
  background: var(--ink);
  position: relative; overflow: hidden;
}
.wt-herowrap::before {  /* signature flow line */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-lift), transparent);
  background-size: 50% 100%;
  animation: flow 5s linear infinite;
  opacity: 0.9;
}
@keyframes flow { from { background-position: -100% 0; } to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .wt-herowrap::before { animation: none; } }

.wt-hero-inner {
  max-width: 720px; margin: 0 auto;
  padding: 64px 24px 88px;
}
.wt-eyebrow {
  display: inline-block;
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-lift);
  margin-bottom: 18px;
}
.wt-hero-inner h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3.05rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--white);
}
.wt-hero-inner h1 .hl { color: var(--brand-lift); }
.wt-hero-inner p {
  margin: 0; max-width: 48ch;
  color: var(--muted-d);
  font-size: 1.12rem; line-height: 1.5;
}

/* ---------- Form card (pulled up over hero) ---------- */
.wt-wrap {
  max-width: 720px; margin: -56px auto 0;
  padding: 0 24px 90px;
  position: relative; z-index: 2;
}
/* interior pages (privacy, terms…) have no dark hero to pull over,
   so they need normal top spacing, not the home page's negative margin */
.wt-wrap--page { margin-top: 0; padding-top: 48px; }
.wt-page-title {
  margin: 0 0 22px; font-size: 1.9rem;
  letter-spacing: -0.025em; color: var(--text);
}
.wt-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 34px;
  box-shadow: 0 18px 50px -28px rgba(11,27,43,0.4);
}
.wt-card-head { margin-bottom: 26px; }
.wt-card-head h2 { margin: 0 0 4px; font-size: 1.28rem; letter-spacing: -0.02em; }
.wt-card-head p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.wt-field { margin-bottom: 22px; }
.wt-field:last-of-type { margin-bottom: 0; }

.wt-label {
  display: block; font-weight: 600; font-size: 0.9rem;
  margin-bottom: 8px; color: var(--text);
}
.wt-hint { font-weight: 400; color: var(--muted); font-size: 0.84rem; }

.wt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.wt-input, .wt-select, .wt-textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font: inherit; color: var(--text); background: var(--white);
  transition: border-color .12s, box-shadow .12s;
}
.wt-input::placeholder, .wt-textarea::placeholder { color: #aab8c4; }
.wt-input:focus, .wt-select:focus, .wt-textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}
.wt-textarea { min-height: 116px; resize: vertical; }
.wt-select { appearance: none;
  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='%235b6b79' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}

/* segmented control */
.wt-segment {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 5px;
}
.wt-segment button {
  padding: 11px; border: 0; border-radius: 7px; background: transparent;
  font: inherit; font-weight: 600; font-size: 0.92rem; color: var(--muted);
  cursor: pointer; transition: background .12s, color .12s;
}
.wt-segment button[aria-pressed="true"] {
  background: var(--ink); color: var(--white);
}

/* consent */
.wt-consent {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--brand-glow); border: 1px solid rgba(22,196,224,0.3);
  border-radius: var(--r-sm); padding: 15px; font-size: 0.9rem; cursor: pointer;
}
.wt-consent input { margin-top: 2px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--brand-deep); }

/* button */
.wt-btn {
  width: 100%; padding: 15px; border: 0; border-radius: var(--r-sm);
  background: var(--brand); color: var(--white);
  font: inherit; font-weight: 700; font-size: 1.04rem; letter-spacing: -0.01em;
  cursor: pointer; transition: background .12s, transform .04s;
}
.wt-btn:hover { background: var(--brand-deep); color: var(--white); }
.wt-btn:active { transform: translateY(1px); }
.wt-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.wt-error { color: var(--warn); font-size: 0.84rem; margin-top: 7px; }
.wt-formerror {
  background: #fcefe9; border: 1px solid #f1c7b6; color: #a83d1c;
  border-radius: var(--r-sm); padding: 13px 15px; margin-bottom: 20px;
  font-size: 0.9rem; display: none;
}

.hidden { display: none !important; }

/* trust strip under form */
.wt-trust {
  display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
  margin-top: 26px; color: var(--muted); font-size: 0.85rem;
}
.wt-trust span { display: inline-flex; align-items: center; gap: 7px; }
.wt-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }

/* confirmation */
.wt-confirm { text-align: center; padding: 22px 0; }
.wt-confirm .tick {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--brand-glow); color: var(--brand-deep);
  display: grid; place-items: center; margin: 0 auto 20px; font-size: 30px; font-weight: 700;
}
.wt-confirm h2 { margin: 0 0 10px; font-size: 1.5rem; letter-spacing: -0.02em; }
.wt-confirm p { color: var(--muted); margin: 0 auto; max-width: 42ch; }

.wt-foot { text-align: center; color: var(--muted); font-size: 0.82rem; margin-top: 22px; }

@media (max-width: 560px) {
  .wt-hero-inner { padding: 48px 24px 80px; }
  .wt-card { padding: 24px; }
  .wt-row { grid-template-columns: 1fr; }
}

/* ---------- Phase 2: contractor account components ---------- */
.wt-info {
  background: var(--brand-glow); border: 1px solid rgba(2,78,156,0.25);
  color: var(--brand-deep); border-radius: var(--r-sm);
  padding: 12px 14px; margin-bottom: 16px; font-size: 0.9rem;
}
.wt-status-row { margin-bottom: 14px; }
.wt-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.02em; padding: 5px 11px; border-radius: 999px;
}
.wt-badge--review  { background: #fff3e0; color: #9a5a12; border: 1px solid #f0d2a0; }
.wt-badge--ok      { background: #e6f6ef; color: #156b4a; border: 1px solid #b6e0cd; }
.wt-badge--blocked { background: #fbeae6; color: #a23218; border: 1px solid #f0c2b4; }
