/* ==========================================================================
   the levelooh blog — Ignite identity, standalone build.

   A hand-written companion to the app's resources/css/app.css: the same
   tokens (dark Ignite + light Ignite Daylight), the same fonts and the
   same component language (glass-bar, buttons, identity-card, eyebrow,
   brand-label, site-footer) — without Tailwind. If the app's palette
   changes, re-sync the two token blocks below.
   ========================================================================== */

:root {
  --font-headline: "Space Grotesk", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --font-label: "JetBrains Mono", ui-monospace, monospace;

  /* Dark Ignite (default) — semantic roles */
  --color-background: #120e15;
  --color-surface: #120e15;
  --color-surface-dim: #0b070d;
  --color-surface-container-lowest: #09060b;
  --color-surface-container-low: #19131f;
  --color-surface-container: #211a29;
  --color-surface-container-high: #2b2336;
  --color-primary: #ff6b4a;
  --color-on-primary: #1a0a06;
  --color-secondary: #ffc247;
  --color-energy: #b7ff4a;
  --color-energy-fill: #b7ff4a;
  --color-energy-container: #20370f;
  --color-on-energy: #0d1607;
  --color-on-surface: #fff6ee;
  --color-on-surface-variant: rgba(255, 246, 238, 0.72);
  --color-outline: rgba(255, 246, 238, 0.42);
  --color-outline-variant: rgba(255, 246, 238, 0.13);

  /* Raw brand palette */
  --coral: #ff6b4a;
  --coral-2: #e95434;
  --coral-3: #ff9474;
  --lime: #b7ff4a;
  --lime-2: #8de13c;
  --lime-3: #cbff69;
  --energy-ink: #b7ff4a;
  --gold: #ffc247;
  --gold-2: #f2a52d;
  --cream: #fff6ee;

  /* Translucents */
  --coral-dim: rgba(255, 107, 74, 0.16);
  --lime-dim: rgba(183, 255, 74, 0.16);
  --gold-dim: rgba(255, 194, 71, 0.18);
  --gold-faint: rgba(255, 194, 71, 0.08);
  --line: rgba(255, 246, 238, 0.1);
  --line-strong: rgba(255, 246, 238, 0.16);
  --muted: rgba(255, 246, 238, 0.56);
  --spark-warm: rgba(255, 194, 71, 0.5);
  --spark-faint: rgba(255, 148, 116, 0.24);

  --radius-card: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;

  /* Flat by design — no elevation shadows or glows. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ignite Daylight — the light companion (LIGHT_THEME.md). */
html[data-theme="light"] {
  color-scheme: light;

  --color-background: #faf6f0;
  --color-surface: #faf6f0;
  --color-surface-dim: #eee4dc;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #fffdfb;
  --color-surface-container: #f6eee8;
  --color-surface-container-high: #eee3db;
  --color-primary: #c53d24;
  --color-on-primary: #ffffff;
  --color-secondary: #8b5b00;
  --color-energy: #496f08;
  --color-energy-fill: #a8ea45;
  --color-energy-container: #ecf8d8;
  --color-on-energy: #172207;
  --color-on-surface: #241a21;
  --color-on-surface-variant: #655861;
  --color-outline: #8a7982;
  --color-outline-variant: rgba(36, 26, 33, 0.16);

  --coral: #c53d24;
  --coral-2: #9f2d18;
  --coral-3: #c53d24;
  --lime: #a8ea45;
  --lime-2: #82c52d;
  --lime-3: #b8f25f;
  --energy-ink: #496f08;
  --gold: #f5b82e;
  --gold-2: #d89a0b;
  --cream: #241a21;

  --coral-dim: rgba(197, 61, 36, 0.12);
  --lime-dim: rgba(73, 111, 8, 0.12);
  --gold-dim: rgba(139, 91, 0, 0.13);
  --gold-faint: rgba(139, 91, 0, 0.06);
  --line: rgba(36, 26, 33, 0.13);
  --line-strong: rgba(36, 26, 33, 0.22);
  --muted: #74666e;
  --spark-warm: rgba(139, 91, 0, 0.32);
  --spark-faint: rgba(197, 61, 36, 0.18);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

html {
  background: var(--color-background);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--color-on-surface);
  background-color: var(--color-background);
  letter-spacing: 0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

main {
  flex: 1;
  width: 100%;
  overflow-x: clip;
}

a,
button {
  touch-action: manipulation;
}

button {
  -webkit-user-select: none;
  user-select: none;
}

button:not(:disabled),
a[href] {
  cursor: pointer;
}

::selection {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

*:focus-visible {
  outline: 2px solid var(--energy-ink);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Display type: Space Grotesk, always upright, tightened tracking. */
.font-headline {
  font-family: var(--font-headline);
  font-style: normal;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Ambient energy backdrop — fixed, low opacity, behind everything.
   ========================================================================== */

.celestial-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 38% at 10% 0%, rgba(255, 107, 74, 0.18) 0%, transparent 64%),
    radial-gradient(ellipse 50% 34% at 94% 4%, rgba(255, 194, 71, 0.1) 0%, transparent 66%),
    radial-gradient(ellipse 72% 32% at 54% 104%, rgba(183, 255, 74, 0.07) 0%, transparent 64%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-dim) 62%, var(--color-surface) 100%);
  background-size: 180% 180%, 180% 180%, 170% 170%, 100% 100%;
  animation: auroraDrift 44s ease-in-out infinite;
}

.celestial-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 246, 238, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 246, 238, 0.026) 1px, transparent 1px),
    radial-gradient(1.5px 1.5px at 16% 22%, var(--spark-warm), transparent 55%),
    radial-gradient(1px 1px at 30% 64%, var(--spark-faint), transparent 55%),
    radial-gradient(1.5px 1.5px at 64% 30%, var(--spark-warm), transparent 55%),
    radial-gradient(1px 1px at 82% 70%, var(--spark-faint), transparent 55%),
    radial-gradient(1.2px 1.2px at 90% 20%, var(--spark-warm), transparent 55%),
    radial-gradient(1px 1px at 44% 84%, var(--spark-faint), transparent 55%);
  background-size: 88px 88px, 88px 88px, auto, auto, auto, auto, auto, auto;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 82%, transparent 100%);
  opacity: 0.34;
  animation: sparkFloat 7s ease-in-out infinite;
}

