/* EscalateKit: shared design system for Cloudflare Pages */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg-0: #060a12;
  --bg-1: #0d1324;
  --bg-2: #131c32;
  --panel: rgba(10, 16, 28, 0.88);
  --panel-border: rgba(41, 224, 161, 0.12);
  --text: #f0f6fc;
  --text-soft: #b4c5e0;
  --muted: #7b94b8;
  --accent: #29e0a1;
  --accent-dim: rgba(41, 224, 161, 0.35);
  --accent-blue: #3fa8ff;
  --accent-blue-dim: rgba(63, 168, 255, 0.28);
  --border: rgba(188, 209, 255, 0.18);
  --ring: #9feaff;
  --shadow: 0 24px 56px rgba(2, 8, 18, 0.5);
  --radius: 16px;
  --radius-lg: 24px;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(62rem 38rem at 8% -8%, rgba(63, 168, 255, 0.22), transparent 55%),
    radial-gradient(52rem 34rem at 92% 4%, rgba(41, 224, 161, 0.2), transparent 58%),
    linear-gradient(160deg, var(--bg-0) 6%, var(--bg-1) 42%, var(--bg-2) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
  padding: 1rem 1.25rem 2rem;
}

/* ----- Site header (shared across pages) ----- */
.site-header {
  width: 100%;
  max-width: 820px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo:hover {
  color: var(--accent);
}

.site-logo span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* ----- Main content panel ----- */
main {
  width: 100%;
  max-width: 720px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw + 1rem, 2.75rem);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  isolation: isolate;
}

main::before {
  content: "";
  position: absolute;
  width: 20rem;
  height: 20rem;
  top: -6rem;
  right: -5rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%);
  filter: blur(14px);
  z-index: -1;
  pointer-events: none;
}

/* ----- Header block (cohesive spacing) ----- */
main > header {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

main > header .status,
main > header h1,
main > header .problem-line,
main > header .hero-tagline,
main > header .company-line {
  margin: 0;
}

/* ----- Typography ----- */
h1 {
  font-size: clamp(1.85rem, 4vw + 1rem, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-soft);
}

p {
  margin: 0.6rem 0 0;
  color: var(--text-soft);
  max-width: 65ch;
}

.hero-tagline {
  margin: 0;
  font-size: clamp(1rem, 1.2vw + 0.9rem, 1.15rem);
  color: var(--muted);
  max-width: 52ch;
}

.hero-tagline strong {
  color: var(--text);
  font-weight: 600;
}

.status {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.problem-line {
  font-size: 1rem;
  color: var(--text-soft);
  font-style: italic;
  max-width: 52ch;
}

.company-line {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 52ch;
}

/* Code-like inline terms */
kbd, .term {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(41, 224, 161, 0.12);
  color: var(--accent);
  border: 1px solid rgba(41, 224, 161, 0.2);
}

/* ----- Lists ----- */
ul {
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.6rem;
  color: var(--text-soft);
}

ul li {
  max-width: 60ch;
}

/* ----- CTA block (home page) ----- */
.access {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.75rem;
}

.access h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.85rem 1.35rem;
  border-radius: 12px;
  border: 1px solid rgba(41, 224, 161, 0.5);
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-blue-dim));
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(41, 224, 161, 0.2), 0 12px 28px rgba(0, 12, 20, 0.35);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  word-break: break-word;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 6px rgba(41, 224, 161, 0.1), 0 16px 36px rgba(0, 12, 20, 0.4);
  border-color: rgba(41, 224, 161, 0.7);
}

.cta:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.cta-secondary {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-secondary a {
  color: var(--accent);
  font-weight: 500;
}

.cta-secondary a:hover {
  color: var(--accent-blue);
}

/* ----- Legal pages ----- */
.updated {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.intro,
.plain,
.contact,
.back {
  color: var(--text-soft);
}

.back {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ----- Footer ----- */
footer {
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-copy {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

footer a {
  color: var(--text-soft);
  text-underline-offset: 0.2em;
}

footer a:hover {
  color: var(--accent);
}

/* ----- Links ----- */
a {
  color: #b8d4f0;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-blue);
}

a:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
  body {
    padding: 0.75rem 1rem 1.5rem;
  }

  .site-header {
    margin-bottom: 1rem;
  }

  .site-nav a {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
  }

  main {
    padding: 1.25rem 1.1rem;
  }

  ul {
    padding-left: 1rem;
  }

  .cta {
    width: 100%;
  }
}
