/* Permanent brand font families shared by the app and static public pages. */
:root {
  --spiri-font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --spiri-font-body: "Inter", system-ui, sans-serif;
  --spiri-font-technical: Menlo, Consolas, monospace;

  /* Compatibility aliases used by Tailwind and existing page styles. */
  --app-font-serif: var(--spiri-font-display);
  --app-font-sans: var(--spiri-font-body);
  --app-font-mono: var(--spiri-font-technical);
}

/*
 * Shared styles for static, crawlable SpiriLumen pages.
 * Load after the page's font links (Cinzel and Inter are already part of the
 * public site shell); all selectors are scoped to .seo-site to avoid touching
 * the app interface.
 */

.seo-site {
  --seo-night: #160d20;
  --seo-night-deep: #100817;
  --seo-plum: #24142f;
  --seo-plum-raised: #2d1b3b;
  --seo-amethyst: #c6a1e6;
  --seo-amethyst-bright: #e0c5f5;
  --seo-lavender: #e8dff0;
  --seo-muted: #c3b4cd;
  --seo-subtle: #a895b4;
  --seo-gold: #e4c788;
  --seo-gold-soft: #f0dbad;
  --seo-rule: rgb(215 188 235 / 20%);
  --seo-panel: rgb(39 24 51 / 72%);
  --seo-focus: #f1d58f;
  --seo-display: var(--spiri-font-display, "Cinzel", Georgia, "Times New Roman", serif);
  --seo-body: var(--spiri-font-body, "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  --seo-reading-width: 70ch;

  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow: clip;
  color: var(--seo-lavender);
  background:
    radial-gradient(ellipse 62rem 38rem at 88% -8%, rgb(101 57 128 / 28%), transparent 68%),
    radial-gradient(ellipse 48rem 32rem at -10% 42%, rgb(73 42 97 / 18%), transparent 70%),
    linear-gradient(180deg, var(--seo-night) 0%, var(--seo-night-deep) 100%);
  font-family: var(--seo-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.seo-site::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.16;
  background-image:
    radial-gradient(1px 1px at 13% 19%, #f6eaff 55%, transparent 100%),
    radial-gradient(1px 1px at 76% 13%, #d9b5ef 55%, transparent 100%),
    radial-gradient(1px 1px at 84% 61%, #f0d9a7 55%, transparent 100%),
    radial-gradient(1px 1px at 29% 77%, #d9c3e9 55%, transparent 100%);
  background-size: 480px 420px;
}

.seo-site :where(img, picture, svg, video) {
  max-width: 100%;
}

.seo-site :where(img, video) {
  height: auto;
}

.seo-site :where(a) {
  color: var(--seo-amethyst-bright);
  text-decoration-color: rgb(198 161 230 / 48%);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.seo-site :where(a:hover) {
  color: var(--seo-gold-soft);
  text-decoration-color: currentColor;
}

.seo-site :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--seo-focus);
  outline-offset: 4px;
  border-radius: 3px;
}

.seo-site :where(button, input, select, textarea) {
  font: inherit;
}

.seo-site :where(button) {
  color: inherit;
}

.seo-site :where(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  color: #f4ecfa;
  font-family: var(--seo-display);
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}

.seo-site :where(p, ul, ol, blockquote, figure, dl) {
  margin-top: 0;
}

.seo-site :where(p:last-child, ul:last-child, ol:last-child, blockquote:last-child) {
  margin-bottom: 0;
}

.seo-site ::selection {
  color: var(--seo-night-deep);
  background: var(--seo-gold-soft);
}

.seo-site :where(.seo-skip-link) {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  border: 1px solid var(--seo-gold);
  border-radius: 999px;
  color: var(--seo-night-deep);
  background: var(--seo-gold-soft);
  font-weight: 600;
}

.seo-site :where(.seo-skip-link:focus) {
  transform: translateY(0);
}

.seo-header {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, 76rem);
  min-height: 5rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border-bottom: 1px solid var(--seo-rule);
}

.seo-header :where(.seo-brand, .seo-wordmark) {
  color: #f4eafa;
  font-family: var(--seo-display);
  font-size: 1rem;
  letter-spacing: 0.045em;
  text-decoration: none;
}

.seo-header :where(.seo-brand span, .seo-wordmark span) {
  color: var(--seo-amethyst);
}

.seo-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  color: var(--seo-muted);
  font-size: 0.84rem;
}

.seo-nav a {
  color: inherit;
  text-decoration: none;
}

.seo-nav a:hover,
.seo-nav a[aria-current="page"] {
  color: var(--seo-gold-soft);
}

.seo-locale {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--seo-rule);
  border-radius: 999px;
  color: var(--seo-muted);
  background: rgb(31 18 40 / 62%);
  font-size: 0.75rem;
  line-height: 1.2;
  text-decoration: none;
}

.seo-locale[aria-current="page"] {
  border-color: rgb(228 199 136 / 52%);
  color: var(--seo-gold-soft);
}

.seo-main {
  width: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(4rem, 9vw, 7rem);
}

.seo-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 5vw, 4.5rem);
  color: var(--seo-subtle);
  font-size: 0.78rem;
}