.celestial-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 14, 21, 0) 0%, rgba(11, 7, 13, 0.42) 100%);
}

html[data-theme="light"] .celestial-bg {
  background:
    radial-gradient(ellipse 68% 38% at 10% 0%, rgba(197, 61, 36, 0.08) 0%, transparent 64%),
    radial-gradient(ellipse 50% 34% at 94% 4%, rgba(139, 91, 0, 0.07) 0%, transparent 66%),
    radial-gradient(ellipse 72% 32% at 54% 104%, rgba(73, 111, 8, 0.06) 0%, transparent 64%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-dim) 62%, var(--color-surface) 100%);
}

html[data-theme="light"] .celestial-bg::after {
  background-image:
    linear-gradient(rgba(36, 26, 33, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 26, 33, 0.03) 1px, transparent 1px),
    radial-gradient(1.5px 1.5px at 16% 22%, var(--spark-warm), transparent 55%),
    radial-gradient(1px 1px at 30% 64%, var(--spark-faint), transparent 55%),
    radial-gradient(1.5px 1.5px at 64% 30%, var(--spark-warm), transparent 55%),
    radial-gradient(1px 1px at 82% 70%, var(--spark-faint), transparent 55%),
    radial-gradient(1.2px 1.2px at 90% 20%, var(--spark-warm), transparent 55%),
    radial-gradient(1px 1px at 44% 84%, var(--spark-faint), transparent 55%);
  opacity: 0.26;
}

html[data-theme="light"] .celestial-bg::before {
  background: linear-gradient(180deg, transparent 0%, rgba(238, 228, 220, 0.34) 100%);
}

@keyframes auroraDrift {
  0% { background-position: 0% 30%, 100% 20%, 50% 90%, 0 0; }
  50% { background-position: 80% 50%, 30% 65%, 62% 30%, 0 0; }
  100% { background-position: 0% 30%, 100% 20%, 50% 90%, 0 0; }
}

@keyframes sparkFloat {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 0.65; transform: translateY(-3px); }
}

/* ==========================================================================
   Layout shells
   ========================================================================== */

.shell {
  margin-inline: auto;
  width: 100%;
  max-width: 72rem;
  padding-inline: 1rem;
  box-sizing: border-box;
}

.shell--content {
  max-width: 56rem;
}

.shell--post {
  max-width: 46rem;
}

@media (min-width: 640px) {
  .shell {
    padding-inline: 1.5rem;
  }
}

/* ==========================================================================
   Header — the sticky glass bar
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
}

.glass-bar {
  background:
    linear-gradient(90deg, rgba(255, 107, 74, 0.045), transparent 38%, rgba(183, 255, 74, 0.025)),
    rgba(18, 14, 21, 0.96);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border-bottom: 1px solid var(--line);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-bar { background: var(--color-surface); }
}

html[data-theme="light"] .glass-bar {
  background:
    linear-gradient(90deg, rgba(197, 61, 36, 0.04), transparent 38%, rgba(73, 111, 8, 0.025)),
    rgba(255, 253, 251, 0.96);
  border-color: var(--line);
}

.header-row {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .header-nav {
    gap: 0.75rem;
  }
}

/* Visibility wrapper — never put this on a .btn-* (they set display). */
.only-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .only-desktop {
    display: flex;
  }
}

