/* ============================================================================
   ANA'S EMBER — LUMINOUS CRAFT WELCOME MODAL, TRUST CHIPS & HOME SPOTLIGHT
   Obsidian & Warm Candlelit Ember Gold Motif with Gentle Living Glows
   ============================================================================ */

/* --- 1. Quiet Editorial Trust Line (Threshold Table & A Forgotten Verse) --- */
.ae-craft-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.42rem 0.72rem;
  margin: 0.95rem auto 0.55rem;
  max-width: 860px;
}

.ae-craft-item {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  color: rgba(243, 224, 184, 0.88);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.ae-craft-sep {
  color: rgba(232, 168, 73, 0.42);
  font-size: 0.82rem;
  user-select: none;
}

.ae-craft-chip-star {
  color: #f0b956;
  font-size: 0.78rem;
  text-shadow: 0 0 10px rgba(240, 185, 86, 0.75);
  animation: aeStarSoftGlow 4.2s ease-in-out infinite;
}

.ae-craft-item:nth-of-type(2) .ae-craft-chip-star {
  animation-delay: -1.4s;
}

.ae-craft-item:nth-of-type(3) .ae-craft-chip-star {
  animation-delay: -2.8s;
}

@keyframes aeStarSoftGlow {
  0%, 100% {
    opacity: 0.74;
    text-shadow: 0 0 8px rgba(240, 185, 86, 0.52);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 14px rgba(248, 206, 114, 0.92);
  }
}

/* Single Glowing Reopen Pill */
.ae-how-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border-radius: 999px;
  padding: 0.34rem 0.92rem;
  border: 1px solid rgba(232, 168, 73, 0.48);
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 165, 60, 0.22), transparent 74%),
    rgba(16, 12, 20, 0.86);
  backdrop-filter: blur(10px);
  color: #f6dba0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(232, 154, 54, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  animation: aeHowPillBreathe 4.6s ease-in-out infinite;
}

.ae-how-pill:hover {
  transform: translateY(-1px);
  border-color: #f8d486;
  color: #fff6de;
  box-shadow: 0 0 24px rgba(232, 162, 56, 0.42);
}

@keyframes aeHowPillBreathe {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42), 0 0 12px rgba(232, 152, 54, 0.14);
    border-color: rgba(232, 168, 73, 0.42);
  }
  50% {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.48), 0 0 22px rgba(232, 158, 56, 0.3);
    border-color: rgba(246, 198, 102, 0.68);
  }
}

/* Contextual Whisper Note (Shuffle Table & Forgotten Verse Setup) */
.ae-craft-whisper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.65rem auto 0.85rem;
  padding: 0.55rem 1rem;
  max-width: 700px;
  border-radius: 10px;
  border: 1px solid rgba(232, 168, 73, 0.28);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232, 152, 54, 0.14), transparent 72%),
    rgba(16, 12, 22, 0.68);
  color: #ebd8b4;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.04rem;
  line-height: 1.45;
  text-align: center;
  box-shadow: inset 0 0 22px rgba(232, 152, 54, 0.06);
}

.ae-craft-whisper-icon {
  color: #f0b956;
  flex-shrink: 0;
  text-shadow: 0 0 10px rgba(240, 185, 86, 0.7);
}

.ae-craft-whisper-link {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.25rem;
  color: #f6cb78;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ae-craft-whisper-link:hover {
  color: #fff2ce;
}

/* --- 2. Luminous Welcome & Craft Modal Overlay --- */
.ae-welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.35rem 1rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

.ae-welcome-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ae-welcome-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 34%, rgba(236, 154, 48, 0.16) 0%, rgba(16, 11, 20, 0.92) 56%),
    rgba(6, 5, 10, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.ae-welcome-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  margin: auto;
  padding: clamp(1.65rem, 3.6vw, 2.5rem) clamp(1.35rem, 3.8vw, 2.6rem);
  border-radius: 16px;
  border: 1px solid rgba(232, 174, 82, 0.56);
  background:
    radial-gradient(ellipse 85% 42% at 50% 0%, rgba(242, 166, 62, 0.2) 0%, transparent 66%),
    radial-gradient(ellipse 70% 45% at 50% 100%, rgba(212, 146, 58, 0.1) 0%, transparent 70%),
    linear-gradient(165deg, rgba(20, 15, 25, 0.97) 0%, rgba(12, 10, 16, 0.98) 100%);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.88),
    0 0 58px rgba(232, 152, 54, 0.2),
    inset 0 0 42px rgba(232, 152, 54, 0.08);
  color: #f3e6cc;
  overflow: hidden;
  transform: translateY(16px) scale(0.975);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  animation: aeModalAuraBreathe 5.4s ease-in-out infinite;
}

