:root {
  --primary: #2F6FE4;
  --primary-hover: #1E5BD1;
  --soft: #EEF4FF;
  --surface: #F5F8FF;
  --ink: #16233D;
  --muted: #5B6B85;
  --line: #E3EAF6;
  --paper: #FFFFFF;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }

/* Top bar */
.topbar { height: 76px; padding: 0 clamp(1.25rem,5vw,5rem); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; display: block; object-fit: cover; background: #fff; box-shadow: 0 6px 16px rgba(47,111,228,.2); }
.brand strong, .brand small { display: block; }
.brand small { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: var(--primary); color: #fff; padding: .9rem 1.3rem; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 9px 20px rgba(47,111,228,.24); transition: .2s; }
.button:hover { background: var(--primary-hover); transform: translateY(-1px); }
.button-small { padding: .58rem .95rem; border-radius: 9px; font-size: .9rem; }
.button-ghost { color: var(--primary); background: #fff; border: 1px solid var(--line); box-shadow: none; }

/* Account menu */
.account-menu { position: relative; }
.account-menu__trigger { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem .35rem .35rem; cursor: pointer; font: inherit; }
.account-menu.is-open .account-menu__trigger, .account-menu__trigger:hover { border-color: var(--primary); }
.account-avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--soft); color: var(--primary); font-weight: 800; flex: none; }
.account-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-avatar.has-image-error img { display: none; }
.account-avatar--large { width: 44px; height: 44px; }
.account-menu__identity { display: none; text-align: left; line-height: 1.15; }
.account-menu__identity strong { display: block; font-size: .88rem; }
.account-menu__identity small { color: var(--muted); font-size: .76rem; }
.account-menu__chevron { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; }
.account-menu__panel { position: absolute; right: 0; top: calc(100% + .6rem); width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(22,35,61,.16); padding: .75rem; z-index: 20; }
.account-menu__person { display: flex; align-items: center; gap: .75rem; padding: .5rem; }
.account-menu__person strong { display: block; font-size: .92rem; }
.account-menu__person small { color: var(--muted); font-size: .78rem; }
.account-menu__divider { height: 1px; background: var(--line); margin: .5rem 0; }
.account-menu__signout { display: block; text-align: left; width: 100%; padding: .6rem .5rem; border-radius: 10px; font-weight: 600; color: var(--ink); }
.account-menu__signout:hover { background: var(--surface); }
@media (min-width: 560px) { .account-menu__identity { display: block; } }

/* Hero */
.hero { min-height: 620px; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(390px,.92fr); align-items: center; gap: 4rem; padding: 5rem clamp(1.5rem,8vw,8rem); position: relative; overflow: hidden; background: linear-gradient(125deg,#fff 10%,#f7faff 65%,var(--soft)); }
.hero-glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(47,111,228,.12); filter: blur(90px); left: 33%; top: 10%; }
.hero-copy { position: relative; z-index: 1; max-width: 740px; }
.eyebrow { color: var(--primary); font-size: .75rem; font-weight: 800; letter-spacing: .17em; }
.hero h1 { font-size: clamp(3rem,6vw,6rem); line-height: .96; letter-spacing: -.05em; margin: 1.2rem 0 1.6rem; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { font-size: 1.18rem; line-height: 1.75; color: var(--muted); max-width: 650px; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.text-link { font-weight: 700; color: var(--primary); }
.orbit { aspect-ratio: 1; position: relative; max-width: 500px; width: 100%; }
.orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke: rgba(47,111,228,.22); fill: none; stroke-width: 1.5; }
.orbit-center, .person { position: absolute; z-index: 2; display: grid; place-items: center; border-radius: 50%; font-weight: 800; }
.orbit-center { width: 124px; height: 124px; left: calc(50% - 62px); top: calc(50% - 62px); background: var(--primary); color: #fff; box-shadow: 0 20px 50px rgba(47,111,228,.3); }
.orbit-center span, .orbit-center small { display: block; }
.orbit-center span { font-size: 1.9rem; }
.orbit-center small { font-weight: 500; opacity: .8; }
.person { width: 68px; height: 68px; background: #fff; color: var(--primary); border: 6px solid var(--soft); box-shadow: 0 10px 28px rgba(22,35,61,.12); }
.person-one { left: 12%; top: 24%; }
.person-two { right: 7%; top: 31%; }
.person-three { right: 23%; bottom: 7%; }

/* Invite band — the primary action area, a solid color block */
.invite-band { background: var(--primary); padding: 4.5rem clamp(1.5rem,8vw,8rem); display: flex; justify-content: center; }
.invite-form { width: 100%; max-width: 640px; display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: center; }
.invite-field { position: relative; flex: 1 1 320px; }
.contact-input { width: 100%; padding: 1.15rem 3.6rem 1.15rem 1.3rem; border-radius: 14px; border: 1px solid var(--line); font: inherit; font-size: 1.05rem; background: #fff; color: var(--ink); }
.contact-input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.contact-badge { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: var(--primary); text-transform: uppercase; pointer-events: none; }
.invite-band .button { padding: 1.15rem 1.9rem; font-size: 1.02rem; white-space: nowrap; background: #fff; color: var(--primary); box-shadow: 0 12px 28px rgba(0,0,0,.2); }
.invite-band .button:hover { background: #EEF4FF; }

/* Content sections */
.section { padding: 6rem clamp(1.5rem,8vw,8rem); }
.section header { max-width: 820px; }
.section h2 { font-size: clamp(2rem,3.6vw,3.6rem); letter-spacing: -.03em; line-height: 1.08; margin: .9rem 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin-top: 3.5rem; }
.feature-grid article { padding: 2.2rem; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 14px 40px rgba(22,35,61,.06); }
.feature-number { font-size: .75rem; color: var(--primary); font-weight: 800; }
.feature-grid h3 { font-size: 1.3rem; margin: 2rem 0 .8rem; }
.feature-grid p { color: var(--muted); line-height: 1.7; }

/* Footer */
footer { padding: 2rem clamp(1.5rem,8vw,8rem); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.footer-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; }
footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
footer nav a:hover { color: var(--primary); }

/* Invite redemption page */
.redeem-shell { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 3rem 1.2rem; background: radial-gradient(circle at 50% 10%,var(--soft),transparent 45%),linear-gradient(#fbfdff,var(--soft)); }
.redeem-card { width: min(100%,590px); padding: 3.5rem; text-align: center; background: rgba(255,255,255,.96); border: 1px solid #fff; border-radius: 28px; box-shadow: 0 30px 80px rgba(22,35,61,.14); }
.invite-icon { width: 55px; height: 55px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 1.2rem; background: var(--soft); color: var(--primary); font-size: 1.6rem; }
.redeem-card h1 { font-size: 2rem; margin: 1.2rem 0 .7rem; }
.redeem-card p { color: var(--muted); }
.inviter-avatar { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; margin: 1.5rem auto 0; border: 6px solid var(--soft); }
.inviter-avatar.fallback { display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; }
.redeem-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 2rem; }
.message { padding: 1.1rem; border-radius: 12px; background: #fff3e2; color: #7a4700; margin-top: 1.5rem; }
.message.success { background: #e8f7ef; color: #17683d; }

/* Modal dialog */
dialog.modal { border: 1px solid var(--line); background: var(--paper); border-radius: 20px; padding: 0; max-width: min(92vw,420px); box-shadow: 0 30px 80px rgba(22,35,61,.22); }
dialog.modal::backdrop { background: rgba(22,35,61,.45); backdrop-filter: blur(2px); }
.modal-drag-handle { height: 22px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.modal-drag-handle::before { content: ''; width: 40px; height: 4px; border-radius: 2px; background: var(--line); }
.modal-drag-handle:active { cursor: grabbing; }
.modal-body { padding: 0 2.2rem 2.2rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.modal-row { display: flex; align-items: flex-start; gap: 1rem; text-align: left; }
.modal-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--primary); font-size: 1.35rem; }
.modal-text h3 { margin: 0 0 .4rem; font-size: 1.25rem; }
.modal-text p { color: var(--muted); line-height: 1.6; margin: 0; }
.modal-body .button { width: 100%; }
dialog.modal.is-error .modal-icon { background: #fde2e2; color: #b3261e; }
dialog.modal.is-success .modal-icon { background: #e8f7ef; color: #17683d; }

/* Button loading state */
.button[data-loading] { position: relative; color: transparent; pointer-events: none; }
.button[data-loading]::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: button-spin .7s linear infinite; }
/* .invite-band .button has a white background (blue text), so its spinner needs to be blue, not white-on-white. */
.invite-band .button[data-loading]::after { border-color: rgba(47,111,228,.25); border-top-color: var(--primary); }
@keyframes button-spin { to { transform: rotate(360deg); } }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding-top: 4rem; }
  .orbit { max-width: 380px; margin: auto; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* Intentionally no prefers-color-scheme: dark override — this site stays light
   regardless of OS theme so it doesn't inherit a dark look nobody asked for here. */
:root, html { color-scheme: light; }
