/* Movimente-se brand palette — same values as apps/api/src/services/email-layout.ts
   and the logo (apps/web/public/images/email-logo.png). */
:root {
  --green: #085833;
  --green-hover: #0b6b3f;
  --lime: #89bc60;
  --olive: #74804d;
  --cream: #f6f1e7;
  --card: #fffdf8;
  --text: #30372f;
  --text-soft: #4b5543;
  --text-faint: #8a8f84;
  --line: #e8e3d7;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--text);
  font-family: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Soft brand wave behind the header, echoing the logo's line. */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 260px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(137, 188, 96, 0.28), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

/* Header */
.profile {
  text-align: center;
  margin-bottom: 28px;
}

.avatar {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--card), 0 8px 24px rgba(8, 88, 51, 0.22);
}

.brand {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--green);
}

.slogan {
  margin: 2px 0 12px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
}

.bio {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* Links */
.links {
  display: grid;
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 20px 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(48, 55, 47, 0.04);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(48, 55, 47, 0.1);
}

.card:active {
  transform: scale(0.985);
}

.card:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.card__tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--lime);
  color: #1f3a12;
}

.card__tag--soft {
  background: #eef0e3;
  color: var(--olive);
}

.card__title {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--green);
}

.card__text {
  display: block;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.card__cta {
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green);
}

/* The main product: solid brand green. */
.card--featured {
  background: var(--green);
  border-color: var(--green);
}

.card--featured:hover {
  background: var(--green-hover);
}

.card--featured .card__title,
.card--featured .card__cta {
  color: #fff;
}

.card--featured .card__text {
  color: rgba(255, 255, 255, 0.85);
}

.card--featured .card__cta {
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--lime);
  color: #1f3a12;
}

/* "Not sure?" entry point to the lead form: present, not competing. */
.help {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 16px 20px;
  border: 1.5px dashed #c9cdb4;
  border-radius: var(--radius);
  background: transparent;
  font: inherit;
  text-align: center;
  color: var(--text-soft);
  cursor: pointer;
}

.help:hover {
  background: rgba(137, 188, 96, 0.12);
  border-color: var(--lime);
}

.help:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.help__title {
  display: block;
  font-weight: 600;
  color: var(--green);
}

.help__text {
  display: block;
  font-size: 0.85rem;
}

/* Footer */
.footer {
  margin-top: 32px;
  text-align: center;
}

.motto {
  margin: 0 0 14px;
  font-weight: 600;
  color: var(--green);
}

.social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text-faint);
}

.social a:hover {
  color: var(--green);
  background: rgba(137, 188, 96, 0.16);
}

.social a:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.social svg {
  width: 16px;
  height: 16px;
}

.legal {
  margin: 18px 0 0;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.legal a {
  color: inherit;
}

/* Lead dialog: bottom sheet on phones, centered card on larger screens. */
.lead {
  width: 100%;
  max-width: 440px;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
}

.lead::backdrop {
  background: rgba(20, 30, 20, 0.5);
}

.lead[open] {
  animation: lead-in 0.22s ease-out;
}

@keyframes lead-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

@media (min-width: 560px) {
  .lead {
    margin: auto;
    border-radius: 24px;
  }
}

.lead__box {
  position: relative;
  padding: 28px 20px max(20px, env(safe-area-inset-bottom));
}

.lead__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-faint);
  cursor: pointer;
}

.lead__close:hover {
  background: var(--line);
}

.lead__title {
  margin: 0 36px 6px 0;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--green);
}

.lead__text {
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.field {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 500;
}

.field input[type='text'],
.field input[type='tel'] {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px; /* below 16px iOS zooms into the field */
  color: var(--text);
}

.field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(137, 188, 96, 0.35);
}

.field input[aria-invalid='true'] {
  border-color: #b3261e;
}

.field__error {
  display: block;
  min-height: 1em;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #b3261e;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-block;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.chip input:checked + span {
  border-color: var(--green);
  background: #e5f1dc;
  color: var(--green);
  font-weight: 600;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.lead__submit {
  width: 100%;
  margin-top: 6px;
  padding: 15px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  font: inherit;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

.lead__submit:hover {
  background: var(--green-hover);
}

.lead__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.lead__legal {
  margin: 12px 0 0;
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-faint);
}

.lead__legal a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }

  .lead[open] {
    animation: none;
  }
}
