:root {
  color-scheme: light;
  --ink: #15343a;
  --muted: #526d70;
  --teal: #087f80;
  --teal-dark: #075f66;
  --paper: #f7fbf8;
  --line: rgba(21, 52, 58, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--ink);
  background-color: #dbe9dc;
  background-image:
    linear-gradient(90deg, rgba(244, 250, 247, 0.96) 0%, rgba(244, 250, 247, 0.88) 46%, rgba(244, 250, 247, 0.3) 100%),
    url("assets/forest.jpg");
  background-position: center;
  background-size: cover;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.page-shell {
  width: min(1180px, calc(100% - 64px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0;
}

.brand__logo {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
}

.brand__name {
  font-size: 22px;
  font-weight: 750;
}

.welcome {
  width: min(650px, 100%);
  align-self: center;
  padding: 48px 0 72px;
}

.welcome__eyebrow {
  margin: 0 0 18px;
  color: var(--teal);
  font-size: 15px;
  font-weight: 750;
  text-transform: uppercase;
}

h1 {
  max-width: 620px;
  margin: 0;
  font-size: 68px;
  line-height: 1.02;
  letter-spacing: 0;
}

.welcome__lead {
  max-width: 590px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
}

.welcome__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
}

.primary-button {
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 12px 30px rgba(7, 95, 102, 0.2);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

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

.primary-button:focus-visible {
  outline: 3px solid rgba(8, 127, 128, 0.28);
  outline-offset: 4px;
}

.welcome__note {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

body.is-error {
  --teal: #a1433f;
  --teal-dark: #7c302d;
}

body.is-error .primary-button {
  box-shadow: 0 12px 30px rgba(124, 48, 45, 0.18);
}

@media (max-width: 700px) {
  body {
    background-image:
      linear-gradient(180deg, rgba(244, 250, 247, 0.94) 0%, rgba(244, 250, 247, 0.82) 65%, rgba(244, 250, 247, 0.62) 100%),
      url("assets/forest.jpg");
    background-position: center;
  }

  .page-shell {
    width: min(100% - 36px, 560px);
  }

  .brand {
    padding: 20px 0;
  }

  .brand__logo {
    width: 46px;
    height: 46px;
  }

  .welcome {
    padding: 40px 0 56px;
  }

  h1 {
    font-size: 43px;
  }

  .welcome__lead {
    font-size: 18px;
  }

  .welcome__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .primary-button {
    width: 100%;
  }

}

@media (prefers-reduced-motion: no-preference) {
  .brand,
  .welcome,
  footer {
    animation: reveal 520ms ease-out both;
  }

  .welcome {
    animation-delay: 90ms;
  }

  footer {
    animation-delay: 170ms;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
