/* ============================================================
   Adam J.W. Walker — Digital Business Card
   Concept: "Visionary Cartography" — an earthy-cosmic map of a
   mind. Deep midnight-teal ground, aurora gradients drifting
   like dye in water, gold ritual accents, sacred-geometry glow.
   Plain CSS. Mobile-first. Honours prefers-reduced-motion.
   ============================================================ */

:root {
  /* Ground */
  --bg: #07151f;
  --bg-2: #0a1f2e;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-solid: #0e2738;
  --tint: rgba(20, 184, 166, 0.05);
  --line: rgba(180, 230, 224, 0.12);
  --line-strong: rgba(180, 230, 224, 0.22);

  /* Ink */
  --ink: #ecf6f4;
  --ink-soft: #aec7c3;
  --muted: #768f8c;

  /* Aurora spectrum */
  --teal: #14b8a6;
  --cyan: #2dd4bf;
  --aqua: #38e0d4;
  --violet: #8b6cf0;
  --magenta: #e879c8;
  --gold: #f3b85f;
  --amber: #ef9a4a;

  --accent: #2dd4bf;
  --accent-ink: #04141a;
  --accent-soft: rgba(45, 212, 191, 0.16);

  --grad-aurora: linear-gradient(
    100deg,
    var(--teal) 0%,
    var(--cyan) 22%,
    var(--violet) 52%,
    var(--magenta) 74%,
    var(--gold) 100%
  );
  --grad-aurora-soft: linear-gradient(
    120deg,
    rgba(20, 184, 166, 0.85),
    rgba(139, 108, 240, 0.8),
    rgba(232, 121, 200, 0.8),
    rgba(243, 184, 95, 0.85)
  );

  --radius: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 40px 90px -34px rgba(0, 0, 0, 0.85);
  --glow: 0 0 40px -8px rgba(45, 212, 191, 0.45);

  --tap: 48px;
  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image:
    radial-gradient(58% 48% at 14% 6%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(60% 50% at 88% 14%, rgba(139, 108, 240, 0.18), transparent 60%),
    radial-gradient(64% 58% at 82% 90%, rgba(139, 108, 240, 0.12), transparent 62%),
    radial-gradient(58% 54% at 16% 94%, rgba(20, 184, 166, 0.1), transparent 62%),
    linear-gradient(180deg, #0a1726 0%, var(--bg) 55%, #050f17 100%);
  background-attachment: fixed;
}

/* ---------- Ancient-future atmosphere (whole-site background) ---------- */
.aether {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

main {
  position: relative;
  z-index: 1;
}

/* slow-drifting cool aurora glow */
.aether__glow {
  position: absolute;
  inset: -25% -15%;
  pointer-events: none;
  will-change: transform, opacity;
  background:
    radial-gradient(40% 36% at 22% 18%, rgba(45, 212, 191, 0.16), transparent 62%),
    radial-gradient(42% 38% at 82% 28%, rgba(139, 108, 240, 0.18), transparent 62%),
    radial-gradient(46% 40% at 68% 88%, rgba(139, 108, 240, 0.12), transparent 64%),
    radial-gradient(38% 34% at 26% 82%, rgba(45, 212, 191, 0.1), transparent 64%);
  filter: blur(72px);
  opacity: 0.85;
  animation: aetherDrift 40s ease-in-out infinite alternate;
}

/* schematic blueprint grid — the "tech" layer (fine + bold + node dots) */
.aether__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(141, 215, 207, 0.12) 1px, transparent 1.7px),
    linear-gradient(rgba(141, 215, 207, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 215, 207, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(141, 215, 207, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 215, 207, 0.022) 1px, transparent 1px);
  background-size: 92px 92px, 92px 92px, 92px 92px, 46px 46px, 46px 46px;
  -webkit-mask: radial-gradient(125% 100% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 80%);
  mask: radial-gradient(125% 100% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 80%);
  opacity: 0.6;
}

/* flower-of-life lattice — interlocking circles, slowly turning */
.aether__weave {
  position: absolute;
  inset: -30%;
  pointer-events: none;
  background-image:
    radial-gradient(circle, transparent 0 26px, rgba(141, 215, 207, 0.06) 26px 27px, transparent 27px),
    radial-gradient(circle, transparent 0 26px, rgba(139, 108, 240, 0.045) 26px 27px, transparent 27px);
  background-size: 54px 54px, 54px 54px;
  background-position: 0 0, 27px 27px;
  -webkit-mask: radial-gradient(58% 58% at 50% 32%, #000, transparent 78%);
  mask: radial-gradient(58% 58% at 50% 32%, #000, transparent 78%);
  opacity: 0.7;
  will-change: transform;
  animation: aetherWeave 150s linear infinite;
}

/* large slow-turning sacred-geometry mandala — the "ancient" layer */
.aether__geometry {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150vmax;
  height: 150vmax;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(141, 215, 207, 0.05) 0deg 0.5deg,
      transparent 0.5deg 7.5deg
    ),
    repeating-radial-gradient(
      circle,
      rgba(141, 215, 207, 0.05) 0 1px,
      transparent 1px 64px
    );
  -webkit-mask: radial-gradient(circle, #000 6%, rgba(0, 0, 0, 0.35) 30%, transparent 52%);
  mask: radial-gradient(circle, #000 6%, rgba(0, 0, 0, 0.35) 30%, transparent 52%);
  opacity: 0.7;
  will-change: transform;
  animation: aetherSpin 240s linear infinite;
}

/* inner counter-rotating wheel — finer spokes, violet tint (the moiré) */
.aether__geometry::before {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(139, 108, 240, 0.06) 0deg 0.45deg,
      transparent 0.45deg 5deg
    ),
    repeating-radial-gradient(
      circle,
      rgba(139, 108, 240, 0.045) 0 1px,
      transparent 1px 44px
    );
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 62%);
  mask: radial-gradient(circle, #000 8%, transparent 62%);
  animation: aetherSpinRev 190s linear infinite;
}

/* crisp concentric orbit rings near the core — structure */
.aether__geometry::after {
  content: "";
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    rgba(141, 215, 207, 0.08) 0 1px,
    transparent 1px 9%
  );
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 70%);
  mask: radial-gradient(circle, #000 10%, transparent 70%);
}

@keyframes aetherDrift {
  0% { transform: translate3d(-3%, 2%, 0) scale(1.04); opacity: 0.7; }
  50% { transform: translate3d(4%, -2%, 0) scale(1.1); opacity: 0.9; }
  100% { transform: translate3d(-1%, 1%, 0) scale(1.06); opacity: 0.78; }
}

@keyframes aetherSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

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

@keyframes aetherWeave {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(360deg) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .aether__glow,
  .aether__weave,
  .aether__geometry,
  .aether__geometry::before {
    animation: none;
  }
}

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

::selection {
  background: rgba(45, 212, 191, 0.3);
  color: #fff;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.container--narrow {
  max-width: 720px;
}

.section {
  position: relative;
  padding: 76px 0;
}

.section--tint {
  background: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(2px);
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 14px;
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow--light {
  background: linear-gradient(100deg, #d7fff8, #ffe6c2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section__title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 10px;
}

.section__sub {
  color: var(--ink-soft);
  margin: 0 0 34px;
  max-width: 48ch;
}

.lead {
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  color: var(--ink-soft);
  margin: 0 0 30px;
}

.grad-text {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(60px, 11vh, 116px) 0 92px;
  overflow: hidden;
}

/* drifting aurora veil */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 150%;
  background:
    radial-gradient(40% 38% at 30% 30%, rgba(45, 212, 191, 0.5), transparent 60%),
    radial-gradient(36% 34% at 72% 26%, rgba(139, 108, 240, 0.45), transparent 62%),
    radial-gradient(40% 40% at 60% 70%, rgba(232, 121, 200, 0.4), transparent 60%),
    radial-gradient(36% 36% at 22% 72%, rgba(243, 184, 95, 0.35), transparent 60%);
  filter: blur(46px);
  opacity: 0.6;
  z-index: 0;
  animation: auroraDrift 22s ease-in-out infinite alternate;
}

/* concentric sacred-geometry rings */
.hero::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(140vw, 1100px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background:
    repeating-radial-gradient(
      circle,
      rgba(180, 230, 224, 0.05) 0 1px,
      transparent 1px 46px
    );
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  z-index: 0;
  pointer-events: none;
}

@keyframes auroraDrift {
  0% { transform: translate3d(-3%, -2%, 0) scale(1); }
  50% { transform: translate3d(4%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) scale(1.04); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Avatar ---------- */
.avatar {
  position: relative;
  width: 168px;
  height: 168px;
  margin-bottom: 30px;
  display: grid;
  place-items: center;
}

.avatar__img {
  position: relative;
  z-index: 2;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.8);
}

.avatar__ring {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(
    from 0deg,
    var(--teal),
    var(--cyan),
    var(--violet),
    var(--magenta),
    var(--gold),
    var(--teal)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 14s linear infinite;
}

.avatar__halo {
  position: absolute;
  inset: -16px;
  z-index: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--teal),
    var(--violet),
    var(--magenta),
    var(--gold),
    var(--teal)
  );
  filter: blur(22px);
  opacity: 0.55;
  animation: spin 18s linear infinite reverse;
}

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

.hero__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.9rem, 11vw, 4.6rem);
  letter-spacing: 0.005em;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #cfeee8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__title {
  font-size: clamp(0.92rem, 3.4vw, 1.06rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0 0 20px;
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__title .dot {
  color: rgba(180, 230, 224, 0.4);
  -webkit-text-fill-color: rgba(180, 230, 224, 0.4);
  margin: 0 5px;
}

.hero__strap {
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: 1.08rem;
  margin: 0 0 36px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  width: 100%;
}

.hero__scroll {
  position: absolute;
  z-index: 1;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(45, 212, 191, 0.6);
  border-radius: 14px;
  opacity: 0.7;
}

.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan);
  animation: scrolldot 1.6s ease-in-out infinite;
}

@keyframes scrolldot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--tap);
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  color: var(--accent-ink);
  background: var(--grad-aurora);
  background-size: 180% 180%;
  box-shadow: var(--glow), var(--shadow);
  animation: hue 12s ease infinite;
}

