/*
 * XDC website. Tokens mirror the member app (frontends/xdc/src/styles/tokens.css):
 * deep navy + blue identity with the warm cream/orange accent of the fox mark.
 */
:root {
  --navy-900: #0a1f3c;
  --navy: #0b3a78;
  --blue: #1467d6;
  --blue-600: #0f56b8;
  --blue-50: #ecf3fd;
  --blue-100: #d8e7fb;
  --sky: #5aa3f5;
  --cream: #fef0da;
  --orange: #f39200;
  --text-strong: #0f2440;
  --text: #4c5d73;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #e3e9f1;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Inter, Roboto, sans-serif;
  --r-card: 18px;
  --r-control: 12px;
  --shadow-sm: 0 1px 2px rgb(15 36 64 / 6%), 0 1px 1px rgb(15 36 64 / 4%);
  --shadow-md: 0 10px 28px rgb(15 36 64 / 10%);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: clamp(16px, 5vw, 32px);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

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

.hp {
  left: -9999px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--cream);
  color: var(--navy-900);
  font-weight: 700;
  border-radius: var(--r-control);
  transition: top 160ms var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------------------------------------------------------ hero */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1100px 560px at 82% -8%, rgb(20 103 214 / 60%), transparent 62%),
    radial-gradient(800px 480px at 0% 100%, rgb(90 163 245 / 22%), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy) 58%, #0f4fa3 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  animation: drift 20s ease-in-out infinite alternate;
}

.orb-a {
  width: 420px;
  height: 420px;
  left: -140px;
  top: 8%;
  background: var(--sky);
  opacity: 0.32;
}

.orb-b {
  width: 300px;
  height: 300px;
  right: 8%;
  top: 14%;
  background: var(--orange);
  mix-blend-mode: screen;
  opacity: 0.2;
  animation-duration: 26s;
  animation-delay: -6s;
}

.orb-c {
  width: 520px;
  height: 520px;
  right: -180px;
  bottom: 6%;
  background: var(--blue);
  opacity: 0.4;
  animation-duration: 30s;
  animation-delay: -12s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(36px, -28px, 0) scale(1.12);
  }
}

.ridge {
  position: absolute;
  left: 0;
  width: 100%;
}

.ridge-back {
  bottom: 40px;
  height: clamp(120px, 20vw, 220px);
}

.ridge-back path {
  fill: rgb(255 255 255 / 6%);
}

.ridge-front {
  bottom: -1px;
  height: clamp(70px, 11vw, 150px);
}

.ridge-front path {
  fill: var(--bg);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  border-radius: 11px;
  box-shadow: 0 4px 14px rgb(0 0 0 / 28%);
}

.brand-word {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgb(255 255 255 / 82%);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    background 160ms var(--ease),
    color 160ms var(--ease);
}

.site-nav a:hover {
  background: rgb(255 255 255 / 12%);
  color: #fff;
}

.hero-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px var(--gutter) clamp(110px, 17vw, 190px);
  text-align: center;
}

.emblem {
  position: relative;
  margin-bottom: 26px;
  animation: float 6s ease-in-out infinite;
}

.emblem img {
  width: 132px;
  height: 132px;
  border-radius: 32px;
  box-shadow:
    0 0 0 6px rgb(255 255 255 / 12%),
    0 24px 60px rgb(0 0 0 / 38%),
    0 0 80px rgb(90 163 245 / 45%);
}