.ae-welcome-modal.is-open .ae-welcome-card {
  transform: translateY(0) scale(1);
}

.ae-welcome-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 11px;
  border: 1px solid rgba(232, 180, 92, 0.18);
  pointer-events: none;
}

@keyframes aeModalAuraBreathe {
  0%, 100% {
    box-shadow:
      0 32px 90px rgba(0, 0, 0, 0.88),
      0 0 48px rgba(232, 152, 54, 0.17),
      inset 0 0 36px rgba(232, 152, 54, 0.06);
  }
  50% {
    box-shadow:
      0 32px 90px rgba(0, 0, 0, 0.88),
      0 0 72px rgba(242, 168, 62, 0.3),
      inset 0 0 52px rgba(242, 168, 62, 0.12);
  }
}

/* Soft Rising Ember Motes Inside Modal Header */
.ae-welcome-embers {
  position: absolute;
  inset: 0 0 auto 0;
  height: 150px;
  pointer-events: none;
  overflow: hidden;
}

.ae-welcome-ember {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3c8 0%, #f0a83e 55%, transparent 100%);
  box-shadow: 0 0 10px rgba(244, 178, 72, 0.85);
  opacity: 0;
  animation: aeSparkRise 5.2s ease-in infinite;
}

.ae-welcome-ember:nth-child(1) { left: 16%; animation-delay: 0s; animation-duration: 5.4s; }
.ae-welcome-ember:nth-child(2) { left: 34%; animation-delay: -1.4s; animation-duration: 4.6s; width: 3px; height: 3px; }
.ae-welcome-ember:nth-child(3) { left: 52%; animation-delay: -2.8s; animation-duration: 5.8s; }
.ae-welcome-ember:nth-child(4) { left: 71%; animation-delay: -0.9s; animation-duration: 4.9s; width: 3px; height: 3px; }
.ae-welcome-ember:nth-child(5) { left: 84%; animation-delay: -3.6s; animation-duration: 5.2s; }

@keyframes aeSparkRise {
  0% { transform: translate3d(0, 0, 0) scale(0.7); opacity: 0; }
  20% { opacity: 0.85; }
  80% { opacity: 0.45; }
  100% { transform: translate3d(14px, -135px, 0) scale(1.25); opacity: 0; }
}

.ae-welcome-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(232, 176, 86, 0.42);
  background: rgba(16, 12, 22, 0.88);
  color: #f2d497;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ae-welcome-close:hover {
  transform: scale(1.07);
  border-color: #f8d892;
  background: rgba(34, 24, 38, 0.96);
}

.ae-welcome-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 1.25rem;
}

.ae-welcome-eyebrow {
  margin: 0 0 0.35rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e8b04e;
  text-shadow: 0 0 14px rgba(232, 176, 78, 0.45);
}

.ae-welcome-title {
  margin: 0 0 0.35rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.85rem, 3.6vw, 2.45rem);
  font-weight: 600;
  line-height: 1.12;
  color: #faf0d7;
}

.ae-welcome-tagline {
  margin: 0 0 0.85rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.16rem;
  color: #f2c672;
}

.ae-welcome-intro {
  margin: 0 auto;
  max-width: 600px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(242, 232, 212, 0.88);
}

.ae-welcome-intro strong {
  color: #f8dca0;
  font-weight: 600;
}

/* Three Illuminated Craft Pillars */
.ae-welcome-pillars {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.85rem;
  margin: 1.3rem 0 1.45rem;
}

.ae-welcome-pillar {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 0.95rem;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 172, 80, 0.24);
  background:
    radial-gradient(circle at 0% 50%, rgba(236, 160, 56, 0.13), transparent 58%),
    rgba(255, 255, 255, 0.025);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.ae-welcome-modal.is-open .ae-welcome-pillar {
  opacity: 1;
  transform: translateY(0);
}

.ae-welcome-modal.is-open .ae-welcome-pillar:nth-child(1) { transition-delay: 0.08s; }
.ae-welcome-modal.is-open .ae-welcome-pillar:nth-child(2) { transition-delay: 0.16s; }
.ae-welcome-modal.is-open .ae-welcome-pillar:nth-child(3) { transition-delay: 0.24s; }

.ae-welcome-pillar.is-highlighted {
  border-color: rgba(248, 206, 118, 0.82);
  box-shadow: 0 0 26px rgba(242, 168, 62, 0.28), inset 0 0 18px rgba(242, 168, 62, 0.1);
}

