/* Panama Equity × TWI — Affiliate invite landing */

:root {
  --ink: #142029;
  --ink-soft: #3d4a55;
  --muted: #6b7782;
  --paper: #eef3f5;
  --paper-2: #e2ebef;
  --line: rgba(20, 32, 41, 0.1);
  --ocean: #0d3a4a;
  --ocean-deep: #082833;
  --teal: #1f6f78;
  --sun: #e8942a;
  --sun-hover: #d4821c;
  --white: #fbfcfd;
  --surface: #ffffff;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --wrap: min(1120px, calc(100% - 2.5rem));
  --narrow: min(680px, calc(100% - 2.5rem));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(90% 50% at 10% 0%, rgba(31, 111, 120, 0.07), transparent 50%),
    radial-gradient(70% 40% at 90% 20%, rgba(232, 148, 42, 0.05), transparent 45%),
    var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.35rem, 5.5vw, 3.75rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.narrow {
  width: var(--narrow);
}

.center {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.section-lede {
  max-width: 52ch;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

/* ——— Hero ——— */

.hero {
  position: relative;
  min-height: min(100svh, 920px);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.06);
  animation: kenburns 18s var(--ease) forwards;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 40, 51, 0.35) 0%, rgba(8, 40, 51, 0.55) 42%, rgba(8, 40, 51, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 40, 51, 0.55) 0%, transparent 55%);
}

.hero__inner {
  width: var(--wrap);
  margin: 0 auto;
  padding: 5.5rem 0 3.75rem;
  animation: rise 0.9s var(--ease) both;
}

.brand-lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  margin-bottom: 2.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
}

.brand--pe img {
  width: min(185px, 46vw);
  height: auto;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.25));
}

.brand--twi img {
  width: min(168px, 42vw);
  height: auto;
}

.brand-lockup__x {
  opacity: 0.55;
  font-size: 1.15rem;
  font-weight: 500;
}

.hero__meta {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.hero__lede {
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.trust-strip {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
}

.trust-strip li {
  position: relative;
  padding-left: 1.05rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.35;
}

.trust-strip li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 1px;
  background: var(--teal);
}

.trust-strip--hero {
  margin-top: 1.25rem;
  max-width: 36rem;
}

.trust-strip--hero li {
  color: rgba(255, 255, 255, 0.82);
}

.trust-strip--hero li::before {
  background: var(--sun);
}

.trust-strip--center {
  justify-content: center;
}

.trust-strip--compact {
  margin-top: 0.15rem;
  gap: 0.45rem 0.9rem;
}

.trust-strip--compact li {
  font-size: 0.82rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--sun);
  color: var(--ocean-deep);
}

.btn--primary:hover {
  background: var(--sun-hover);
}

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
  background: transparent;
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

.btn--block {
  width: 100%;
}

/* ——— Sections ——— */

.section {
  padding: clamp(2.75rem, 5.5vw, 4.25rem) 0;
}

.section--letter {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 252, 253, 0.98)),
    var(--surface);
}

.section--letter h2 {
  margin-bottom: 1.35rem;
}

.section--letter p {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.section--letter em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink);
}

.signoff {
  margin-top: 2rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink) !important;
  font-size: 1rem !important;
}

.signoff span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section--about {
  background:
    linear-gradient(160deg, #e7f0f3 0%, #f4f7f9 45%, #eef3f5 100%);
}

.split {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}

.split__copy p {
  color: var(--ink-soft);
}

.role-callout {
  padding: 1.75rem 1.6rem;
  background: var(--ocean);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.role-callout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(31, 111, 120, 0.45), transparent 60%);
  pointer-events: none;
}

.role-callout > * {
  position: relative;
}

.role-callout__label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.role-callout__title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 0.85rem;
}

.section--why {
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(31, 111, 120, 0.08), transparent 55%),
    var(--surface);
}

.pillars {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1.75rem;
}

.pillars li {
  padding-top: 1rem;
  border-top: 2px solid var(--ocean);
}

.pillars p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.note {
  padding: 1.15rem 1.25rem;
  background: var(--paper-2);
  border-left: 3px solid var(--teal);
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.section--schedule {
  background:
    linear-gradient(180deg, var(--ocean-deep), var(--ocean));
  color: var(--white);
}

.section--schedule .eyebrow {
  color: rgba(232, 148, 42, 0.95);
}

.section--schedule h2 {
  margin-bottom: 2rem;
}

.days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: day;
}

.days li {
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  animation: rise 0.8s var(--ease) both;
}

.days li:nth-child(2) { animation-delay: 0.08s; }
.days li:nth-child(3) { animation-delay: 0.16s; }
.days li:nth-child(4) { animation-delay: 0.24s; }

.days__when {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.days h3 {
  color: var(--white);
}

.days p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
}

