/* ==========================================================================
   PAYLIGN SITE
   Light, product-led styling that matches the Paylign app.
   Shared by every page; homepage sections first, inner pages at the end.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Surfaces */
  --bg: #f7f6fc;
  --surface: #ffffff;
  --tint: #eeecf8;
  --tint-strong: #e2def4;

  /* Ink */
  --ink: #15122b;
  --ink-2: #4b4766;
  --ink-3: #757190;
  --line: #e4e1f0;

  /* Brand (same purple as the app and logo) */
  --brand: #483d8b;
  --brand-hover: #3b3176;
  --brand-deep: #1d1840;
  --brand-soft: #8f86d1;

  /* Money in */
  --green: #0f9a63;
  --green-bg: #e3f5ec;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow-card: 0 1px 2px rgba(21, 18, 43, 0.04), 0 8px 24px rgba(21, 18, 43, 0.06);
  --shadow-phone: 0 2px 6px rgba(21, 18, 43, 0.06), 0 40px 80px -20px rgba(29, 24, 64, 0.35);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max: 1180px;
  --gutter: 16px;
  --header-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 700;
}

p {
  color: var(--ink-2);
  text-wrap: pretty;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 56px;
  padding: 0 1.4rem 0 1.15rem;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.store-btn:hover {
  background: #000;
  transform: translateY(-2px);
}

.store-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.store-btn span {
  display: block;
  line-height: 1.15;
}

.store-btn .store-sub {
  font-size: 0.7rem;
  opacity: 0.75;
}

.store-btn .store-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.store-btn.on-dark {
  background: #fff;
  color: var(--ink);
}

.store-btn.on-dark:hover {
  background: var(--tint);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(247, 246, 252, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-brand img {
  width: 34px;
  height: 34px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--ink);
}

.mobile-nav-cta {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 992px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gutter) 2rem;
    background: var(--bg);
    /* Fade in place: sliding in from the side would widen the page on phones */
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }

  .nav-menu.open {
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .nav-link {
    padding: 1rem 0;
    font-size: 1.15rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }

  .mobile-nav-cta {
    display: block;
    margin-top: 1.5rem;
  }

  .mobile-nav-cta .btn {
    width: 100%;
    min-height: 52px;
  }

  #header-download-btn {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero-copy h1 {
  margin-bottom: 1.5rem;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--brand);
}

.hero-copy .lead {
  max-width: 34rem;
  margin-bottom: 2rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
}

.hero-trust svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 8% 4% 8% 4%;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(143, 134, 209, 0.55), transparent 55%),
    var(--brand);
}

.phone {
  position: relative;
  width: min(300px, 72vw);
  border-radius: 40px;
  padding: 8px;
  background: var(--ink);
  box-shadow: var(--shadow-phone);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.link-chip {
  position: absolute;
  left: -2%;
  bottom: 14%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  max-width: 90%;
}

.link-chip-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--tint);
  color: var(--brand);
}

.link-chip-icon svg {
  width: 20px;
  height: 20px;
}

.link-chip small {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-3);
  line-height: 1.3;
}

.link-chip strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    margin-top: 0.5rem;
  }

  .link-chip {
    left: 0;
  }
}

/* --------------------------------------------------------------------------
   Currencies strip
   -------------------------------------------------------------------------- */
.currencies {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.currencies-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.5rem;
}

.currencies-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
}

.currencies-head p {
  font-size: 0.95rem;
}

.currency-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  list-style: none;
}

.currency-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.currency-item img,
.currency-item .flag-text {
  flex-shrink: 0;
  width: 32px;
  height: 24px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(21, 18, 43, 0.08);
}

.currency-item .flag-text {
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--tint);
  color: var(--brand);
}

.currency-item strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
}

.currency-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Product rows
   -------------------------------------------------------------------------- */
.products {
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.product-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.product-row + .product-row {
  margin-top: clamp(5rem, 10vw, 8rem);
}

.product-row.flip .product-copy {
  order: 2;
}

.product-copy h2 {
  margin-bottom: 1.25rem;
}

.product-copy > p {
  font-size: 1.075rem;
  margin-bottom: 1.75rem;
  max-width: 32rem;
}

.check-list {
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.check-list li {
  display: flex;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}

.check-list li::before {
  content: '';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23483d8b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat,
    var(--tint);
}

.product-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3.5rem) 1rem;
  border-radius: var(--radius-lg);
  background: var(--tint);
  overflow: hidden;
}

