/* My City Solar — mobile-first styles. Brand colours live in :root. */

:root {
  --ink: #1c2822;
  --ink-soft: #3e4a44;
  --muted: #55615b;
  --deep: #1a2e26;
  --green: #2a6248;
  --orange: #c2410c;
  --orange-deep: #9a3412;
  --sand: #f4f1ea;
  --paper: #ffffff;
  --line: #e3dfd6;
  --mark-gap: #ffffff;
  --footer-text: #e6eeea;
  --footer-muted: #b7c4bc;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --header-height: 72px;
  --measure: 40rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-height) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.05rem, 6.2vw, 4.05rem);
  line-height: 1.04;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
}

h3 {
  font-size: 1.35rem;
  line-height: 1.25;
}

a {
  color: var(--green);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

::selection {
  background: #f3d2c0;
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 56px 0;
}

.section-compact {
  padding: 48px 0;
}

.section-sand {
  background: var(--sand);
}

.section-head {
  max-width: var(--measure);
}

.section-head h2 + .lede,
.page-hero h1 + .lede,
.hero-copy h1 + .lede {
  margin-top: 16px;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.lede {
  max-width: 38rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}

.narrow {
  max-width: var(--measure);
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p + p {
  margin-top: 1rem;
}

.prose a {
  text-underline-offset: 3px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: var(--header-height);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1rem;
  line-height: 1.1;
}

.logo span {
  white-space: nowrap;
}

.logo-mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.mark-panel {
  fill: currentColor;
}

.mark-gap {
  fill: var(--mark-gap);
}

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0;
  padding: 8px 20px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav.is-open {
  display: flex;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.125rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.nav a[aria-current="page"] {
  color: var(--green);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}

.bars {
  position: relative;
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 1.5px;
  background: currentColor;
}

.bars::before {
  top: -6px;
}

.bars::after {
  top: 6px;
}

@media (prefers-reduced-motion: no-preference) {
  .bars,
  .bars::before,
  .bars::after {
    transition: transform 0.15s ease, top 0.15s ease, background 0.15s ease;
  }
}

.menu-toggle[aria-expanded="true"] .bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .bars::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--orange-deep);
  color: #fff;
}

.btn-primary:visited {
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .help-card,
  .flow li {
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
}

.header-cta {
  padding-inline: 14px;
  min-height: 44px;
}

.header-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 100%;
  order: 5;
  min-height: 44px;
  margin-top: 2px;
  padding: 6px 0 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--green);
}

.cta-short {
  display: none;
}

/* Hero */

.hero {
  padding: 36px 0 64px;
}

.hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions .btn,
.cta-actions .btn,
.inline-cta .btn {
  width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  padding-top: 12px;
  padding-bottom: 12px;
}

.hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-visual img {
  width: 100%;
  border-radius: 16px;
  background: var(--sand);
}

/* Shared content grids */

.trust-grid,
.explain-grid,
.benefit-grid,
.process,
.plain-list {
  margin-top: 36px;
}

.trust-grid,
.explain-grid,
.benefit-grid,
.plain-list {
  display: grid;
  gap: 28px;
  padding: 0;
  list-style: none;
}

.trust-grid article,
.explain-grid article,
.benefit-grid article,
.plain-list li {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.trust-grid h3,
.explain-grid h3,
.benefit-grid h3,
.help-card h3 {
  margin-bottom: 8px;
}

.benefit-grid h3,
.flow h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.35;
}

.help-grid {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.help-card {
  border: 1px solid #ddd8ce;
  border-radius: 12px;
  padding: 20px 18px 18px;
  background: var(--paper);
}

.help-card h3 {
  font-size: 1.28rem;
}

.local-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.place-mark {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sand);
}

.place-kicker,
.place-region,
.place-near {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.place-name {
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.place-plus {
  margin: 10px 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--orange);
}

.flow {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 12px;
  counter-reset: step;
}

.flow li {
  counter-increment: step;
  border: 1px solid #ddd8ce;
  border-radius: 12px;
  padding: 18px 18px 16px;
  background: var(--paper);
}

.flow li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--orange);
  letter-spacing: -0.03em;
}

.flow p,
.help-card p,
.benefit-grid p {
  color: var(--muted);
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.inline-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.inline-cta p {
  max-width: 28rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

@media (hover: hover) {
  .help-card:hover,
  .flow li:hover {
    border-color: #c4bbae;
  }
}

.section-sand .trust-grid article,
.section-sand .benefit-grid article,
.section-sand .plain-list li,
.section-sand .process li {
  border-top-color: #ddd8ce;
}

.process {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 28px;
  counter-reset: step;
}

.process li {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  counter-increment: step;
}

.process li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--orange);
  letter-spacing: -0.03em;
}

.process h3 {
  margin-bottom: 8px;
}

/* FAQ */

.faq {
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}

.section-sand .faq {
  border-bottom-color: #ddd8ce;
}

.faq details {
  border-top: 1px solid var(--line);
}

.section-sand .faq details {
  border-top-color: #ddd8ce;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 1.15rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  color: var(--orange);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  max-width: 65ch;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

/* Closing band */

.cta-band .cta-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

/* Inner pages */

.page-hero {
  padding: 40px 0 8px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  max-width: 14em;
}

.stack {
  padding-top: 28px;
  padding-bottom: 72px;
}

/* Contact */

.contact-layout {
  display: grid;
  gap: 40px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.contact-actions .btn {
  width: 100%;
}

.contact-block {
  margin-top: 32px;
}

.contact-block h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.contact-line {
  margin-top: 8px;
}

.contact-line a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 3px;
}

.placeholder-note,
.form-note,
.form-status {
  color: var(--muted);
  font-size: 0.95rem;
}

.placeholder-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-card {
  background: var(--sand);
  border-radius: 16px;
  padding: 22px 18px 20px;
}

.form-card h2 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.field {
  margin-top: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cfcbc2;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--orange);
}