/* Language switcher — mono EN·FR·ES links, current in coral. The header
   copy hides below sm (the footer one is always there, the app pattern). */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.lang-switch a {
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}

.lang-switch a:hover {
  color: var(--color-primary);
}

.lang-switch a[aria-current="true"] {
  color: var(--color-primary);
}

.lang-switch--header {
  display: none;
}

@media (min-width: 640px) {
  .lang-switch--header {
    display: flex;
  }
}

/* Brand mark — tile + wordmark ("level" on-surface, "ooh" coral). */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.brand-mark__tile {
  display: block;
  flex: 0 0 auto;
}

.brand-mark__word {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
}

.brand-mark__word .word-level { color: var(--color-on-surface); }
.brand-mark__word .word-ooh { color: var(--color-primary); }

.brand-mark .brand-label--blog {
  margin-top: 0.2em;
}

@media (max-width: 419px) {
  .brand-mark .brand-label--blog {
    display: none;
  }
}

/* ==========================================================================
   House components (mirrored from app.css)
   ========================================================================== */

.theme-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--color-surface-container);
  color: var(--color-on-surface-variant);
  transition: background 180ms var(--ease-out),
              border-color 180ms var(--ease-out),
              color 180ms var(--ease-out),
              transform 180ms var(--ease-out);
}

.theme-toggle:hover {
  border-color: var(--energy-ink);
  background: var(--color-energy-container);
  color: var(--energy-ink);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: scale(0.97);
}

/* The button shows the theme you'd switch TO (sun while dark, moon while light). */
.theme-toggle svg { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Buttons — solid flat pills, sentence case. Lime = action. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-energy-fill);
  color: var(--color-on-energy);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms var(--ease-out),
              border-color 200ms var(--ease-out),
              transform 200ms var(--ease-out),
              filter 200ms var(--ease-out);
}

.btn-primary:hover:not(:disabled) {
  background: var(--lime-3);
  border-color: rgba(255, 246, 238, 0.26);
  filter: saturate(1.03);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  background: var(--lime-2);
  transform: translateY(0) scale(0.985);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-surface-container);
  color: var(--color-on-surface-variant);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms var(--ease-out),
              border-color 180ms var(--ease-out),
              color 180ms var(--ease-out),
              transform 180ms var(--ease-out);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-energy-container);
  border-color: rgba(183, 255, 74, 0.3);
  color: var(--energy-ink);
  transform: translateY(-1px);
}

.btn-ghost:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.btn--sm {
  padding: 0.5rem 1.05rem;
  font-size: 0.85rem;
}

/* Ignite Daylight: bright lime alone can't form a component edge on white. */
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-primary:hover:not(:disabled) {
  border-color: var(--energy-ink);
}

html[data-theme="light"] .btn-ghost:hover:not(:disabled) {
  border-color: rgba(73, 111, 8, 0.42);
}

@media (pointer: coarse) {
  .btn-primary,
  .btn-ghost {
    min-height: 44px;
  }
  .btn--sm {
    min-height: 40px;
  }
}

/* Eyebrow — mono coral section label. */
.eyebrow {
  color: var(--coral-3);
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0;
}

/* Brand label — tiny mono status/category tag. */
.brand-label {
  font-family: var(--font-label);
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--coral-3);
  opacity: 0.92;
}

/* Identity card — the opaque workhorse tile, flat with a hairline border. */
.identity-card {
  background:
    radial-gradient(ellipse 92% 74% at 0% 0%, rgba(255, 107, 74, 0.055), transparent 58%),
    var(--color-surface-container-low);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  transition: border-color 200ms var(--ease-out),
              background 200ms var(--ease-out),
              transform 200ms var(--ease-out);
}

.identity-card:is(a, button):hover {
  border-color: rgba(183, 255, 74, 0.28);
}

@media (hover: hover) {
  .identity-card:is(a, button):hover {
    transform: translateY(-1px);
  }
}

html[data-theme="light"] .identity-card {
  background:
    radial-gradient(ellipse 92% 74% at 0% 0%, rgba(197, 61, 36, 0.045), transparent 58%),
    var(--color-surface-container-low);
}

