/* ============================================================
   Arcanum Apps — shared styles
   Palette derived from the AuraMe mark: void black, plum,
   mystic purple, sacred gold, parchment.
   ============================================================ */

:root {
  --void:        #0a0412;
  --plum:        #150a22;
  --plum-raised: #1d1030;
  --line:        #2e2044;
  --purple:      #b24eff;
  --violet:      #c9a0ff;
  --gold:        #f0c060;
  --gold-soft:   #f6d99a;
  --parchment:   #ece6f2;
  --muted:       #9a8fb0;
  --muted-dim:   #6f6488;

  --maxw: 1140px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --grad: linear-gradient(100deg, var(--violet) 0%, var(--purple) 42%, var(--gold) 100%);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--violet); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold); }

/* ---------- starfield backdrop ---------- */
.sky {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(178,78,255,.16), transparent 62%),
    radial-gradient(900px 620px at 12% 6%, rgba(240,192,96,.07), transparent 58%),
    var(--void);
}
.sky::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(236,230,242,.9), transparent),
    radial-gradient(1.2px 1.2px at 67% 18%, rgba(201,160,255,.8), transparent),
    radial-gradient(1px 1px at 40% 62%, rgba(236,230,242,.7), transparent),
    radial-gradient(1.3px 1.3px at 85% 48%, rgba(246,217,154,.7), transparent),
    radial-gradient(1px 1px at 12% 78%, rgba(236,230,242,.6), transparent),
    radial-gradient(1.2px 1.2px at 55% 88%, rgba(201,160,255,.6), transparent),
    radial-gradient(1px 1px at 92% 82%, rgba(236,230,242,.5), transparent);
  background-repeat: no-repeat;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity:.55 } to { opacity:1 } }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.eyebrow {
  font-size: .72rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin: 0 0 1rem;
  display: inline-flex; align-items: center; gap: .7rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); opacity: .7; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,4,18,.72);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--serif); }
.brand:hover { color: var(--parchment); }
.brand .glyph { width: 30px; height: 30px; flex: none; }
.brand .name { font-size: 1.18rem; font-weight: 600; color: var(--parchment); letter-spacing: .02em; }
.brand .name b { font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav a { color: var(--muted); font-size: .9rem; letter-spacing: .03em; }
.nav a:hover { color: var(--parchment); }
.nav .pill {
  color: var(--void); background: var(--grad); font-weight: 600;
  padding: .5rem 1.05rem; border-radius: 999px; font-size: .86rem;
}
.nav .pill:hover { color: var(--void); filter: brightness(1.08); }
.nav-toggle { display: none; background: none; border: 0; color: var(--parchment); cursor: pointer; padding: .3rem; }
@media (max-width: 760px) {
  .nav a:not(.pill) { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding-block: clamp(4.5rem, 11vw, 9rem); }
.hero .constellation {
  width: min(360px, 68vw); margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
  filter: drop-shadow(0 0 40px rgba(178,78,255,.35));
  animation: float 7s ease-in-out infinite alternate;
}
@keyframes float { from { transform: translateY(-6px) } to { transform: translateY(6px) } }
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1.04;
  margin: 0 0 1.2rem; letter-spacing: -0.01em;
}
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede {
  max-width: 40ch; margin: 0 auto 2rem; color: var(--muted);
  font-size: clamp(1.02rem, 2.2vw, 1.22rem);
}
.hero-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  padding: .8rem 1.5rem; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .18s ease, filter .18s ease, background .2s ease;
}
.btn-primary { background: var(--grad); color: var(--void); }
.btn-primary:hover { color: var(--void); transform: translateY(-2px); filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--parchment); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--purple); color: var(--parchment); transform: translateY(-2px); }

/* ---------- section heading ---------- */
.section-head { max-width: 52ch; margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.1; margin: 0 0 .8rem;
}
.section-head p { color: var(--muted); margin: 0; font-size: 1.06rem; }

/* ---------- catalogue (apps) ---------- */
.catalogue { display: grid; gap: 1.25rem; }
.work {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  background: linear-gradient(160deg, var(--plum-raised), var(--plum));
  border: 1px solid var(--line); border-radius: 20px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .3s ease;
}
.work.flagship { border-color: rgba(178,78,255,.4); }
.work:hover { transform: translateY(-4px); border-color: rgba(178,78,255,.55); box-shadow: 0 24px 60px -30px rgba(178,78,255,.5); }
.work .opus {
  font-family: var(--serif); font-size: .82rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); writing-mode: initial; align-self: start;
}
.work .work-logo { width: clamp(84px, 14vw, 128px); }
.work .work-body h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.4rem,3.4vw,2rem); margin: .2rem 0 .5rem; }
.work .work-body p { color: var(--muted); margin: 0 0 1rem; max-width: 46ch; }
.work .tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  font-size: .74rem; letter-spacing: .05em; color: var(--violet);
  border: 1px solid var(--line); border-radius: 999px; padding: .28rem .7rem;
}
.work .status { text-align: right; align-self: start; }
.badge {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  padding: .35rem .7rem; border-radius: 999px; white-space: nowrap;
}
.badge.live { color: var(--void); background: var(--gold); }
.badge.soon { color: var(--violet); border: 1px solid var(--line); }
@media (max-width: 720px) {
  .work { grid-template-columns: 1fr; text-align: left; }
  .work .opus { order: -1; }
  .work .work-logo { width: 96px; }
  .work .status { text-align: left; }
}

