/* Divine Karma Atlas - shared styles for both sites.
   Adapted from the atlas-site Next.js app into a static, no-build stylesheet.
   Uses two accent tokens injected by the parent site theme:
     --atlas-accent      (institute gold #c9a96a  /  divine-karma gold #b8a063)
     --atlas-accent-soft (paler variant used for emphasis text)
   Everything else is scoped so it doesn't collide with the parent site chrome. */

.atlas-shell {
  --night: #090f22;
  --navy: #111a34;
  --navy-soft: #182344;
  --purple: #501a6d;
  --purple-light: #8d65ad;
  --parchment: #f6f1e7;
  --ink: #25212c;
  --muted: #aeb4c8;
  --line: rgba(202,161,83,.34);

  min-height: 100vh;
  overflow: hidden;
  color: #f8f5ef;
  font-family: "Avenir Next", Avenir, "Inter", "Nunito", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 74% 13%, rgba(103,56,133,.28), transparent 26rem),
    radial-gradient(circle at 12% 42%, rgba(57,78,131,.22), transparent 34rem),
    var(--night);
}
.atlas-shell * { box-sizing: border-box; }
.atlas-shell button, .atlas-shell input { font: inherit; }
.atlas-shell button, .atlas-shell a { -webkit-tap-highlight-color: transparent; }
.atlas-shell button:focus-visible,
.atlas-shell a:focus-visible,
.atlas-shell input:focus-visible {
  outline: 3px solid #f3cd75;
  outline-offset: 4px;
}

