/* WELS public pages, styled after www.winsted.com: navy header and hero, cyan accent,
 * condensed uppercase headings, square buttons. Same palette as the maintenance page
 * (maintenance/www/maintenance.html).
 *
 * Self-contained on purpose: the CSP allows only same-origin styles, fonts and images
 * (plus data: images), so the fonts are the winsted.com files (Benton Sans Condensed for
 * headings, Helvetica Now Text for body), copied into assets/fonts/ and declared with the
 * same family names and weights the main site uses. No inline style="" anywhere: the CSP
 * blocks those too.
 */

@font-face { font-family: "Benton"; src: url(fonts/BentonSansCondLight.otf) format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Benton"; src: url(fonts/BentonSansCondBold.otf) format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Benton"; src: url(fonts/BentonSansCondBlack.otf) format("opentype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "HelveticaNow"; src: url(fonts/helveticanow-pro-text-light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "HelveticaNow"; src: url(fonts/helveticanow-pro-text-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "HelveticaNow"; src: url(fonts/helveticanow-pro-text-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "HelveticaNow"; src: url(fonts/helveticanow-pro-text-medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "HelveticaNow"; src: url(fonts/helveticanow-pro-text-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0e1527;
  --navy-2: #172038;
  --navy-3: #222c48;
  --cyan: #00b3d6;
  --cyan-dark: #0090ad;
  --cyan-soft: #5acde4;
  --ink: #1d2433;
  --ink-2: #4b5568;
  --muted: #b9c2d3;
  --paper: #f3f5f8;
  --line: #d3d9e3;
  --white: #fff;
  --danger: #b3352c;
  --danger-bg: #fbecea;
  --head: "Benton", "Helvetica Neue Condensed", "Arial Narrow", "Roboto Condensed",
          "Liberation Sans Narrow", sans-serif;
  --body: "HelveticaNow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: -0.01em;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan-dark); }
a:hover { color: var(--navy); }
code { font-family: var(--mono); font-size: .92em; background: #e7ebf1; padding: .1em .35em; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { background: var(--navy); color: var(--white); position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: block; width: 120px; flex: none; }
.brand img { width: 100%; height: auto; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.site-nav a {
  color: var(--white);
  text-decoration: none;
  font-family: var(--head);
  font-stretch: condensed;
  font-weight: 700;
  font-size: 1.0625rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .12s ease-in, color .12s ease-in;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--white); border-bottom-color: var(--cyan); }
.site-nav a.button { border-bottom: 1px solid transparent; padding: .55rem 1.25rem .45rem; font-size: 1rem; }

/* ── Hero band ──────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 56px 0 128px;
}
/* Diagonal cyan line field, after winsted.com's navy section backgrounds */
.hero::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 55%;
  background: repeating-linear-gradient(135deg,
    rgba(0, 179, 214, .5) 0 2px, transparent 2px 12px);
  -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 90%);
          mask-image: linear-gradient(to left, #000 0%, transparent 90%);
  opacity: .28;
  pointer-events: none;
  animation: drift 22s linear infinite;
}
@keyframes drift { to { background-position: 170px 0; } }
.hero .wrap { position: relative; z-index: 1; }
.hero.compact { padding-bottom: 112px; }

.eyebrow {
  font-family: var(--head);
  font-stretch: condensed;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cyan);
  font-size: 1rem;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--cyan); }

h1, h2, h3 {
  font-family: var(--head);
  font-stretch: condensed;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -0.005em;
}
h1 { font-weight: 800; font-size: clamp(2.375rem, 1.2rem + 4.2vw, 3.75rem); margin: 0 0 16px; }
h1 span { color: var(--cyan); }
h2 { font-weight: 800; font-size: 1.75rem; margin: 0 0 12px; color: var(--navy); }
h3 { font-weight: 700; font-size: 1.1875rem; margin: 0 0 8px; color: var(--navy); }