.product-visual .phone {
  width: min(280px, 70vw);
}

/* Phone crop: show only the top of tall screenshots */
.phone.cropped {
  aspect-ratio: 9 / 15.5;
  overflow: hidden;
}

.phone.cropped img {
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* App-style UI cards built in HTML */
.ui-card {
  width: min(380px, 100%);
  padding: 1.25rem;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-phone);
}

.ui-card-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.ui-card-sub {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.ui-list {
  list-style: none;
}

.ui-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.25rem;
  border-top: 1px solid var(--line);
}

.ui-row:first-child {
  border-top: 0;
}

.ui-row img {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.ui-row .flag-round {
  box-shadow: 0 0 0 1px rgba(21, 18, 43, 0.08);
}

.ui-row strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
}

.ui-row span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-3);
  line-height: 1.3;
}

.ui-row .ui-tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--tint);
  color: var(--brand);
}

.ui-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.ui-footer svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .product-row {
    grid-template-columns: 1fr;
  }

  .product-row.flip .product-copy {
    order: 0;
  }
}

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */
.steps {
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head h2 {
  margin-bottom: 1rem;
}

.steps-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.steps-list li {
  counter-increment: step;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.steps-list li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.steps-list h3 {
  margin-bottom: 0.5rem;
}

.steps-list p {
  font-size: 0.95rem;
}

@media (max-width: 800px) {
  .steps-list {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Security (dark band)
   -------------------------------------------------------------------------- */
.security {
  padding: clamp(4rem, 9vw, 7rem) 0;
  background: var(--brand-deep);
  color: #fff;
}

.security .eyebrow {
  color: var(--brand-soft);
}

.security h2 {
  color: #fff;
}

.security .section-head p {
  color: rgba(255, 255, 255, 0.7);
}

.security-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.security-grid li {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--brand-deep);
}

.security-grid svg {
  width: 28px;
  height: 28px;
  color: var(--brand-soft);
  margin-bottom: 1.25rem;
}

.security-grid h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.security-grid p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
}

.security-grid a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 700px) {
  .security-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.faq-grid .section-head {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.faq-grid .section-head a {
  color: var(--brand);
  font-weight: 700;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315122b' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='12' y1='6' x2='12' y2='18'/%3E%3Cline x1='6' y1='12' x2='18' y2='12'/%3E%3C/svg%3E") center / 14px no-repeat,
    var(--tint);
  transition: transform 0.25s var(--ease);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  padding: 0 2.5rem 1.5rem 0;
}

@media (max-width: 860px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-grid .section-head {
    position: static;
  }
}

/* --------------------------------------------------------------------------
   Download CTA
   -------------------------------------------------------------------------- */
.cta {
  padding: 0 0 clamp(4rem, 8vw, 6rem);
}

.cta-card {
  position: relative;
  overflow: hidden;
  display: grid;
  padding: clamp(2rem, 6vw, 4.5rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 10%, rgba(143, 134, 209, 0.5), transparent 50%),
    var(--brand);
  color: #fff;
}

.cta-card h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.075rem;
  margin-bottom: 2rem;
  max-width: 30rem;
}



/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
}

.footer-brand p {
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  max-width: 22rem;
}

.social-links {
  display: flex;
  gap: 0.5rem;
}

.social-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--ink);
  transition: background-color 0.15s;
}

.social-link:hover {
  background: var(--tint-strong);
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.7rem;
}

.footer-link {
  font-size: 0.925rem;
  color: var(--ink-2);
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--brand);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.footer-bottom p {
  color: var(--ink-3);
  font-size: 0.82rem;
  max-width: 60rem;
}

.footer-bottom-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-bottom-row nav {
  display: flex;
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------------------
   Product animations (driven by main.js)
   -------------------------------------------------------------------------- */

/* Hero: payment link types a username */
.link-chip .caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--brand);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

/* Send card: the highlighted recipient moves down the list */
.ui-list.cycle .ui-row {
  position: relative;
  border-radius: 14px;
  transition: background-color 0.35s var(--ease), border-color 0.35s;
}

.ui-list.cycle .ui-row.is-active,
.ui-list.cycle .ui-row.is-active + .ui-row {
  border-top-color: transparent;
}

.ui-list.cycle .ui-row.is-active {
  background: var(--tint);
}

