/* =====================================================
   Upton Ridge — Design System (Composio-inspired dark)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Inter:wght@400;500&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --void-black:    #0f0f0f;
  --pure-black:    #000000;
  --pure-white:    #ffffff;
  --cobalt:        #0007cd;
  --cyan:          #00ffff;
  --signal-blue:   #0089ff;
  --charcoal:      #2c2c2c;
  --ghost-white:   rgba(255,255,255,0.60);
  --whisper-white: rgba(255,255,255,0.50);
  --phantom-white: rgba(255,255,255,0.20);
  --b-mist-12:     rgba(255,255,255,0.12);
  --b-mist-10:     rgba(255,255,255,0.10);
  --b-mist-08:     rgba(255,255,255,0.08);
  --b-mist-06:     rgba(255,255,255,0.06);
  --b-mist-04:     rgba(255,255,255,0.04);
  --near-black:    oklch(0.145 0 0);

  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;

  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-pill: 37px;

  --shadow-brutalist: rgba(0,0,0,0.15) 4px 4px 0px 0px;
  --shadow-float:     rgba(0,0,0,0.50) 0px 8px 32px;

  --max-width:   1200px;
  --section-gap: 96px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--void-black);
  color: var(--pure-white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a            { color: inherit; text-decoration: none; }
a:hover      { color: var(--pure-white); }
img          { max-width: 100%; height: auto; display: block; border-radius: var(--radius-md); }
ul           { list-style: none; }
strong       { font-weight: 500; }

/* ── Container ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================
   Cookie Banner
   ===================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--pure-black);
  border-top: 1px solid var(--b-mist-12);
  padding: 16px 24px;
  display: none;
}
.cookie-banner.visible { display: block; }
.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-inner p { color: var(--ghost-white); font-size: 14px; flex: 1; }
.cookie-inner a { color: var(--signal-blue); text-decoration: underline; }
.cookie-actions  { display: flex; gap: 12px; flex-shrink: 0; }

.btn-cookie-accept,
.btn-cookie-reject {
  padding: 8px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-cookie-accept {
  background: var(--pure-white);
  color: var(--near-black);
  border: none;
}
.btn-cookie-reject {
  background: transparent;
  color: var(--ghost-white);
  border: 1px solid var(--charcoal);
}
.btn-cookie-accept:hover,
.btn-cookie-reject:hover { opacity: 0.8; }

/* =====================================================
   Navigation
   ===================================================== */
.site-header {
  position: sticky;
  top: 0; z-index: 100;
  background: rgba(15,15,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--b-mist-08);
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--cobalt);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--pure-white);
  flex-shrink: 0;
}
.logo-text { font-size: 15px; font-weight: 500; color: var(--pure-white); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
}
.nav-link {
  font-size: 14px;
  color: var(--ghost-white);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link--active { color: var(--pure-white); background: var(--b-mist-06); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--pure-white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* =====================================================
   Hero (Home)
   ===================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--b-mist-06);
}
.glow-halo {
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(0,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-content { display: flex; flex-direction: column; gap: 20px; }

.overline-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.85;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.0;
  color: var(--pure-white);
  letter-spacing: -0.3px;
}
.hero-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ghost-white);
  max-width: 520px;
}
.btn-primary {
  display: inline-block;
  background: var(--pure-white);
  color: var(--near-black);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 500;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  align-self: flex-start;
  transition: opacity 0.2s;
  border: none; cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; color: var(--near-black); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ghost-white);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 400;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--charcoal);
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--b-mist-12); color: var(--pure-white); }

.hero-image-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--b-mist-10);
  box-shadow: var(--shadow-float);
}

/* =====================================================
   Stats Band
   ===================================================== */
.stats-band {
  padding: 48px 0;
  border-bottom: 1px solid var(--b-mist-06);
  background: linear-gradient(180deg, rgba(0,7,205,0.04) 0%, transparent 100%);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--b-mist-08);
}
.stat-item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 32px 24px;
  background: var(--void-black);
}
.stat-number {
  font-family: var(--font-mono);
  font-size: 36px; font-weight: 400;
  color: var(--pure-white);
  line-height: 1; letter-spacing: -0.5px;
}
.stat-label { font-size: 14px; color: var(--ghost-white); line-height: 1.5; }

/* =====================================================
   Articles Grid (Home)
   ===================================================== */
.articles-section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--b-mist-06);
}
.section-heading {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  color: var(--pure-white);
  margin-bottom: 32px;
  line-height: 1.1;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.article-card {
  background: var(--pure-black);
  border: 1px solid var(--b-mist-10);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.2s;
  box-shadow: var(--shadow-brutalist);
  text-decoration: none;
}
.article-card:hover { border-color: var(--b-mist-12); }
.article-card__img img {
  width: 100%; height: 180px;
  object-fit: cover;
  border-radius: 0;
}
.article-card__body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.article-card__tag {
  font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--signal-blue);
}
.article-card__title {
  font-size: 17px; font-weight: 500;
  color: var(--pure-white);
  line-height: 1.3;
}
.article-card:hover .article-card__title { color: var(--pure-white); }
.article-card__excerpt {
  font-size: 14px;
  color: var(--ghost-white);
  line-height: 1.6;
  flex: 1;
}
.article-card__link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal-blue);
  letter-spacing: 0.2px;
  margin-top: 4px;
}

