/* ============================================================
   REDSTAR — Canonical stylesheet
   Semantic classes, driven entirely by tokens.css.
   Y2K revival · celestial minimalism · pure line art.
   No build step, no framework. Edit freely.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap");
@import url("./tokens.css");

/* ---------------- Reset / base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--rs-bg);
  color: var(--ink-700);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
::selection { background: rgba(224,96,48,.18); color: var(--coral-dark); }
:focus-visible { outline: 2px solid rgba(224,96,48,.55); outline-offset: 3px; }

/* ---------------- Layout primitives ---------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: 6rem; position: relative; }
.section--alt { background: var(--rs-surface-alt); }
.section__head { text-align: center; max-width: 40rem; margin: 0 auto 4rem; }
.eyebrow { color: var(--ink-400); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--coral-dark); font-weight: 600; line-height: 1.1; letter-spacing: -.005em; }
.h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); margin-bottom: 1rem; }
.lead { color: var(--ink-500); font-size: 1.05rem; }
.text-prism {
  background: var(--coral-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------- Decorative helpers ---------------- */
.deco-pattern { background-image: var(--deco-pattern); background-size: 72px 72px; }
.deco-line { height: 1px; background: var(--deco-line); }
/* Four-point celestial sparkle (✦) — pure typographic flourish */
.sparkle { color: var(--coral); display: inline-block; line-height: 1; animation: rs-sparkle 2.4s ease-in-out infinite; }
.sparkle::before { content: "\2726"; }
.sparkle--sm { font-size: .7rem; }
.sparkle--md { font-size: 1.15rem; }
.sparkle--lg { font-size: 1.9rem; }
.sparkle:nth-of-type(2n) { animation-delay: .5s; }
.sparkle:nth-of-type(3n) { animation-delay: 1s; }
@keyframes rs-sparkle { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
/* Orbital ring — thin celestial ellipse */
.orbital { border: 1px solid var(--rs-line-soft); border-radius: 50%; animation: rs-spin 24s linear infinite; }
@keyframes rs-spin { to { transform: rotate(360deg); } }
/* Y2K double-border frame */
.double-border { border: 1px solid var(--rs-line); padding: 4px; border-radius: var(--radius); }
.double-border-inner { border: 1px solid var(--rs-line); }

/* ---------------- Marquee (Y2K signature ticker) ---------------- */
.marquee { width: 100%; overflow: hidden; border-block: 1px solid var(--rs-line); background: var(--rs-cream); padding-block: .7rem; }
.marquee__track { display: flex; width: max-content; animation: rs-marquee 26s linear infinite; }
.marquee__track span { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .2em; color: var(--coral); white-space: nowrap; padding-inline: 2rem; }
@keyframes rs-marquee { to { transform: translateX(-50%); } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-mono); font-weight: 700; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .18em;
  padding: .85rem 2rem; border: 1px solid transparent; border-radius: var(--radius-pill);
  transition: all var(--dur) var(--ease); position: relative; overflow: hidden;
}
.btn--sm { padding: .5rem 1.15rem; font-size: .66rem; letter-spacing: .14em; }
.btn--lg { padding: 1rem 2.4rem; font-size: .8rem; letter-spacing: .2em; }
.btn--primary { background: var(--coral); color: var(--white); border-color: var(--coral); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--coral-dark); border-color: var(--coral-dark); box-shadow: var(--shadow-md); }
.btn--outline { border-color: var(--coral); color: var(--coral); background: transparent; }
.btn--outline:hover { background: var(--coral); color: var(--white); }
.btn--ghost { color: var(--coral); }
.btn--ghost:hover { color: var(--coral-dark); background: var(--accent-soft); }
.btn--block { width: 100%; }