.ui-list.cycle .ui-tag {
  transition: background-color 0.35s var(--ease), color 0.35s;
}

.ui-list.cycle .ui-row.is-active .ui-tag {
  background: var(--brand);
  color: #fff;
}

/* Crypto card: payout status steps through to "paid" */
.ui-footer.status {
  background: var(--tint);
  color: var(--brand);
  transition: background-color 0.35s var(--ease), color 0.35s;
}

.ui-footer.status svg {
  display: none;
}

.status-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  background: currentColor;
  animation: status-pulse 1.2s ease-in-out infinite;
}

@keyframes status-pulse {
  50% {
    transform: scale(0.6);
    opacity: 0.5;
  }
}

.ui-footer.status.is-done {
  background: var(--green-bg);
  color: var(--green);
}

.ui-footer.status.is-done svg {
  display: block;
}

.ui-footer.status.is-done .status-dot {
  display: none;
}

.status-text {
  transition: opacity 0.2s;
}

/* --------------------------------------------------------------------------
   Scroll reveal (set up by main.js)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  .link-chip .caret,
  .status-dot {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ==========================================================================
   INNER PAGES (terms, privacy, contact, account deletion, 404)
   ========================================================================== */

.page-hero {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 40rem;
  font-size: 1.1rem;
}

.container-narrow {
  width: 100%;
  max-width: calc(760px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page-body {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(4rem, 8vw, 6rem);
}

/* Legal documents */
.legal-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-3);
}

.alert-callout {
  margin: 0 0 2.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--brand);
  background: var(--tint);
  color: var(--ink);
  font-size: 0.95rem;
}

.alert-callout.success {
  border-left-color: var(--green);
  background: var(--green-bg);
}

.alert-callout.warning {
  border-left-color: #c77700;
  background: #fff4e0;
}

.legal-section {
  padding-top: 2rem;
}

.legal-section + .legal-section {
  margin-top: 0.5rem;
}

.legal-section h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.legal-section h3,
.legal-document > h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.6rem;
}

.legal-document > h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.legal-document p,
.legal-document li {
  color: var(--ink-2);
  line-height: 1.75;
}

.legal-document p + p {
  margin-top: 1rem;
}

.legal-document ul,
.legal-document ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.5rem;
}

.legal-document li::marker {
  color: var(--brand);
}

.legal-document a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-document strong {
  color: var(--ink);
}

.legal-contact {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.legal-contact h3 {
  margin-top: 0;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.contact-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  background: var(--tint);
  color: var(--brand);
}

.contact-card-icon svg {
  width: 22px;
  height: 22px;
}

.contact-card p {
  font-size: 0.95rem;
  flex-grow: 1;
}

.contact-card a {
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--brand);
  word-break: break-word;
}

.contact-card.urgent {
  border-color: #f3c4c4;
}

.contact-card.urgent .contact-card-icon {
  background: #fde8e8;
  color: #b42318;
}

.contact-card.urgent a {
  color: #b42318;
}

.contact-note {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);
}

@media (max-width: 700px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Forms */
.form-card {
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.form-card h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.form-card > p {
  margin-bottom: 1.75rem;
}

.form-group {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(72, 61, 139, 0.15);
}

textarea.form-control {
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.checkbox-label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-weight: 500 !important;
  color: var(--ink-2) !important;
  cursor: pointer;
}

.checkbox-label input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--brand);
}

.btn-block {
  width: 100%;
  min-height: 52px;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--tint);
}

.form-result {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--green-bg);
  text-align: center;
}

.form-result h3 {
  color: var(--green);
  margin-bottom: 0.75rem;
}

.form-result p + p {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.form-result a {
  color: var(--brand);
  font-weight: 700;
}

/* 404 */
.not-found {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding: clamp(4rem, 10vw, 7rem) 0;
  text-align: center;
}

.not-found .code {
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--brand);
  margin-bottom: 1rem;
}

.not-found p {
  max-width: 30rem;
  margin: 1rem auto 2rem;
}

.not-found .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Toasts (used by forms) */
.toast-container {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  left: var(--gutter);
  z-index: 100;
  display: grid;
  justify-items: end;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 420px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: var(--shadow-card);
  pointer-events: auto;
}

.toast.error .toast-icon {
  color: #ff9b9b;
}

.toast.success .toast-icon {
  color: #7be0b0;
}
