@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@400;700;900&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&display=swap');
@import "tailwindcss";

@theme {
  /* Mystic color palette */
  --color-mystic-ink: #08054a;
  --color-mystic-ink-50: #110a65;
  --color-mystic-ink-100: #050334;

  --color-mystic-purple-50: #f7eefa;
  --color-mystic-purple-100: #ead5f0;
  --color-mystic-purple-200: #d4aade;
  --color-mystic-purple-300: #bd80ca;
  --color-mystic-purple-400: #a56da6;
  --color-mystic-purple-500: #8a4a8b;
  --color-mystic-purple-600: #6d2577;
  --color-mystic-purple-700: #520b7e;
  --color-mystic-purple-800: #3a075c;
  --color-mystic-purple-900: #27043f;
  --color-mystic-purple-950: #160227;

  --color-mystic-blue-50: #e8e8ff;
  --color-mystic-blue-100: #c5c6ff;
  --color-mystic-blue-200: #9a9bff;
  --color-mystic-blue-300: #6769ff;
  --color-mystic-blue-400: #3e40ff;
  --color-mystic-blue-500: #1a1bff;
  --color-mystic-blue-600: #0002cc;
  --color-mystic-blue-700: #0001a8;
  --color-mystic-blue-800: #000180;
  --color-mystic-blue-900: #000160;
  --color-mystic-blue-950: #000140;

  --color-mystic-gold-50: #fffdf0;
  --color-mystic-gold-100: #fef9d3;
  --color-mystic-gold-200: #fde47a;
  --color-mystic-gold-300: #e0c050;
  --color-mystic-gold-400: #ccaa3a;
  --color-mystic-gold-500: #d4af37;
  --color-mystic-gold-600: #ccaa3a;
  --color-mystic-gold-700: #a88520;
  --color-mystic-gold-800: #7c6104;
  --color-mystic-gold-900: #5c4702;
  --color-mystic-gold-950: #3a2c01;

  --color-mystic-red-50:  #fef2f2;
  --color-mystic-red-100: #fee2e2;
  --color-mystic-red-200: #fecaca;
  --color-mystic-red-300: #f87171;
  --color-mystic-red-400: #ef4444;
  --color-mystic-red-500: #D62828;
  --color-mystic-red-600: #b91c1c;
  --color-mystic-red-700: #991b1b;
  --color-mystic-red-800: #7f1d1d;
  --color-mystic-red-900: #450a0a;
  --color-mystic-red-950: #2a0505;

  /* Fonts */
  --font-heading: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
  --font-ui: 'Montserrat', system-ui, sans-serif;
  --font-montserrat: 'Montserrat', system-ui, sans-serif;

  /* Bump small text utilities so nothing is too tiny */
  --text-xs:   0.8rem;
  --text-sm:   0.95rem;
  --text-base: 1.05rem;
  --text-lg:   1.2rem;
  --text-xl:   1.35rem;

  /* Shadows */
  --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.5);
  --shadow-purple: 0 0 30px rgba(82, 11, 126, 0.6);
  --shadow-mystic: 0 4px 60px rgba(8, 5, 74, 0.8);

  /* Animations */
  --animate-float: float 6s ease-in-out infinite;
  --animate-glow-pulse: glow-pulse 2s ease-in-out infinite;
  --animate-shimmer: shimmer 2.5s linear infinite;
  --animate-flicker: flicker 4s ease-in-out infinite;
  --animate-sacred-rotate: sacred-rotate 120s linear infinite;

  @keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
  }

  @keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 0 28px rgba(212, 175, 55, 0.8); }
  }

  @keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }

  /* Quiz-specific animations */
  @keyframes sigil-entrance {
    0%   { transform: scale(0.2) rotate(-180deg); opacity: 0; filter: blur(16px); }
    60%  { transform: scale(1.12) rotate(8deg);   opacity: 1; filter: blur(0); }
    100% { transform: scale(1)    rotate(0deg);   opacity: 1; }
  }

  @keyframes ring-expand {
    0%   { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(2.8); opacity: 0; }
  }

  @keyframes name-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
  }

  @keyframes star-fall {
    0%   { transform: translateY(-20px) rotate(0deg)   scale(1);   opacity: 1; }
    80%  { opacity: 0.6; }
    100% { transform: translateY(100vh) rotate(540deg) scale(0.4); opacity: 0; }
  }

  @keyframes reveal-fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes progress-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }

  @keyframes flicker {
    0%, 100% { opacity: 1;    filter: brightness(1); }
    30%       { opacity: 0.94; filter: brightness(0.96); }
    60%       { opacity: 0.98; filter: brightness(0.99); }
    80%       { opacity: 0.92; filter: brightness(0.95); }
  }

  @keyframes corner-glow {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 0.65; }
  }

  @keyframes portal-pulse {
    0%   { opacity: 0; transform: scale(0.2) rotate(0deg); }
    20%  { opacity: 0.75; transform: scale(0.9) rotate(12deg); }
    100% { opacity: 0; transform: scale(2.4) rotate(-8deg); }
  }

  @keyframes sacred-rotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
}

