/* fae.css – faerie.tools, the hub for hazyn's projects.
   grown from the old "hazyn's scripts" draft: same dusk palette, lilac glow, round cards.
   fonts live in variables so they're easy to swap: rosarivo italic (main title), eb garamond
   italic (headings), fraunces soft (everything else). the link in index.html loads just those.
   comments are lowercase on purpose.
*/

:root {
  --fae-night: #2c283d;
  --fae-dusk: #3f3a52;
  --fae-card: rgba(58, 53, 78, 0.86);
  --fae-lilac: #e7baf2;
  --fae-lilac-soft: #f3d9fa; /* lilac that's light enough for small text */
  --fae-rose: #b87b8d;
  --fae-periwinkle: #7c80b0;
  --fae-text: #f8eaff;
  --fae-radius: 20px;
  --fae-ease: 0.25s ease;

  --title-font: 'Rosarivo', serif; /* the big faerie.tools only, like faerie.page */
  --title-style: italic;
  --heading-font: 'EB Garamond', serif; /* card names, "say hello" */
  --heading-style: italic;
  --body-font: 'Fraunces', serif;
  --body-variation: 'SOFT' 100;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--fae-night);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.25rem;
  color: var(--fae-text);
  font-family: var(--body-font);
  font-variation-settings: var(--body-variation);
  font-size: 1.0625rem;
  line-height: 1.6;
  background:
    radial-gradient(ellipse 70% 45% at 12% 0%, rgba(231, 186, 242, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 92% 8%, rgba(184, 123, 141, 0.2), transparent 70%),
    radial-gradient(ellipse 90% 55% at 50% 105%, rgba(124, 128, 176, 0.28), transparent 70%),
    linear-gradient(var(--fae-night), var(--fae-dusk) 55%, var(--fae-night));
  background-attachment: fixed;
}

/* a quiet field of stars behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 14%, #fff 60%, transparent),
    radial-gradient(1px 1px at 22% 38%, #f3d9fa 60%, transparent),
    radial-gradient(1.5px 1.5px at 35% 9%, #fff 60%, transparent),
    radial-gradient(1px 1px at 48% 28%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 63% 16%, #f3d9fa 60%, transparent),
    radial-gradient(1px 1px at 77% 34%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 90% 22%, #fff 60%, transparent),
    radial-gradient(1px 1px at 14% 62%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 30% 80%, #f3d9fa 60%, transparent),
    radial-gradient(1px 1px at 55% 70%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 72% 88%, #fff 60%, transparent),
    radial-gradient(1px 1px at 86% 66%, #f3d9fa 60%, transparent),
    radial-gradient(1px 1px at 95% 82%, #fff 60%, transparent);
  opacity: 0.7;
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: twinkle 7s ease-in-out infinite alternate;
  }
}

@keyframes twinkle {
  from { opacity: 0.45; }
  to { opacity: 0.85; }
}

/* ---------- words ---------- */

h1,
h2,
h3 {
  font-family: var(--heading-font);
  font-style: var(--heading-style);
  font-weight: 400;
  text-transform: lowercase;
  text-shadow: 0 0 10px rgba(231, 186, 242, 0.25);
  margin: 0;
}

a {
  color: var(--fae-lilac-soft);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-style: dotted;
}

a:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 2px solid var(--fae-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--fae-lilac);
  color: var(--fae-night);
  border-radius: 0 0 12px 12px;
  z-index: 10;
}

.skip-link:focus {
  top: 0;
}

/* ---------- header ---------- */

.fae-header {
  text-align: center;
  margin: clamp(2.5rem, 8vw, 4.5rem) 0 1rem;
}

.fae-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(231, 186, 242, 0.7));
}

@media (prefers-reduced-motion: no-preference) {
  .fae-logo {
    transition: transform 0.6s ease;
  }

  .fae-logo:hover {
    transform: rotate(20deg) scale(1.05);
  }
}

.fae-header h1 {
  font-family: var(--title-font);
  font-style: var(--title-style);
  font-size: clamp(2.6rem, 9vw, 4rem);
  line-height: 1.1;
  margin-top: 0.6rem;
}

.fae-header .dot {
  color: var(--fae-lilac);
}

.tagline {
  margin: 0.4rem 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ---------- sparkle dividers ---------- */

.divider {
  text-align: center;
  margin: 1.75rem 0;
  color: var(--fae-lilac);
  font-size: 0.9rem;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

/* ---------- the cards ---------- */

main {
  width: min(1000px, 100%);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.75rem 1.5rem 1.6rem;
  text-align: center;
  background: var(--fae-card);
  border: 2px solid var(--fae-lilac);
  border-radius: var(--fae-radius);
  box-shadow: 0 0 14px rgba(231, 186, 242, 0.18);
  transition: box-shadow var(--fae-ease), transform var(--fae-ease);
}

.card:hover,
.card:focus-within {
  box-shadow: 0 0 24px rgba(231, 186, 242, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
  .card:hover,
  .card:focus-within {
    transform: translateY(-3px);
  }
}

/* the ones that aren't open yet: dashed edges, so it doesn't rest on colour alone */
.card-soon {
  border-style: dashed;
  border-color: rgba(231, 186, 242, 0.7);
  background: rgba(58, 53, 78, 0.6);
}

.card h3 {
  font-size: 1.75rem; /* garamond runs small, so a touch bigger */
}

.card p {
  margin: 0;
}

.card .small {
  font-size: 0.92rem;
  opacity: 0.88;
}

.emblem {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(243, 217, 250, 0.35), rgba(124, 128, 176, 0.35));
  border: 1px solid rgba(231, 186, 242, 0.6);
  box-shadow: inset 0 0 12px rgba(231, 186, 242, 0.25);
}

.emblem svg {
  width: 42px;
  height: 42px;
  fill: var(--fae-lilac-soft);
}

.emblem .stroke {
  fill: none;
  stroke: var(--fae-lilac-soft);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.pill {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--fae-lilac);
  border-radius: 999px;
  color: var(--fae-lilac-soft);
}

.fae-button {
  margin-top: auto;
  display: inline-block;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  background: var(--fae-lilac);
  color: var(--fae-night);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--fae-ease);
}

.card-open .small + .fae-button {
  margin-top: 0.6rem;
}

.fae-button:hover {
  background: var(--fae-lilac-soft);
  text-decoration: none;
}

/* ---------- say hello ---------- */

.hello {
  margin: 2.5rem auto 0;
  text-align: center;
}

.hello h2 {
  font-size: 2.05rem;
}

.hello p {
  margin: 0.4rem 0 0;
}

/* ---------- footer ---------- */

.fae-footer {
  text-align: center;
  font-size: 0.92rem;
  opacity: 0.85;
  margin-bottom: 2.5rem;
}

.fae-footer p {
  margin: 0;
}

/* ---------- scrollbar (from the old draft) ---------- */

::-webkit-scrollbar {
  width: 11px;
  background: #232037;
}

::-webkit-scrollbar-thumb {
  background: var(--fae-rose);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d9a3cf;
}