.lede { font-size: 1.1875rem; color: var(--muted); max-width: 40em; margin: 0; }
.lede strong { color: var(--white); font-weight: 600; }

/* ── Content: cards overlapping the hero ────────────────────────────────── */
.content { flex: 1; margin-top: -88px; padding-bottom: 72px; position: relative; z-index: 1; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 760px); justify-content: start; }

.card {
  background: var(--white);
  border-top: 4px solid var(--cyan);
  box-shadow: 0 1px 2px rgba(14, 21, 39, .06), 0 12px 32px rgba(14, 21, 39, .10);
  padding: 36px 40px 40px;
}
.card > :last-child { margin-bottom: 0; }
.card p { color: var(--ink-2); margin: 0 0 14px; }
.card-intro { font-size: 1.0625rem; margin-bottom: 26px !important; }
.card-intro strong { color: var(--ink); }

.panel { background: var(--navy); color: var(--white); padding: 32px 30px; }
.panel h3 { color: var(--white); }
.panel p { color: var(--muted); font-size: .9375rem; margin: 0 0 12px; }
.panel a:not(.button) { color: var(--cyan-soft); }
.panel hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .14); margin: 24px 0; }

/* Numbered steps with cyan counters */
.steps { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 50px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--head);
  font-stretch: condensed;
  font-weight: 800;
  font-size: 1.0625rem;
}
.steps li strong { display: block; font-family: var(--head); font-stretch: condensed; text-transform: uppercase;
                   letter-spacing: .03em; font-size: 1.0625rem; }
.steps li span { display: block; font-size: .9375rem; }
.panel .steps li strong { color: var(--white); }
.panel .steps li span { color: var(--muted); }
.card .steps li strong { color: var(--navy); }
.card .steps li span { color: var(--ink-2); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--cyan);
  color: var(--navy);
  font-family: var(--head);
  font-stretch: condensed;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .02em;
  text-decoration: none;
  padding: .9rem 2rem .8rem;
  border: 1px solid var(--cyan);
  border-radius: 0;
  cursor: pointer;
  transition: background-color .1s ease-in, color .1s ease-in, border-color .1s ease-in;
}
.button:hover, .button:focus-visible { background: var(--navy); color: var(--white); border-color: var(--navy); }
.panel .button:hover, .panel .button:focus-visible,
.site-header .button:hover, .site-header .button:focus-visible { background: transparent; border-color: var(--cyan); }
.button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.button svg { width: 18px; height: 18px; flex: none; }
.button.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.button.ghost:hover, .button.ghost:focus-visible { background: var(--navy); color: var(--white); }
.button.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.help-line { margin-top: 22px !important; font-size: .9375rem; }

/* ── Form ───────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 22px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label {
  font-family: var(--head);
  font-stretch: condensed;
  font-weight: 700;
  font-size: .9375rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--navy);
}
.req { color: var(--cyan-dark); text-decoration: none; border: 0; margin-left: 2px; }
.optional { color: #8a94a6; font-weight: 400; text-transform: none; letter-spacing: 0;
            font-family: var(--body); font-size: .8125rem; margin-left: 6px; }
.hint { font-size: .8125rem; color: var(--ink-2); }

input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 13px;
  min-height: 48px;
  transition: border-color .12s ease-in, box-shadow .12s ease-in;
}
textarea { min-height: 132px; resize: vertical; line-height: 1.5; }
select {
  -webkit-appearance: none;
          appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230090ad' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
input:hover, select:hover, textarea:hover { border-color: #aab4c4; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 179, 214, .22);
}

.check { display: flex; align-items: flex-start; gap: 12px; font-size: .9375rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--cyan-dark); }
.field .check label { font-family: var(--body); font-stretch: normal; text-transform: none; letter-spacing: 0;
                      font-weight: 400; font-size: .9375rem; color: var(--ink-2); }
.form-footer { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.form-submit { margin-top: 10px; }
.form-submit .button { align-self: flex-start; min-width: 280px; }

/* Honeypot: real people never see or fill this; bots that fill every field get
   silently discarded by download-request.php. Keep it out of the layout. */
