/* ==========================================================================
   Budget and Bricks — Cosmic Clarity
   Design tokens and global styles
   ========================================================================== */

:root {
  /* Palette */
  --void:        #0B1026;
  --deep:        #111A3D;
  --surface:     #16215073;
  --indigo:      #3B4BA8;
  --violet:      #7C5CFF;
  --pink:        #FF6B9A;
  --cyan:        #4FD9E8;

  /* Ink */
  --ink:         #EEF1FF;
  --ink-muted:   #A7B0D8;
  --ink-faint:   #7B85B4;
  --rule:        #FFFFFF1F;

  /* Type */
  --display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --body:    "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);

  /* Space */
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --shell:  72rem;
  --radius: 14px;
}

/* --------------------------------------------------------------------------
   Reset and base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

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

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  padding: 0.75rem 1.25rem;
  background: var(--cyan);
  color: var(--void);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

/* --------------------------------------------------------------------------
   Ambient bokeh — decorative only
   -------------------------------------------------------------------------- */

.bokeh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bokeh__orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.42;
}

.bokeh__orb--violet {
  width: 46vmax; height: 46vmax;
  top: -16vmax; left: -12vmax;
  background: radial-gradient(circle, var(--violet), transparent 68%);
}
.bokeh__orb--cyan {
  width: 34vmax; height: 34vmax;
  top: 22vmax; right: -14vmax;
  background: radial-gradient(circle, var(--cyan), transparent 68%);
  opacity: 0.28;
}
.bokeh__orb--pink {
  width: 30vmax; height: 30vmax;
  top: 62vmax; left: 8vmax;
  background: radial-gradient(circle, var(--pink), transparent 68%);
  opacity: 0.22;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: #0B1026CC;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark__amp {
  color: var(--pink);
  padding-inline: 0.18em;
  font-weight: 500;
}
.wordmark__bricks { color: var(--cyan); }

.masthead__nav {
  display: flex;
  gap: 1.5rem;
  font-size: var(--step--1);
  font-weight: 500;
}
.masthead__nav a {
  color: var(--ink-muted);
  text-decoration: none;
  padding-block: 0.75rem;
}
.masthead__nav a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 10vw, 7rem) clamp(2.5rem, 7vw, 4.5rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: var(--step-3);
  max-width: 18ch;
}

.hero__lede {
  margin-top: 1.5rem;
  max-width: 56ch;
  font-size: var(--step-1);
  color: var(--ink-muted);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.6rem;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button--primary {
  background: linear-gradient(100deg, var(--violet), var(--pink));
  color: #14061F;
  box-shadow: 0 0 28px #7C5CFF66;
}
.button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px #FF6B9A80;
}

.button--ghost {
  border: 1px solid var(--rule);
  color: var(--ink);
  background: #FFFFFF0A;
}
.button--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.hero__marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin-top: 2.5rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--ink-faint);
}
.hero__marks li::before {
  content: "◆";
  color: var(--pink);
  margin-right: 0.6em;
  font-size: 0.7em;
  vertical-align: 0.15em;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(3rem, 8vw, 5.5rem); }

.section__title { font-size: var(--step-2); }

.section__lede {
  margin-top: 0.85rem;
  max-width: 58ch;
  color: var(--ink-muted);
}

.group__label {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 3rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.card:hover {
  border-color: #7C5CFF80;
  background: #1B2A6099;
  transform: translateY(-3px);
}

.card__link {
  display: block;
  padding: 1.4rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.card__title {
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--ink);
}
.card:hover .card__title { color: var(--cyan); }

.card__text {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
  line-height: 1.55;
}

/* Principles */

.section--principles { border-top: 1px solid var(--rule); }

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.principle { border-left: 2px solid var(--violet); padding-left: 1.15rem; }
.principle:nth-child(2) { border-left-color: var(--cyan); }
.principle:nth-child(3) { border-left-color: var(--pink); }
.principle:nth-child(4) { border-left-color: var(--indigo); }

.principle__title {
  font-size: var(--step-0);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.principle p { color: var(--ink-muted); font-size: var(--step--1); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--rule);
  background: #080C1D;
  padding-block: 3rem 4rem;
}

.footer__disclaimer {
  max-width: 70ch;
  font-size: var(--step--1);
  color: var(--ink-muted);
}
.footer__disclaimer strong { color: var(--ink); }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
  font-size: var(--step--1);
}
.footer__nav a { color: var(--ink-muted); text-decoration: none; }
.footer__nav a:hover { color: var(--cyan); text-decoration: underline; }

.footer__meta {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Preferences and print
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .card:hover, .button--primary:hover { transform: none; }
}

@media print {
  .bokeh, .masthead__nav, .hero__actions { display: none; }
  body { background: #fff; color: #000; }
  .card, .footer { background: none; border-color: #ccc; }
  a { color: #000; }
  .wordmark__amp, .wordmark__bricks, .eyebrow { color: #000; }
  .footer__disclaimer, .card__text, .principle p { color: #333; }
}