.emblem-ring {
  position: absolute;
  inset: -14px;
  border-radius: 42px;
  border: 2px solid rgb(254 240 218 / 55%);
  animation: ring 3.2s ease-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes ring {
  0% {
    transform: scale(0.94);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 7px 16px 7px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 22%);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgb(243 146 0 / 70%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgb(243 146 0 / 0%);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(243 146 0 / 0%);
  }
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, min(7.4vw, 9.4vh), 4.6rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.accent {
  display: block;
  background: linear-gradient(95deg, var(--cream) 0%, #ffc66b 45%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}

.lede {
  max-width: 600px;
  margin: 22px 0 0;
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  color: rgb(255 255 255 / 80%);
  text-wrap: pretty;
}

.launch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  font-weight: 700;
  color: var(--cream);
}

.launch-line svg {
  fill: currentcolor;
}

.countdown {
  display: flex;
  gap: clamp(8px, 2vw, 14px);
  margin-top: 18px;
}

.countdown[hidden] {
  display: none;
}

.tile {
  min-width: clamp(64px, 17vw, 92px);
  padding: 14px 8px 12px;
  border-radius: 16px;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 18%);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgb(0 0 0 / 18%);
}

.tile strong {
  display: block;
  font-size: clamp(1.6rem, 6vw, 2.35rem);
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.tile span {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 66%);
}

/* notify */
.notify {
  width: 100%;
  max-width: 480px;
  margin-top: 30px;
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 18%);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgb(0 0 0 / 22%);
}

.notify h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: #fff;
}

.notify p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: rgb(255 255 255 / 76%);
}

.notify form {
  display: flex;
  gap: 8px;
}

.notify input[type='email'] {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  font: inherit;
  color: var(--text-strong);
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--r-control);
}

.notify input[type='email']::placeholder {
  color: #8a98ab;
}

.notify input[type='email']:focus-visible {
  outline: none;
  border-color: var(--sky);
}

.button,
.notify button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  font: inherit;
  font-weight: 800;
  color: var(--navy-900);
  background: var(--orange);
  border: 0;
  border-radius: var(--r-control);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgb(243 146 0 / 38%);
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease),
    background 160ms var(--ease);
}

.button:hover,
.notify button:hover {
  background: #ffa21f;
  transform: translateY(-1px);
}

.notify button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.form-status {
  min-height: 1.4em;
  margin: 10px 0 0 !important;
  font-weight: 700;
  color: var(--cream) !important;
}

.form-status.is-error {
  color: #ffb3ad !important;
}

.fine {
  margin: 8px 0 0 !important;
  font-size: 0.8rem !important;
  color: rgb(255 255 255 / 58%) !important;
}

/* the streak: a seven day chain that fills in, one day at a time */
.streak-wrap {
  margin-top: 40px;
}

.streak {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 2.6vw, 18px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.streak li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.streak small {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgb(255 255 255 / 66%);
  white-space: nowrap;
}

.dot {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(34px, 9.5vw, 48px);
  height: clamp(34px, 9.5vw, 48px);
  border-radius: 50%;
  border: 2px dashed rgb(255 255 255 / 38%);
  animation: dot-empty 9s ease-in-out infinite;
}

.dot svg {
  width: 56%;
  height: 56%;
  fill: #fff;
  animation: check 9s ease-in-out infinite;
}

.streak li:nth-child(1) .dot,
.streak li:nth-child(1) .dot svg {
  animation-delay: 0s;
}
.streak li:nth-child(2) .dot,
.streak li:nth-child(2) .dot svg {
  animation-delay: 0.4s;
}
.streak li:nth-child(3) .dot,
.streak li:nth-child(3) .dot svg {
  animation-delay: 0.8s;
}
.streak li:nth-child(4) .dot,
.streak li:nth-child(4) .dot svg {
  animation-delay: 1.2s;
}
.streak li:nth-child(5) .dot,
.streak li:nth-child(5) .dot svg {
  animation-delay: 1.6s;
}
.streak li:nth-child(6) .dot,
.streak li:nth-child(6) .dot svg {
  animation-delay: 2s;
}
.streak li:nth-child(7) .dot,
.streak li:nth-child(7) .dot svg {
  animation-delay: 2.4s;
}
.streak li:nth-child(7) .dot {
  animation-name: dot-final;
}

@keyframes dot-empty {
  0%,
  6% {
    background: transparent;
    border-color: rgb(255 255 255 / 38%);
    border-style: dashed;
    transform: scale(1);
  }
  11% {
    transform: scale(1.18);
  }
  15%,
  86% {
    background: linear-gradient(145deg, var(--sky), var(--blue));
    border-color: transparent;
    border-style: solid;
    transform: scale(1);
    box-shadow: 0 6px 18px rgb(20 103 214 / 55%);
  }
  96%,
  100% {
    background: transparent;
    border-color: rgb(255 255 255 / 38%);
    border-style: dashed;
    transform: scale(1);
    box-shadow: none;
  }
}

@keyframes dot-final {
  0%,
  6% {
    background: transparent;
    border-color: rgb(254 240 218 / 55%);
    border-style: dashed;
    transform: scale(1);
  }
  11% {
    transform: scale(1.28);
  }
  15%,
  86% {
    background: linear-gradient(145deg, #ffc66b, var(--orange));
    border-color: transparent;
    border-style: solid;
    transform: scale(1);
    box-shadow: 0 6px 22px rgb(243 146 0 / 65%);
  }
  96%,
  100% {
    background: transparent;
    border-color: rgb(254 240 218 / 55%);
    border-style: dashed;
    transform: scale(1);
    box-shadow: none;
  }
}

@keyframes check {
  0%,
  8% {
    opacity: 0;
    transform: scale(0.3);
  }
  14%,
  86% {
    opacity: 1;
    transform: scale(1);
  }
  96%,
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}

.streak-caption {
  margin: 18px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgb(255 255 255 / 72%);
}

/* ------------------------------------------------------------------------------------------------------- sections */
.section {
  padding: clamp(56px, 9vw, 104px) 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap-narrow {
  max-width: 760px;
}

.section h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.75rem, 4.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.section-intro {
  max-width: 620px;
  margin: 14px auto 0;
  text-align: center;
  font-size: 1.05rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  transition:
    transform 220ms var(--ease),
    box-shadow 220ms var(--ease),
    border-color 220ms var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-100);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--blue-50), var(--blue-100));
  color: var(--blue);
}