.btn--primary:hover {
  filter: brightness(1.08) saturate(1.1);
  box-shadow: 0 0 56px -6px rgba(45, 212, 191, 0.6), var(--shadow);
}

@keyframes hue {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: #fff;
  box-shadow: var(--glow);
}

.btn--block {
  width: 100%;
}

.ico {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Pull quote ---------- */
.pullquote {
  position: relative;
  margin: 0;
  padding: 24px 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-family: "Fraunces", serif;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-style: italic;
  line-height: 1.4;
  color: #eafffb;
  overflow: hidden;
}

.pullquote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-aurora);
}

/* ---------- Story ---------- */
.story p {
  margin: 0 0 1.25em;
  color: var(--ink-soft);
}

.story p:first-child {
  margin-top: 0;
}

.story__more[hidden] {
  display: none;
}

.readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 4px;
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background-image: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.readmore .ico {
  stroke: var(--cyan);
  transition: transform 0.25s ease;
}

.readmore[aria-expanded="true"] .ico {
  transform: rotate(180deg);
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 34px 0 0;
  padding: 0 0 0 26px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--grad-aurora);
  opacity: 0.7;
}

.timeline__item {
  position: relative;
  padding: 0 0 30px 22px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgba(45, 212, 191, 0.6);
}

.timeline__item h3 {
  font-size: 1.18rem;
  margin-bottom: 3px;
}