@layer base {
  html {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 16px;
    @media (min-width: 640px)  { font-size: 17px; }
    @media (min-width: 1536px) { font-size: 18px; }
    background-color: #08054a;
    background-image:
      repeating-linear-gradient(45deg,  transparent, transparent 58px, rgba(212,175,55,0.014) 58px, rgba(212,175,55,0.014) 59px),
      repeating-linear-gradient(-45deg, transparent, transparent 58px, rgba(212,175,55,0.014) 58px, rgba(212,175,55,0.014) 59px);
    color: #d9d9d9;
    scroll-behavior: smooth;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.7), 0 0 45px rgba(212,175,55,0.10);
  }

  a {
    transition: color 0.2s ease, opacity 0.2s ease;
  }

  ::selection {
    background-color: rgba(212, 175, 55, 0.3);
    color: #ffffff;
  }
}

@layer components {
  .btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #000000;
    background-color: #d4af37;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);

    &:hover {
      background-color: #d4af37;
      box-shadow: 0 0 30px rgba(212, 175, 55, 0.7);
    }
  }

  .btn-outline-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #d4af37;
    border: 1px solid #d4af37;
    transition: all 0.3s;

    &:hover {
      background-color: #d4af37;
      color: #000000;
    }
  }

  .btn-purple {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: white;
    background-color: #520b7e;
    transition: all 0.3s;

    &:hover { background-color: #6d2577; }
  }

  .card-mystic {
    position: relative;
    background-color: #110a65;
    border: 1px solid rgba(82, 11, 126, 0.3);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
    box-shadow: inset 0 0 40px rgba(8,5,74,0.55);

    &:hover {
      border-color: rgba(204, 170, 58, 0.4);
      box-shadow: 0 0 30px rgba(82, 11, 126, 0.6), inset 0 0 40px rgba(8,5,74,0.55);
    }
  }

  .section-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: #d4af37;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 28px rgba(212,175,55,0.45), 0 0 60px rgba(212,175,55,0.20), 0 2px 20px rgba(0,0,0,0.8);

    &::before { content: "✦ "; font-size: 0.52em; opacity: 0.65; vertical-align: middle; }
    &::after  { content: " ✦"; font-size: 0.52em; opacity: 0.65; vertical-align: middle; }
  }

  .section-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
  }

  .gold-divider {
    margin: 2rem 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #D4AF37, transparent);
  }

  /* Ornamental divider with centred heraldic symbol */
  .ornamental-divider {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 2.5rem auto;

    &::before, &::after {
      content: '';
      flex: 1;
      height: 1px;
    }

    &::before {
      background: linear-gradient(to right, transparent, rgba(212,175,55,0.45));
    }

    &::after {
      background: linear-gradient(to left, transparent, rgba(212,175,55,0.45));
    }

    .ornament {
      color: #D4AF37;
      opacity: 0.70;
      font-size: 0.85rem;
      letter-spacing: 0.45em;
      white-space: nowrap;
      flex-shrink: 0;
    }
  }

  /* Section vignette — deep radial glow behind content */
  .medieval-vignette {
    position: relative;

    &::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse 70% 55% at 50% 40%, rgba(82,11,126,0.14) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 20% 80%, rgba(82,11,126,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 80%, rgba(8,5,74,0.08) 0%, transparent 60%);
      pointer-events: none;
      z-index: 0;
    }

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

  /* Heraldic corner brackets for cards / panels */
  .corner-ornament {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: rgba(212,175,55,0.35);
    border-style: solid;
    animation: corner-glow 3s ease-in-out infinite;

    &.tl { top: 4px;  left: 4px;  border-width: 1px 0 0 1px; }
    &.tr { top: 4px;  right: 4px; border-width: 1px 1px 0 0; }
    &.bl { bottom: 4px; left: 4px;  border-width: 0 0 1px 1px; }
    &.br { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; }
  }

  .prose-mystic {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;

    h1, h2, h3, h4 {
      font-family: 'Cinzel', Georgia, serif;
      color: #d4af37;
      line-height: 1.3;
      letter-spacing: 0.03em;
    }

    h2 {
      font-size: 1.6rem;
      margin-top: 2.75rem;
      margin-bottom: 1rem;
      padding-bottom: 0.55rem;
      border-bottom: 1px solid rgba(212, 175, 55, 0.18);
    }

    h3 {
      font-size: 1.27rem;
      color: #e3c259;
      margin-top: 2.25rem;
      margin-bottom: 0.6rem;
    }

    h4 {
      font-size: 1.1rem;
      margin-top: 1.75rem;
      margin-bottom: 0.5rem;
    }

    /* No giant gap above the very first block */
    > :first-child { margin-top: 0; }

    p { margin-bottom: 1.4rem; }

    ul, ol { margin: 1.4rem 0 1.6rem; }

    ul {
      list-style: none;
      padding-left: 0.25rem;

      li {
        position: relative;
        padding-left: 1.5rem;
        margin-bottom: 0.6rem;

        &::before {
          content: '✦';
          position: absolute;
          left: 0;
          top: 0.05em;
          color: #d4af37;
          font-size: 0.75em;
        }
      }
    }

    ol {
      list-style: decimal;
      padding-left: 1.4rem;

      li { margin-bottom: 0.6rem; padding-left: 0.35rem; }
    }

    a {
      color: #d4af37;
      text-decoration: underline;
      text-decoration-color: rgba(212, 175, 55, 0.4);
      text-underline-offset: 3px;
      transition: text-decoration-color 0.2s;

      &:hover { text-decoration-color: #d4af37; }
    }

    strong { color: #e3c259; font-weight: 600; }

    blockquote {
      border-left: 2px solid rgba(212, 175, 55, 0.5);
      padding-left: 1.25rem;
      margin: 1.6rem 0;
      font-style: italic;
      color: rgba(255, 255, 255, 0.62);
    }
  }

  /* Justified, hyphenated body — long-form article text only */
  .prose-justify p {
    text-align: justify;
    hyphens: auto;
  }

  .nav-link {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #a56da6;
    transition: color 0.2s;

    &:hover { color: #d4af37; }
  }

  /* Navbar light theme — applied by navbar_controller when a .dobra-light
     section sits beneath the bar, so text stays legible over cream. */
  .navbar-shell.is-light {
    background-color: rgba(245, 242, 238, 0.85);
  }
  .navbar-shell.is-light .nav-link { color: #4a1d63; }
  .navbar-shell.is-light .nav-link:hover,
  .navbar-shell.is-light .nav-link.text-mystic-gold-400 { color: #7c6104; }
  .navbar-shell.is-light .navbar-logo { color: #7c6104; }
  .navbar-shell.is-light .navbar-toggle { color: #4a1d63; }

  .input-mystic {
    width: 100%;
    background-color: #110a65;
    border: 1px solid rgba(82, 11, 126, 0.5);
    color: #d9d9d9;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 0.2s;

    &::placeholder { color: #808080; }

    &:focus { border-color: #D4AF37; }
  }

  /* ── Quiz progress bar ── */
  .quiz-progress-bar {
    background-image: linear-gradient(
      90deg,
      #520b7e 0%,
      #d4af37 60%,
      #d4af37 80%,
      #d4af37 100%
    );
    background-size: 200% 100%;
    animation: progress-shimmer 2.5s linear infinite;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ── Quiz archetype reveal ── */
  .quiz-starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }

  .quiz-star {
    position: absolute;
    left: var(--x);
    top: -1.5rem;
    font-size: var(--size);
    color: #D4AF37;
    opacity: 0.7;
    animation: star-fall 6s linear var(--delay) infinite;

    &::before { content: "✦"; }
  }

  .quiz-reveal-section { position: relative; z-index: 1; }
  .quiz-reveal-body    { position: relative; z-index: 1; }

  .quiz-sigil-wrap {
    position: relative;
    display: inline-block;
  }

  .quiz-sigil-img {
    animation: sigil-entrance 1.1s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  }

  .quiz-reveal-photo {
    animation: sigil-entrance 1.1s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  }

  .quiz-ring {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.7);
    animation: ring-expand 1.4s ease-out 0.25s both;
  }

  .quiz-reveal-label {
    animation: reveal-fade-up 0.6s ease-out 0.7s both;
  }

  .archetype-name {
    background: linear-gradient(
      90deg,
      #ccaa3a 0%,
      #d4af37 20%,
      #d4af37 40%,
      #d4af37 50%,
      #d4af37 60%,
      #d4af37 80%,
      #ccaa3a 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: name-shimmer 3s linear infinite, reveal-fade-up 0.7s ease-out 1s both;
  }

  .quiz-reveal-tagline {
    animation: reveal-fade-up 0.6s ease-out 1.5s both;
    opacity: 0;
    animation-fill-mode: both;
  }

  /* Reduce motion: disable all quiz animations */
  @media (prefers-reduced-motion: reduce) {
    .quiz-star,
    .quiz-sigil-img,
    .quiz-ring,
    .quiz-reveal-label,
    .archetype-name,
    .quiz-reveal-tagline,
    .quiz-progress-bar { animation: none; }

    .archetype-name {
      background: none;
      -webkit-text-fill-color: var(--archetype-color, #D4AF37);
      color: var(--archetype-color, #D4AF37);
    }
  }

  /* ── Roadmap luminosity enhancements ── */
  .roadmap-cosmic-bg {
    position: relative;
    &::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse 55% 80% at 12% 50%, rgba(82,11,126,0.22) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 88% 50%, rgba(8,5,74,0.16) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(165,109,166,0.10) 0%, transparent 55%);
      pointer-events: none;
      z-index: 0;
    }
    > * { position: relative; z-index: 1; }
  }

  .roadmap-title-glow {
    text-shadow: 0 0 12px rgba(212,175,55,0.75), 0 0 28px rgba(212,175,55,0.38), 0 0 52px rgba(212,175,55,0.16);
  }

  .roadmap-node {
    box-shadow: 0 0 14px rgba(165,109,166,0.65), 0 0 38px rgba(165,109,166,0.30), inset 0 0 14px rgba(165,109,166,0.14);
    transition: box-shadow 0.35s ease;
  }
  .group:hover .roadmap-node {
    box-shadow: 0 0 22px rgba(212,175,55,0.65), 0 0 54px rgba(212,175,55,0.28), inset 0 0 18px rgba(212,175,55,0.12);
  }

  @keyframes roadmap-node-pulse {
    0%, 100% { box-shadow: 0 0 22px rgba(212,175,55,0.72), 0 0 58px rgba(212,175,55,0.40), 0 0 110px rgba(212,175,55,0.18), inset 0 0 22px rgba(212,175,55,0.14); }
    50%       { box-shadow: 0 0 38px rgba(212,175,55,0.98), 0 0 90px rgba(212,175,55,0.58), 0 0 155px rgba(212,175,55,0.26), inset 0 0 32px rgba(212,175,55,0.24); }
  }
  .roadmap-node-last {
    box-shadow: 0 0 24px rgba(212,175,55,0.82), 0 0 62px rgba(212,175,55,0.48), 0 0 115px rgba(212,175,55,0.20), inset 0 0 22px rgba(212,175,55,0.16);
    animation: roadmap-node-pulse 2.5s ease-in-out infinite;
  }

  .roadmap-tail {
    width: 1.5px;
    background: linear-gradient(to bottom, rgba(165,109,166,0.92), transparent);
    filter: drop-shadow(0 0 4px rgba(165,109,166,0.70));
  }
  .roadmap-tail-last {
    width: 1.5px;
    background: linear-gradient(to bottom, rgba(255,215,0,0.96), transparent);
    filter: drop-shadow(0 0 6px rgba(255,215,0,0.75));
  }

  .roadmap-dot-glow {
    box-shadow: 0 0 8px rgba(165,109,166,1), 0 0 22px rgba(165,109,166,0.58);
  }
  .roadmap-dot-glow-last {
    box-shadow: 0 0 12px rgba(212,175,55,1), 0 0 30px rgba(212,175,55,0.65), 0 0 58px rgba(212,175,55,0.25);
  }

  .roadmap-parallel-node {
    box-shadow: 0 0 8px rgba(165,109,166,0.42), 0 0 24px rgba(165,109,166,0.20);
    transition: box-shadow 0.3s ease;
  }
  .group:hover .roadmap-parallel-node {
    box-shadow: 0 0 14px rgba(212,175,55,0.52), 0 0 34px rgba(212,175,55,0.22);
  }

  @media (prefers-reduced-motion: reduce) {
    .roadmap-node-last { animation: none; }
    .roadmap-traveler  { display: none; }
  }

  /* ── Brand system: alternating dark/light dobras ── */
  .dobra-dark {
    position: relative;
    background-color: #050334;
    overflow: hidden;

    &::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(214,40,40,0.05) 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 15% 65%, rgba(82,11,126,0.14) 0%, transparent 55%),
        radial-gradient(ellipse 55% 45% at 85% 35%, rgba(0,1,168,0.10) 0%, transparent 50%);
      pointer-events: none;
      z-index: 0;
    }
  }

  .dobra-light {
    background-color: #f5f2ee;
    color: #08054a;

    h1, h2, h3, h4, h5, h6 {
      text-shadow: none;
      color: #08054a;
    }

    p { color: rgba(8, 5, 74, 0.70); }
  }

  /* White outlined button — for use on dark/colored backgrounds */
  .btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2.5rem;
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    font-kerning: none;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "clig" 0, "calt" 0, "kern" 0;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: transparent;
    transition: all 0.3s ease;

    &:hover {
      background: white;
      border-color: white;
      color: #08054a;
    }
  }

  /* Brand gradient button */
  .btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2.5rem;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: white;
    background: linear-gradient(to right, #D62828, #520b7e, #0001a8);
    transition: all 0.4s;
    box-shadow: 0 0 24px rgba(82,11,126,0.35);

    &:hover {
      box-shadow: 0 0 44px rgba(82,11,126,0.65), 0 0 20px rgba(214,40,40,0.35);
      transform: translateY(-1px);
      color: white;
    }
  }

  /* Dark CTA button for light sections */
  .btn-dark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2.5rem;
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    font-kerning: none;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "clig" 0, "calt" 0, "kern" 0;
    color: white;
    background-color: #08054a;
    border: 1px solid rgba(82,11,126,0.4);
    transition: all 0.4s;

    &:hover {
      background: linear-gradient(to right, #D62828, #520b7e, #0001a8);
      border-color: transparent;
      box-shadow: 0 0 32px rgba(82,11,126,0.5);
      transform: translateY(-1px);
    }
  }

  /* Frequency cards — translucent glassmorphism */
  .freq-card {
    padding: 2.5rem 1.5rem;
    background: rgba(8, 5, 74, 0.45);
    border: 1px solid rgba(82, 11, 126, 0.22);
    backdrop-filter: blur(8px);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;

    &::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse 80% 70% at 50% 20%, rgba(82,11,126,0.12) 0%, transparent 65%);
      pointer-events: none;
    }

    &:hover {
      transform: translateY(-6px);
      border-color: rgba(214, 40, 40, 0.55);
      box-shadow: 0 8px 48px rgba(214, 40, 40, 0.30), 0 0 0 1px rgba(214,40,40,0.18);
    }
  }

  .freq-card--banner {
    padding: 1.25rem 1rem;
  }

  /* Cinematic experience banners */
  .exp-banner {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 3 / 4;
    background: #050334;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.7s ease;
    }

    &::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(5,3,52,0.92) 0%, rgba(5,3,52,0.45) 50%, rgba(5,3,52,0.10) 100%);
      transition: opacity 0.4s;
      z-index: 1;
    }

    .exp-banner-content {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 2rem 1.5rem;
      z-index: 2;
    }

    &:hover {
      img { transform: scale(1.06); }
      box-shadow: 0 0 50px rgba(82,11,126,0.45);
    }
  }

  /* Product carousel */
  .product-carousel {
    scrollbar-width: none;
    padding-block: 1.5rem;
    padding-inline: 1rem;
    &::-webkit-scrollbar { display: none; }

    @media (min-width: 768px) {
      padding-block: 2.5rem;
      padding-inline: 2.5rem;
    }
  }

  /* ~1.4 cards on mobile, scaling up to 5 on large screens */
  .product-carousel-item {
    flex: 0 0 70%;

    @media (min-width: 640px) {
      flex-basis: calc((100% - 1 * 1.25rem) / 2);
    }
    @media (min-width: 768px) {
      flex-basis: calc((100% - 2 * 1.25rem) / 3);
    }
    @media (min-width: 1024px) {
      flex-basis: calc((100% - 4 * 1.25rem) / 5);
    }
  }

  @keyframes card-heartbeat {
    0%   { box-shadow: 0 0 5px rgba(214,40,40,0.25),  0 0 14px rgba(214,40,40,0.12); }
    8%   { box-shadow: 0 0 20px rgba(214,40,40,1.0),  0 0 40px rgba(214,40,40,0.75); }
    18%  { box-shadow: 0 0 8px rgba(148,26,100,0.45), 0 0 20px rgba(148,26,100,0.25); }
    28%  { box-shadow: 0 0 16px rgba(82,11,126,0.9),  0 0 34px rgba(82,11,126,0.60); }
    42%  { box-shadow: 0 0 5px rgba(0,1,168,0.25),    0 0 14px rgba(0,1,168,0.12); }
    100% { box-shadow: 0 0 5px rgba(0,1,168,0.25),    0 0 14px rgba(0,1,168,0.12); }
  }

  .exp-banner--sm {
    aspect-ratio: 7 / 9;
    background: #050334;

    &::after { display: none; }

    img { object-fit: contain; }

    &:hover {
      animation: card-heartbeat 2.2s ease-in-out infinite;
    }
  }

  /* Large social media blocks */
  .social-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 3rem 2rem;
    border: 1px solid rgba(82, 11, 126, 0.20);
    background: rgba(8, 5, 74, 0.30);
    backdrop-filter: blur(4px);
    transition: all 0.4s ease;
    text-decoration: none;
    color: white;

    &:hover {
      transform: translateY(-5px);
      border-color: rgba(82, 11, 126, 0.55);
      box-shadow: 0 12px 52px rgba(82, 11, 126, 0.30);
      color: white;
    }
  }

  .font-cinzel {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
  }

  /* Brand gradient divider line */
  .brand-divider {
    height: 1px;
    border: none;
    background: linear-gradient(to right, transparent, #D62828 20%, #520b7e 50%, #0001a8 80%, transparent);
    opacity: 0.6;
  }

  /* Section title for light sections */
  .section-title-dark {
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: #08054a;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-shadow: none;
  }

  /* ── Hero Carousel ── */
  [data-carousel-target="slide"] {
    transition: opacity 0.9s ease-in-out, transform 1s ease-in-out;
  }

  [data-carousel-target="slide"][data-active="false"] {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.03);
  }

  [data-carousel-target="slide"][data-active="true"] {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  .carousel-dot {
    transition: all 0.35s ease;
    line-height: 1;
  }

  .carousel-dot--active {
    color: #D4AF37 !important;
    text-shadow: 0 0 14px rgba(212,175,55,0.95), 0 0 32px rgba(212,175,55,0.55);
    transform: scale(1.5);
  }

  .carousel-portal--pulse {
    animation: portal-pulse 1.2s ease-out forwards;
  }

  @media (prefers-reduced-motion: reduce) {
    [data-carousel-target="slide"] { transition: none; }
    .carousel-portal--pulse { animation: none; }
  }
}

