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

:root {
  /* Bruxa palette — Lavender Spring */
  --white:       #ffffff;
  --violet-tint: #E3CEF0;   /* violet-50   — surface accent */
  --lilac:       #c4b5fd;   /* violet-300  — hex borders    */
  --purple:      #9333ea;   /* purple-600  — action         */
  --ink:         #1f2937;   /* gray-800    — headings       */
  --body:        #4b5563;   /* gray-600    — body copy      */
  --muted:       #a78bfa;   /* violet-400  — muted text     */

  --font-display:   'Henny Penny', 'Comic Sans MS', cursive;
  --font-condensed: 'Saira Condensed', 'Arial Narrow', ui-sans-serif, system-ui, sans-serif;
  --font-body:      ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--white) 0%, var(--violet-tint) 55%, var(--white) 100%);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* The splash is a locked panel; the home view scrolls */
body.at-splash { overflow: hidden; }

/* Starry sky backdrop, veiled in white — as on the Bruxa homepage */
.sky, .veil { position: fixed; inset: 0; pointer-events: none; }
.sky {
  background: url("assets/sky.jpg") center / cover no-repeat;
  opacity: .38;
}
.veil {
  background:
    radial-gradient(58% 46% at 50% 44%, rgba(255, 255, 255, .82), rgba(255, 255, 255, 0) 72%),
    linear-gradient(to bottom, rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, .7) 100%);
}

/* Two views share the page; only one is ever unhidden. The backdrop above
   sits outside both, so it holds steady while they cross over. */
.view {
  position: relative;
  z-index: 1;
  transition: opacity .32s ease;
}
.view.is-fading { opacity: 0; }
.view[hidden]   { display: none; }

.page, .home {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-inline: clamp(1rem, 5vw, 3rem);
}
.page {
  align-items: center;
  justify-content: center;
  gap: clamp(1.1rem, 3vh, 1.9rem);
  padding-block: clamp(2rem, 6vh, 4rem);
  text-align: center;
}

.view:focus { outline: none; }

/* Cauldron in a honeycomb tile */
.hex {
  position: relative;
  width: clamp(172px, 36vw, 232px);
  aspect-ratio: 140 / 160;
  max-width: 100%;
}
.hex .glow {
  position: absolute;
  inset: -22%;
  --glow: .2;
  --glow-reach: 62%;
  background: radial-gradient(circle, rgba(147, 51, 234, var(--glow)), rgba(147, 51, 234, 0) var(--glow-reach));
  transition: background .25s ease;
}
.hex .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.hex img {
  position: absolute;
  left: 50%;
  top: 48%;   /* the pot reads centred a touch above the tile's midline */
  transform: translate(-50%, -50%);
  width: 64%;
}
.still { display: none; }

/* The cauldron is the way in */
.hex-link {
  display: block;
  border-radius: 12px;
  color: inherit;          /* don't let the tile pick up the default link blue */
  text-decoration: none;
  transition: transform .25s ease;
}
.hex-link:hover,
.hex-link:focus-visible { transform: translateY(-2px); }
.hex-link:hover .glow,
.hex-link:focus-visible .glow {
  --glow: .34;
  --glow-reach: 66%;
}
.hex-link:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 6px;
}

/* Henny Penny is for "Bruxo" as the logo only. In a product name
   ("Bruxo Cauldrons") the whole name stays in the surrounding font. */
.wordmark, .site-nav .brand, .bruxo {
  font-family: var(--font-display);
  font-weight: 400;
}

.wordmark, .hero h1 {
  margin: 0;
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 { font-family: var(--font-condensed); font-weight: 500; }
.wordmark {
  font-size: clamp(3.25rem, 13vw, 6.5rem);
  line-height: 1.08;
}

.tagline {
  margin: 0;
  max-width: 26ch;
  font-family: var(--font-condensed);
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  line-height: 1.5;
}

.rule {
  width: min(240px, 55%);
  height: 1px;
  border: 0;
  margin: clamp(.4rem, 1.5vh, 1rem) 0 0;
  background: linear-gradient(90deg, rgba(196, 181, 253, 0), var(--lilac), rgba(196, 181, 253, 0));
}

.footnote {
  margin: 0;
  font-family: var(--font-condensed);
  font-weight: 500;
  font-size: .8125rem;
  letter-spacing: .22em;
  color: var(--muted);
}

/* ── Home ─────────────────────────────────────────────────────────── */

.home {
  padding-block: clamp(1.25rem, 4vh, 2.25rem);
}

.shell {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;   /* the taller logo mustn't nudge the links down */
  justify-content: space-between;
  gap: clamp(.75rem, 3vw, 2rem);
}
/* About/Contact sit top-left on every page, exactly as on the home view;
   the content pages add the logo at the far right as the way back. */
.site-nav .brand {
  margin-left: auto;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  color: var(--ink);
  text-decoration: none;
}
.site-nav .links {
  display: flex;
  gap: clamp(1rem, 4vw, 2rem);
  font-family: var(--font-condensed);
  font-weight: 500;
  font-size: .8125rem;
  letter-spacing: .18em;
}
.site-nav .links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.site-nav .links a:hover,
.site-nav .links a:focus-visible { color: var(--purple); }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.9rem, 2.5vh, 1.5rem);
  padding-block: clamp(1rem, 4vh, 2.5rem) clamp(2.5rem, 10vh, 6rem);
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.25rem, 7vw, 4rem);
  line-height: 1.12;
}

