/* ==========================================================================
   North Brook Vault — Minimalist Design System (Light & Dark Themes)
   Inspired by Linear (linear.app) with Automatic System Preference Detection
   ========================================================================== */

:root {
  --bg-dark: #08090a;
  --bg-surface: #0e0f12;
  --bg-surface-hover: #141519;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  --accent-linear: #5e6ad2;
  --accent-linear-hover: #6e79d6;
  --accent-glow: rgba(94, 106, 210, 0.15);
  
  --accent-green: #34d399;
  --accent-blue: #60a5fa;

  --text-main: #f7f8f8;
  --text-muted: #8a8f98;
  --text-dim: #5c6068;

  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition-fast: 0.15s ease;
  --max-width: 1140px;
}

/* System Light Theme Media Query & Explicit Class */
@media (prefers-color-scheme: light) {
  :root:not(.dark-theme) {
    --bg-dark: #ffffff;
    --bg-surface: #f4f4f6;
    --bg-surface-hover: #e8e8ec;
    
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.16);

    --accent-linear: #4f46e5;
    --accent-linear-hover: #4338ca;
    --accent-glow: rgba(79, 70, 229, 0.12);
    
    --accent-green: #059669;
    --accent-blue: #2563eb;

    --text-main: #09090b;
    --text-muted: #52525b;
    --text-dim: #71717a;
  }
}

html.light-theme {
  --bg-dark: #ffffff;
  --bg-surface: #f4f4f6;
  --bg-surface-hover: #e8e8ec;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);

  --accent-linear: #4f46e5;
  --accent-linear-hover: #4338ca;
  --accent-glow: rgba(79, 70, 229, 0.12);
  
  --accent-green: #059669;
  --accent-blue: #2563eb;

  --text-main: #09090b;
  --text-muted: #52525b;
  --text-dim: #71717a;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark light;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* Linear Ambient Light */
.glow-bg {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow-radial {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 850px;
  height: 450px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 75%);
  filter: blur(70px);
}

.grid-line-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 65% 45% at 50% 0%, #000 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 65% 45% at 50% 0%, #000 60%, transparent 100%);
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.linear-headline-gradient {
  background: linear-gradient(180deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Container & Section Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem auto;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Linear Header / Navbar */
.navbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: var(--max-width);
  z-index: 1000;
  background: var(--bg-dark);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  height: 52px;
  transition: all var(--transition-fast);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: none;
  border-radius: 0;
  width: auto;
  height: auto;
}

.logo-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-menu a:hover {
  color: var(--text-main);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.cmd-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  font-family: monospace;
  font-size: 0.725rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cmd-badge:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-dark);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
}

.btn-large {
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
}

/* Hero Section */
.hero {
  padding-top: 160px;
  padding-bottom: 70px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 0.825rem;
  margin-bottom: 1.75rem;
}

.hero-pill-tag {
  color: var(--accent-linear);
  font-weight: 600;
}

.hero-headline {
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  font-weight: 600;
  max-width: 880px;
  margin: 0 auto 1.5rem auto;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4.5rem;
}

/* Hero Interface Frame (Linear style) */
.hero-frame {
  max-width: 1060px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.hero-frame-img {
  width: 100%;
  display: block;
}

/* Linear Bento Grid Features */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

.bento-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.bento-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.bento-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }

@media (max-width: 900px) {
  .col-8, .col-4, .col-6 { grid-column: span 12; }
}

/* Workload Showcase Grid */
.workload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .workload-grid { grid-template-columns: 1fr; }
}

.workload-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-fast);
}

.workload-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

.workload-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.workload-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-glow);
  color: var(--accent-linear);
  display: flex;
  align-items: center;
  justify-content: center;
}

.workload-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.workload-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.workload-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-main);
}

.workload-item-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.check-icon {
  color: var(--accent-green);
  flex-shrink: 0;
}

/* 5 Logo Variants Showcase Section */
.logo-variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.logo-variant-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logo-variant-card:hover, .logo-variant-card.active {
  border-color: var(--accent-linear);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.logo-variant-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--border-subtle);
}

.logo-variant-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.logo-variant-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Calculator Box */
.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
}

@media (max-width: 850px) {
  .calc-card { grid-template-columns: 1fr; gap: 2rem; padding: 1.75rem; }
}

.calc-group {
  margin-bottom: 2rem;
}

.calc-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.925rem;
}

.calc-num {
  font-weight: 600;
  color: var(--text-main);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-subtle);
  accent-color: var(--accent-linear);
  cursor: pointer;
}

.calc-panel {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.calc-amount {
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-main);
  line-height: 1;
  margin: 1rem 0;
}

.calc-note {
  font-size: 0.85rem;
  color: var(--accent-green);
}

/* FAQ Rows */
.faq-wrap {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.faq-a {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.925rem;
  display: none;
  line-height: 1.6;
}

.faq-row.active .faq-a { display: block; }

/* Command Palette Overlay */
.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.cmd-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-box {
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  overflow: hidden;
}

.cmd-head {
  display: flex;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
}

.cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-main);
}

.cmd-list {
  list-style: none;
  padding: 0.5rem;
}

.cmd-item {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Mobile Nav */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-menu.active { display: flex; }
}

/* ==========================================================================
   Blog & Article Subsystem (Linear Design System Alignment)
   ========================================================================== */
.section-title-wrap {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem auto;
}

.section-heading {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 1rem 0 1.25rem 0;
  line-height: 1.1;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(94, 106, 210, 0.15);
  color: var(--accent-linear);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.blog-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.blog-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.blog-title a:hover {
  color: var(--accent-linear);
}

.blog-excerpt {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Article Page Layout */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 150px;
  padding-bottom: 100px;
}

.article-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2rem;
}

.article-title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 1rem 0 1.25rem 0;
}

.article-content {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.8;
}

.article-content p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.article-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem 0;
  letter-spacing: -0.03em;
}

.article-content h3 {
  font-size: 1.3rem;
  margin: 2rem 0 0.85rem 0;
  letter-spacing: -0.02em;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.75rem 1.5rem;
  color: var(--text-muted);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 3px solid var(--accent-linear);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-main);
}
