:root {
  --bg: #f8f7f2;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --border: rgba(17, 17, 17, 0.12);
  --text: #111111;
  --muted: #5f6058;
  --accent: #18b9b5;
  --shadow: 0 28px 80px rgba(17, 17, 17, 0.08);
  --success-bg: rgba(34, 121, 82, 0.1);
  --success-text: #1d6c49;
  --error-bg: rgba(148, 40, 40, 0.1);
  --error-text: #7f2525;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 56px 20px 32px;
  background:
    radial-gradient(circle at top, rgba(24, 185, 181, 0.07), transparent 26%),
    linear-gradient(180deg, #fcfbf7 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.page {
  width: 100%;
  max-width: 720px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 18px;
  flex: 1;
  align-content: center;
}

.engage-group {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: -4px;
}

.footer-links {
  display: grid;
  justify-items: center;
  gap: 0;
  margin-top: auto;
  padding-bottom: 8px;
}

.engage-trigger {
  border: 0;
  background: transparent;
  color: rgba(17, 17, 17, 0.82);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
  transition: opacity 160ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.engage-trigger:hover,
.engage-trigger:focus-visible {
  opacity: 0.78;
  outline: none;
}

.engage-panel {
  width: 100%;
  display: none;
}

.engage-panel.visible {
  display: block;
}

.engage-trigger.mobile-attention {
  animation: engage-breathe 2.6s ease-in-out infinite;
}

@keyframes engage-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(24, 185, 181, 0);
    transform: translateY(0);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(24, 185, 181, 0.05);
    transform: translateY(-1px);
  }
}

.pill-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1 1 0;
  min-height: 46px;
  padding: 6px 18px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.56);
  color: rgba(17, 17, 17, 0.88);
  text-decoration: none;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  transition: transform 160ms ease, opacity 160ms ease, background-color 160ms ease;
}

button.pill-link {
  background: transparent;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.pill-link:hover,
.pill-link:focus-visible {
  transform: translateY(-1px);
  opacity: 0.9;
  outline: none;
}

.pill-link.active {
  background: rgba(88, 168, 255, 0.12);
  border-color: rgba(88, 168, 255, 0.5);
  color: rgba(17, 17, 17, 0.96);
}

.privacy-link {
  color: #111111;
  font-size: 0.96rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 160ms ease;
}

.privacy-link a {
  color: inherit;
}

.footer-action {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.privacy-link:hover,
.privacy-link:focus-visible,
.privacy-link a:hover,
.privacy-link a:focus-visible,
.footer-action:hover,
.footer-action:focus-visible {
  opacity: 0.82;
  outline: none;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(10px);
  padding: 10px 14px;
  border: 1px solid rgba(88, 168, 255, 0.2);
  border-radius: 14px;
  background: rgba(88, 168, 255, 0.12);
  color: #2357b7;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-toast.success-toast {
  border-color: rgba(34, 121, 82, 0.18);
  background: rgba(34, 121, 82, 0.1);
  color: #1d6c49;
}

.mini-notice {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(10px);
  padding: 10px 14px;
  border: 1px solid rgba(88, 168, 255, 0.2);
  border-radius: 14px;
  background: rgba(88, 168, 255, 0.12);
  color: #2357b7;
  font-size: 0.88rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.mini-notice.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.notice-slot {
  min-height: 0;
  display: grid;
  align-items: center;
  justify-items: center;
}

.subtle-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(248, 247, 242, 0.42);
  backdrop-filter: blur(12px);
}

.subtle-modal.open {
  display: flex;
}

.subtle-modal-card {
  width: min(100%, 560px);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.05);
  padding: 22px;
}

.subtle-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.subtle-modal-header h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.subtle-modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.subtle-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.community-list {
  display: grid;
  gap: 10px;
}

.community-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  transition: transform 160ms ease, background-color 160ms ease;
}

.community-link:hover,
.community-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(24, 185, 181, 0.08);
  outline: none;
}

.community-link strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
}

.community-link span {
  display: block;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.98rem;
  white-space: nowrap;
}

.portrait {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.5), transparent 36%),
    linear-gradient(180deg, #58a8ff 0%, #2f72ea 100%);
  box-shadow: 0 18px 40px rgba(47, 114, 234, 0.2);
  animation: portrait-idle 4.6s ease-in-out infinite;
}

.portrait-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 260ms ease;
}

.portrait-trigger:hover,
.portrait-trigger:focus-visible {
  transform: translateY(-2px) scale(1.015);
  outline: none;
}

.portrait-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.portrait-trigger::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(24, 185, 181, 0.09);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.portrait-trigger:hover::after,
.portrait-trigger:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

.portrait-trigger.voice-active::after {
  opacity: 1;
  animation: portrait-pulse 1.9s ease-in-out infinite;
}

.portrait-trigger.voice-active .portrait {
  animation: portrait-float 2.4s ease-in-out infinite;
}

