*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #ffffff;
  --border: #d8e1ea;
  --text: #334155;
  --text-muted: #64748b;
  --title: #0f3d6e;
  --primary: #0f3d6e;
  --primary-hover: #1d5da8;
  --primary-soft: rgba(15, 61, 110, 0.08);
  --danger: #dc2626;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  min-height: 100%;
  width: 100%;
}

html {
  font-family: var(--font);
}

body,
button,
input,
textarea,
select {
  font-family: var(--font);
}

body {
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.embedded,
body.embedded .page {
  background: #ffffff;
}

body.embedded .page {
  min-height: auto;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

body.embedded .home-link {
  display: none;
}

.page {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}

.hero {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 2.25rem;
}

.hero h1 {
  font-size: clamp(1.55rem, 4vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
  line-height: 1.25;
}

.hero-lead {
  margin-top: 0.75rem;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.hero-follow {
  margin-top: 0.65rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.01em;
}

.sidebar-lead {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
}

.sidebar-lead strong {
  color: var(--title);
  font-weight: 600;
}

.sidebar-label {
  margin-top: 0.85rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.expect-list {
  margin-top: 0.45rem;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.expect-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.45;
}

.expect-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
}

.sidebar-note {
  margin-top: 0.85rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.why-block {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.why-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--title);
}

.why-text {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.home-link {
  display: inline-block;
  margin-top: 1.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

.home-link:hover {
  opacity: 0.75;
}

.form-panel {
  width: 100%;
}

.opt-in-form {
  display: grid;
  gap: 1rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--title);
}

.input-wrap {
  --ring-angle: 0deg;
  position: relative;
  display: block;
  border-radius: 8px;
}

.input-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from -90deg,
    var(--primary) 0deg,
    var(--primary) var(--ring-angle),
    transparent var(--ring-angle)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.input-wrap.is-drawing::before,
.input-wrap.is-focused::before {
  opacity: 1;
}

.input-wrap.is-focused::before {
  --ring-angle: 360deg;
}

.input-wrap input,
.input-wrap textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s var(--ease);
  position: relative;
  z-index: 1;
}

.input-wrap input:hover,
.input-wrap textarea:hover {
  border-color: rgba(15, 61, 110, 0.28);
}

.input-wrap input:focus,
.input-wrap textarea:focus {
  outline: none;
}

.input-wrap.is-drawing input,
.input-wrap.is-drawing textarea {
  border-color: var(--border);
}

.input-wrap.is-focused input,
.input-wrap.is-focused textarea {
  border-color: var(--primary);
}

.input-wrap input::placeholder,
.input-wrap textarea::placeholder {
  color: #94a3b8;
}

.input-wrap textarea {
  min-height: 6rem;
  resize: vertical;
  display: block;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .input-wrap::before {
    display: none;
  }

  .input-wrap input:focus,
  .input-wrap textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 61, 110, 0.1);
  }
}

.field-error {
  font-size: 0.78rem;
  color: var(--danger);
}

.field-error[hidden] {
  display: none;
}

.reassurance {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: center;
}

.reassurance strong {
  color: var(--title);
  font-weight: 600;
}

.form-actions {
  margin-top: 0.5rem;
}

.btn-continue {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.btn-continue:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 61, 110, 0.18);
}

.btn-continue:active:not(:disabled) {
  transform: translateY(0);
}

.btn-continue:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 780px) {
  .page {
    padding: 1.75rem 1rem 2.25rem;
  }

  .hero {
    margin-bottom: 1.75rem;
    text-align: left;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 540px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