.card-icon svg {
  fill: currentcolor;
}

.card:nth-child(3n + 2) .card-icon {
  background: linear-gradient(145deg, #fff3df, var(--cream));
  color: #d97f00;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--text-strong);
}

.card p {
  margin: 0;
}

.faq {
  margin-top: 36px;
}

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

.faq summary {
  position: relative;
  padding: 20px 44px 20px 4px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-strong);
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 2.5px solid var(--blue);
  border-bottom: 2.5px solid var(--blue);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 200ms var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq details p {
  margin: 0 0 22px;
  padding: 0 44px 0 4px;
}

/* ------------------------------------------------------------------------------------------------------- footer */
.site-footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px));
  color: rgb(255 255 255 / 70%);
  background: var(--navy-900);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}

.footer-line {
  margin: 0;
  font-size: 0.9rem;
}

.social {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}

.social a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------------------------------------------- 404 */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  gap: 8px;
  padding: 32px var(--gutter);
  text-align: center;
}

.not-found img {
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 12px;
}

.not-found h1 {
  color: var(--text-strong);
  font-size: clamp(2rem, 6vw, 3rem);
}

.not-found p {
  margin: 0 0 18px;
}

/* ------------------------------------------------------------------------------------------------ small screens */
@media (min-width: 521px) and (max-height: 860px) {
  .hero-main {
    padding-top: 12px;
  }

  .emblem {
    margin-bottom: 16px;
  }

  .emblem img {
    width: 104px;
    height: 104px;
    border-radius: 26px;
  }

  .eyebrow {
    margin-bottom: 12px;
  }

  .lede {
    margin-top: 16px;
  }

  .launch-line {
    margin-top: 18px;
  }

  .streak-wrap {
    margin-top: 28px;
  }
}

@media (max-width: 520px) {
  .notify form {
    flex-direction: column;
  }

  .notify button {
    width: 100%;
  }

  .site-nav a {
    padding: 8px 10px;
  }

  .emblem img {
    width: 112px;
    height: 112px;
    border-radius: 28px;
  }

  .streak small {
    font-size: 0.62rem;
  }
}

/* ------------------------------------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .emblem-ring {
    display: none;
  }

  .dot {
    border-style: solid;
    border-color: transparent;
    background: linear-gradient(145deg, var(--sky), var(--blue));
  }

  .streak li:last-child .dot {
    background: linear-gradient(145deg, #ffc66b, var(--orange));
  }
}
