/* ==========================================================================
   RADIANTGLOOM — 01 BASE
   Brutalist index: ink on paper, one acid signal, hard rules, no ornament.
   ========================================================================== */

:root {
  /* --- colour ---------------------------------------------------------- */
  --ink: #0a0a0a;
  --ink-2: #141412;
  --paper: #f2efe6;
  --paper-2: #e7e3d6;
  --lime: #c6f906;
  --lime-deep: #9cc400;
  --grey: #64645b;
  --grey-ink: #a5a59b;

  --on-ink: #f2efe6;
  --on-ink-dim: rgba(242, 239, 230, 0.7);
  --on-paper: #0a0a0a;
  --on-paper-dim: #4b4b44;

  --line-ink: rgba(242, 239, 230, 0.3);
  --line-ink-soft: rgba(242, 239, 230, 0.14);
  --line-paper: #0a0a0a;
  --line-paper-soft: rgba(10, 10, 10, 0.22);

  /* --- type ------------------------------------------------------------ */
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-900: clamp(3.05rem, 9.4vw, 9.4rem);
  --fs-850: clamp(2.6rem, 6.6vw, 6rem);
  --fs-800: clamp(2.3rem, 5.4vw, 4.9rem);
  --fs-700: clamp(1.85rem, 3.7vw, 3.3rem);
  --fs-600: clamp(1.45rem, 2.3vw, 2.05rem);
  --fs-500: clamp(1.18rem, 1.5vw, 1.42rem);
  --fs-400: clamp(1rem, 1vw, 1.09rem);
  --fs-300: 0.9375rem;
  --fs-200: 0.6875rem;

  /* --- layout ---------------------------------------------------------- */
  --gutter: clamp(1.15rem, 3.4vw, 3.75rem);
  --max: 1560px;
  --sec-y: clamp(4.25rem, 8vw, 8rem);
  --header-h: 76px;

  /* --- motion ---------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.2s;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--on-paper);
  font-family: var(--sans);
  font-size: var(--fs-400);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* --- typography -------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-900);
  line-height: 0.85;
  letter-spacing: -0.045em;
}

h2 {
  font-size: var(--fs-700);
}

h3 {
  font-size: var(--fs-600);
  line-height: 1;
}

h4 {
  font-size: var(--fs-500);
  line-height: 1.1;
}

h5,
h6 {
  font-family: var(--mono);
  font-size: var(--fs-200);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

/* No italic anywhere: the brand and the type stay upright. */
em,
i,
.rg-italic {
  font-style: normal;
}

/* --- primitives -------------------------------------------------------- */
.rg-wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.rg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: var(--fs-200);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--grey);
}

.rg-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--lime);
  flex: none;
}

.rg-eyebrow--plain::before {
  display: none;
}

.rg-sec--ink .rg-eyebrow {
  color: var(--grey-ink);
}

.rg-meta {
  font-family: var(--mono);
  font-size: var(--fs-200);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.7;
  color: var(--grey);
}

.rg-sec--ink .rg-meta {
  color: var(--grey-ink);
}

.rg-mark {
  background: var(--lime);
  color: var(--ink);
  padding: 0 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.rg-rule {
  height: 1px;
  width: 100%;
  background: var(--line-paper);
  border: 0;
  margin: 0;
}

.rg-dim {
  color: var(--on-paper-dim);
}

.rg-sec--ink .rg-dim {
  color: var(--on-ink-dim);
}

.rg-lime {
  color: var(--lime);
}

.rg-note {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--grey);
  max-width: 82ch;
}

.rg-sec--ink .rg-note {
  border-top-color: var(--line-ink);
  color: var(--grey-ink);
}

.rg-note a {
  color: var(--on-paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rg-sec--ink .rg-note a {
  color: var(--on-ink);
}

.rg-note a:hover {
  background: var(--lime);
  color: var(--ink);
  text-decoration: none;
}

/* --- buttons ----------------------------------------------------------- */
.rg-btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  min-height: 50px;
  padding: 0 1.35em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.rg-btn svg {
  width: 14px;
  height: 14px;
}

.rg-btn:hover {
  --btn-bg: var(--lime);
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
}

.rg-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
}

.rg-btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
}

.rg-sec--ink .rg-btn,
.rg-hero .rg-btn {
  --btn-bg: var(--lime);
  --btn-fg: var(--ink);
  --btn-bd: var(--lime);
}

.rg-sec--ink .rg-btn:hover,
.rg-hero .rg-btn:hover {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bd: var(--paper);
}

.rg-sec--ink .rg-btn--ghost,
.rg-hero .rg-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bd: var(--line-ink);
}

.rg-sec--ink .rg-btn--ghost:hover,
.rg-hero .rg-btn--ghost:hover {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bd: var(--paper);
}

.rg-btn--ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-bd: var(--ink);
}

/* inline link */
.rg-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 0.28em;
  border-bottom: 1px solid currentColor;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.rg-link svg {
  width: 12px;
  height: 12px;
}

.rg-link:hover {
  background: var(--lime);
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --- reveal ------------------------------------------------------------ */
.rg-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.rg-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --- accessibility ----------------------------------------------------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rg-skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  background: var(--lime);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: top 0.2s var(--ease);
}

.rg-skip:focus {
  top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rg-reveal {
    opacity: 1;
    transform: none;
  }
}