.section--include {
  background:
    linear-gradient(180deg, #e6eef2 0%, #edf2f5 100%);
}

.split--include {
  align-items: stretch;
}

.pricing {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.75rem 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 12px 40px rgba(8, 40, 51, 0.06);
}

.pricing .trust-strip {
  margin-top: 0.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.pricing .trust-strip li {
  flex: 1 1 100%;
}

.checklist {
  list-style: none;
  margin: 1.25rem 0 1.25rem;
  padding: 0;
}

.checklist li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.55rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 1px;
  background: var(--teal);
}

.fine {
  font-size: 0.9rem;
  color: var(--muted);
}

.price {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.price--vip {
  border-bottom: none;
  padding-bottom: 0.25rem;
}

.price__tier {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.price__amount {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.price__note {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.section--close {
  background:
    radial-gradient(70% 80% at 50% 120%, rgba(31, 111, 120, 0.12), transparent 60%),
    linear-gradient(180deg, #f7fafb, #eef4f6);
  padding-bottom: 3.5rem;
}

.section--close p {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.close-meta {
  margin-top: 1rem !important;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ——— Invite form ——— */

.section--invite {
  background:
    linear-gradient(145deg, #0d3a4a 0%, #0a2f3c 55%, #123f4d 100%);
  color: rgba(255, 255, 255, 0.9);
}

.section--invite .eyebrow {
  color: rgba(232, 148, 42, 0.95);
}

.section--invite h2 {
  color: var(--white);
}

.invite-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: start;
}

.invite-intro p {
  color: rgba(255, 255, 255, 0.78);
}

.reassure-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reassure-list li {
  padding: 0.9rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.reassure-list strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
  color: #fff;
}

.reassure-list span {
  display: block;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.invite-form-mount {
  position: relative;
  min-height: 12rem;
}

.invite-form-mount:empty {
  display: none;
}

.invite-form.is-submitting {
  pointer-events: none;
  opacity: 0.72;
}

.invite-form.is-submitting #invite-submit {
  position: relative;
}

.invite-form-mount.is-complete .invite-form {
  display: none;
}

.invite-success {
  display: none;
  text-align: center;
  padding: 2.25rem 1.75rem 2rem;
  background: linear-gradient(180deg, #f0faf6 0%, #ffffff 55%);
  border: 2px solid #2d9f6f;
  border-radius: 10px;
  box-shadow:
    0 0 0 4px rgba(45, 159, 111, 0.12),
    0 20px 50px rgba(8, 40, 51, 0.18);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
}

.invite-success.is-visible {
  display: block;
  animation: successReveal 0.65s var(--ease) forwards;
}

.invite-success__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.invite-success__circle {
  stroke: #2d9f6f;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.invite-success__check {
  stroke: #2d9f6f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.invite-success.is-visible .invite-success__circle {
  animation: successCircle 0.55s var(--ease) 0.15s forwards;
}

.invite-success.is-visible .invite-success__check {
  animation: successCheck 0.45s var(--ease) 0.55s forwards;
}

.invite-success__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2d9f6f;
}

.invite-success__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  color: var(--ink);
}

.invite-success__text {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36ch;
  margin-inline: auto;
}

.invite-success__meta {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

@keyframes successReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes successCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes successCheck {
  to { stroke-dashoffset: 0; }
}

.invite-form-mount.is-complete {
  animation: successMountPulse 0.4s var(--ease);
}

@keyframes successMountPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.012); }
  100% { transform: scale(1); }
}

.invite-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.35rem 1.35rem 1.2rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.optional {
  font-weight: 500;
  color: var(--muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
}

.form-row textarea {
  min-height: 7rem;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid rgba(31, 111, 120, 0.35);
  outline-offset: 1px;
  border-color: var(--teal);
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.form-status {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.form-status.is-visible.is-success {
  color: #1f6f48;
}

.form-status.is-visible.is-error {
  padding: 0.75rem 0.9rem;
  background: #fef2f2;
  border: 1px solid #f5c2c2;
  border-radius: 6px;
  color: #9b2c2c;
  font-weight: 500;
}

button.btn {
  border: none;
  cursor: pointer;
  font: inherit;
}

button.btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* ——— Mobile invite portal ——— */

.invite-portal {
  width: min(100%, 28rem);
  max-width: 100%;
  margin: auto;
  padding: 0;
  border: none;
  border-radius: 12px 12px 0 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 -8px 40px rgba(8, 40, 51, 0.18);
}

.invite-portal::backdrop {
  background: rgba(8, 40, 51, 0.55);
  backdrop-filter: blur(2px);
}

.invite-portal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--ocean-deep);
  color: var(--white);
}

.invite-portal__bar h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--white);
}

.invite-portal__close {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.invite-portal__body {
  padding: 1rem;
  max-height: min(78svh, 640px);
  overflow: auto;
}

.invite-portal .invite-form {
  padding: 0;
  border: none;
  background: transparent;
}

@media (max-width: 720px) {
  .invite-portal {
    width: 100%;
    max-height: 92svh;
    margin: 0;
    margin-top: auto;
  }

  .invite-portal[open] {
    display: flex;
    flex-direction: column;
  }
}

/* ——— Footer ——— */

.footer {
  padding: 2rem 0 2.5rem;
  background: var(--ocean-deep);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer__brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  font-weight: 600;
  color: var(--white);
}

.footer__brands a {
  text-decoration: none;
}

.footer__brands a:hover {
  color: var(--sun);
}

.footer__legal {
  margin: 0;
  max-width: 62ch;
  line-height: 1.55;
}

/* ——— Motion ——— */

@keyframes kenburns {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__img,
  .hero__inner,
  .days li,
  .reveal,
  .invite-success,
  .invite-success__circle,
  .invite-success__check,
  .invite-form-mount.is-complete {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }

  .invite-form-mount.is-complete .invite-success {
    display: block;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

/* ——— Responsive ——— */

@media (max-width: 960px) {
  .pillars,
  .days {
    grid-template-columns: repeat(2, 1fr);
  }

  .split,
  .split--include,
  .invite-layout {
    grid-template-columns: 1fr;
  }

  .form-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --wrap: calc(100% - 1.75rem);
    --narrow: calc(100% - 1.75rem);
  }

  .hero {
    min-height: 92svh;
    align-items: flex-end;
  }

  .hero__inner {
    padding: 4.5rem 0 2.75rem;
  }

  .pillars,
  .days {
    grid-template-columns: 1fr;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