.atlas-hero {
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(50px, 6vw, 90px) clamp(20px, 6vw, 80px) 60px;
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(520px, 1.22fr);
  align-items: center;
  gap: clamp(30px, 5vw, 72px);
  position: relative;
}
.atlas-hero::before {
  content: "";
  position: absolute; inset: 0;
  opacity: .3; pointer-events: none;
  background-image:
    radial-gradient(circle at 7% 13%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 31% 73%, #d6c386 0 1px, transparent 1.6px),
    radial-gradient(circle at 62% 24%, #fff 0 .8px, transparent 1.4px),
    radial-gradient(circle at 88% 68%, #a7b7e0 0 1px, transparent 1.5px);
  background-size: 170px 170px, 230px 230px, 120px 120px, 280px 280px;
}
.atlas-copy, .atlas-map, .atlas-list { position: relative; z-index: 2; }
.atlas-shell .eyebrow {
  color: var(--atlas-accent);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 700;
  font-size: .72rem;
  margin: 0 0 14px;
}
.atlas-shell h1, .atlas-shell h2, .atlas-shell h3 {
  font-family: Baskerville, "Cormorant Garamond", Georgia, serif;
  margin-top: 0;
  color: inherit;
}
.atlas-hero h1 {
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.04em;
  margin-bottom: 22px;
  max-width: 680px;
  color: #fff;
}
.atlas-lede {
  color: #c9cedd;
  font-family: Baskerville, "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.6;
  max-width: 560px;
}

.search-wrap { max-width: 560px; margin-top: 34px; position: relative; }
.search-wrap > label {
  display: block; margin-bottom: 9px; color: #f1e4c6;
  font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
}
.search-field {
  height: 55px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.07); border-radius: 12px;
  display: flex; align-items: center; gap: 11px; padding: 0 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.search-field .glyph { color: var(--atlas-accent); font-size: 1.4rem; transform: rotate(-20deg); }
.search-field input { flex: 1; min-width: 0; color: #fff; background: transparent; border: 0; outline: 0; }
.search-field input::placeholder { color: #8991aa; }
.search-field button { border: 0; background: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  border-radius: 12px; overflow: hidden;
  background: #161e39; border: 1px solid var(--line);
  box-shadow: 0 25px 70px rgba(0,0,0,.5); z-index: 30; max-height: 320px; overflow-y: auto;
}
.search-results button {
  width: 100%; border: 0; border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff; background: transparent; text-align: left; padding: 12px 15px; cursor: pointer;
  display: flex; justify-content: space-between; gap: 20px;
}
.search-results button:hover { background: rgba(201,160,82,.12); }
.search-results small { color: #9199b3; }
.map-note { margin-top: 26px; color: #8e96ad; font-size: .85rem; font-style: italic; }

.atlas-map {
  width: min(680px, 48vw);
  aspect-ratio: 1;
  justify-self: center;
  position: relative;
  border-radius: 50%;
  border: 1px solid rgba(202,161,83,.18);
  background:
    radial-gradient(circle, rgba(92,42,117,.38) 0 14%, transparent 35%),
    radial-gradient(circle, rgba(255,255,255,.035) 0 1px, transparent 1.5px);
  background-size: auto, 44px 44px;
  box-shadow: inset 0 0 120px rgba(99,60,132,.12), 0 0 100px rgba(47,70,128,.12);
}
.orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(202,161,83,.19); left: 50%; top: 50%; transform: translate(-50%,-50%); }
.orbit-one { width: 67%; height: 67%; }
.orbit-two { width: 91%; height: 91%; border-color: rgba(124,145,201,.14); }
.constellation {
  position: absolute; inset: 20%;
  background:
    linear-gradient(45deg, transparent 49.8%, rgba(202,161,83,.11) 50%, transparent 50.2%),
    linear-gradient(-45deg, transparent 49.8%, rgba(202,161,83,.11) 50%, transparent 50.2%);
  border-radius: 50%;
}
.map-nodes { position: absolute; inset: 0; }
.realm-node, .center-node {
  position: absolute; transform: translate(-50%,-50%); color: #fff; cursor: pointer;
}
.realm-node {
  width: 140px; min-height: 66px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: rgba(20,29,55,.93);
  border: 1px solid color-mix(in srgb, var(--realm-color), transparent 38%);
  border-radius: 13px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.realm-node:hover, .realm-node.active {
  transform: translate(-50%,-50%) scale(1.07);
  background: color-mix(in srgb, var(--realm-color) 20%, #111a34);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--realm-color), transparent 50%), 0 16px 42px rgba(0,0,0,.34);
}
.realm-node strong { font-size: .78rem; line-height: 1.15; }
.node-mark { color: var(--realm-color); font-size: .62rem; letter-spacing: .12em; font-weight: 700; }
.pos-0 { top: 7%; left: 50%; }
.pos-1 { top: 20%; left: 78%; }
.pos-2 { top: 50%; left: 93%; }
.pos-3 { top: 79%; left: 78%; }
.pos-4 { top: 93%; left: 50%; }
.pos-5 { top: 79%; left: 22%; }
.pos-6 { top: 50%; left: 7%; }
.pos-7 { top: 20%; left: 22%; }
.center-node {
  left: 50%; top: 50%;
  width: 180px; aspect-ratio: 1;
  border: 1px solid var(--atlas-accent);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6f2c8c, #36124e 72%);
  box-shadow: 0 0 0 12px rgba(201,160,82,.05), 0 0 70px rgba(103,49,132,.42);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .3s ease;
}
.center-node:hover { transform: translate(-50%,-50%) scale(1.045); }
.center-node span { font-family: Baskerville, "Cormorant Garamond", Georgia, serif; font-size: 1rem; }
.center-node strong { font-family: Baskerville, "Cormorant Garamond", Georgia, serif; font-size: 1.3rem; color: var(--atlas-accent-soft); }
.center-node small { margin-top: 8px; text-transform: uppercase; letter-spacing: .16em; color: #cab9d5; font-size: .58rem; }

.atlas-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atlas-list button {
  --realm-color: #fff;
  border: 1px solid color-mix(in srgb, var(--realm-color), transparent 50%);
  color: #fff; background: rgba(255,255,255,.04); border-radius: 12px; padding: 15px; cursor: pointer;
  display: flex; gap: 12px; text-align: left;
}
.atlas-list button.active { background: color-mix(in srgb, var(--realm-color) 18%, #111a34); }
.atlas-list span { color: var(--realm-color); font-size: .72rem; }
.atlas-list strong, .atlas-list small { display: block; }
.atlas-list small { color: #9ca4bd; margin-top: 5px; line-height: 1.35; }

.toggle-view {
  color: var(--atlas-accent-soft); background: transparent; border: 0;
  border-bottom: 1px solid var(--atlas-accent);
  padding: 6px 0; cursor: pointer; font-size: .82rem; letter-spacing: .07em;
  margin-top: 22px;
}

.realm-detail {
  max-width: 1380px;
  margin: 0 auto 80px;
  padding: 50px clamp(22px, 5vw, 68px) 60px;
  border: 1px solid color-mix(in srgb, var(--realm-color), transparent 72%);
  border-radius: 28px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--realm-color) 9%, transparent), transparent 55%),
    rgba(255,255,255,.035);
}
.realm-heading { display: flex; justify-content: space-between; gap: 40px; align-items: end; margin-bottom: 32px; flex-wrap: wrap; }
.realm-heading h2 { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: 0; color: #fff; }
.realm-heading > p { max-width: 380px; color: #bdc3d4; font-family: Baskerville, Georgia, serif; font-size: 1.15rem; line-height: 1.45; margin: 0; }
.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.concept-card {
  min-height: 280px; border: 1px solid rgba(255,255,255,.11); border-radius: 18px;
  background: rgba(7,12,27,.52); color: #fff; text-align: left; padding: 24px; cursor: pointer;
  display: flex; flex-direction: column; transition: transform .25s ease, border-color .25s ease;
}
.concept-card:hover { transform: translateY(-5px); border-color: var(--realm-color); }
.concept-card > span { color: var(--realm-color); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.concept-card h3 { font-size: 1.55rem; margin: 30px 0 10px; color: #fff; }
.concept-card p { color: #bdc2d1; line-height: 1.55; margin: 0; }
.concept-card small { margin-top: auto; padding-top: 22px; color: #7e879f; }

.guided-paths, .illustrations {
  max-width: 1380px;
  margin: 0 auto;
  padding: 80px clamp(22px, 5vw, 68px);
}
.section-intro { max-width: 720px; margin-bottom: 40px; }
.section-intro h2 { font-size: clamp(2.2rem, 3.8vw, 3.8rem); margin-bottom: 12px; color: #fff; }
.section-intro > p:last-child { color: #aab1c4; font-family: Baskerville, Georgia, serif; font-size: 1.15rem; line-height: 1.55; }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.path-grid > button {
  min-height: 250px; padding: 26px; border-radius: 18px; border: 1px solid rgba(201,160,82,.28);
  color: #fff; background: linear-gradient(145deg, rgba(94,39,121,.3), rgba(255,255,255,.025));
  text-align: left; cursor: pointer;
}
.path-grid > button:hover, .path-grid > button.active {
  border-color: var(--atlas-accent);
  background: linear-gradient(145deg, rgba(111,48,139,.52), rgba(201,160,82,.09));
}
.path-grid span { color: var(--atlas-accent); text-transform: uppercase; letter-spacing: .15em; font-size: .7rem; }
.path-grid h3 { font-size: 1.7rem; margin: 30px 0 10px; color: #fff; }
.path-grid p { color: #bfc4d3; line-height: 1.5; margin: 0; }
.path-grid small { display: block; color: var(--atlas-accent-soft); margin-top: 22px; }
.path-trail {
  margin-top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035);
}
.path-trail > strong { display: block; font-family: Baskerville, Georgia, serif; font-size: 1.3rem; margin-bottom: 15px; color: #fff; }
.path-trail > div { display: flex; flex-wrap: wrap; gap: 8px; }
.path-trail button { border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: #fff; background: rgba(255,255,255,.05); padding: 8px 13px; cursor: pointer; }
.path-trail button span { color: var(--atlas-accent); margin-right: 8px; }

.illustrations { padding-top: 60px; }
.illustration-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; align-items: stretch; }
.illustration-grid button {
  border: 1px solid rgba(255,255,255,.1); background: #11182e; padding: 0; color: #fff;
  border-radius: 20px; overflow: hidden; text-align: left; cursor: pointer;
}
.illustration-grid img { width: 100%; height: 400px; object-fit: cover; display: block; }
.illustration-grid button:nth-child(2) img { object-position: top; }
.illustration-grid div { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 5px; }
.illustration-grid span { color: var(--atlas-accent); font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; }
.illustration-grid strong { font-family: Baskerville, Georgia, serif; font-size: 1.3rem; }

.still-point {
  min-height: 560px; padding: 90px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: radial-gradient(circle, rgba(99,42,127,.36), transparent 36%), linear-gradient(rgba(9,15,34,.1), #090f22);
}
.still-point p { color: #9ea5ba; font-family: Baskerville, Georgia, serif; font-size: 1.1rem; margin: 0; }
.still-point h2 { font-size: clamp(2.4rem, 5.5vw, 5.5rem); max-width: 900px; margin: 10px 0 32px; color: var(--atlas-accent-soft); }
.still-point button {
  color: #20152b; background: var(--atlas-accent); border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 700; cursor: pointer;
}

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; padding: 22px;
  display: grid; place-items: center; background: rgba(3,6,16,.83); backdrop-filter: blur(10px);
}
.modal-backdrop[hidden] { display: none; }
.concept-modal {
  width: min(720px, 100%); max-height: 90vh; overflow: auto; position: relative;
  background: var(--parchment); color: var(--ink); border-radius: 24px; padding: clamp(28px, 5vw, 56px);
  box-shadow: 0 40px 120px rgba(0,0,0,.65);
}
.modal-close { position: absolute; right: 18px; top: 14px; border: 0; background: none; font-size: 2rem; color: #5a5361; cursor: pointer; }
.concept-modal .eyebrow { color: var(--atlas-accent); }
.concept-modal h2 { font-size: clamp(2.1rem, 4.5vw, 3.8rem); line-height: 1; margin-bottom: 18px; color: #25162e; }
.concept-modal blockquote {
  margin: 0 0 24px; padding: 16px 0 16px 20px; border-left: 3px solid var(--atlas-accent);
  color: #58216e; font-family: Baskerville, Georgia, serif; font-size: 1.3rem; line-height: 1.45;
}
.concept-modal .modal-detail { font-family: Baskerville, Georgia, serif; font-size: 1.1rem; line-height: 1.7; margin: 0; }
.concept-modal .modal-image img { width: 100%; border-radius: 12px; margin-bottom: 20px; }
.reflection { background: #eee3cf; border-radius: 14px; padding: 20px; margin: 25px 0; }
.reflection span { color: #6f267f; font-size: .7rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.reflection p { font-family: Baskerville, Georgia, serif; font-size: 1.1rem; margin: 6px 0 0; line-height: 1.45; }
.concept-modal .modal-source { color: #77717d; font-size: .82rem; }

@media (max-width: 1120px) {
  .atlas-hero { grid-template-columns: 1fr; }
  .atlas-copy { max-width: 760px; }
  .atlas-map { width: min(680px, 86vw); }
  .realm-detail { margin-left: 22px; margin-right: 22px; }
}

@media (max-width: 760px) {
  .atlas-hero { padding-top: 40px; }
  .atlas-hero h1 { font-size: clamp(2.4rem, 12vw, 4rem); }
  .atlas-map {
    width: 100%; aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    border-radius: 22px; padding: 14px; background: rgba(255,255,255,.025); position: static;
  }
  .orbit, .constellation { display: none; }
  .map-nodes { position: static; display: contents; }
  .realm-node, .center-node { position: static; transform: none; width: auto; min-height: 72px; }
  .realm-node:hover, .realm-node.active, .center-node:hover { transform: none; }
  .center-node { grid-column: 1 / -1; aspect-ratio: auto; border-radius: 14px; min-height: 105px; order: -1; }
  .atlas-list { grid-template-columns: 1fr; }
  .realm-heading { display: block; }
  .realm-heading > p { margin-top: 14px; }
  .concept-grid, .path-grid, .illustration-grid { grid-template-columns: 1fr; }
  .concept-card { min-height: 240px; }
  .illustration-grid img { height: auto; max-height: 480px; object-fit: cover; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .atlas-shell *, .atlas-shell *::before, .atlas-shell *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important;
  }
}
