:root {
  --forest: #123c32;
  --forest-deep: #092a23;
  --eucalyptus: #5f8175;
  --cream: #f5f0e7;
  --paper: #fffcf7;
  --ink: #17312a;
  --muted: #697a74;
  --line: #d8ded9;
  --amber: #d99b54;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }

.portal-shell {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px clamp(36px, 6vw, 92px);
  background:
    radial-gradient(circle at 5% 5%, rgba(229, 188, 126, 0.14), transparent 30%),
    linear-gradient(140deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--cream);
}

.brand-panel::before {
  position: absolute;
  right: -15%;
  bottom: -22%;
  width: 76%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.preview-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8dd5b7;
  box-shadow: 0 0 0 4px rgba(141, 213, 183, 0.12);
}

.brand-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin: auto 0;
  padding: 70px 0;
}

.eyebrow, .step-label {
  margin: 0 0 22px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.21em;
}

.brand-copy h1 {
  max-width: 640px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(45px, 5.4vw, 78px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.99;
}

.intro {
  max-width: 480px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 17px;
  line-height: 1.65;
}

.brand-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.signal-art {
  position: absolute;
  right: -95px;
  bottom: 60px;
  width: 470px;
  height: 470px;
  opacity: 0.48;
  transform: rotate(-8deg);
}

.signal {
  position: absolute;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(245, 240, 231, 0.25);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 100% 0 0;
}

.signal-one { width: 210px; height: 210px; }
.signal-two { width: 330px; height: 330px; }
.signal-three { width: 450px; height: 450px; }
.signal-dot {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
}

.form-panel {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(30px, 7vw, 110px) 30px;
  background: var(--paper);
}

.form-wrap { width: 100%; max-width: 510px; margin: auto; }
.wifi-mark {
  position: relative;
  width: 48px;
  height: 42px;
  margin-bottom: 42px;
}

.wifi-mark span {
  position: absolute;
  left: 50%;
  border: 2px solid var(--forest);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.wifi-mark span:first-child { top: 2px; width: 42px; height: 42px; }
.wifi-mark span:nth-child(2) { top: 14px; width: 24px; height: 24px; }
.wifi-mark i {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  transform: translateX(-50%);
}

.step-label { margin-bottom: 12px; }
.form-wrap h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 4vw, 51px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.form-intro {
  max-width: 440px;
  margin: 18px 0 34px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.portal-form { display: grid; gap: 20px; }
.field-label { color: var(--ink); font-size: 13px; font-weight: 700; }
.field-wrap { position: relative; display: block; margin-top: 9px; }
.field-wrap input {
  width: 100%;
  height: 58px;
  padding: 0 48px 0 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-wrap input::placeholder { color: #a6b0ac; }
.field-wrap input:focus {
  border-color: var(--eucalyptus);
  box-shadow: 0 0 0 4px rgba(95, 129, 117, 0.1);
}
.field-wrap[data-state="valid"] input { border-color: #5b9b80; }
.field-wrap[data-state="invalid"] input { border-color: #bc5d4e; }
.field-status {
  position: absolute;
  top: 50%;
  right: 17px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #e5f1eb;
  color: #39755d;
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-50%);
}
.field-wrap[data-state="invalid"] .field-status {
  background: #f8e9e5;
  color: #a54e41;
}
.field-hint, .form-error {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.form-error { color: #a54e41; }
.consent {
  display: grid;
  grid-template-columns: 19px 1fr;
  gap: 11px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.consent input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--forest);
}
.consent a { color: var(--forest); text-underline-offset: 2px; }
.marketing { margin-top: -10px; }
.connect-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--forest);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(18, 60, 50, 0.16);
  transition: background 160ms ease, transform 160ms ease;
}
.connect-button:hover { background: #194d40; }
.connect-button:active { transform: translateY(1px); }
.connect-button:disabled { cursor: wait; opacity: 0.75; }
.button-arrow { font-size: 18px; line-height: 1; }
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.success-card {
  padding: 30px;
  border: 1px solid #d6e3dc;
  border-radius: 12px;
  background: #f3f8f4;
}
.success-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 22px;
}
.success-card h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 400;
}
.success-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.success-card a {
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.legal-footer {
  display: flex;
  width: 100%;
  max-width: 510px;
  justify-content: space-between;
  gap: 20px;
  margin: 48px auto 0;
  color: #8b9792;
  font-size: 11px;
}
.legal-footer a { color: inherit; text-underline-offset: 3px; }

.policy-page {
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0;
}
.policy-page > a {
  color: var(--forest);
  font-size: 13px;
  font-weight: 700;
  text-underline-offset: 3px;
}
.policy-page .eyebrow { margin-top: 70px; }
.policy-page h1 {
  margin: 0 0 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 70px);
  font-weight: 400;
  letter-spacing: -0.04em;
}
.policy-page p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .portal-shell { display: block; }
  .brand-panel { min-height: 310px; padding: 28px 26px 34px; }
  .brand-copy { margin: 58px 0 10px; padding: 0; }
  .brand-copy h1 { max-width: 520px; font-size: clamp(40px, 10vw, 58px); }
  .intro { display: none; }
  .brand-footer { margin-top: 32px; }
  .brand-footer span:last-child { display: none; }
  .signal-art { right: -175px; bottom: -165px; }
  .form-panel {
    min-height: calc(100svh - 310px);
    padding: 42px 24px 26px;
  }
  .wifi-mark { display: none; }
  .form-wrap h2 { font-size: 38px; }
}

@media (max-width: 430px) {
  .brand-panel { min-height: 255px; }
  .preview-pill { font-size: 9px; }
  .brand-copy { margin-top: 42px; }
  .brand-copy h1 { font-size: 38px; }
  .form-panel { min-height: calc(100svh - 255px); padding-top: 36px; }
  .legal-footer { margin-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
