/* ==========================================================================
   Delite Enterprises — design tokens and site styles.

   Vanilla CSS, no framework. The original 2017 site was Bootstrap 3 plus
   jQuery, jssor, wow.js and parallax.js — roughly 700 KB of JavaScript to
   render four pages of static text. None of that is loaded any more.
   ========================================================================== */

:root {
  --ink:          #10192b;
  --ink-soft:     #42506b;
  --ink-faint:    #6b7a96;
  --line:         #dde3ed;
  --line-soft:    #eef1f6;
  --bg:           #ffffff;
  --bg-tint:      #f6f8fb;
  --brand:        #0b4da2;
  --brand-dark:   #083a7a;
  --brand-tint:   #eaf1fb;
  --accent:       #e8a317;
  --danger:       #b3261e;
  --ok:           #1d7a44;

  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 1px 2px rgba(16, 25, 43, .06), 0 8px 24px rgba(16, 25, 43, .07);
  --shadow-sm:    0 1px 2px rgba(16, 25, 43, .08);

  --wrap:         1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -.015em; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* Keyboard users must be able to see where they are. */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ───────────────────────────── header ───────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; color: var(--ink); font-size: 1.05rem; letter-spacing: -.01em; }
.brand-tag  { font-size: .72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; }

.nav-toggle {
  margin-left: auto; display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 9px 12px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { display: block; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-soft); padding: 9px 14px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 500;
}
.nav a:hover { background: var(--bg-tint); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-tint); font-weight: 600; }
.nav .nav-cta {
  background: var(--brand); color: #fff; margin-left: 8px; font-weight: 600;
}
.nav .nav-cta:hover { background: var(--brand-dark); color: #fff; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; }
}

/* ───────────────────────────── hero ───────────────────────────── */

.hero {
  position: relative; color: #fff; isolation: isolate;
  background: var(--ink);
  padding: clamp(72px, 13vw, 140px) 0;
}
/* hero.jpg is slider1.jpg cropped to its right-hand photographic region. The
   original banner has the headline burnt into the image (spelled "ELETRICAL"),
   which showed through the overlay and competed with the real <h1>. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../img/hero.jpg") right center / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgba(8, 24, 50, .93) 0%, rgba(8, 24, 50, .78) 45%, rgba(11, 77, 162, .58) 100%);
}
.hero h1 { color: #fff; max-width: 17ch; }
.hero-lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #d7e2f3; max-width: 56ch; margin-bottom: 2rem; }
.hero-eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}

.btn {
  display: inline-block; padding: 13px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: .98rem; cursor: pointer; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ───────────────────────────── sections ───────────────────────────── */

.section { padding: clamp(56px, 9vw, 92px) 0; }
.section-tint { background: var(--bg-tint); border-block: 1px solid var(--line-soft); }

.section-head { max-width: 62ch; margin-bottom: 48px; }
.eyebrow {
  display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .6rem;
}
.lede { font-size: 1.1rem; color: var(--ink-soft); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--brand-tint);
  color: var(--brand); display: grid; place-items: center; margin-bottom: 18px;
}

