:root {
  --ink: #182230;
  --muted: #5f6c7b;
  --rose: #f070a8;
  --rose-deep: #d7397c;
  --sky: #93ccec;
  --mint: #88d6b4;
  --paper: rgba(255, 255, 255, 0.9);
  --line: rgba(24, 34, 48, 0.12);
  --shadow: 0 26px 70px rgba(95, 71, 92, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff8fb;
}

.page-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(240, 112, 168, 0.18), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(147, 204, 236, 0.26), transparent 30%),
    linear-gradient(135deg, #fff7fb 0%, #f5fbff 48%, #fff9ee 100%);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(500px, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  width: min(1280px, 100%);
  min-height: calc(100vh - 48px);
  margin: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 43%, rgba(255, 255, 255, 0.16) 69%),
    radial-gradient(circle at 24% 82%, rgba(136, 214, 180, 0.2), transparent 26%);
  z-index: 1;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 67% center;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  padding: 72px;
}

.hero__eyebrow {
  width: fit-content;
  margin: 0 0 20px;
  padding: 9px 16px;
  border: 1px solid rgba(24, 34, 48, 0.1);
  border-radius: 999px;
  color: #b82065;
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  max-width: 8.8em;
  margin: 0;
  color: #111827;
  font-size: 62px;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 40em;
  margin: 24px 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}

.signup-panel {
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 42px rgba(24, 34, 48, 0.1);
  backdrop-filter: blur(14px);
}

.field-label {
  display: block;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.email-row,
.captcha-row {
  display: grid;
  gap: 10px;
}

.email-row {
  grid-template-columns: minmax(0, 1fr) 112px;
}

.captcha-row {
  grid-template-columns: 150px 88px minmax(0, 1fr);
  align-items: center;
}

input,
button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  outline: none;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus {
  border-color: rgba(136, 199, 243, 0.95);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(136, 199, 243, 0.18);
}

button {
  padding: 0 25px;
  color: #fff;
  background: #111827;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.26);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.captcha-group {
  display: grid;
  gap: 9px;
}

.captcha-image {
  width: 150px;
  height: 52px;
  border: 1px solid rgba(136, 199, 243, 0.45);
  border-radius: 999px;
  background: #f8fcff;
  object-fit: cover;
}

.refresh-button {
  min-height: 50px;
  padding: 0 12px;
  color: #1f5d63;
  background: rgba(147, 204, 236, 0.24);
  box-shadow: none;
  font-size: 14px;
}

.captcha-row input {
  min-width: 0;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: min(390px, calc(100vw - 36px));
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  color: #304057;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(52, 64, 84, 0.18);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  color: #9f1239;
}

.toast.is-success {
  color: #16705c;
}

@media (max-width: 820px) {
  .page-shell {
    padding: 12px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 24px);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.62);
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 35%, rgba(255, 255, 255, 0.98) 83%);
  }

  .hero__media {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 350px;
    max-height: 480px;
    overflow: hidden;
  }

  .hero__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 52%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 84%);
  }

  .hero__media img {
    object-position: 58% 28%;
  }

  .hero__content {
    width: 100%;
    min-height: 0;
    margin-top: -76px;
    padding: 0 18px 24px;
    text-align: center;
  }

  .hero__eyebrow {
    margin-right: auto;
    margin-left: auto;
  }

  h1 {
    max-width: 10.5em;
    margin-right: auto;
    margin-left: auto;
    font-size: 40px;
  }

  .hero__lead {
    margin: 18px 0 22px;
    font-size: 16px;
    line-height: 1.68;
  }

  .signup-panel {
    margin-right: auto;
    margin-left: auto;
    text-align: left;
  }

  .email-row {
    grid-template-columns: 1fr;
  }

  .email-row button {
    width: 100%;
  }

  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 86px;
  }

  .captcha-row input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .hero__media {
    height: 49vh;
    min-height: 330px;
  }

  .hero__content {
    margin-top: -68px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero__eyebrow {
    margin-bottom: 12px;
    font-size: 12px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.12;
  }

  .hero__lead {
    margin: 14px 0 18px;
    font-size: 14px;
  }

  .signup-panel {
    padding: 15px;
    border-radius: 8px;
  }

  .captcha-image {
    width: 100%;
  }

  .captcha-row input {
    grid-column: 1 / -1;
    min-width: 0;
  }
}
