:root {
  --ink: #17211f;
  --muted: #56635f;
  --paper: #f8f6ef;
  --surface: #ffffff;
  --line: #d9dfd9;
  --accent: #0b7d69;
  --accent-dark: #075b4e;
  --sun: #f1b84b;
  --danger: #b3261e;
  --shadow: 0 24px 70px rgba(15, 31, 28, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
}

button,
input {
  font: inherit;
}

.page {
  background:
    linear-gradient(180deg, rgba(248, 246, 239, 0.24), var(--paper) 680px),
    var(--paper);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  position: relative;
  display: grid;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-media,
.thanks-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img,
.thanks-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after,
.thanks::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(4, 18, 17, 0.82), rgba(4, 18, 17, 0.26) 62%),
    linear-gradient(0deg, rgba(4, 18, 17, 0.3), rgba(4, 18, 17, 0));
}

.hero-content {
  align-self: end;
  width: min(740px, 100%);
  padding: clamp(28px, 6vw, 72px);
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sun);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.subtitle {
  margin: 20px 0 0;
  max-width: 780px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 32px;
  align-items: start;
  margin-top: 32px;
}

.intro {
  padding: 6px 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.intro p {
  margin: 0 0 18px;
}

.signup-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(24, 44, 40, 0.1);
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(11, 125, 105, 0.14);
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.check a,
.legal-section a {
  color: var(--accent-dark);
  font-weight: 850;
  text-decoration-color: rgba(7, 91, 78, 0.35);
  text-underline-offset: 3px;
}

.primary-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.form-message {
  min-height: 22px;
  margin: -2px 0 0;
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 700;
}

.form-message[data-type="info"] {
  color: var(--accent-dark);
}

.thanks {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  place-items: center;
  padding: 32px;
  isolation: isolate;
}

.thanks::after {
  background:
    linear-gradient(90deg, rgba(4, 18, 17, 0.84), rgba(4, 18, 17, 0.2) 74%),
    linear-gradient(0deg, rgba(4, 18, 17, 0.42), rgba(4, 18, 17, 0));
}

.thanks-content {
  width: min(820px, 100%);
  justify-self: start;
  margin-left: clamp(0px, 7vw, 92px);
  color: #fff;
}

.thanks-content p:not(.eyebrow):not(.subtitle) {
  max-width: 680px;
  margin: 20px 0 0;
  font-size: 1.08rem;
  line-height: 1.7;
}

.secondary-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}

.page-error {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.error-state {
  width: min(560px, calc(100% - 32px));
  padding: 40px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-state .secondary-link {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.legal-page {
  background:
    linear-gradient(180deg, rgba(11, 125, 105, 0.1), rgba(248, 246, 239, 0) 360px),
    var(--paper);
}

.legal-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.legal-header {
  padding: 14px 0 24px;
}

.legal-header h1 {
  max-width: 820px;
  color: var(--ink);
  font-size: clamp(2.35rem, 5vw, 4.4rem);
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--accent-dark);
  font-weight: 850;
  text-decoration: none;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.legal-nav a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  background: #fff;
  font-weight: 850;
  text-decoration: none;
}

.legal-section {
  scroll-margin-top: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.legal-section p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.78;
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 22px, 640px);
    padding-top: 12px;
  }

  .hero {
    min-height: 580px;
  }

  .hero::after {
    background:
      linear-gradient(0deg, rgba(4, 18, 17, 0.84), rgba(4, 18, 17, 0.26) 72%),
      linear-gradient(90deg, rgba(4, 18, 17, 0.34), rgba(4, 18, 17, 0));
  }

  .hero-content {
    padding: 28px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 22px;
  }

  .signup-form {
    padding: 22px;
  }

  .thanks {
    min-height: 100vh;
    padding: 24px;
    place-items: end start;
  }

  .thanks-content {
    margin: 0 0 8vh;
  }

  .legal-shell {
    width: min(100% - 24px, 640px);
    padding-top: 22px;
  }
}