/* ── Home hero ── */
.hero-brand-overlay {
  background: linear-gradient(
    to right,
    rgba(214,40,40,1.0) 0%,
    rgba(147,26,102,0.98) 8%,
    rgba(82,11,126,0.96) 16%,
    rgba(41,6,142,1.0) 22%,
    rgba(0,1,168,1.0) 30%,
    rgba(0,1,168,0.5) 38%,
    rgba(0,1,168,0.1) 46%,
    transparent 50%
  );
}

.hero-depth-glows {
  background:
    radial-gradient(ellipse 55% 50% at 18% 55%, rgba(214,40,40,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 55% at 42% 40%, rgba(82,11,126,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 72% 65%, rgba(0,1,168,0.14) 0%, transparent 55%);
}

.hero-portrait {
  mix-blend-mode: screen;
  max-height: 52vh;
  flex-shrink: 0;
  filter:
    drop-shadow(0 0 25px rgba(139,92,246,0.55))
    drop-shadow(0 0 60px rgba(82,11,126,0.40))
    drop-shadow(0 0 100px rgba(139,92,246,0.20));

  /* Short laptop viewports (e.g. 1366×768): shrink the portrait so the
     caption + CTA stacked below it stay within the fold. */
  @media (max-height: 820px) { max-height: 44vh; }
}

.hero-caption {
  text-shadow:
    0 0 60px rgba(214,40,40,0.20),
    0 0 120px rgba(82,11,126,0.25),
    0 4px 30px rgba(0,0,0,0.85);
}

/* ── Frequency cards ── */
.freq-icon-purple { text-shadow: 0 0 20px rgba(165,109,166,0.8); }
.freq-icon-red    { text-shadow: 0 0 20px rgba(214,40,40,0.7); }
.freq-icon-blue   { text-shadow: 0 0 20px rgba(103,105,255,0.8); }
.freq-icon-teal   { color: #5fb8a0; text-shadow: 0 0 20px rgba(95,184,160,0.7); }
.freq-icon-gold   { text-shadow: 0 0 20px rgba(212,175,55,0.8); }

.freq-line-purple { background: linear-gradient(to right, transparent, rgba(165,109,166,0.6), transparent); }
.freq-line-red    { background: linear-gradient(to right, transparent, rgba(214,40,40,0.6), transparent); }
.freq-line-blue   { background: linear-gradient(to right, transparent, rgba(103,105,255,0.6), transparent); }
.freq-line-teal   { background: linear-gradient(to right, transparent, rgba(95,184,160,0.6), transparent); }
.freq-line-gold   { background: linear-gradient(to right, transparent, rgba(212,175,55,0.5), transparent); }

/* ── Quiz featured panel ── */
.quiz-featured-panel {
  background: rgba(8,5,74,0.55);
  border: 1px solid rgba(82,11,126,0.28);
  backdrop-filter: blur(8px);
}

.quiz-featured-title {
  text-shadow: 0 0 40px rgba(212,175,55,0.2);
}

/* ── Product cards ── */
.product-placeholder-bg {
  background: linear-gradient(135deg, #08054a 0%, #520b7e 50%, #0001a8 100%);
}

.product-title-shadow {
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

/* ── About portrait ── */
.portrait-shadow {
  box-shadow: 0 20px 80px rgba(82,11,126,0.15);
}

.portrait-placeholder {
  background: linear-gradient(135deg, #f5f2ee 0%, #ead5f0 100%);
  box-shadow: 0 20px 80px rgba(82,11,126,0.10);
}

/* ── Utility: bare gold gradient line (no margins) ── */
.gold-line {
  background: linear-gradient(to right, transparent, #D4AF37, transparent);
}

/* ── Language toggle — outside @layer so body selector has full specificity ── */
body:not(.lang-en) [data-lang="en"] { display: none !important; }
body.lang-en [data-lang="pt"] { display: none !important; }

/* ── Article body spacing (Action Text) ──────────────────────────────────────
   Action Text ships an UNLAYERED reset (`.trix-content * { margin:0; padding:0 }`)
   that beats the layered .prose-mystic rules regardless of specificity. These
   overrides are intentionally unlayered + higher-specificity so heading spacing
   and list indentation actually take effect on rendered posts. */
.prose-mystic .trix-content > :first-child { margin-top: 0; }
.prose-mystic .trix-content p { margin: 0 0 1.4rem; }
.prose-mystic .trix-content h2 { margin: 3rem 0 1.5rem; padding-bottom: 0.7rem; }
.prose-mystic .trix-content h3 { margin: 2.5rem 0 0.85rem; }
.prose-mystic .trix-content h4 { margin: 2rem 0 0.5rem; }
.prose-mystic .trix-content ul,
.prose-mystic .trix-content ol { margin: 1.5rem 0; }
.prose-mystic .trix-content ul { padding-left: 0; }
.prose-mystic .trix-content ul li { padding-left: 1.7rem; margin: 0 0 0.6rem; }
.prose-mystic .trix-content ol { padding-left: 1.6rem; }
.prose-mystic .trix-content ol li { margin: 0 0 0.6rem; padding-left: 0.35rem; }
.prose-mystic .trix-content blockquote { margin: 1.6rem 0; padding-left: 1.25rem; }

/* ── Pagy pagination ── */
nav.pagy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

nav.pagy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.65rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(8, 5, 74, 0.45);
  transition: all 0.2s ease;
  text-decoration: none;

  &:hover {
    color: #d4af37;
    border-color: rgba(212, 175, 55, 0.55);
    background: rgba(212, 175, 55, 0.08);
  }
}

nav.pagy a.current {
  color: #d4af37;
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(212, 175, 55, 0.10);
  cursor: default;
}

nav.pagy a.gap {
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.30);
  cursor: default;
  min-width: auto;
  padding: 0 0.25rem;
}