.timeline__item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.timeline__item--outcome::before {
  background: var(--grad-aurora);
  border-color: transparent;
  box-shadow: 0 0 0 4px var(--bg), 0 0 18px rgba(232, 121, 200, 0.7);
}

.timeline__item--outcome h3 {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Project cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 8px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--glow);
  border-color: var(--cyan);
}

/* Aurora gradient border — only where masked compositing is supported,
   so unsupported engines fall back to the solid cyan hover border above
   instead of an opaque overlay covering the card. */
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--grad-aurora);
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .card:hover {
    border-color: transparent;
  }

  .card:hover::before {
    opacity: 1;
  }
}

.card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.card__title {
  font-size: 1.25rem;
  padding-right: 4px;
}

.card__qr {
  flex: none;
  width: 66px;
  height: 66px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
}

.card__qr:hover {
  transform: scale(1.06);
  box-shadow: var(--glow);
}

.card__qr img,
.card__qr canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.card__desc {
  color: var(--ink-soft);
  margin: 14px 0 22px;
  font-size: 0.99rem;
  flex: 1;
}

.card__visit {
  align-self: flex-start;
}

.card__soon {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Energy Medicine — Lineage & the Fire ---------- */
.lineage {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lineage__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.lineage__eyebrow {
  background: linear-gradient(100deg, var(--gold), var(--amber) 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lineage__title {
  margin-bottom: 6px;
  background: linear-gradient(180deg, #fff4e2 0%, #ffcf94 60%, #f0913f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- The fire-wheel: an animated energy mandala ---------- */
.firewheel {
  position: relative;
  width: min(320px, 80vw);
  aspect-ratio: 1;
  margin: 30px auto 38px;
}

.firewheel > * {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* breathing warm halo behind it all */
.firewheel__halo {
  inset: -8%;
  background: conic-gradient(
    from 0deg,
    var(--gold),
    #ff8a3d,
    #bd360d,
    var(--magenta),
    var(--gold)
  );
  filter: blur(38px);
  opacity: 0.5;
  animation: spin 30s linear infinite reverse, haloPulse 6s ease-in-out infinite;
}

@keyframes haloPulse {
  0%, 100% { opacity: 0.38; }
  50% { opacity: 0.62; }
}

/* radiating sun-rays, slowly turning */
.firewheel__rays {
  inset: 4%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(243, 184, 95, 0.22) 0deg 1.4deg,
    transparent 1.4deg 11deg
  );
  -webkit-mask: radial-gradient(circle, transparent 40%, #000 44%, #000 70%, transparent 78%);
  mask: radial-gradient(circle, transparent 40%, #000 44%, #000 70%, transparent 78%);
  animation: spin 46s linear infinite;
}

/* concentric sacred-geometry rings — echoes the hero */
.firewheel__rings {
  inset: 0;
  background: repeating-radial-gradient(
    circle,
    rgba(243, 184, 95, 0.16) 0 1px,
    transparent 1px 15px
  );
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 72%);
  mask: radial-gradient(circle, #000 8%, transparent 72%);
}

/* outer rotating fire ring — warm twin of the avatar ring */
.firewheel__ring {
  inset: 9%;
  padding: 4px;
  background: conic-gradient(
    from 0deg,
    var(--gold),
    #ff8a3d,
    #bd360d,
    var(--magenta),
    #ff8a3d,
    var(--gold)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  box-shadow: 0 0 52px -12px rgba(239, 122, 40, 0.55);
  animation: spin 16s linear infinite;
}

/* pulsing ember core — the hearth */
.firewheel__core {
  inset: 31%;
  background:
    radial-gradient(circle at 50% 58%, #fff0cf 0%, #ffac4f 30%, #e35418 58%, rgba(189, 54, 13, 0) 74%);
  box-shadow:
    0 0 64px -6px rgba(255, 140, 60, 0.6),
    inset 0 0 30px rgba(255, 184, 96, 0.5);
  animation: emberCore 4.6s ease-in-out infinite;
}

@keyframes emberCore {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  45% { transform: scale(1.08); opacity: 1; }
  72% { transform: scale(0.96); opacity: 0.84; }
}

/* embers orbiting the wheel */
.firewheel__ember {
  inset: 5%;
  animation: spin linear infinite;
}

.firewheel__ember::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: #ffce81;
  box-shadow: 0 0 12px 2px rgba(255, 184, 96, 0.85);
}

.firewheel__ember--1 { animation-duration: 13s; animation-delay: -2s; }
.firewheel__ember--2 { animation-duration: 19s; animation-delay: -9s; }
.firewheel__ember--3 { animation-duration: 24s; animation-delay: -16s; }

.lineage__text {
  max-width: 54ch;
  margin: 0 auto;
}

.lineage__text p {
  color: var(--ink-soft);
  margin: 0 0 16px;
}

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

.lineage__text strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Interlude ---------- */
.interlude {
  position: relative;
  color: #f3fffd;
  padding: 96px 0;
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.interlude::before {
  content: "";
  position: absolute;
  inset: -40% -10%;
  background:
    radial-gradient(40% 40% at 28% 30%, rgba(20, 184, 166, 0.55), transparent 60%),
    radial-gradient(40% 40% at 74% 32%, rgba(139, 108, 240, 0.5), transparent 60%),
    radial-gradient(46% 46% at 60% 78%, rgba(232, 121, 200, 0.45), transparent 60%),
    radial-gradient(40% 40% at 20% 76%, rgba(243, 184, 95, 0.4), transparent 60%);
  filter: blur(50px);
  opacity: 0.7;
  animation: auroraDrift 26s ease-in-out infinite alternate;
  z-index: 0;
}

.interlude .container {
  position: relative;
  z-index: 1;
}

.interlude__body {
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  color: rgba(244, 255, 253, 0.85);
  max-width: 54ch;
  margin: 0 auto 34px;
}

.interlude__statement {
  font-family: "Fraunces", serif;
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.32;
  margin: 0 auto;
  max-width: 22ch;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

/* ---------- Contact ---------- */
.contact__primary {
  margin: 6px 0 34px;
}

.links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  transition: border-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

.link:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.link .ico {
  fill: var(--cyan);
  stroke: none;
  width: 20px;
  height: 20px;
}

.links__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 34px 0 14px;
}

.links--secondary .link {
  font-size: 0.9rem;
  min-height: 44px;
  background: transparent;
  box-shadow: none;
}

.link--soon {
  color: var(--muted);
  border-style: dashed;
  cursor: default;
}

.link--soon:hover {
  border-color: var(--line-strong);
  transform: none;
  box-shadow: none;
}

/* ---------- QR sheet ---------- */
.qrsheet {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.qrsheet__item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.qrsheet__item:hover {
  border-color: var(--cyan);
  box-shadow: var(--glow);
}

.qrsheet__code {
  width: 116px;
  height: 116px;
  margin: 0 auto 10px;
  padding: 6px;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.qrsheet__code img,
.qrsheet__code canvas {
  width: 100% !important;
  height: 100% !important;
}

.qrsheet__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.3;
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 0 64px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fff, #cfeee8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer__muted {
  font-family: "Inter", sans-serif !important;
  font-size: 0.85rem;
  color: var(--muted) !important;
  -webkit-text-fill-color: var(--muted);
  margin-top: 8px !important;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 14, 20, 0.82);
  backdrop-filter: blur(6px);
  animation: fade 0.2s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__content {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 30px 30px 26px;
  text-align: center;
  max-width: 330px;
  width: 100%;
  box-shadow: var(--shadow-lg), var(--glow);
}

.lightbox__qr {
  width: 240px;
  height: 240px;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
}

.lightbox__qr img,
.lightbox__qr canvas {
  width: 100% !important;
  height: 100% !important;
}

.lightbox__label {
  font-family: "Fraunces", serif;
  font-size: 1.18rem;
  margin: 0 0 4px;
  color: var(--ink);
}

.lightbox__hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.lightbox__close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__scroll span,
  .hero::before,
  .interlude::before,
  .avatar__ring,
  .avatar__halo,
  .firewheel__halo,
  .firewheel__rays,
  .firewheel__ring,
  .firewheel__core,
  .firewheel__ember,
  .btn--primary {
    animation: none;
  }
}

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .hero__actions {
    width: auto;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .qrsheet {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 920px) {
  .section {
    padding: 100px 0;
  }
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .qrsheet {
    grid-template-columns: repeat(5, 1fr);
  }
  .links {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- High-contrast / forced-colors fallback ----------
   Gradient text uses transparent fill; restore a solid, visible
   colour where the system overrides colours or clipping fails. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .eyebrow,
  .eyebrow--light,
  .hero__name,
  .hero__title,
  .grad-text,
  .readmore,
  .timeline__item--outcome h3,
  .footer p {
    color: var(--ink);
    -webkit-text-fill-color: currentColor;
    background: none;
  }
}

@media (forced-colors: active) {
  .eyebrow,
  .eyebrow--light,
  .hero__name,
  .hero__title,
  .grad-text,
  .readmore,
  .timeline__item--outcome h3,
  .footer p,
  .footer__muted {
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    background: none;
  }
  .avatar__ring,
  .avatar__halo,
  .card::before {
    background: none;
  }
}
