/* Homepage styles, layered on top of styles.css */

body.home {
  /* Palette drawn from the cloud.jpg sky so the page continues the hero */
  --home-text: #3b4a6b;
  --home-heading: #3a5fcf;
  --home-sky: #8cacfe;
  --home-tint: #eef3ff;
  --home-border: #d3ddf5;
  --home-surface: #fbfcff;
  --home-error: #b42318;
  --home-error-bg: #fef3f2;
  --home-success: #067647;
  --home-success-bg: #ecfdf3;

  /* The bright sky hero has no dark variant, so the page stays light */
  color-scheme: light;
  background: var(--home-surface);
  color: var(--home-text);
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.home .wrap.narrow { max-width: 750px; }

.home h2 {
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--home-heading);
  margin: 0 0 16px;
}

.home p { font-size: 1.15rem; margin: 0; }

/* Hero */

.home-hero {
  background: var(--home-sky) url(/assets/img/cloud.jpg) center / cover no-repeat;
  text-align: center;
  padding: 20px 0 0;
  color: #fff;
  text-shadow: 1px 1px 2px #0c2e89;
}

.home-logo {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto 8px;
}

.home-hero h1 {
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  line-height: 1.35;
  margin: 0 0 24px;
}

.home-devices {
  display: block;
  width: 100%;
  max-width: 681px;
  height: auto;
  margin: 0 auto 24px;
}

.store-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 20px;
}

.store-badges img {
  display: block;
  width: 205px;
  height: auto;
}

@media (min-width: 600px) {
  /* On wider screens the badges sit above the devices image, as in the original */
  .home-hero .wrap { display: flex; flex-direction: column; }
  .home-hero picture { order: 1; }
  .home-hero .store-badges { padding-bottom: 0; margin-bottom: 20px; }
  .home-devices { margin-bottom: 40px; }
}

/* Sections */

.home-section {
  text-align: center;
  padding: 48px 0;
}

.home-section.tinted {
  background: var(--home-tint);
  border-block: 1px solid var(--home-border);
}

.home-icon {
  display: block;
  width: 170px;
  height: 170px;
  margin: 0 auto 16px;
  border-radius: 22.5%;
  border: 1px solid var(--home-border);
}

.home-section .store-badges { margin-top: 28px; padding-bottom: 0; }

/* Features */

.features {
  list-style: none;
  margin: 8px auto 0;
  padding: 0;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 28px 40px;
  text-align: left;
}

.features li {
  display: grid;
  grid-template-columns: 27px 1fr;
  column-gap: 13px;
  align-content: start;
}

.features img { grid-row: span 2; width: 27px; height: 27px; }

.features h3 {
  font-size: 1.25rem;
  color: var(--home-heading);
  margin: 0 0 6px;
}

.features p { font-size: 1rem; }

/* Contact */

.button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--home-heading);
  color: #fff;
  text-decoration: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button:hover { filter: brightness(1.1); }
.button:disabled { opacity: 0.7; cursor: progress; }

.contact-form {
  max-width: 600px;
  margin: 32px auto 0;
  text-align: left;
}

.contact-form .field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 18px;
}

@media (min-width: 600px) {
  /* Labels beside inputs, as in the original form */
  .contact-form .field { grid-template-columns: 7rem 1fr; column-gap: 16px; }
  .contact-form label { text-align: right; padding-top: 9px; }
  .contact-form .field > :not(label) { grid-column: 2; }
}

.contact-form label { font-weight: 700; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--home-border);
  border-radius: 8px;
  background: var(--home-surface);
  color: inherit;
  font: inherit;
}

.contact-form textarea { resize: vertical; }

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--home-heading);
  outline-offset: 1px;
}

.contact-form .button { margin-top: 0; justify-self: start; }

.contact-form [aria-invalid="true"] { border-color: var(--home-error); }

.contact-form .field-error {
  color: var(--home-error);
  font-size: 0.9rem;
  margin: 0;
}

.form-status {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.form-status.success { background: var(--home-success-bg); color: var(--home-success); }
.form-status.error { background: var(--home-error-bg); color: var(--home-error); }

/* Footer */

.home-footer {
  text-align: center;
  padding: 32px 0 40px;
  font-size: 0.9rem;
}

.home-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.home-footer a { color: var(--home-heading); }
.home-footer p { font-size: 0.85rem; margin-bottom: 6px; }