/* Content pages: a shorter hero, with the page body taking the slack */
.hero-compact {
  padding-block: clamp(.5rem, 2vh, 1.25rem) clamp(.25rem, 1vh, .5rem);
}
.prose {
  flex: 1;
  max-width: 42rem;
  line-height: 1.7;
  text-align: center;
}
.prose .lead {
  margin: 0 0 1rem;
  font-family: var(--font-condensed);
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--purple);
}

/* A plain, evenly spaced run of capabilities */
.signal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-condensed);
  font-size: clamp(1.05rem, 2.6vw, 1.15rem);
  line-height: 1.45;
}
.signal-list li { padding-block: .25rem; }

.prose > p {
  margin: 0 0 1rem;
  font-family: var(--font-condensed);
  font-size: clamp(1.05rem, 2.6vw, 1.15rem);
  line-height: 1.5;
}

/* About: side-by-side team members, stacking on narrow screens */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
}
.portrait {
  width: 9rem;
  aspect-ratio: 1;
  margin: 0 auto 1rem;
  overflow: hidden;
  border: 1px solid var(--lilac);
  border-radius: 10px;
  background: var(--violet-tint);
}
.portrait svg { display: block; width: 100%; height: 100%; fill: var(--lilac); }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.member h3 {
  margin: 0 0 .5rem;
  font-family: var(--font-condensed);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--purple);
}
.member .role { margin-left: .5em; color: var(--muted); }
.member p {
  margin: 0;
  font-family: var(--font-condensed);
  font-size: .975rem;
  line-height: 1.45;
}

/* Cauldron, wand and spellbook — the three cards below, in picture form */
.hero-icons {
  position: relative;
  width: min(100%, 30rem);
  margin-top: clamp(.25rem, 1.5vh, .75rem);
}
.hero-icons img {
  display: block;
  width: 100%;
  height: auto;
}
/* One hover target per circle, placed as % of the image so it scales with it */
.icon-spot {
  position: absolute;
  left: var(--x);
  top: 49%;
  width: 26.2%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  outline: 2px solid transparent;
  outline-offset: 0;
  transition: outline-color .2s, outline-offset .2s;
}
.icon-spot:hover,
.icon-spot:focus-visible,
.icon-spot.is-lit {
  outline-color: var(--lilac);
  outline-offset: 4px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
  padding-block: clamp(1rem, 4vh, 2.5rem);
}
/* Echoing the hexagon frame — near-white on a lilac stroke */
.card {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: clamp(.75rem, 2vw, 1rem) clamp(.9rem, 2.5vw, 1.25rem);
  border: 1px solid var(--lilac);
  border-radius: 10px;
  text-align: center;
  background: rgba(255, 255, 255, .92);
  transition: background-color .2s;
}
/* Lit alongside its icon above — see site.js */
.card:hover,
.card.is-lit {
  background-color: var(--violet-tint);
}
.card:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
.card h2 {
  margin: 0 0 .6rem;
  font-family: var(--font-condensed);
  font-weight: 500;
  font-size: .9375rem;
  letter-spacing: .14em;
  color: var(--ink);
}
.card p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.6;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.6rem, 2vh, 1rem);
  margin-top: auto;   /* spare height collects here, keeping the footer at the bottom */
  padding-block: clamp(1.5rem, 5vh, 3rem) 0;
  text-align: center;
}
.site-footer .rule { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .anim  { display: none; }
  .still { display: block; }

  .view, .hex-link, .hex .glow, .icon-spot, .card { transition: none; }
  .hex-link:hover,
  .hex-link:focus-visible { transform: none; }
}