/* ---------- AuraMe spotlight ---------- */
.spotlight { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background:
  radial-gradient(700px 420px at 80% 0%, rgba(178,78,255,.1), transparent 60%); }
.spotlight .grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.spotlight .art { text-align: center; }
.spotlight .art img { width: min(380px, 80%); margin: 0 auto; filter: drop-shadow(0 0 44px rgba(178,78,255,.4)); }
.feature-list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1.1rem; }
.feature-list li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; }
.feature-list .fi {
  width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: rgba(178,78,255,.12); border: 1px solid var(--line); color: var(--gold); margin-top: 2px;
}
.feature-list h4 { margin: 0 0 .15rem; font-size: 1.02rem; font-weight: 600; color: var(--parchment); font-family: var(--sans); }
.feature-list p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
@media (max-width: 820px) { .spotlight .grid { grid-template-columns: 1fr; } .spotlight .art { order: -1; } }

/* ---------- about / values ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.value {
  padding: 1.6rem; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(160deg, var(--plum-raised), var(--plum));
}
.value .k { font-family: var(--serif); color: var(--gold); font-size: 1.1rem; margin: 0 0 .4rem; }
.value p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .inner {
  border: 1px solid var(--line); border-radius: 24px; padding: clamp(2.5rem, 6vw, 4rem);
  background: radial-gradient(600px 300px at 50% 0%, rgba(240,192,96,.08), transparent 65%), linear-gradient(160deg, var(--plum-raised), var(--plum));
}
.cta-band h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem,4.5vw,2.8rem); margin: 0 0 .8rem; }
.cta-band p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.8rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--plum); padding-block: clamp(3rem, 6vw, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid .brand { margin-bottom: 1rem; }
.site-footer p.tag-line { color: var(--muted); max-width: 34ch; font-size: .92rem; }
.footer-col h5 { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-col a { color: var(--muted); font-size: .92rem; }
.footer-col a:hover { color: var(--parchment); }
.footer-base {
  margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--muted-dim); font-size: .82rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }

/* ---------- legal / content pages ---------- */
.page-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 5vw, 3.2rem); margin: .4rem 0 .3rem; }
.page-head .meta { color: var(--muted-dim); font-size: .86rem; }
.doc { padding-block: clamp(2.5rem, 6vw, 4rem); }
.doc .wrap { max-width: 820px; }
.doc h2 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; margin: 2.6rem 0 .8rem; color: var(--parchment); }
.doc h3 { font-size: 1.1rem; margin: 1.8rem 0 .5rem; color: var(--violet); font-weight: 600; }
.doc p, .doc li { color: var(--muted); }
.doc a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.doc a:hover { color: var(--gold); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .5rem; }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.doc th, .doc td { text-align: left; padding: .7rem .8rem; border: 1px solid var(--line); vertical-align: top; }
.doc th { background: var(--plum-raised); color: var(--parchment); }
.toc { background: var(--plum); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.4rem; margin: 1.5rem 0 2rem; }
.toc h5 { margin: 0 0 .6rem; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.toc ol { margin: 0; padding-left: 1.3rem; color: var(--muted); columns: 2; gap: 2rem; }
.toc a { text-decoration: none; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

.review-note {
  border: 1px dashed var(--gold); background: rgba(240,192,96,.06);
  border-radius: 12px; padding: 1rem 1.2rem; margin: 1.5rem 0; color: var(--gold-soft); font-size: .9rem;
}
.review-note strong { color: var(--gold); }

.callout { background: var(--plum-raised); border: 1px solid var(--line); border-left: 3px solid var(--purple);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.2rem 0; }
.callout p { margin: 0; color: var(--parchment); font-size: .95rem; }

/* ---------- faq ---------- */
.faq { display: grid; gap: .8rem; margin-top: 1.5rem; }
.faq details {
  border: 1px solid var(--line); border-radius: 12px; background: var(--plum);
  padding: 0 1.3rem; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 0; font-weight: 600; color: var(--parchment);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.2rem; color: var(--muted); font-size: .96rem; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