@keyframes portrait-idle {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 18px 40px rgba(47, 114, 234, 0.2);
  }

  50% {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 24px 52px rgba(47, 114, 234, 0.28);
  }
}

@keyframes portrait-pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.2;
  }

  50% {
    transform: scale(1.12);
    opacity: 0.34;
  }
}

@keyframes portrait-float {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 18px 40px rgba(24, 185, 181, 0.18);
  }

  50% {
    transform: translateY(-2px);
    box-shadow: 0 22px 46px rgba(24, 185, 181, 0.2);
  }
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3.3rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.subheadline {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.72;
  letter-spacing: -0.01em;
}

.contact-trigger {
  margin-top: 26px;
  min-width: 240px;
  border: 1px solid rgba(17, 17, 17, 0.84);
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  padding: 11px 22px;
  font: inherit;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.contact-trigger:hover,
.contact-trigger:focus-visible {
  transform: translateY(-1px);
  background: rgba(17, 17, 17, 0.04);
  outline: none;
}

.hero-actions {
  display: grid;
  justify-items: center;
  gap: 0;
  width: 100%;
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(248, 247, 242, 0.56);
  backdrop-filter: blur(16px);
}

.modal-shell.open {
  display: flex;
}

.modal {
  width: min(100%, 620px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 500;
}

.modal-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.close-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.status {
  display: none;
  margin: 0 0 16px;
  padding: 13px 15px;
  border-radius: 12px;
  line-height: 1.5;
}

.status.visible {
  display: block;
}

.status.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.status.error {
  background: var(--error-bg);
  color: var(--error-text);
}

.intake-stack {
  display: grid;
  gap: 12px;
}

.step {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  overflow: hidden;
}

.step-head {
  display: flex;
  align-items: center;
}

.step-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 18px 18px 16px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.step-head .step-toggle {
  flex: 1;
  min-width: 0;
}

.step-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 18px;
}

.step-toggle:focus {
  outline: none;
}

.step-toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.12);
}

.step-title {
  font-size: 1rem;
}

.step-meta {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.step-meta:focus-visible {
  outline: none;
  opacity: 0.8;
}

.step-arrow {
  display: inline-block;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 160ms ease, color 160ms ease;
}

.step.open .step-arrow {
  transform: rotate(90deg);
}

.step.done .step-meta {
  color: var(--success-text);
  font-size: 1.45rem;
  font-weight: 600;
}

.step-panel {
  display: none;
  padding: 8px 18px 18px;
}

.step.open .step-panel {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

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

.field.full {
  grid-column: 1 / -1;
}

.field.email-field {
  grid-column: 1;
}

.field.phone-field {
  grid-column: 2;
}

.about-last-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  grid-column: 1 / -1;
  align-items: stretch;
  margin-top: 2px;
}

.about-last-row .field {
  min-width: 0;
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 14px;
  font: inherit;
  transition: border-color 160ms ease, background-color 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(17, 17, 17, 0.42);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(17, 17, 17, 0.28);
  background: rgba(255, 255, 255, 0.96);
}

textarea {
  min-height: 94px;
  resize: vertical;
}

.modal-actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.step-button {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.06);
  color: var(--text);
  min-height: 46px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 450;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
}

.step-button.slim {
  width: auto;
  min-height: 32px;
  padding: 4px 9px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(17, 17, 17, 0.045);
  border-color: rgba(17, 17, 17, 0.12);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1px);
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

.step-button.slim.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.step-button.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fbfaf6;
  font-weight: 650;
}

.submit-button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: var(--text);
  color: #fbfaf6;
  padding: 14px 20px;
  font: inherit;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
}

.submit-button:hover:not(:disabled),
.submit-button:focus-visible:not(:disabled),
.step-button:hover,
.step-button:focus-visible {
  transform: translateY(-1px);
  opacity: 0.94;
  outline: none;
}

.step-button:hover,
.step-button:focus-visible {
  font-weight: 650;
}

.submit-button:disabled {
  opacity: 0.74;
  cursor: wait;
}

.recaptcha-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.recaptcha-note a {
  color: inherit;
}

@media (max-width: 900px) {
  .modal {
    width: min(100%, 760px);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full,
  .field.email-field,
  .field.phone-field {
    grid-column: auto;
  }

  .about-last-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 24px 16px;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 3.3rem);
  }

  .subheadline {
    font-size: 1rem;
  }

  .modal {
    padding: 20px;
    border-radius: 18px;
  }

  .pill-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pill-link {
    flex: 0 1 calc(50% - 12px);
    width: calc(50% - 12px);
  }

  .pill-nav .pill-link:last-child {
    width: calc(50% - 12px);
    flex-basis: calc(50% - 12px);
  }

  .about-last-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .engage-group {
    margin-top: 8px;
  }
}

@media (hover: none), (pointer: coarse) {
  .engage-trigger.mobile-attention {
    animation: engage-breathe 2.8s ease-in-out infinite;
  }
}
