/* AI Security Engineering LLC — Shared Styles */
/* Executive-facing, light theme, constraint-led design */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --bg-dark: #0f172a;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-on-dark: #f8fafc;
  --text-on-dark-muted: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #0f172a;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --accent-amber: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow: 0 4px 6px -1px rgb(15 23 42 / 0.07), 0 2px 4px -2px rgb(15 23 42 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.08);
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1200px;
  --header-height: 4.5rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

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

.section {
  padding: 5rem 0;
}

.section-soft { background: var(--bg-soft); }

.section-header {
  max-width: 44rem;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
}

.section-title { margin-bottom: 0.75rem; }

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.text-center { text-align: center; }
.text-center .section-header { margin-left: auto; margin-right: auto; }

.muted { color: var(--text-secondary); }
.small { font-size: 0.875rem; }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-dark);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-soft);
  text-decoration: none;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 0.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.site-nav .btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
}
.site-nav .btn-primary {
  color: var(--text-on-dark);
}
.site-nav .btn-primary:hover {
  color: var(--text-on-dark);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

/* Hero */
.hero {
  padding: 5rem 0 6rem;
  background:
    radial-gradient(circle at 90% 20%, rgba(14,165,233,0.06) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(15,23,42,0.03) 0%, transparent 40%);
  border-bottom: 1px solid var(--border);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

.hero-title em {
  font-style: normal;
  color: var(--accent-dark);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 36rem;
}

.hero-cta { margin-bottom: 2.5rem; }

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-proof svg {
  width: 18px;
  height: 18px;
  color: var(--accent-green);
}

/* Constraint visual */
.constraint-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin: 0 auto;
}

.constraint-visual svg {
  width: 100%;
  height: 100%;
}

/* Trust bar */
.trust-bar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.trust-item {
  text-align: center;
}

.trust-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.trust-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-dark);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.service-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Process */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.process-steps::before {
  content: "";
  position: absolute;
  top: 2rem;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--accent);
  z-index: 0;
}

.process-step {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 0 0.5rem;
}

.process-step-num {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.process-step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Comparison */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.compare-table th,
.compare-table td {
  padding: 1.1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table thead th {
  background: var(--bg-soft);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.compare-table tbody tr:last-child td { border-bottom: none; }

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
  width: 35%;
}

.compare-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.compare-icon.positive { color: var(--accent-green); }
.compare-icon.negative { color: var(--accent-red); }
.compare-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  transform: translateY(-3px);
  text-decoration: none;
}

.article-card-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.article-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.article-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.article-card-meta {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* CTA band */
.cta-band {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 5rem 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-band p {
  color: var(--text-on-dark-muted);
  font-size: 1.15rem;
  max-width: 34rem;
  margin: 0 auto 2rem;
}

.cta-band .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cta-band .btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Footer */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .brand-tagline { color: var(--text-muted); }
.footer-desc {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 24rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.footer-links a:hover { color: var(--text); }

.footer-contact p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.footer-principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.principle {
  text-align: center;
}

.principle-label {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.principle-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* Toast / message box */
#msg-box {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-dark);
  color: #fff;
  font-size: 0.9rem;
  max-width: 320px;
  z-index: 100;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
#msg-box p { margin-bottom: 0.75rem; }
#msg-box p:first-child { font-weight: 700; margin-bottom: 0.35rem; }
#msg-box button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
#msg-box button:hover { background: rgba(255,255,255,0.2); }
.hidden { display: none !important; }

/* Contact form modal */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.contact-modal[hidden] {
  display: none !important;
}

.contact-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.contact-modal-content {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.contact-modal-header h2 {
  font-size: 1.25rem;
  color: var(--text);
}

.contact-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.contact-modal-close:hover {
  background: var(--bg-muted);
  color: var(--text);
}

#yt-form-container form {
  margin: 0;
}

#yt-form-container h1 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

/* Article page styles */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
}

.article-layout {
  max-width: 44rem;
  margin: 0 auto;
}

.article-content {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.article-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
}

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

.article-content strong { color: var(--text); }

.article-figure {
  margin: 2.5rem 0;
}

.article-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.article-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.back-link {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.references {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 1.5rem;
  margin-top: 1.5rem;
}

.references li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Article list on articles index */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-list-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-list-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
  text-decoration: none;
}

.article-list-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 3rem;
}

.article-list-title {
  flex: 1;
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
}

.article-list-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 960px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-content { text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-proof { justify-content: center; }

  .constraint-visual {
    max-width: 320px;
    order: -1;
  }

  .services-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
  }

  .process-steps::before { display: none; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-principles {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .section { padding: 3.5rem 0; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .site-nav.open { display: flex; }

  .mobile-menu-btn { display: flex; }

  .trust-items {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.85rem 1rem;
  }

  .compare-table td:first-child { width: 40%; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-principles {
    grid-template-columns: 1fr 1fr;
  }

  .article-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .btn-group { justify-content: center; }
  .btn { width: 100%; }
  .footer-principles { grid-template-columns: 1fr; }
}