.field-error {
  min-height: 0;
  margin-top: 6px;
  color: var(--orange);
  font-size: 0.88rem;
}

.field-error:empty {
  display: none;
}

.form-card .btn {
  width: 100%;
  margin-top: 8px;
}

.form-note {
  margin-top: 12px;
}

.form-status {
  margin-top: 16px;
}

.form-status:empty {
  display: none;
}

.prepared {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #ddd8ce;
}

.prepared p {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 8px;
}

.prepared pre {
  margin: 0 0 12px;
  white-space: pre-wrap;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.section-actions {
  margin-top: 28px;
}

.photo-frame img {
  width: 100%;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--sand);
}

.photo-frame figcaption {
  margin-top: 10px;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.system-flow {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
}

.system-flow li {
  position: relative;
  padding: 2px 0 34px;
}

.system-flow li::after {
  content: "↓";
  position: absolute;
  left: 0;
  bottom: 6px;
  color: var(--orange);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1;
}

.system-flow li:last-child {
  padding-bottom: 0;
}

.system-flow li:last-child::after {
  content: none;
}

.system-flow h3 {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.35;
}

.system-flow p {
  max-width: 18rem;
  color: var(--muted);
}

.ready-list {
  margin: 12px 0 12px;
  padding: 0;
  list-style: none;
}

.ready-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.assess {
  max-width: 40rem;
}

.assess-progress {
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.assess-step h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  max-width: 16em;
}

.choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.choice {
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid #ddd8ce;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.choice.is-selected {
  border-color: var(--orange);
  background: #fbf7f3;
}

.assess-nav {
  margin-top: 18px;
}

.btn-text {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.assess-result h2 {
  max-width: 16em;
}

.assess-result .lede {
  margin-top: 16px;
}

.assess .btn-primary,
.assess-result .btn-primary {
  width: 100%;
  margin-top: 22px;
}

.assess-result .btn {
  margin-top: 24px;
}

/* Footer */

.site-footer {
  background: var(--deep);
  color: var(--footer-text);
  --mark-gap: var(--deep);
  padding: 56px 0 24px;
}

.site-footer .logo {
  color: var(--footer-text);
}

.footer-grid {
  display: grid;
  gap: 32px;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 28rem;
  color: var(--footer-muted);
}

.footer-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--footer-text);
  margin-bottom: 12px;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.follow {
  margin-top: 28px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  display: inline-block;
  padding: 6px 0;
  color: var(--footer-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--footer-text);
}

.footer-base {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--footer-muted);
  font-size: 0.92rem;
}

/* Tablet and desktop */

@media (max-width: 899px) {
  :root {
    --header-height: 118px;
  }
}

@media (max-width: 480px) {
  .cta-long {
    display: none;
  }

  .cta-short {
    display: inline;
  }

  .header-cta {
    padding-inline: 12px;
    font-size: 0.88rem;
  }

  .faq summary {
    font-size: 1.12rem;
  }
}

@media (min-width: 640px) {
  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .assess .btn-primary,
  .assess-result .btn-primary {
    width: auto;
  }

  .hero-actions,
  .contact-actions,
  .cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-actions .btn,
  .contact-actions .btn,
  .cta-actions .btn,
  .form-card .btn,
  .inline-cta .btn {
    width: auto;
  }

  .process,
  .help-grid,
  .flow {
    grid-template-columns: 1fr 1fr;
  }

  .benefit-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
  }
}

@media (min-width: 800px) {
  .section {
    padding: 96px 0;
  }

  .section-compact {
    padding: 72px 0;
  }

  .hero {
    padding: 72px 0 104px;
  }

  .page-hero {
    padding: 72px 0 12px;
  }

  .stack {
    padding-top: 36px;
    padding-bottom: 104px;
  }

  .trust-grid,
  .plain-list,
  .process-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .local-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    gap: 64px;
  }

  .cta-band .cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }

  .cta-band .lede {
    margin-top: 12px;
  }

  .form-card {
    padding: 32px 28px;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 0.8fr 0.9fr;
    gap: 48px;
  }
}

@media (min-width: 900px) {
  .header-phone {
    flex: none;
    order: 0;
    justify-content: flex-start;
    margin-top: 0;
    padding: 0;
    border-top: 0;
    font-size: 0.92rem;
  }

  .menu-toggle {
    display: none;
  }

  .nav,
  .nav.is-open {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav a {
    font-size: 0.98rem;
    padding: 0;
    border: 0;
  }

  .nav a:hover {
    color: var(--green);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
  }

  .system-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .system-flow li {
    padding: 0 22px 0 0;
  }

  .system-flow li::after {
    content: "→";
    left: auto;
    right: 0;
    bottom: auto;
    top: 0;
  }

  .system-flow p {
    max-width: none;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 64px;
    align-items: start;
  }
}

@media (min-width: 1000px) {
  .explain-grid,
  .process,
  .flow,
  .help-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .process {
    gap: 32px;
  }

  .process.process-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--orange);
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}