/* Featured card — the coral→gold→lime reward wash, for genuine reward moments. */
.identity-card--featured {
  background:
    radial-gradient(ellipse 80% 70% at 12% 0%, rgba(255, 107, 74, 0.26), transparent 58%),
    radial-gradient(ellipse 70% 65% at 100% 12%, rgba(255, 194, 71, 0.18), transparent 58%),
    linear-gradient(135deg, rgba(255, 107, 74, 0.14), rgba(255, 194, 71, 0.11) 56%, rgba(183, 255, 74, 0.06)),
    var(--color-surface-container-low);
  border-color: rgba(255, 194, 71, 0.38);
}

html[data-theme="light"] .identity-card--featured {
  background:
    radial-gradient(ellipse 80% 70% at 12% 0%, rgba(197, 61, 36, 0.14), transparent 58%),
    radial-gradient(ellipse 70% 65% at 100% 12%, rgba(139, 91, 0, 0.11), transparent 58%),
    linear-gradient(135deg, rgba(197, 61, 36, 0.08), rgba(139, 91, 0, 0.07) 56%, rgba(73, 111, 8, 0.05)),
    var(--color-surface-container-low);
  border-color: rgba(139, 91, 0, 0.34);
}

/* ==========================================================================
   Blog surfaces
   ========================================================================== */

.page-hero {
  padding-block: 3.5rem 2.5rem;
}

.page-hero--center {
  text-align: center;
  padding-block: 5rem 4rem;
}

.page-hero .eyebrow {
  margin-bottom: 0.9rem;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--color-on-surface);
}

.lead {
  margin: 1rem 0 0;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--color-on-surface-variant);
  max-width: 40rem;
}

.page-hero--center .lead {
  margin-inline: auto;
}

.page-hero__action {
  margin: 2rem 0 0;
}

/* Post list */
.post-list {
  display: grid;
  gap: 1rem;
  padding-bottom: 4rem;
}

.post-card {
  display: block;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.post-card h2 {
  margin: 0.55rem 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-on-surface);
}

.post-card__excerpt {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-on-surface-variant);
}

.post-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.post-tags {
  margin: 0.9rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Single post */
.back-row {
  margin: 2rem 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--color-on-surface-variant);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}

.back-link:hover {
  color: var(--color-primary);
}

.post-hero {
  padding: 2.25rem 0 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.25rem;
}

.post-hero h1 {
  margin: 0.9rem 0 0;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--color-on-surface);
}

/* Post body typography — authored HTML from content/posts/*.html. */
.post-body {
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--color-on-surface-variant);
}

.post-body p {
  margin: 0 0 1.25rem;
}

.post-body h2,
.post-body h3 {
  font-family: var(--font-headline);
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-on-surface);
  line-height: 1.25;
}

.post-body h2 {
  font-size: 1.45rem;
  margin: 2.25rem 0 0.9rem;
}

.post-body h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.7rem;
}

.post-body strong {
  color: var(--color-on-surface);
}

.post-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

.post-body li {
  margin-bottom: 0.45rem;
}

.post-body li::marker {
  color: var(--color-primary);
}

.post-body blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--gold-faint);
  color: var(--color-on-surface);
}

.post-body blockquote p {
  margin: 0;
}

.post-body code {
  font-family: var(--font-label);
  font-size: 0.88em;
  background: var(--color-surface-container);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.4em;
}

.post-body pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.2rem;
  background: var(--color-surface-container);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  border: 0;
  padding: 0;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--line-strong);
  margin: 2rem 0;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

/* Post-footer CTA card */
.post-cta {
  margin: 3rem 0 4rem;
  padding: 1.75rem;
}

.post-cta h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-on-surface);
}

.post-cta p {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-on-surface-variant);
}

.post-cta__actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--color-surface);
  padding-block: 3rem 2.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
  }
}

.footer-brand {
  max-width: 20rem;
}

.footer-brand p {
  margin: 1rem 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-on-surface-variant);
}

.footer-mail {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: none;
}

.footer-mail:hover {
  text-decoration: underline;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-cols {
    display: flex;
    gap: 3.5rem;
  }
}

@media (min-width: 1024px) {
  .footer-cols {
    gap: 5rem;
  }
}

.footer-col h2 {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-on-surface-variant);
  opacity: 0.8;
}

.footer-col ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--color-on-surface-variant);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--color-primary) 10%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-on-surface-variant);
  opacity: 0.7;
}

.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.footer-meta .brand-label {
  margin: 0;
  opacity: 0.92;
}

/* ==========================================================================
   Reduced motion — continuous effects stop; brief transitions stay.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .celestial-bg,
  .celestial-bg::after {
    animation: none;
  }

  .btn-primary:hover:not(:disabled),
  .btn-ghost:hover:not(:disabled),
  .theme-toggle:hover,
  .identity-card:is(a, button):hover {
    transform: none;
  }
}