/* ---------------- Badge / pill ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .85rem;
  font-family: var(--font-mono); font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em;
  border: 1px solid var(--rs-line-soft); border-radius: var(--radius-pill); color: var(--coral);
  background: var(--rs-surface);
}
.badge--accent { color: var(--coral); border-color: var(--rs-line-soft); background: var(--accent-soft); }
.badge--gold { color: var(--coral-dark); border-color: rgba(192,64,32,.35); background: rgba(224,96,48,.08); }

/* ---------------- Navbar ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(250,245,236,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rs-line-faint);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__mark {
  width: 1.6rem; height: 1.6rem; flex-shrink: 0;
  background: var(--coral);
  -webkit-mask: var(--star-mask) center / contain no-repeat;
  mask: var(--star-mask) center / contain no-repeat;
  --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L14 10 L24 12 L14 14 L12 24 L10 14 L0 12 L10 10 Z'/%3E%3C/svg%3E");
}
.brand__name { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .14em; color: var(--coral-dark); }
.nav__links { display: none; align-items: center; gap: 2rem; }
.nav__link { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-500); transition: color var(--dur); }
.nav__link:hover { color: var(--coral); }
.nav__cta { display: none; }
.nav__toggle { display: inline-flex; color: var(--coral); padding: .25rem; }
.nav__mobile { display: none; border-top: 1px solid var(--rs-line-faint); background: var(--rs-cream); }
.nav__mobile.open { display: block; }
.nav__mobile ul { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 0; }
.nav__mobile a { display: block; padding: .55rem 0; font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-500); }
.nav__mobile a:hover { color: var(--coral); }
.nav__mobile .btn { margin-top: .75rem; }

@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 8rem 0 6rem; overflow: hidden; text-align: center;
}
.hero__glow {
  position: absolute; top: 50%; left: 50%; width: 1000px; height: 1000px;
  transform: translate(-50%, -50%); background: var(--glow-radial); pointer-events: none;
}
.hero__frame { position: absolute; inset: 2rem; pointer-events: none; }
.hero__frame .deco-line { position: absolute; left: 0; right: 0; }
.hero__frame .deco-line--top { top: 0; }
.hero__frame .deco-line--bottom { bottom: 0; }
.corner { position: absolute; width: 2rem; height: 2rem; }
.corner--tl { top: 0; left: 0; border-top: 1px solid var(--rs-line-soft); border-left: 1px solid var(--rs-line-soft); }
.corner--tr { top: 0; right: 0; border-top: 1px solid var(--rs-line-soft); border-right: 1px solid var(--rs-line-soft); }
.corner--bl { bottom: 0; left: 0; border-bottom: 1px solid var(--rs-line-soft); border-left: 1px solid var(--rs-line-soft); }
.corner--br { bottom: 0; right: 0; border-bottom: 1px solid var(--rs-line-soft); border-right: 1px solid var(--rs-line-soft); }
/* scattered celestial flourishes */
.hero__orbital { position: absolute; pointer-events: none; }
.hero__orbital--a { top: 18%; right: 10%; width: 8rem; height: 4rem; opacity: .35; }
.hero__orbital--b { bottom: 22%; left: 8%; width: 6rem; height: 3rem; opacity: .25; transform: rotate(38deg); }
.hero__sparkle { position: absolute; pointer-events: none; }
.hero__sparkle--1 { top: 24%; left: 22%; }
.hero__sparkle--2 { top: 30%; right: 24%; }
.hero__sparkle--3 { bottom: 26%; left: 30%; }
.hero__sparkle--4 { top: 40%; right: 30%; }
.hero__inner { position: relative; z-index: 10; max-width: 56rem; margin-inline: auto; }
.hero__title { font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--coral); font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 1.5rem 0; }
.hero__desc { max-width: 34rem; margin: 0 auto 2.5rem; color: var(--ink-500); font-size: 1.1rem; font-weight: 300; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero__ornament { position: absolute; bottom: 3.5rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; }
.hero__ornament span.l { width: 4rem; height: 1px; background: linear-gradient(90deg, transparent, var(--rs-line-soft)); }
.hero__ornament span.r { width: 4rem; height: 1px; background: linear-gradient(-90deg, transparent, var(--rs-line-soft)); }
.hero__ornament .diamond { width: .75rem; height: .75rem; transform: rotate(45deg); border: 1px solid var(--rs-line-soft); }

/* ---------------- Features ---------------- */
.features__grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.feature {
  padding: 1.75rem; background: var(--rs-surface); border: 1px solid var(--rs-line-faint); border-radius: var(--radius);
  transition: border-color var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.feature:hover { border-color: var(--rs-line); box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.feature__icon { color: var(--coral); margin-bottom: 1rem; }
.feature__icon svg { width: 1.5rem; height: 1.5rem; }
.feature__title { font-family: var(--font-mono); font-size: .95rem; text-transform: uppercase; letter-spacing: .1em; color: var(--coral-dark); margin-bottom: .5rem; }
.feature__desc { font-size: .92rem; color: var(--ink-500); }
@media (min-width: 768px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- Pricing ---------------- */
.pricing__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
.tier { position: relative; padding: 2.25rem; background: var(--rs-surface); border: 1px solid var(--rs-line-faint); border-radius: var(--radius); }
.tier--featured { background: var(--rs-cream); border: 1px solid var(--coral); box-shadow: var(--glow-coral); }
.tier__flag { position: absolute; top: -.75rem; left: 50%; transform: translateX(-50%); }
.tier__name { font-family: var(--font-mono); text-align: center; font-size: .95rem; text-transform: uppercase; letter-spacing: .12em; color: var(--coral-dark); margin-bottom: .5rem; }
.tier__price { text-align: center; display: flex; align-items: baseline; justify-content: center; gap: .25rem; }
.tier__amount { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--coral); }
.tier__amount.text-prism { line-height: 1.1; }
.tier__period { color: var(--ink-400); }
.tier__desc { text-align: center; font-size: .85rem; color: var(--ink-500); margin: .5rem 0 2rem; }
.tier__features { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2rem; }
.tier__features li { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: var(--ink-700); }
.tier__features svg { width: 1rem; height: 1rem; color: var(--coral); flex-shrink: 0; }
@media (min-width: 768px) { .pricing__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- Testimonials ---------------- */
.tst__grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.tst {
  padding: 1.75rem; background: var(--rs-surface); border: 1px solid var(--rs-line-faint); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.tst__quote { color: var(--ink-700); font-size: .98rem; line-height: 1.75; }
.tst__quote::before { content: "\201C"; font-family: var(--font-display); color: var(--coral); font-size: 2rem; line-height: 0; vertical-align: -.35em; margin-right: .15em; }
.tst__who { display: flex; align-items: center; gap: .85rem; }
.tst__avatar {
  width: 2.6rem; height: 2.6rem; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--font-mono); font-weight: 700; font-size: .85rem; color: var(--white); background: var(--coral);
}
.tst__name { font-family: var(--font-mono); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--coral-dark); font-weight: 700; }
.tst__role { font-size: .78rem; color: var(--ink-400); }
@media (min-width: 768px) { .tst__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- FAQ ---------------- */
.faq { max-width: 44rem; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--rs-line-faint); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.3rem 0; text-align: left; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--coral-dark);
}
.faq__q svg { width: 1.1rem; height: 1.1rem; color: var(--coral); flex-shrink: 0; transition: transform var(--dur) var(--ease); }
.faq__item.open .faq__q svg { transform: rotate(180deg); }
.faq__a { overflow: hidden; max-height: 0; transition: max-height var(--dur) var(--ease); }
.faq__a p { padding: 0 0 1.3rem; color: var(--ink-500); font-size: .95rem; }

/* ---------------- CTA ---------------- */
.cta { position: relative; overflow: hidden; text-align: center; background: var(--rs-surface-alt); }
.cta__glow { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(224,96,48,.10), transparent 60%); opacity: .7; }
.cta__inner { position: relative; z-index: 10; max-width: 40rem; margin-inline: auto; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* ---------------- Footer ---------------- */
.footer { background: var(--rs-cream); border-top: 1px solid var(--rs-line); }
.footer__inner { padding-block: 4rem; }
.footer__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-bottom: 3rem; }
.footer__brand { grid-column: 1 / -1; }
.footer__brand p { font-size: .9rem; color: var(--ink-500); max-width: 20rem; margin-top: 1rem; }
.footer__col h4 { font-family: var(--font-mono); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; color: var(--coral-dark); margin-bottom: 1rem; }
.footer__col li { margin-bottom: .6rem; }
.footer__col a { font-size: .9rem; color: var(--ink-500); transition: color var(--dur); }
.footer__col a:hover { color: var(--coral); }
.footer__bottom { padding-top: 2rem; border-top: 1px solid var(--rs-line-faint); display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.footer__copy { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-400); text-align: center; }
.footer__made { display: flex; align-items: center; gap: 1.25rem; }
@media (min-width: 768px) {
  .footer__grid { grid-template-columns: repeat(4, 1fr); }
  .footer__brand { grid-column: auto; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------------- Scroll reveal ---------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .sparkle, .orbital, .marquee__track { animation: none !important; }
  html { scroll-behavior: auto; }
}
