/* Patrons App website theme.
   Palette, type and motion are lifted from the app itself so the site and the
   product read as one thing. Dark-first, because the app is. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #05080f;
  --surface: #101725;
  --surface-high: #182133;
  --accent: #5b8cff;
  --accent-soft: #9b6bff;
  --text: #e8edf7;
  --muted: #8a97ad;
  --warning: #f5b14c;
  --border: rgba(255, 255, 255, 0.08);
  --ring: rgba(255, 255, 255, 0.07);
  --shadow: rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafbfd;
    --surface: #f0f3f8;
    --surface-high: #ffffff;
    --accent: #3a6fe8;
    --accent-soft: #7c4de0;
    --text: #111826;
    --muted: #63708a;
    --warning: #b57314;
    --border: rgba(17, 24, 38, 0.1);
    --ring: rgba(17, 24, 38, 0.08);
    --shadow: rgba(17, 24, 38, 0.1);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.3px;
  font-size: 16px;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: block;
}

.brand .logo-dark {
  display: block;
}
.brand .logo-light {
  display: none;
}
@media (prefers-color-scheme: light) {
  .brand .logo-dark {
    display: none;
  }
  .brand .logo-light {
    display: block;
  }
}

.topbar nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.topbar nav a:hover {
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 48px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 22%, transparent) 0%,
    transparent 62%
  );
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(38px, 9vw, 60px);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 0 0 14px;
  font-weight: 700;
}

.flow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
}

.flow b {
  color: var(--text);
  font-weight: 600;
}

.flow .arrow {
  color: var(--accent);
}

/* ---------- Orbit animation ---------- */

.orbit {
  position: relative;
  width: min(420px, 88vw);
  aspect-ratio: 1;
  margin: 8px auto 0;
}

.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--ring);
  border-radius: 50%;
}
.ring.r1 {
  width: 34%;
  height: 34%;
}
.ring.r2 {
  width: 66%;
  height: 66%;
}
.ring.r3 {
  width: 98%;
  height: 98%;
}

.sweep {
  position: absolute;
  inset: 1%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 300deg,
    color-mix(in srgb, var(--accent) 20%, transparent) 360deg
  );
  animation: spin 6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  animation: story 9s ease-in-out infinite;
}

.node .drift {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  animation: drift 7s ease-in-out infinite;
}

.node .av {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 18px;
  border: 1.5px solid currentColor;
  background: color-mix(in srgb, currentColor 16%, transparent);
}

.node .nm {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
}

.node.you {
  top: 50%;
  left: 50%;
  animation: none;
  z-index: 3;
}

.node.you .av {
  width: 84px;
  height: 84px;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 45%, transparent);
}

.node.you .av img {
  width: 40px;
  height: 40px;
  display: block;
}

.node.you .nm {
  font-weight: 600;
  font-size: 13.5px;
}

.node.n1 {
  top: 20%;
  left: 20%;
  color: #35c7a8;
  animation-delay: -0.4s;
}
.node.n2 {
  top: 34%;
  left: 84%;
  color: #f08a5d;
  animation-delay: -0.9s;
}
.node.n3 {
  top: 84%;
  left: 62%;
  color: #e5679a;
  animation-delay: -1.4s;
}

.node.n1 .drift {
  animation-duration: 6s;
}
.node.n2 .drift {
  animation-duration: 8s;
  animation-delay: -2s;
}
.node.n3 .drift {
  animation-duration: 7.4s;
  animation-delay: -4s;
}

/* People arrive, hold, then clear so the loop restarts cleanly. */
@keyframes story {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  92% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.94);
  }
}

/* Subtle life, deliberately small. this should register as breathing,
   not as movement you have to track. */
@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(2px, -3px) scale(1.025);
  }
  50% {
    transform: translate(-1px, 2px) scale(0.985);
  }
  75% {
    transform: translate(-3px, -1px) scale(1.015);
  }
}

.ripple {
  position: absolute;
  top: 20%;
  left: 20%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  border: 2px solid #35c7a8;
  opacity: 0;
  animation: ripple 9s ease-out infinite;
  z-index: 2;
}

@keyframes ripple {
  0%,
  44% {
    opacity: 0;
    transform: scale(0.7);
  }
  50% {
    opacity: 0.8;
    transform: scale(1);
  }
  62%,
  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}

.chip {
  position: absolute;
  top: 20%;
  left: 20%;
  transform: translate(-50%, -170%);
  padding: 7px 13px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  animation: chip 9s ease-out infinite;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent);
  z-index: 4;
}

@keyframes chip {
  0%,
  54% {
    opacity: 0;
    transform: translate(-50%, -150%);
  }
  62%,
  88% {
    opacity: 1;
    transform: translate(-50%, -185%);
  }
  96%,
  100% {
    opacity: 0;
    transform: translate(-50%, -200%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sweep,
  .node,
  .node .drift,
  .ripple,
  .chip {
    animation: none;
  }
  .ripple {
    opacity: 0;
  }
  .chip {
    opacity: 1;
  }
}

/* ---------- Content ---------- */

main {
  padding-bottom: 90px;
}

.page-head {
  padding: 56px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

h1 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin: 0 0 10px;
  font-weight: 700;
}

h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  margin: 42px 0 12px;
  font-weight: 700;
}

h3 {
  font-size: 16.5px;
  margin: 26px 0 8px;
  font-weight: 600;
}

.effective {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 9px;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

strong {
  font-weight: 600;
  color: var(--text);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 28px 0;
}

.card p:first-child {
  margin-top: 0;
}
.card p:last-child {
  margin-bottom: 0;
}

/* The not-a-finance-app notice. Deliberately loud. */
.disclaimer {
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 28px 0;
}

.disclaimer h3 {
  margin: 0 0 8px;
  color: var(--warning);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.disclaimer p {
  margin: 0 0 10px;
  font-size: 15px;
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 32px 0;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  text-align: left;
}

.step .n {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
}

.step h3 {
  margin: 0 0 2px;
  font-size: 16px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

details {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 20px;
  margin-bottom: 10px;
  background: var(--surface);
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
}

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

summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
}

details[open] summary::after {
  content: "−";
}

details > p:last-child {
  margin-bottom: 18px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 48px 0 40px;
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px 24px;
  margin-bottom: 36px;
}

.footer-section h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin: 0 0 12px;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--text);
  text-decoration: none;
  font-size: 14.5px;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-note {
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.copyright {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}