.hp, #dept, #f_dept { display: none !important; }

.alert {
  border-left: 4px solid var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
  padding: 14px 18px;
  margin: 0 0 24px;
  font-size: .9375rem;
}
.alert p { color: inherit; margin: 0; }

/* ── Download / status pages ────────────────────────────────────────────── */
.status { display: flex; gap: 22px; align-items: flex-start; }
.status-icon {
  flex: none;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--navy);
  color: var(--cyan);
}
.status-icon svg { width: 28px; height: 28px; }
.status-icon.bad { background: var(--danger-bg); color: var(--danger); }
.status h2 { margin-top: 4px; }
.status h2:empty, .status p:empty { display: none; }   /* server_error() without a message */
.file {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 14px 16px;
  margin: 18px 0;
}
.file svg { width: 26px; height: 26px; color: var(--cyan-dark); flex: none; }
.file code { background: none; padding: 0; font-size: 1rem; color: var(--ink); word-break: break-all; }
.progress { height: 4px; background: #e2e7ef; overflow: hidden; margin: 6px 0 22px; }
.progress span { display: block; height: 100%; width: 40%; background: var(--cyan);
                 animation: sweep 1.4s ease-in-out infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ── Privacy policy modal (opened by index.php's script) ────────────────── */
.modal { display: none; position: fixed; inset: 0; z-index: 50; overflow-y: auto;
         background: rgba(14, 21, 39, .72); padding: 6vh 16px; }
.modal-content { max-width: 780px; margin: 0 auto; background: var(--white);
                 box-shadow: 0 24px 64px rgba(0, 0, 0, .35); }
.modal-header { background: var(--navy); color: var(--white); padding: 22px 28px;
                display: flex; align-items: center; justify-content: space-between; gap: 16px;
                border-top: 4px solid var(--cyan); }
.modal-header h2 { color: var(--white); margin: 0; font-size: 1.5rem; }
.modal-header .close { background: none; border: 0; color: var(--white); font-size: 2rem; line-height: 1;
                       cursor: pointer; padding: 0 4px; }
.modal-header .close:hover { color: var(--cyan); }
.modal-body { padding: 24px 28px; color: var(--ink-2); }
.modal-body h1, .modal-body h2, .modal-body h3 { color: var(--navy); font-size: 1.25rem; margin: 22px 0 8px; }
.modal-footer { padding: 16px 28px 22px; border-top: 1px solid var(--line); }
.modal-footer p { margin: 0; color: var(--ink-2); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: var(--muted); font-size: .875rem; border-top: 4px solid var(--cyan); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; }
.site-footer .brand { width: 92px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.site-footer .legal { margin-left: auto; }
.site-footer .badge { font-family: var(--mono); color: var(--cyan-soft); margin-right: 8px; }

/* ── Entrance ───────────────────────────────────────────────────────────── */
.rise { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.rise.d1 { animation-delay: .06s; }
.rise.d2 { animation-delay: .12s; }
.rise.d3 { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ── Small screens ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { min-height: 68px; }
  .brand { width: 96px; }
  .site-nav { gap: 16px; }
  .site-nav .hide-sm { display: none; }
  .hero { padding: 36px 0 104px; }
  .hero::after { width: 100%; opacity: .16; }
  .content { margin-top: -72px; }
  .card { padding: 26px 20px 28px; }
  .panel { padding: 26px 20px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .status { flex-direction: column; gap: 14px; }
  .form-submit .button { align-self: stretch; min-width: 0; }
  .site-nav .button { padding: .5rem .9rem .4rem; font-size: .9375rem; }
  .site-footer .legal { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .progress span { width: 100%; }
}