/* =====================================================
   Article Page Layout
   ===================================================== */
.article-page { padding: var(--section-gap) 0; }
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}

/* Article Hero */
.article-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--b-mist-06);
}
.article-hero h1 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--pure-white);
  margin-top: 12px;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}
.article-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.article-meta__date,
.article-meta__read {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--whisper-white);
  letter-spacing: 0.3px;
}

/* Content Blocks */
.content-block { margin-bottom: 52px; }
.content-block h2 {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--pure-white);
  margin-bottom: 18px;
  letter-spacing: -0.2px;
}
.content-block h3 {
  font-size: 18px; font-weight: 500;
  color: var(--pure-white);
  margin-top: 28px; margin-bottom: 12px;
}
.content-block p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ghost-white);
  margin-bottom: 16px;
}
.content-block p:last-child { margin-bottom: 0; }

.styled-list {
  list-style: none;
  padding: 0;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 16px;
}
.styled-list li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ghost-white);
  padding-left: 20px;
  position: relative;
}
.styled-list li::before {
  content: '—';
  position: absolute; left: 0;
  color: var(--signal-blue);
  font-family: var(--font-mono);
  font-size: 13px;
}
.styled-list li strong { color: var(--pure-white); }
.styled-list li em { color: rgba(255,255,255,0.75); font-style: italic; }

/* Tip card */
.tip-card {
  background: var(--pure-black);
  border: 1px solid var(--b-mist-10);
  border-left: 3px solid var(--signal-blue);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 24px;
}
.tip-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--signal-blue);
  margin-bottom: 10px;
}
.tip-card p { font-size: 15px; line-height: 1.7; color: var(--ghost-white); margin: 0; }

/* Article Figure */
.article-figure {
  margin: 32px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--b-mist-10);
  box-shadow: var(--shadow-brutalist);
}
.article-figure img { width: 100%; border-radius: 0; }
.article-figure figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--whisper-white);
  background: var(--pure-black);
  font-family: var(--font-mono);
  letter-spacing: -0.1px;
}

/* Conclusion */
.conclusion-block {
  border-top: 1px solid var(--b-mist-08);
  padding-top: 40px;
}

/* =====================================================
   Sidebar
   ===================================================== */
.article-sidebar {
  position: sticky;
  top: 80px;
  display: flex; flex-direction: column; gap: 16px;
}
.sidebar-card {
  background: var(--pure-black);
  border: 1px solid var(--b-mist-10);
  border-radius: var(--radius-md);
  padding: 20px;
}
.sidebar-heading {
  font-size: 12px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pure-white);
  margin-bottom: 14px;
  font-family: var(--font-mono);
}
.sidebar-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-list a {
  font-size: 14px;
  color: var(--ghost-white);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  display: block;
  transition: background 0.15s, color 0.15s;
}
.sidebar-list a:hover { background: var(--b-mist-06); color: var(--pure-white); }

.sidebar-fact-list { display: flex; flex-direction: column; gap: 10px; }
.sidebar-fact-list li { font-size: 13px; color: var(--ghost-white); line-height: 1.5; }
.sidebar-fact-list li strong { color: var(--pure-white); }

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal-blue);
  text-decoration: underline;
  word-break: break-all;
}
.contact-email:hover { color: var(--cyan); }

/* =====================================================
   Inner Pages (about, privacy, terms)
   ===================================================== */
.inner-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--b-mist-06);
}
.inner-hero h1 {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 400;
  line-height: 1.0;
  color: var(--pure-white);
  margin-top: 12px; margin-bottom: 16px;
}
.inner-hero p { font-size: 16px; color: var(--ghost-white); max-width: 640px; }

.inner-content {
  padding: 64px 0;
  max-width: 760px;
}
.inner-content h2 {
  font-size: 22px; font-weight: 400;
  color: var(--pure-white);
  margin-top: 40px; margin-bottom: 14px;
  line-height: 1.2;
}
.inner-content p,
.inner-content li {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ghost-white);
  margin-bottom: 14px;
}
.inner-content ul { list-style: disc; padding-left: 24px; margin-bottom: 14px; }
.inner-content a { color: var(--signal-blue); text-decoration: underline; }
.inner-content a:hover { color: var(--cyan); }

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  border-top: 1px solid var(--b-mist-08);
  padding: 40px 0;
  background: var(--pure-black);
}
.footer-inner {
  display: flex; flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-logo .logo-mark { width: 28px; height: 28px; font-size: 10px; }
.footer-logo .logo-text { font-size: 14px; }
.footer-tagline { font-size: 13px; color: var(--ghost-white); }

.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { font-size: 14px; color: var(--ghost-white); transition: color 0.2s; }
.footer-nav a:hover { color: var(--pure-white); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.30); }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --section-gap: 64px; }

  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--pure-black);
    border-bottom: 1px solid var(--b-mist-10);
    flex-direction: column;
    align-items: flex-start;
    gap: 0; padding: 8px 0;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 12px 24px; width: 100%; font-size: 16px; border-radius: 0; }

  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-image-wrap { order: -1; }
  .hero h1 { font-size: 28px; }

  .stats-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .cookie-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 480px) {
  .hero { padding: 48px 0 40px; }
  .stat-number { font-size: 28px; }
  .footer-nav { gap: 16px; }
}
