/* Fix My Monday — minimal, readable, fast. */

/* 1) Design tokens */
:root {
  --bg: #0b0c0f;
  --panel: #111318;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --brand: #78e0a5;
  --brand-ink: #0d1b12;
  --link: #9bd1ff;
  --border: #22252d;
  --maxw: 72rem;
  --radius: 10px;
  --space: clamp(1rem, 1.5vw, 1.25rem);
  --space-lg: clamp(1.5rem, 3vw, 2.5rem);

  /* Fallback; JS updates this dynamically */
  --header-h: 64px;
}

/* 2) Base & resilience */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  color-scheme: dark;
  overflow-x: hidden;

  /* Tame mobile auto-text inflation and anchor offsets */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: linear-gradient(180deg, var(--bg), #0e1117);
  color: var(--text);
  line-height: 1.6;
}

/* Media sizing guardrails */
img, svg, video { max-width: 100%; height: auto; }

/* Forms (future-proof: avoid iOS zoom-on-focus) */
button, input, select, textarea { font-size: 16px; }

/* 3) Layout utilities */
.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.small { font-size: 0.9rem; color: var(--muted); }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.grid.two { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
@media (min-width: 780px) { .grid.two { grid-template-columns: 1fr 1fr; } }

/* 4) Type scale (less twitchy across orientations) */
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.8rem); }
h3 { font-size: clamp(1.2rem, 1rem + 0.6vw, 1.4rem); }
h4 { font-size: 1.05rem; color: var(--muted); letter-spacing: 0.2px; }
p { margin: 0 0 1rem; }
.lead { font-size: clamp(1.05rem, 0.95rem + 0.7vw, 1.2rem); color: #f2f4f8; max-width: 65ch; }

/* 5) Lists */
ul { margin: 0.5rem 0 0 1.1rem; padding: 0; }
.list { list-style: disc; }
.bullets { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.bullets li { position: relative; padding-left: 1.25rem; }
.bullets li::before { content: "•"; position: absolute; left: 0; color: var(--brand); }

/* 6) Header & Nav */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15,17,22,0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0.5rem;
  flex-wrap: wrap;            /* allow wrapping on small screens */
  gap: 0.5rem 1rem;
}
.identity { display: flex; align-items: center; gap: 0.9rem; }
.avatar { border-radius: 50%; border: 1px solid var(--border); width: 48px; height: 48px; object-fit: cover; }
.brand { margin: 0; font-weight: 700; }
.tagline { margin: 0; color: var(--muted); font-size: 0.95rem; }

.site-nav { width: 100%; }
.site-nav ul { display: flex; gap: 0.8rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: center; }
.site-nav a { color: var(--text); text-decoration: none; padding: 0.4rem 0.6rem; border-radius: 6px; }
.site-nav a:hover, .site-nav a:focus { background: var(--panel); outline: none; }

@media (min-width: 780px) {
  .site-nav { width: auto; }
  .site-nav ul { justify-content: flex-end; }
}
@media (max-width: 420px) {
  .site-nav a { padding: 0.35rem 0.5rem; font-size: 0.95rem; }
  .brand { font-size: 1.1rem; }
  .tagline { font-size: 0.85rem; }
}

/* 7) Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3rem);
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(120,224,165,0.12), transparent 60%),
    radial-gradient(1000px 380px at 90% -20%, rgba(155,209,255,0.10), transparent 60%);
  border-bottom: 1px solid var(--border);
  overflow-x: clip; /* clip wide gradients on mobile */
}
.pillars { color: var(--muted); }

/* 8) Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

/* 9) Buttons & CTAs */
.button {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}
.button:hover, .button:focus { filter: brightness(0.95); outline: none; }
.button.secondary { background: transparent; color: var(--link); border-color: #2a3140; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* 10) Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; background: #0c0f14; }

/* 11) Links & focus */
a { color: var(--link); }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 12) Skip link */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; width: auto; height: auto;
  background: #000; color: #fff; padding: 0.5rem 0.75rem; border-radius: 6px; z-index: 9999;
}

/* 13) Motion-respect */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* 14) Anchor offset for sticky header */
.hero, .section { scroll-margin-top: var(--header-h); }

/* Old Safari fallback */
@supports not (scroll-margin-top: 1px) {
  :target::before {
    content: "";
    display: block;
    height: var(--header-h);
    margin-top: calc(var(--header-h) * -1);
    visibility: hidden;
  }
}

/* 15) Slightly taller header on wider screens (fallback when JS is off) */
@media (min-width: 780px) { :root { --header-h: 76px; } }
