/* ==========================================================================
   Integrated Septic Solutions — content modules
   hero · spotlight · content · flow · downloads · accordion · cta · form
   Requires tokens.css and base.css.
   ========================================================================== */

/* --- Hero ----------------------------------------------------------------- */
/* Full-bleed photograph with the navy laid over it. Text stays in the
   constrained column. Falls back to flat navy if the image is missing. */

.hero {
  position: relative;
  background: var(--iss-navy-deep);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30,48,86,.92) 0%, rgba(30,48,86,.72) 60%, rgba(30,48,86,.55) 100%);
}

.hero__inner {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero h1 { color: #fff; max-width: 22ch; }
.hero .lead { color: #DCE6F2; margin-top: var(--space-sm); max-width: 46ch; }

/* Compact variant for interior pages. */
.hero--page { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero--page h1 { max-width: 24ch; }

.hero__eyebrow {
  font-family: var(--font-text);
  font-size: var(--size-small);
  color: var(--iss-sky);
  margin-bottom: var(--space-2xs);
}


/* --- Spotlight ------------------------------------------------------------ */
/* Deliberately not cards. Divided columns with a rule between them —
   no shadows, no boxes, no uniform radius. */

.spotlights {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

.spotlight h3 {
  font-size: var(--size-h4);
  font-family: var(--font-text);
  font-weight: var(--weight-bold);
  color: var(--color-heading);
  margin-bottom: var(--space-2xs);
}

/* Monoline schematics drawn from the tank geometry. They carry the same
   argument as the heading, so they are hidden from assistive tech. */
.spotlight__figure {
  display: block;
  width: 132px;
  height: 76px;
  margin-bottom: var(--space-sm);
  color: var(--iss-blue-500);
  overflow: visible;
}
.spotlight__figure .grade { stroke: var(--iss-rule); stroke-width: 1; }
.spotlight__figure .solid { stroke: currentColor; stroke-width: 1.25; fill: none;
                            stroke-linejoin: round; stroke-linecap: round; }
.spotlight__figure .ghost { stroke: var(--iss-rule); stroke-width: 1;
                            stroke-dasharray: 3 3; fill: none; }
.spotlight__figure .fill  { fill: var(--iss-sky); stroke: none; opacity: .55; }

.spotlight p { color: var(--color-text-muted); max-width: 40ch; }

@media (min-width: 48rem) {
  .spotlights--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl); }
  .spotlights--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl); }
  .spotlights--3 .spotlight + .spotlight,
  .spotlights--2 .spotlight + .spotlight {
    border-left: 1px solid var(--color-border);
    padding-left: var(--space-lg);
  }
}


/* --- Content -------------------------------------------------------------- */

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-sm); }
.prose h3 { margin-top: var(--space-lg); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: var(--space-3xs); }

/* Text alongside an image. */
.split {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); }
  .split--reverse > *:first-child { order: 2; }
}
.split img { border-radius: var(--radius); }

/* For artwork that should never upscale past its native size. Centered in
   its column so the cap does not read as a misaligned image. */
.figure--cap {
  max-width: 456px;
  width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 0;
}


/* --- Flow ----------------------------------------------------------------- */
/* The five-chamber sequence. The only place the design raises its voice,
   and it is used because the content genuinely is a sequence. */

.flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin-top: var(--space-lg);
  counter-reset: chamber;
}

.flow__step {
  counter-increment: chamber;
  padding: var(--space-sm) var(--space-md);
  color: #fff;
}

.flow__step::before {
  content: counter(chamber);
  display: block;
  font-family: var(--font-text);
  font-variant-numeric: lining-nums;
  font-size: var(--size-caption);
  opacity: .65;
  margin-bottom: var(--space-3xs);
}

.flow__step h3 {
  font-family: var(--font-text);
  font-size: var(--size-small);
  font-weight: var(--weight-bold);
  color: #fff;
  margin-bottom: var(--space-3xs);
}

.flow__step p {
  font-size: var(--size-caption);
  line-height: 1.5;
  color: rgba(255,255,255,.82);
  max-width: none;
}

.flow__step:nth-child(1) { background: var(--iss-navy); }
.flow__step:nth-child(2) { background: var(--iss-blue-700); }
.flow__step:nth-child(3) { background: var(--iss-blue-600); }
.flow__step:nth-child(4) { background: var(--iss-blue-500); }
.flow__step:nth-child(5) { background: var(--iss-blue-400); }

@media (min-width: 48rem) {
  .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}


/* --- Downloads ------------------------------------------------------------ */
/* The designer's page. Rows, not cards. Filename and format visible
   before the click. */

.downloads { list-style: none; border-top: var(--border-hair); }

.download {
  border-bottom: 1px solid var(--color-border-soft);
}

.download a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2xs) var(--space-sm);
  padding: var(--space-xs) 0;
  text-decoration: none;
  color: var(--color-text);
}
.download a:hover { color: var(--color-link); }
.download a:hover .download__name { text-decoration: underline; }

.download__name { flex: 1 1 18rem; font-size: var(--size-small); }

