/* =============================================================================
   Creator landing template — stylesheet
   You should not need to edit this file. All colours, radii and sizes come from
   config.js via the custom properties below.
   ============================================================================= */

:root {
  --bg: #15111C;
  --bg-soft: #1E1826;
  --text: #F3EEF9;
  --text-muted: #A99CB8;
  --accent: #C6A2FF;
  --accent-ink: #1A1222;
  --hairline: rgba(255, 255, 255, 0.10);
  --btn-radius: 999px;
  --avatar-size: 128px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-1: 6px;
  --space-2: 12px;
  --space-3: 20px;
  --space-4: 28px;
  --space-5: 40px;
  --measure: 26rem; /* 416px — the whole page column */
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* A very quiet vertical wash so the page isn't a flat block of colour. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  z-index: 0;
}

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

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

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

/* -----------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--measure);
  margin-inline: auto;
  padding: max(var(--space-5), env(safe-area-inset-top)) var(--space-3)
           calc(var(--space-5) + env(safe-area-inset-bottom));
  transition: filter 260ms ease;
}

/* -----------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.head { text-align: center; }

.avatar {
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
  margin: 0 auto var(--space-3);
}

/* Signature: a slow, barely-there halo behind the avatar. */
.avatar::before {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    color-mix(in srgb, var(--accent) 55%, transparent) 90deg,
    transparent 200deg,
    color-mix(in srgb, var(--accent) 30%, transparent) 300deg,
    transparent 360deg);
  filter: blur(12px);
  opacity: 0.75;
  animation: spin 22s linear infinite;
}

.avatar img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
}

.name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.handle {
  margin: var(--space-1) 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.tagline {
  margin: var(--space-2) auto 0;
  max-width: 22rem;
  font-size: 1rem;
  color: var(--text-muted);
}

/* -----------------------------------------------------------------------------
   Social icon row
   -------------------------------------------------------------------------- */
.socials {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.social {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  color: var(--text-muted);
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.social svg { width: 19px; height: 19px; }

.social:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.social:active { transform: scale(0.94); }

/* -----------------------------------------------------------------------------
   Hero / teaser
   -------------------------------------------------------------------------- */
.hero { margin-top: var(--space-5); text-align: center; }

.hero__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--hairline);
  background: var(--bg-soft);
}

.hero__kicker {
  margin: var(--space-2) 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* -----------------------------------------------------------------------------
   CTA buttons
   -------------------------------------------------------------------------- */
.ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 60px;
  padding: 14px 22px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  transition: transform 160ms cubic-bezier(.2,.7,.3,1),
              box-shadow 200ms ease,
              background-color 200ms ease,
              border-color 200ms ease;
}

.btn__label { display: flex; align-items: center; gap: 9px; }
.btn__label svg { width: 17px; height: 17px; flex: none; }

.btn__note {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.72;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent);
  animation: breathe 4.5s ease-in-out infinite;
}

.btn--primary.is-gate-confirm {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--hairline);
  animation: none;
  box-shadow: none;
}

.btn--secondary {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--hairline);
}

.btn:hover { transform: translateY(-2px); }
.btn--secondary:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn:active { transform: translateY(0) scale(0.985); }

/* -----------------------------------------------------------------------------
   Age-gate focus state — when a gated CTA is showing its confirm step,
   everything except the CTA row dims and blurs so the change is unmissable.
   -------------------------------------------------------------------------- */
.head, .hero, .cause, .foot {
  transition: filter 260ms ease, opacity 260ms ease;
}

body.gate-focus .head,
body.gate-focus .hero,
body.gate-focus .cause,
body.gate-focus .foot {
  filter: blur(6px);
  opacity: 0.45;
  pointer-events: none;
}

/* -----------------------------------------------------------------------------
   Charity / cause
   -------------------------------------------------------------------------- */
.cause {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
  text-align: center;
}

.cause__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cause__body {
  margin: var(--space-2) auto 0;
  max-width: 21rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cause__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: var(--space-2);
  padding-bottom: 2px;
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  transition: color 180ms ease, border-color 180ms ease;
}

.cause__link svg { width: 15px; height: 15px; }
.cause__link:hover { color: var(--accent); border-color: var(--accent); }

/* -----------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.foot { margin-top: var(--space-5); text-align: center; }

.foot__note,
.foot__legal {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.foot__legal { margin-top: var(--space-1); }

/* -----------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; }

body.ready .reveal {
  animation: rise 520ms cubic-bezier(.2,.7,.3,1) both;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

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

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 34%, transparent); }
  50%      { box-shadow: 0 0 26px 2px color-mix(in srgb, var(--accent) 28%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .avatar::before,
  .btn--primary { animation: none; }
  body.ready .reveal { animation: none; opacity: 1; }
  .btn:hover { transform: none; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}

/* -----------------------------------------------------------------------------
   Desktop — same column, a little more air. Deliberately not a wide layout.
   -------------------------------------------------------------------------- */
@media (min-width: 720px) {
  .page { padding-top: 64px; padding-bottom: 64px; }
  .name { font-size: 1.75rem; }
  .btn { min-height: 64px; }
}

@media (prefers-color-scheme: light) {
  /* Colours are set from config.js, so light mode inherits the same palette.
     Add overrides here only if you ship a light-themed creator. */
}