.seo-breadcrumbs :where(a) {
  color: var(--seo-muted);
  text-decoration: none;
}

.seo-breadcrumbs :where(a:hover) {
  color: var(--seo-gold-soft);
  text-decoration: underline;
}

.seo-breadcrumbs [aria-current="page"] {
  color: var(--seo-lavender);
}

.seo-hero {
  position: relative;
  display: grid;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  min-height: clamp(17rem, 35vw, 27rem);
  margin-bottom: clamp(3.5rem, 8vw, 7rem);
  padding: clamp(2rem, 6vw, 4.75rem);
  overflow: hidden;
  border: 1px solid rgb(212 184 235 / 22%);
  border-radius: 3px 44px 3px 44px;
  background:
    radial-gradient(ellipse at 83% 42%, rgb(136 87 166 / 25%), transparent 46%),
    linear-gradient(128deg, rgb(43 27 56 / 93%), rgb(25 15 33 / 91%));
  box-shadow: inset 0 1px 0 rgb(255 246 255 / 5%);
}

.seo-hero::after {
  position: absolute;
  right: -4rem;
  bottom: -12rem;
  width: clamp(16rem, 38vw, 31rem);
  aspect-ratio: 1;
  border: 1px solid rgb(220 192 240 / 16%);
  border-radius: 50%;
  box-shadow:
    0 0 0 2.4rem rgb(220 192 240 / 3%),
    0 0 0 5.3rem rgb(220 192 240 / 2%);
  content: "";
  pointer-events: none;
}

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

.seo-hero-copy {
  max-width: 48rem;
}

.seo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
  color: var(--seo-gold-soft);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.seo-eyebrow::before {
  width: 1.6rem;
  height: 1px;
  background: var(--seo-gold);
  content: "";
}

.seo-hero h1 {
  max-width: 16ch;
  font-size: clamp(2.35rem, 6vw, 4.9rem);
  letter-spacing: -0.045em;
}

.seo-hero h1 em,
.seo-hero h1 strong {
  color: var(--seo-amethyst-bright);
  font-weight: 400;
}

.seo-hero p {
  max-width: 62ch;
  margin: 1.2rem 0 0;
  color: #d0c2da;
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  line-height: 1.85;
}

.seo-content {
  width: min(100%, var(--seo-reading-width));
  margin-inline: auto;
}

.seo-content > :where(h2) {
  margin: 3.1rem 0 1rem;
  font-size: clamp(1.55rem, 3.4vw, 2.2rem);
  letter-spacing: -0.025em;
}

.seo-content > :where(h3) {
  margin: 2.25rem 0 0.75rem;
  color: #eadcf4;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
}

.seo-content > :where(p, ul, ol, blockquote, figure, .seo-callout, .seo-meta) {
  margin-bottom: 1.4rem;
}

.seo-content p,
.seo-article p,
.seo-article li {
  color: #d0c3d8;
  font-size: clamp(0.98rem, 1.4vw, 1.055rem);
  line-height: 1.9;
  text-wrap: pretty;
}

.seo-content :where(ul, ol),
.seo-article :where(ul, ol) {
  padding-left: 1.35rem;
}

.seo-content li + li,
.seo-article li + li {
  margin-top: 0.55rem;
}

.seo-content li::marker,
.seo-article li::marker {
  color: var(--seo-gold);
}

.seo-article {
  width: min(100%, var(--seo-reading-width));
  margin-inline: auto;
}

.seo-article > :where(h2) {
  margin: 3.2rem 0 1rem;
  padding-top: 0.25rem;
  color: #f2e8f8;
  font-size: clamp(1.55rem, 3.3vw, 2.15rem);
  letter-spacing: -0.03em;
  scroll-margin-top: 2rem;
}

.seo-article > :where(h3) {
  margin: 2.1rem 0 0.65rem;
  color: #eadcf4;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
}

.seo-article > :where(p, ul, ol, blockquote, figure, table, .seo-callout) {
  margin-bottom: 1.45rem;
}

.seo-article :where(strong, b) {
  color: #f0e4f6;
  font-weight: 600;
}

.seo-article :where(hr) {
  height: 1px;
  margin: 2.8rem 0;
  border: 0;
  background: linear-gradient(90deg, var(--seo-gold), rgb(215 188 235 / 20%), transparent);
}

