/* ==========================================================================
   Portland Hot Water Co — site styles
   Static marketing site. Design tokens recreated from DESIGN-HANDOFF.md.
   ========================================================================== */

:root {
  /* Colors */
  --ink: #16222F;          /* primary dark / sections */
  --ink-2: #1F3142;        /* secondary dark text */
  --paper: #F6F3EC;        /* page background, light text-on-dark */
  --paper-2: #EDE8DC;      /* alt section background */
  --copper: #B5703D;       /* accent — droplet, badge numbers, bullets */
  --copper-dark: #8C5429;  /* kickers, form success link */
  --ember: #E2592C;        /* primary CTA / phone / eyebrow accent */
  --ember-dark: #C24420;   /* CTA drop shadow */
  --steel: #5C6B73;        /* muted body text, ghost-border on dark */
  --line: #D8D2C2;         /* hairline borders */

  /* Footer / dark muted extras */
  --footer-bg: #0F1820;
  --footer-line: #2C3F4F;
  --muted-1: #7E8E97;
  --muted-2: #9FAEB8;
  --muted-3: #C9D2D9;
  --hero-trust: #8FA0AA;

  /* Fonts */
  --font-display: 'Big Shoulders', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --maxw: 1120px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

@keyframes hwFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 9px;
  padding-bottom: 9px;
}
.topbar__note { opacity: .8; }
.topbar__phone {
  color: var(--ember);
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Nav ---------- */
.nav {
  background: rgba(246, 243, 236, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  padding-bottom: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}
.brand__mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1;
}
.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}
.nav__links a { text-decoration: none; color: var(--ink-2); }
.nav__cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  display: inline-block;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.btn--solid {
  background: var(--ember);
  color: #fff;
  border: none;
  box-shadow: 0 2px 0 var(--ember-dark);
}
.btn--solid:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--ember-dark);
}
.btn--solid-lg {
  background: var(--ember);
  color: #fff;
  border: none;
  box-shadow: 0 3px 0 var(--ember-dark);
}
.btn--solid-lg:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--ember-dark);
}
.btn--ghost-ink {
  color: var(--ink);
  border: 1.5px solid var(--ink);
  background: transparent;
}
.btn--ghost-ink:hover { background: var(--ink); color: var(--paper); }
.btn--ghost-steel {
  color: var(--paper);
  border: 1.5px solid var(--steel);
  background: transparent;
}
.btn--ghost-steel:hover { background: var(--steel); color: var(--paper); }
.btn--ghost-paper {
  color: var(--paper);
  border: 1.5px solid var(--paper);
  background: transparent;
}

.nav__cta .btn--ghost-ink { font-size: 13.5px; padding: 10px 16px; }
.nav__cta .btn--solid { font-size: 13.5px; padding: 11px 18px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.hero__scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 36px);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  min-height: 520px;
  padding: 64px 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--ember);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
}
.eyebrow__dot {
  width: 7px;
  height: 7px;
  background: var(--ember);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(226, 89, 44, 0.25);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 0.98;
  margin: 0 0 20px;
}
.hero__sub {
  color: var(--muted-3);
  font-size: 18px;
  max-width: 480px;
  margin: 0 0 30px;
}
.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero__ctas .btn--solid-lg { font-size: 15.5px; padding: 15px 28px; }
.hero__ctas .btn--ghost-steel { font-size: 15.5px; padding: 15px 26px; }
.hero__trust {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--hero-trust);
  letter-spacing: .03em;
}
.hero__media {
  position: relative;
  animation: hwFloat 6s ease-in-out infinite;
}
.hero__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 78%;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--footer-line);
}
.hero__badge {
  position: absolute;
  left: -16px;
  bottom: 24px;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 18px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  max-width: 210px;
}
.hero__badge-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  color: var(--copper);
}
.hero__badge-sub {
  font-size: 12.5px;
  color: var(--steel);
  margin-top: 4px;
}

/* ---------- Trust strip ---------- */
.trustbar {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trustbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--ink-2);
}

/* ---------- Generic section bits ---------- */
.section { padding: 80px 0; }
.section--paper { background: var(--paper); }
.section--paper2 {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.kicker--copper { color: var(--copper-dark); }
.kicker--ember { color: var(--ember); }
.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.02;
  margin: 10px 0 8px;
}
.lead {
  color: var(--steel);
  font-size: 16px;
  max-width: 560px;
  margin: 0 0 40px;
}
.section--ink .lead { color: var(--muted-3); }

