:root {
  color-scheme: light;
  --bg: #eef3f5;
  --panel: #ffffff;
  --text: #505b60;
  --strong: #3f4a50;
  --muted: #6d777c;
  --line: #d8e0e4;
  --field: #f9fbfc;
  --primary: #1783a6;
  --primary-dark: #0f6683;
  --danger: #b42318;
  --success: #067647;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.background-photo {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("./assets/solar-rooftop.jpeg") center / cover no-repeat;
}

.background-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(33, 52, 61, 0.54);
  backdrop-filter: blur(5px);
}

.page-shell {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.form-panel {
  overflow: hidden;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(17, 38, 48, 0.34);
}

.hero-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.hero-image > img:first-child {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.12));
}

.brand-logo {
  position: absolute;
  right: 38px;
  bottom: 34px;
  z-index: 1;
  width: min(310px, 44%);
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.28));
}

.intro {
  padding: 54px 72px 28px;
  text-align: center;
}

h1 {
  margin: 0 0 26px;
  color: var(--strong);
  font-size: 44px;
  line-height: 1.1;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
}

#requestForm,
#statusForm {
  display: grid;
  gap: 20px;
}

.home-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 72px 58px;
}

.app-view {
  padding: 0 72px 58px;
}

form.app-view {
  padding: 0 72px 58px;
}

.app-view[hidden],
.home-view[hidden] {
  display: none;
}

form.app-view {
  padding-top: 0;
}

.choice-button,
.back-button {
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.choice-button {
  min-height: 74px;
  padding: 18px;
  font-size: 22px;
}

.primary-choice {
  background: var(--primary);
  color: #ffffff;
}

.secondary-choice {
  background: #eef3f5;
  color: var(--strong);
  border: 1px solid var(--line);
}

.choice-button:hover,
.choice-button:focus,
.back-button:hover,
.back-button:focus {
  filter: brightness(0.96);
}

.back-button {
  justify-self: start;
  margin-bottom: 8px;
  background: transparent;
  color: var(--primary);
  padding: 8px 0;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--strong);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  padding: 13px 14px;
  color: var(--strong);
  font: inherit;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  outline: 3px solid rgba(23, 131, 166, 0.17);
}

small {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
}

.project-field {
  position: relative;
}

.results {
  display: none;
  position: absolute;
  z-index: 10;
  top: 78px;
  left: 0;
  right: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(17, 38, 48, 0.18);
}

.results.is-visible {
  display: block;
}

.result-button {
  display: grid;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
}

.result-button:hover,
.result-button:focus {
  background: #eef8fb;
}

.result-button strong {
  color: var(--strong);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}

.actions button {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  padding: 13px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.actions button:hover {
  background: var(--primary-dark);
}

.actions button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.error {
  color: var(--danger);
}

#formStatus.success {
  color: var(--success);
}

#formStatus.error {
  color: var(--danger);
}

.status-card {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid #b8dce7;
  border-radius: 8px;
  background: #eef9fc;
  padding: 16px;
  color: var(--strong);
}

.status-card strong {
  font-size: 18px;
}

.status-card span,
.status-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
}

.consult-note {
  display: block;
  margin-top: -6px;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 20px, 860px);
    padding: 20px 0;
  }

  .hero-image {
    height: 190px;
  }

  .brand-logo {
    right: 22px;
    bottom: 24px;
    width: min(230px, 54%);
  }

  .intro {
    padding: 34px 24px 22px;
  }

  h1 {
    font-size: 34px;
  }

  p {
    font-size: 17px;
  }

  #requestForm,
  #statusForm,
  .home-view,
  .app-view,
  form.app-view {
    padding: 0 24px 34px;
  }

  .home-view {
    grid-template-columns: 1fr;
  }
}