/* Partner logos — the originals are JPEGs with white backgrounds, so they sit
   on white tiles rather than being tinted or inverted. */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.logo-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: grid; place-items: center; min-height: 128px;
}
.logo-tile img { max-height: 62px; width: auto; object-fit: contain; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.stat { border-left: 3px solid var(--brand); padding-left: 18px; }
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat-label { font-size: .9rem; color: var(--ink-faint); }

.quote {
  border-left: 4px solid var(--accent); padding: 4px 0 4px 24px; margin: 0 0 2rem;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 600; color: var(--ink); line-height: 1.4;
}

.prose > :last-child { margin-bottom: 0; }

.cta-band { background: var(--brand); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d7e2f3; }
.cta-band .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 28px; padding-block: clamp(44px, 7vw, 68px);
}
.cta-band .cta-copy { max-width: 60ch; }
.cta-band .cta-copy > :last-child { margin-bottom: 0; }
.cta-band .btn-primary { background: #fff; color: var(--brand); }
.cta-band .btn-primary:hover { background: #eaf1fb; color: var(--brand-dark); }

/* ───────────────────────────── page header ───────────────────────────── */

.page-head {
  background: var(--ink); color: #fff; padding: clamp(52px, 8vw, 84px) 0;
  background-image: linear-gradient(120deg, #0d1c36 0%, #123a70 100%);
}
.page-head h1 { color: #fff; margin-bottom: .35em; }
.page-head p { color: #c3d2e8; max-width: 60ch; margin-bottom: 0; }

/* ───────────────────────────── contact ───────────────────────────── */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: 36px; } }

.detail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.detail-list dt, .detail-item-label {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .35rem;
}
.detail-item-value { color: var(--ink); font-weight: 500; }
.detail-item-value a { font-weight: 600; }
.detail-note { display: block; font-size: .9rem; color: var(--ink-faint); margin-top: .3rem; }

/* ───────────────────────────── forms ───────────────────────────── */

.form-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 38px); box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field .optional { font-weight: 400; color: var(--ink-faint); }

.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .97rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { display: block; font-size: .85rem; color: var(--danger); margin-top: 6px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-note { font-size: .86rem; color: var(--ink-faint); margin-top: 16px; margin-bottom: 0; }

.alert { padding: 13px 16px; border-radius: var(--radius); font-size: .93rem; margin-bottom: 20px; }
.alert-ok    { background: #e7f5ed; color: #14532d; border: 1px solid #b7e0c8; }
.alert-error { background: #fdecea; color: #7f1d1a; border: 1px solid #f5c4bf; }
.alert-info  { background: var(--brand-tint); color: var(--brand-dark); border: 1px solid #c5daf5; }
.alert[hidden] { display: none; }

/* ───────────────────────────── auth ───────────────────────────── */

.auth-main { min-height: calc(100vh - 72px); display: grid; place-items: center; background: var(--bg-tint); padding: 48px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .form-card { padding: clamp(28px, 5vw, 40px); }
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head img { height: 46px; width: auto; margin: 0 auto 18px; }
.auth-head h1 { font-size: 1.55rem; margin-bottom: .3em; }
.auth-head p { color: var(--ink-faint); font-size: .95rem; margin-bottom: 0; }

/* No public sign-up: accounts are created by Delite. Say so rather than
   showing a register link that goes nowhere. */
.auth-foot {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  font-size: .88rem; color: var(--ink-faint); text-align: center;
}
.auth-foot a { font-weight: 600; }

/* ───────────────────────────── portal ───────────────────────────── */

.portal-bar {
  background: var(--ink); color: #fff;
  padding: 14px 0;
}
.portal-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.portal-bar .brand-name, .portal-bar .brand-tag { color: #fff; }
.portal-bar .brand-tag { color: #9fb3d1; }
.portal-user { display: flex; align-items: center; gap: 16px; font-size: .92rem; color: #c3d2e8; }
.portal-user strong { color: #fff; font-weight: 600; }
.btn-logout {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
  color: #fff; padding: 8px 16px; border-radius: var(--radius); font: inherit;
  font-size: .9rem; font-weight: 500; cursor: pointer;
}
.btn-logout:hover { background: rgba(255, 255, 255, .2); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); background: var(--bg-tint); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
td.msg { min-width: 280px; white-space: pre-wrap; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--ink-faint); }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.badge-new  { background: var(--brand-tint); color: var(--brand-dark); }
.badge-seen { background: var(--line-soft); color: var(--ink-faint); }

/* ───────────────────────────── footer ───────────────────────────── */

.site-footer { background: var(--ink); color: #9fb3d1; padding: 60px 0 28px; font-size: .94rem; }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1.1em; }
.site-footer a { color: #c3d2e8; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 44px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-logo { background: #fff; border-radius: var(--radius); padding: 10px 14px; display: inline-block; margin-bottom: 18px; }
.footer-logo img { height: 36px; width: auto; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .87rem;
}
.footer-bottom p { margin: 0; }

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