/* Hex & Co custom styles. Edit these in Admin > Site styles.
   They load after the main stylesheet, so anything here wins. */

/* ── Title colours ─────────────────────────────────────────────
   Titles are solid colour, so the colour blocks do the talking.
   For a purple-to-teal fade on a few words, highlight them in the
   editor and pick the "Gradient" text style. These two colours
   feed that style; on the dark theme they're lifted a little so
   the purple end stays readable on Nighttime. */
:root {
  --title-from: #A88BE0;   /* Moonlight, lifted for dark */
  --title-to: #3DC2C2;     /* Borealis, lifted for dark */
}
:root[data-theme="light"] {
  --title-from: #6C3BAA;
  --title-to: #008B8B;
}
/* On a coloured block, the gradient style uses the block's own text colour family. */
:is(.hero, .page-intro, .tone-moonlight, .tone-shade) { --title-from: #EDE6D6; --title-to: #F6F3EE; }

/* Titles slide up gently as they come into view
   (in browsers that support it; others show them straight away). */
main h1,
main h2 {
  animation: title-rise 0.8s ease-out both;
}

@keyframes title-rise {
  from { opacity: 0; transform: translateY(0.35em); }
  to   { opacity: 1; transform: none; }
}

@supports (animation-timeline: view()) {
  main h2 {
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }
}

/* ── Text styles ───────────────────────────────────────────────
   Each class below shows up as a tile on Admin > Site styles and
   in the page editor's "Text style" menu: highlight some words,
   pick a style, and they're wrapped in that class.
   The comment above a class gives it its name. Add your own the
   same way: a comment like the ones here, then .your-class { }. */

/* @style Gradient */
.hx-gradient {
  background-image: linear-gradient(135deg, var(--title-from, var(--moonlight)), var(--title-to, var(--borealis)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* @style Highlighter */
.hx-highlight {
  color: var(--ink);
  background: linear-gradient(transparent 58%, color-mix(in srgb, var(--borealis) 38%, transparent) 58%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 0.1em;
}

/* @style Moonlight */
.hx-moonlight {
  color: var(--title-from, var(--moonlight));
  font-weight: 600;
}

/* @style Borealis */
.hx-borealis {
  color: var(--title-to, var(--borealis));
  font-weight: 600;
}

/* @style Big intro */
.hx-lead {
  font-size: 1.3em;
  line-height: 1.45;
  color: var(--ink);
}

/* @style Label */
.hx-label {
  font-family: var(--mono);
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--title-to, var(--borealis));
}

/* @style Display */
.hx-display {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15em;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* @style Pill */
.hx-pill {
  display: inline-block;
  padding: 0.15em 0.65em;
  border: 1px solid color-mix(in srgb, var(--moonlight) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--moonlight) 14%, transparent);
  color: var(--ink);
  font-size: 0.85em;
  line-height: 1.5;
}
