/* Riverside Plumbing — demonstration trade site.
   Plain CSS, mobile first, no framework, no third-party fonts.
   Colour pairs are checked in tools/contrast.mjs; keep them AA. */

:root {
  --navy: #0d2436;
  --navy-2: #14344b;
  --navy-3: #1d4966;
  --ink: #12181d;
  --ink-2: #4a565f;
  --line: #d5dce1;
  --bg: #ffffff;
  --bg-2: #f1f5f7;
  --accent: #c2410c;      /* 5.18:1 on white, white text 5.18:1 on it */
  --accent-dk: #9a330a;
  --yellow: #ffc93c;      /* 10.1:1 on navy — accents only */
  --focus: #0b4fbf;
  --focus-dark: #ffc93c;
  --radius: 5px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.85rem, 7.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 5.2vw, 2.15rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); }
a:hover { color: var(--accent-dk); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.bar :focus-visible,
.hero :focus-visible,
.foot :focus-visible { outline-color: var(--focus-dark); }

.u-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

.skip {
  position: absolute; left: .5rem; top: -4rem; z-index: 100;
  background: var(--yellow); color: var(--navy);
  font-weight: 700; padding: .6rem 1rem; border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus { top: .5rem; }

.wrap {
  width: 100%;
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;            /* thumb-sized: every button is a tap target */
  padding: .62rem .9rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn--call { background: var(--accent); color: #fff; }
.btn--call:hover { background: var(--accent-dk); color: #fff; }
.btn--ghost {
  background: transparent; color: #fff; border-color: #ffffff;
}
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--lg { padding: .85rem 1.15rem; font-size: 1.05rem; }
.btn--full { width: 100%; }

/* ---------- header ---------- */

.bar {
  position: sticky; top: 0; z-index: 40;
  background: var(--navy);
  color: #fff;
  border-bottom: 3px solid var(--accent);
}
.bar__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem;
  min-height: 3.5rem;
  padding-block: .5rem;
}
.brand {
  display: flex; align-items: center; gap: .5rem;
  color: #fff; text-decoration: none; min-width: 0;
}
.brand__mark {
  display: grid; place-items: center;
  width: 2rem; height: 2rem; flex: none;
  background: var(--accent); color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
}
.brand__txt {
  font-weight: 800; font-size: .95rem; line-height: 1.05;
  letter-spacing: -0.01em; text-transform: uppercase;
}
.brand__name2 { color: var(--yellow); }
.bar__call { padding: .5rem .7rem; font-size: .95rem; }
.bar__callTxt { white-space: nowrap; }

/* ---------- section nav ---------- */

.subnav { background: var(--navy-2); }
.subnav__in {
  display: flex; flex-wrap: wrap; gap: .1rem 1rem;
  padding-block: .5rem;
}
.subnav a {
  color: #e7eef3; text-decoration: none;
  font-weight: 600; font-size: .9rem;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: #fff; border-bottom-color: var(--yellow); }

/* ---------- hero ---------- */

.hero {
  background: var(--navy);
  color: #fff;
  padding-block: 2.25rem 2.5rem;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 40%);
}
.eyebrow {
  display: flex; align-items: center; gap: .4rem;
  margin: 0 0 .5rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero .eyebrow { color: var(--yellow); }
.hero__lead {
  font-size: 1.06rem; max-width: 34em; color: #e2eaf0;
  margin-bottom: 1.35rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero__cta .btn { flex: 1 1 100%; }   /* full width until there is room for two */
.hero__status {
  display: flex; align-items: center; gap: .5rem;
  margin: 1.1rem 0 0; font-size: .95rem; color: #e2eaf0;
}
.hero__status:empty { display: none; }
.dot {
  width: .7rem; height: .7rem; border-radius: 50%; flex: none;
  background: #38d16a; box-shadow: 0 0 0 3px rgba(56,209,106,.22);
}
.dot--shut { background: #ff9b3d; box-shadow: 0 0 0 3px rgba(255,155,61,.22); }
.hero__points {
  display: grid; gap: .4rem;
  margin: 1.5rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.22);
  font-size: .95rem; color: #e2eaf0;
}
.hero__points li { display: flex; align-items: flex-start; gap: .5rem; }
.hero__points .ico { color: var(--yellow); margin-top: .18em; }

/* ---------- sections ---------- */

.sect { padding-block: 2.5rem; }
.sect--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.sect__lead { max-width: 40em; color: var(--ink-2); margin-bottom: 1.5rem; }
.note { color: var(--ink-2); font-size: .95rem; max-width: 42em; }

.cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}
.card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.card__ico { font-size: 1.7rem; color: var(--accent); display: block; margin-bottom: .5rem; }
.card p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.steps {
  display: grid; gap: 1rem; counter-reset: s;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}
.step {
  min-width: 0; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem;
}
.step__n {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem; margin-bottom: .6rem;
  background: var(--navy); color: #fff;
  border-radius: 50%; font-weight: 800;
}
.step p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.areas {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(8rem, 100%), 1fr));
  margin-bottom: 1.25rem;
}
.areas li {
  min-width: 0;
  background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--navy-3);
  border-radius: 3px;
  padding: .5rem .6rem; font-size: .93rem; font-weight: 600;
}

/* ---------- hours ---------- */

.hours__grid { display: grid; gap: 1.5rem; }
table.hours { width: 100%; border-collapse: collapse; max-width: 26rem; }
table.hours th, table.hours td {
  text-align: left; padding: .55rem .25rem;
  border-bottom: 1px solid var(--line); font-size: .97rem;
}
table.hours th { font-weight: 600; }
table.hours td { text-align: right; font-variant-numeric: tabular-nums; }
table.hours tr[data-today] th, table.hours tr[data-today] td {
  background: #fff6e6; font-weight: 800;
  box-shadow: inset 3px 0 0 var(--accent);
}
.panel {
  background: var(--navy); color: #fff;
  border-radius: var(--radius); padding: 1.25rem;
  min-width: 0;
}
.panel h3 { color: var(--yellow); }
.panel p { color: #e2eaf0; font-size: .97rem; }
.panel p:last-child { margin-bottom: 0; }
.panel__alt { display: flex; align-items: center; gap: .45rem; }
.panel__alt a { color: #fff; overflow-wrap: anywhere; }

/* ---------- form ---------- */

.quote__grid { display: grid; gap: 1.75rem; }
.callout {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy-3);
  border-radius: var(--radius);
  padding: .9rem 1rem;
}
.callout p { margin: 0; font-size: .95rem; }
.quote__talk { margin: 1rem 0 0; }
.quote__talk a { overflow-wrap: anywhere; }
.callout--warn { border-left-color: var(--accent); background: #fdf1eb; }

.form {
  display: grid; gap: 1rem;
  background: #fff; border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.15rem;
  min-width: 0;
}
.field { display: grid; gap: .3rem; min-width: 0; }
.field > label, .fieldset > legend {
  font-weight: 700; font-size: .95rem; padding: 0;
}
.opt { font-weight: 400; color: var(--ink-2); }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  padding: .6rem .65rem;
  border: 2px solid #77848e;   /* 3.84:1 on white — WCAG 1.4.11 wants 3:1 */
  border-radius: var(--radius);
}
textarea { resize: vertical; min-height: 5.5rem; }
select { -webkit-appearance: none; appearance: none; padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 49%, var(--ink) 50%),
                    linear-gradient(-45deg, transparent 49%, var(--ink) 50%);
  background-size: .5rem .5rem, .5rem .5rem;
  background-position: right 1.15rem top 55%, right .75rem top 55%;
  background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); }
.hint { margin: 0; font-size: .87rem; color: var(--ink-2); }
.err { margin: 0; font-size: .87rem; font-weight: 700; color: #a4160f; }
.err:empty { display: none; }
[aria-invalid="true"] { border-color: #a4160f; }

.fieldset { border: 0; margin: 0; padding: 0; }
.radios { display: grid; gap: .35rem; margin-top: .2rem; }
.radio { display: flex; align-items: center; gap: .5rem; font-size: .97rem; }
.radio input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); flex: none; }

.form__foot { margin: 0; font-size: .9rem; color: var(--ink-2); }
.form__foot:empty { display: none; }

/* ---------- footer ---------- */

.foot { background: var(--navy); color: #e2eaf0; padding-block: 2rem 1.5rem; }
.foot__grid { display: grid; gap: 1.5rem; }
.foot__brand {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .4rem; font-weight: 800; color: #fff;
  text-transform: uppercase; letter-spacing: -0.01em;
}
.foot__small { color: #c4d2dd; font-size: .93rem; margin: 0; }
.foot__h {
  font-size: .8rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--yellow); margin: 0 0 .5rem;
}
.foot__list { display: grid; gap: .35rem; font-size: .95rem; }
.foot__list a { color: #fff; overflow-wrap: anywhere; }
.foot__list a:hover { color: var(--yellow); }
.foot__rule {
  margin-top: 1.75rem; padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,.22);
}
.foot__demo { margin: 0 0 .5rem; font-size: .93rem; color: #fff; font-weight: 700; }
.foot__demo--small {
  font-weight: 400; color: #c4d2dd; font-size: .87rem;
  max-width: 60em; margin: 0;
}
.foot__demo--small a { color: #fff; }

/* ---------- wider screens ---------- */

@media (min-width: 34rem) {
  .brand__txt { font-size: 1.15rem; }
  .bar__call { font-size: 1rem; padding: .6rem .9rem; }
  .hero { padding-block: 3.25rem 3.5rem; }
  .hero__cta .btn { flex: 0 0 auto; }
  .hero__points { grid-template-columns: repeat(auto-fit, minmax(min(15rem,100%), 1fr)); gap: .6rem 1.25rem; }
  .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 52rem) {
  .sect { padding-block: 3.5rem; }
  .hours__grid { grid-template-columns: 1.15fr .85fr; align-items: start; gap: 2.5rem; }
  .quote__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
  .hero__lead { font-size: 1.15rem; }
}

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