/* ---------- Services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--paper);
  padding: 32px 28px;
  position: relative;
}
.card__tab {
  position: absolute;
  top: 0;
  left: 28px;
  width: 34px;
  height: 4px;
  background: var(--copper);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 24px;
  margin: 20px 0 10px;
}
.card p {
  color: var(--steel);
  font-size: 14.5px;
  margin: 0;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ember);
  margin-bottom: 12px;
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 21px;
  margin: 0 0 8px;
}
.step p {
  color: var(--muted-3);
  font-size: 14.5px;
  margin: 0;
}

/* ---------- Service areas pills ---------- */
.pills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pill {
  font-family: var(--font-mono);
  font-size: 13.5px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  padding: 9px 18px;
  border-radius: 22px;
  text-decoration: none;
  display: inline-block;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
a.pill:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.pill[aria-current="page"] {
  background: var(--copper);
  color: #fff;
  border-color: var(--copper);
}

/* ---------- Quote form ---------- */
.quote__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.quote h2 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.0;
  margin: 10px 0 14px;
}
.quote__sub {
  color: var(--muted-3);
  font-size: 16px;
  max-width: 420px;
  margin: 0 0 28px;
}
.quote__list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.quote__list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  padding: 9px 0;
}
.quote__bullet {
  width: 7px;
  height: 7px;
  background: var(--copper);
  flex-shrink: 0;
}
.quote__phone {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.4vw, 34px);
  color: var(--ember);
  text-decoration: none;
}
.formcard {
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 32px 30px;
}
.field { margin-bottom: 16px; }
.field--names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field--last { margin-bottom: 18px; }
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.input,
.textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}
.textarea {
  resize: vertical;
  min-height: 84px;
}
.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--ember);
}
.error {
  color: var(--ember);
  font-size: 12px;
  margin-top: 5px;
  font-family: var(--font-mono);
}
.btn--submit {
  width: 100%;
  text-align: center;
  font-size: 15.5px;
  padding: 15px;
}
/* Success state */
.success { text-align: center; padding: 32px 0; }
.success__circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--copper);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.success h3 { font-size: 20px; margin: 0 0 8px; }
.success p {
  color: var(--steel);
  font-size: 14.5px;
  margin: 0;
}
.success a { color: var(--copper-dark); font-weight: 600; }

/* ---------- Footer ---------- */
.footer {
  background: var(--footer-bg);
  color: var(--muted-3);
  padding: 48px 0 28px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--footer-line);
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer__brand span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  text-transform: uppercase;
  color: var(--paper);
}
.footer__about {
  max-width: 340px;
  font-size: 13.5px;
  color: var(--muted-2);
  margin: 0;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted-1);
  text-transform: uppercase;
  margin: 0 0 12px;
}
.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 2;
  font-size: 13.5px;
}
.footer__list a { color: var(--muted-3); text-decoration: none; }
.footer__list a:hover { text-decoration: underline; }
.footer__phone {
  display: block;
  font-size: 15px;
  color: var(--ember);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 10px;
}
.footer__legal {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
}
.footer__legal a { color: var(--muted-2); text-decoration: underline; }
.footer__copy {
  font-size: 12px;
  color: var(--muted-1);
  line-height: 1.6;
  margin: 16px 0 0;
}

/* ---------- Mobile sticky action bar ---------- */
.mobilebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--ink);
  border-top: 1px solid var(--footer-line);
  padding: 10px 14px;
  gap: 10px;
  display: none; /* hidden on desktop; shown at <=860px */
}
.mobilebar .btn {
  flex: 1;
  text-align: center;
  font-size: 14px;
  padding: 13px 10px;
}

/* ==========================================================================
   Responsive — breakpoint at 860px
   ========================================================================== */
@media (max-width: 860px) {
  /* Hide desktop nav center links + right-side buttons */
  .nav__links,
  .nav__cta { display: none; }

  /* Show mobile sticky bar */
  .mobilebar { display: flex; }

  /* Keep fixed bar from covering footer / page bottom */
  body { padding-bottom: 76px; }

  /* Hero collapses to single column, image below text */
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: 0;
    padding: 48px 0;
  }
  .hero__media { order: 2; }
  .hero__badge { left: 0; }

  /* Stack multi-column grids */
  .cards,
  .steps,
  .quote__grid {
    grid-template-columns: 1fr;
  }
  .cards { border: 1px solid var(--line); gap: 1px; }
  .quote__grid { gap: 40px; }

  .section { padding: 56px 0; }
}

@media (max-width: 480px) {
  .field--names { grid-template-columns: 1fr; }
  .hero__trust { gap: 10px 20px; }
}