.download__meta {
  flex: 0 0 auto;
  font-size: var(--size-caption);
  color: var(--color-text-muted);
  font-variant-numeric: lining-nums;
  letter-spacing: .02em;
}

.downloads-group + .downloads-group { margin-top: var(--space-lg); }
.downloads-group h3 {
  font-family: var(--font-text);
  font-size: var(--size-small);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2xs);
}


/* --- Accordion ------------------------------------------------------------ */
/* Native <details>. No JavaScript, keyboard accessible, prints expanded. */

.accordion { border-top: var(--border-hair); }

.accordion details {
  border-bottom: 1px solid var(--color-border-soft);
}

.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-sm) 2rem var(--space-sm) 0;
  position: relative;
  font-size: var(--size-body);
  color: var(--color-heading);
  font-weight: var(--weight-medium);
}
.accordion summary::-webkit-details-marker { display: none; }

.accordion summary::after {
  content: "";
  position: absolute;
  right: .5rem;
  top: 50%;
  width: 9px; height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--iss-blue-500);
  border-bottom: 2px solid var(--iss-blue-500);
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.accordion details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }

.accordion summary:hover { color: var(--color-link); }

.accordion__body { padding-bottom: var(--space-md); }
.accordion__body p { color: var(--color-text-muted); }
.accordion__body > * + * { margin-top: var(--space-sm); }

@media print {
  .accordion details { break-inside: avoid; }
  .accordion__body { display: block !important; }
}


/* --- Call to action ------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--iss-navy);
  color: #fff;
  text-decoration: none;
  border: 2px solid var(--iss-navy);
  border-radius: var(--radius);
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
}
.btn:hover { background: var(--iss-blue-700); border-color: var(--iss-blue-700); color: #fff; }

.btn--ghost { background: none; color: var(--iss-navy); }
.btn--ghost:hover { background: var(--iss-navy); color: #fff; }

.btn--on-dark { background: #fff; border-color: #fff; color: var(--iss-navy-deep); }
.btn--on-dark:hover { background: var(--iss-sky); border-color: var(--iss-sky); color: var(--iss-navy-deep); }

.btn--outline-on-dark { background: none; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--outline-on-dark:hover { background: #fff; border-color: #fff; color: var(--iss-navy-deep); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); }


/* --- Spec table ------------------------------------------------------------ */
/* Specs as rows, models as columns — the orientation designers expect and
   the one the manufacturer uses. Scrolls horizontally on narrow screens with
   the label column pinned so the row stays identifiable. */

.table-scroll {
  overflow-x: auto;
  margin-top: var(--space-md);
  border: var(--border-hair);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.spec-table {
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: var(--size-small);
  min-width: 46rem;
}

.spec-table th,
.spec-table td {
  padding: var(--space-2xs) var(--space-sm);
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border-soft);
}

.spec-table thead th {
  background: var(--iss-navy-deep);
  color: #fff;
  font-weight: var(--weight-medium);
  border-bottom: none;
  position: sticky;
  top: 0;
}

.spec-table th[scope="row"] {
  text-align: left;
  font-weight: var(--weight-normal);
  color: var(--color-text);
  background: var(--color-bg);
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: var(--border-hair);
  white-space: normal;
  min-width: 12rem;
}

.spec-table thead th:first-child {
  text-align: left;
  left: 0;
  z-index: 2;
  background: var(--iss-navy-deep);
}

.spec-table tbody tr:nth-child(even) th[scope="row"],
.spec-table tbody tr:nth-child(even) td { background: var(--color-bg-alt); }

.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td { border-bottom: none; }

.spec-table .row-group th {
  background: var(--color-bg-alt);
  font-weight: var(--weight-bold);
  font-size: var(--size-caption);
  color: var(--color-heading);
}

.spec-table td.span {
  text-align: center;
  white-space: normal;
  color: var(--color-text-muted);
}

.table-note {
  font-size: var(--size-caption);
  color: var(--color-text-muted);
  margin-top: var(--space-2xs);
  max-width: var(--measure);
}

@media print {
  .table-scroll { overflow: visible; }
  .spec-table { min-width: 0; font-size: 9pt; }
  .spec-table thead th { background: none; color: #000; border-bottom: 1px solid #000; }
}


/* --- Form ----------------------------------------------------------------- */

.form { max-width: 34rem; }
.form > * + * { margin-top: var(--space-sm); }

.field label {
  display: block;
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-3xs);
}

.field input,
.field textarea {
  width: 100%;
  padding: var(--space-2xs) var(--space-xs);
  border: var(--border-hair);
  border-radius: var(--radius);
  background: var(--color-bg);
  font-size: var(--size-small);
}
.field input:focus,
.field textarea:focus { border-color: var(--iss-blue-500); }

.field textarea { min-height: 8rem; resize: vertical; }

.field__hint { font-size: var(--size-caption); color: var(--color-text-muted); }

.form__error {
  border-left: 3px solid #B03A2E;
  background: #FBEEEC;
  padding: var(--space-xs) var(--space-sm);
  margin-top: var(--space-md);
  font-size: var(--size-small);
  max-width: 34rem;
}
