/*
 * Affiliate link tree.
 *
 * Palette and type are lifted from the affiliate portal's design tokens
 * (Playfair Display headings over Inter, navy/green/gold) so a prospect who
 * clicks through to a funding form does not feel handed off to another company.
 *
 * Deliberately light-only: this is a branded marketing page, and a dark variant
 * would put the affiliate's own logo — almost always drawn for a light
 * background — on a surface it was never designed against.
 */

:root {
  --navy: #1b3a65;
  --navy-deep: #12294a;
  --green: #3d963c;
  --green-deep: #2f7a2f;
  --gold: #f3bf16;
  --ink: #152a47;
  --muted: #627084;
  --border: #dadfe7;
  --surface: #ffffff;
  --canvas: #f6f8fa;
  --radius: 0.875rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  background-image:
    radial-gradient(60rem 28rem at 50% -12rem, rgba(27, 58, 101, 0.16), transparent 70%),
    linear-gradient(180deg, #eef2f7 0%, var(--canvas) 34rem);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* ------------------------------------------------------------------ card */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow:
    0 1px 2px rgba(21, 42, 71, 0.04),
    0 12px 32px -12px rgba(21, 42, 71, 0.18);
  overflow: hidden;
}

.card__crest {
  height: 0.375rem;
  background: linear-gradient(90deg, var(--navy) 0%, var(--green) 55%, var(--gold) 100%);
}

.card__body {
  padding: 1.75rem 1.5rem 1.5rem;
}

/* ------------------------------------------------------------ identity */

.identity {
  text-align: center;
}

.identity__logo {
  display: block;
  max-width: 15rem;
  /* Contain, never crop: affiliate logos arrive at every aspect ratio and a
     stretched logo is the fastest way to look unprofessional. */
  max-height: 5.5rem;
  width: auto;
  height: auto;
  margin: 0 auto 1.25rem;
  object-fit: contain;
}

.identity__name {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
}

.identity__tagline {
  margin: 0.625rem auto 0;
  max-width: 26rem;
  font-size: 0.9375rem;
  color: var(--muted);
  text-wrap: pretty;
}

/*
 * The generated contact header is a ~500px transparent PNG of the affiliate's
 * name, email and phone. Capped at its natural width and left unframed so it
 * reads as part of the card — stretched to full width it upscales into a blur,
 * and a border around it makes a contact line look like an embedded document.
 */
.identity__header-image {
  display: block;
  max-width: min(100%, 500px);
  height: auto;
  margin: 1.25rem auto 0;
}

/* --------------------------------------------------------------- offers */

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 0.875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.offers {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.offer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

/* The accent bar reads as a hover affordance without moving any text. */
.offer::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--green);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.offer:hover,
.offer:focus-visible {
  border-color: #b9c6d6;
  box-shadow: 0 6px 20px -8px rgba(21, 42, 71, 0.28);
  transform: translateY(-1px);
}

.offer:hover::before,
.offer:focus-visible::before {
  opacity: 1;
}

.offer:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.offer__text {
  flex: 1;
  min-width: 0;
}

.offer__title {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy-deep);
}

.offer__blurb {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.offer__chevron {
  flex: none;
  color: #9aa8ba;
  transition: color 0.15s ease, transform 0.15s ease;
}

.offer:hover .offer__chevron {
  color: var(--green);
  transform: translateX(2px);
}

/* -------------------------------------------------------------- socials */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--navy);
  background: var(--surface);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.social:hover,
.social:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

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

/* --------------------------------------------------------------- footer */

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.contact a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 58, 101, 0.25);
}

.contact a:hover {
  color: var(--green-deep);
  border-bottom-color: var(--green);
}

.colophon {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.colophon a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------------------------------------------------------- empty */

.notice {
  text-align: center;
  padding: 3rem 1.5rem;
}

.notice__title {
  margin: 0 0 0.5rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  color: var(--navy-deep);
}

.notice__body {
  margin: 0 auto;
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.notice__cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.notice__cta:hover {
  background: var(--navy-deep);
}

@media (min-width: 480px) {
  .card__body {
    padding: 2rem 2rem 1.75rem;
  }

  .identity__name {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