.seo-article :where(blockquote) {
  padding: 0.3rem 0 0.3rem 1.35rem;
  border-left: 2px solid var(--seo-gold);
  color: #e1d1eb;
  font-family: var(--seo-display);
  font-size: 1.1rem;
  line-height: 1.8;
}

.seo-article :where(table) {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  color: #d7c9e0;
  font-size: 0.91rem;
  -webkit-overflow-scrolling: touch;
}

.seo-article :where(th, td) {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--seo-rule);
  text-align: left;
  vertical-align: top;
}

.seo-article :where(th) {
  color: var(--seo-gold-soft);
  font-weight: 600;
}

.seo-callout {
  position: relative;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  border: 1px solid rgb(215 188 235 / 23%);
  border-radius: 2px 24px 2px 24px;
  background:
    radial-gradient(ellipse at 100% 0%, rgb(127 83 151 / 16%), transparent 62%),
    var(--seo-panel);
  box-shadow: inset 0 1px 0 rgb(255 245 255 / 4%);
}

.seo-callout > :first-child {
  margin-top: 0;
}

.seo-callout > :last-child {
  margin-bottom: 0;
}

.seo-callout :where(h2, h3) {
  color: var(--seo-amethyst-bright);
}

.seo-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  color: var(--seo-subtle);
  font-size: 0.8rem;
  line-height: 1.5;
}

.seo-meta > :not(:last-child)::after {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-left: 1rem;
  border-radius: 50%;
  background: var(--seo-gold);
  content: "";
  vertical-align: middle;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 2rem;
}

.seo-grid > * {
  min-width: 0;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--seo-rule);
  border-radius: 3px 22px 3px 3px;
  background:
    radial-gradient(ellipse at 100% 0%, rgb(134 85 159 / 13%), transparent 66%),
    rgb(37 23 48 / 76%);
}

.seo-grid > :nth-child(even) {
  border-radius: 22px 3px 3px 3px;
}

.seo-grid :where(h2, h3, h4) {
  margin-bottom: 0.65rem;
  color: #eddef6;
  font-size: 1.1rem;
}

.seo-grid p {
  margin-bottom: 0;
  color: var(--seo-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.seo-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
  border: 1px solid rgb(224 193 241 / 28%);
  border-radius: 42px 3px 42px 3px;
  background:
    radial-gradient(ellipse at 80% 40%, rgb(130 78 159 / 24%), transparent 50%),
    linear-gradient(120deg, rgb(43 26 56 / 96%), rgb(25 15 34 / 96%));
}

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

.seo-cta h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.seo-cta p {
  max-width: 56ch;
  margin: 0;
  color: var(--seo-muted);
  font-size: 0.95rem;
}

.seo-cta-link {
  display: inline-flex;
  min-height: 3rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid rgb(255 243 214 / 72%);
  border-radius: 999px;
  color: #2a1b32 !important;
  background: linear-gradient(110deg, #f0d9a8, #dfc0ee);
  box-shadow: 0 8px 24px rgb(12 5 18 / 26%);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.seo-cta-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.seo-footer {
  width: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
  padding: 1.6rem 0 2.4rem;
  border-top: 1px solid var(--seo-rule);
  color: var(--seo-subtle);
  font-size: 0.8rem;
}

.seo-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.seo-footer :where(p) {
  margin: 0;
}

.seo-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
}

.seo-footer-nav a {
  color: var(--seo-muted);
  text-decoration: none;
}

.seo-footer-nav a:hover {
  color: var(--seo-gold-soft);
  text-decoration: underline;
}

@media (min-width: 860px) {
  .seo-hero:has(.seo-hero-art) {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.55fr);
  }

  .seo-hero-art {
    justify-self: end;
    width: min(100%, 23rem);
  }
}

@media (max-width: 700px) {
  .seo-header,
  .seo-main,
  .seo-footer {
    width: min(100% - 2rem, 76rem);
  }

  .seo-header {
    min-height: 4.5rem;
  }

  .seo-nav {
    gap: 0.8rem;
    font-size: 0.76rem;
  }

  .seo-hero {
    min-height: auto;
    padding: clamp(1.5rem, 7vw, 2.5rem);
  }

  .seo-hero::after {
    right: -8rem;
    bottom: -14rem;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .seo-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .seo-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    padding-block: 0.75rem;
  }

  .seo-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .seo-locale {
    padding: 0.28rem 0.5rem;
  }

  .seo-main {
    padding-top: 1.5rem;
  }

  .seo-breadcrumbs {
    margin-bottom: 1.6rem;
  }

  .seo-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seo-site *,
  .seo-site *::before,
  .seo-site *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