.ae-pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(240, 184, 86, 0.5);
  background: radial-gradient(circle at 50% 35%, rgba(244, 178, 72, 0.28), rgba(18, 13, 24, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8d488;
  box-shadow: 0 0 18px rgba(238, 162, 56, 0.26);
  flex-shrink: 0;
}

.ae-pillar-title {
  margin: 0 0 0.22rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.24rem;
  font-weight: 600;
  color: #f6d592;
}

.ae-pillar-body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  line-height: 1.58;
  color: rgba(238, 228, 210, 0.86);
}

.ae-welcome-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.72rem;
  text-align: center;
}

.ae-welcome-signoff {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #e6cfa2;
}

.ae-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.ae-welcome-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 224, 152, 0.78);
  background: linear-gradient(135deg, #d89638 0%, #f0c264 52%, #d48c2e 100%);
  color: #16100a;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.56),
    0 0 28px rgba(238, 168, 58, 0.42);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.ae-welcome-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 250, 232, 0.48) 50%, transparent 80%);
  transform: translateX(-140%);
  animation: aeGoldSheen 4.4s ease-in-out infinite;
  pointer-events: none;
}

.ae-welcome-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.65),
    0 0 38px rgba(246, 184, 72, 0.62);
}

@keyframes aeGoldSheen {
  0%, 62% { transform: translateX(-140%); }
  100% { transform: translateX(140%); }
}

.ae-welcome-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.74rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 174, 82, 0.45);
  background: rgba(20, 15, 26, 0.85);
  color: #f3d79d;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ae-welcome-secondary:hover {
  border-color: #f8d892;
  background: rgba(34, 24, 40, 0.95);
  color: #fff4d8;
}

/* --- 3. Homepage Luminous Craft Spotlight Card (index.html) --- */
.ae-home-craft-wrap {
  max-width: 1120px;
  margin: 0.25rem auto 2.35rem;
  padding: 0 1.5rem;
}

.ae-home-craft-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.2rem) clamp(1.4rem, 3.4vw, 2.5rem);
  border-radius: 12px;
  border: 1px solid rgba(232, 170, 76, 0.46);
  background:
    radial-gradient(ellipse 68% 72% at 15% 15%, rgba(238, 156, 52, 0.16), transparent 62%),
    radial-gradient(ellipse 60% 70% at 88% 85%, rgba(212, 146, 58, 0.12), transparent 64%),
    linear-gradient(135deg, rgba(16, 13, 21, 0.9) 0%, rgba(22, 16, 18, 0.88) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.64),
    0 0 38px rgba(232, 152, 54, 0.14),
    inset 0 0 34px rgba(232, 152, 54, 0.06);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  align-items: center;
  gap: 1.8rem;
  animation: aeModalAuraBreathe 6s ease-in-out infinite;
}

.ae-home-craft-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 8px;
  border: 1px solid rgba(232, 176, 86, 0.15);
  pointer-events: none;
}

.ae-home-craft-copy {
  position: relative;
  z-index: 2;
}

.ae-home-craft-eyebrow {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ecae4e;
}

.ae-home-craft-title {
  margin: 0 0 0.55rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.65rem, 2.8vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
  color: #faf0d8;
}

.ae-home-craft-desc {
  margin: 0 0 1.15rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.62;
  color: rgba(240, 230, 210, 0.86);
}

.ae-home-craft-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.ae-home-craft-badges {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.7rem;
}

.ae-home-mini-badge {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.78rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(232, 170, 76, 0.24);
  background: rgba(14, 11, 18, 0.62);
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.ae-home-mini-badge:hover {
  transform: translateX(4px);
  border-color: rgba(246, 198, 108, 0.65);
  box-shadow: 0 0 20px rgba(236, 158, 54, 0.2);
}

.ae-home-mini-star {
  color: #f0b956;
  font-size: 0.95rem;
  line-height: 1.3;
  text-shadow: 0 0 10px rgba(240, 185, 86, 0.65);
}

.ae-home-mini-badge strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.12rem;
  color: #f6d796;
  margin-bottom: 0.1rem;
}

.ae-home-mini-badge span {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(234, 224, 206, 0.8);
}

@media (max-width: 860px) {
  .ae-home-craft-card {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }
}

@media (max-width: 600px) {
  .ae-welcome-modal {
    align-items: flex-start;
    padding: 0.9rem 0.75rem 1.8rem;
  }

  .ae-welcome-pillar {
    grid-template-columns: 38px 1fr;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
  }

  .ae-pillar-icon {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ae-craft-chip,
  .ae-welcome-card,
  .ae-welcome-ember,
  .ae-welcome-cta::after,
  .ae-home-craft-card {
    animation: none !important;
  }
}
