/* ==========================================
   Sabi Core – Oxford-Inspired Design System
   ========================================== */

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

:root {
  --navy: #07294d;
  --navy-light: rgba(7, 41, 77, 0.95);
  --beige: #f8f6f1;
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --highlight: #c7d9ee;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--slate-900);
  background: var(--white);
  overflow-x: hidden;
}

/* ---- Layout ---- */

.container {
  max-width: 80rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--slate-200);
}

/* ---- Backgrounds ---- */

.bg-white { background: var(--white); }
.bg-beige { background: var(--beige); }
.bg-slate { background: var(--slate-50); }

.bg-navy {
  background: var(--navy);
  color: var(--white);
  border-bottom-color: transparent;
}

/* ---- Typography ---- */

h1, h2, h3 {
  font-family: var(--font-serif);
}

h2 {
  font-size: 1.875rem;
  line-height: 1.25;
  color: var(--slate-900);
}

h3 {
  font-size: 1.25rem;
  color: var(--slate-900);
}

.text-white { color: var(--white); }

.section-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--slate-500);
  margin-bottom: 0.75rem;
}

.section-label--light {
  color: rgba(255, 255, 255, 0.65);
}

.section-intro {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.section-intro--wide {
  max-width: 48rem;
}

.section-desc {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 2;
  color: var(--slate-700);
}

@media (min-width: 640px) {
  h2 { font-size: 2.25rem; }
}

/* ---- Header ---- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid var(--slate-200);
  transition: box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-box {
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 0.5rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  line-height: 1.3;
  color: var(--white);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  color: var(--white);
}

.brand-tagline {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.nav-cta {
  background: var(--white);
  color: var(--navy) !important;
  padding: 0.5rem 1rem;
  border-radius: 2px;
  border: 1px solid var(--white);
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-cta:hover {
  background: var(--slate-100) !important;
}

/* ---- Hero ---- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04), transparent);
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-badge {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.25rem;
}

.hero h1 {
  max-width: 56rem;
  font-size: 2.25rem;
  line-height: 1.15;
}

.hero-highlight {
  color: var(--highlight);
}

.hero-lead {
  margin-top: 1.5rem;
  max-width: 42rem;
  font-size: 1.125rem;
  line-height: 2;
  color: rgba(255, 255, 255, 0.85);
}

.hero-sub {
  margin-top: 1rem;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.7);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-sidebar {
  align-self: end;
}

.glance-card {
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}

.glance-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 0.75rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.7);
}

.glance-rows {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.glance-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
}

.glance-value {
  text-align: right;
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 640px) {
  .hero h1 { font-size: 3rem; }
  .hero-lead { font-size: 1.25rem; }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    padding-top: 6rem;
    padding-bottom: 7rem;
  }
  .hero h1 { font-size: 3.75rem; }
}

/* ---- Buttons ---- */

.btn-primary {
  display: inline-block;
  background: var(--white);
  color: var(--navy);
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--slate-100);
}

.btn-outline {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Grids ---- */

.grid-2 {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  display: grid;
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Split Layout ---- */

.split-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .split-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

/* ---- Cards ---- */

.card {
  border-radius: 2px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  padding: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--slate-700);
}

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

.card p {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--slate-700);
}

.card-white {
  background: var(--white);
}

.card-beige {
  background: var(--beige);
  color: var(--slate-800);
}

/* ---- Callout ---- */

.callout {
  margin-top: 1rem;
  border-left: 4px solid var(--navy);
  background: var(--white);
  padding: 1.25rem;
  font-size: 1rem;
  line-height: 2;
  color: var(--slate-800);
}

@media (min-width: 640px) {
  .callout { grid-column: span 2; }
}

/* ---- Workflow Cards ---- */

.workflow-card {
  border-radius: 2px;
  border: 1px solid var(--slate-200);
  padding: 1.5rem;
}

.step-number {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--slate-500);
}

.workflow-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--slate-100, #f1f5f9);
  color: var(--slate-700, #334155);
  border: 1px solid var(--slate-200, #e2e8f0);
  white-space: nowrap;
}

.card-badge--configurable {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}

.workflow-card h3 {
  margin-top: 0.75rem;
  font-size: 1.5rem;
}

.workflow-card p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--slate-700);
}

.visual-placeholder {
  margin-top: 1.25rem;
  height: 7rem;
  border-radius: 2px;
  border: 1px dashed var(--slate-300);
  background: var(--slate-50);
  padding: 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Screenshot Cards ---- */

.screenshot-card {
  border-radius: 2px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.screenshot-placeholder {
  height: 10rem;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--slate-100), var(--slate-200));
  margin-bottom: 0.75rem;
}

.screenshot-label {
  font-weight: 500;
  color: var(--slate-900);
}

/* ---- Proof Cards ---- */

.proof-cards {
  display: grid;
  gap: 1rem;
}

.proof-card {
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  padding: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
}

/* ---- Mission Cards ---- */

.mission-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mission-card {
  border-radius: 2px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  padding: 1.5rem;
}

.mission-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--slate-500);
  margin-bottom: 0.75rem;
}

.mission-card p {
  font-size: 1rem;
  line-height: 2;
  color: var(--slate-800);
}

/* ---- Leader Cards ---- */

.leader-card {
  border-radius: 2px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  padding: 1.5rem;
}

.leader-card h3 {
  font-size: 1.5rem;
}

.leader-role {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--slate-500);
}

.leader-card p {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--slate-700);
}

/* ---- Insights ---- */

.insights-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.insights-link {
  display: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
}

.insights-link:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .insights-link { display: block; }
}

.insight-card {
  border-radius: 2px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  padding: 1.5rem;
}

.insight-number {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--slate-500);
  margin-bottom: 0.75rem;
}

.insight-card h3 {
  font-size: 1.5rem;
}

.insight-card p {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--slate-700);
}

/* ---- Book Demo ---- */

.demo-grid {
  display: grid;
  gap: 2.5rem;
  align-items: end;
}

@media (min-width: 1024px) {
  .demo-grid {
    grid-template-columns: 1fr auto;
  }
}

.demo-desc {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 2;
  color: rgba(255, 255, 255, 0.8);
}

.demo-cta .btn-primary {
  padding: 0.75rem 1.5rem;
}

/* ---- Footer ---- */

footer {
  background: var(--slate-900);
  color: var(--white);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
}

.footer-section p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.25rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--white);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-links a {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
}

.social-links a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---- Brand Link ---- */

.brand-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

/* ---- Active Nav ---- */

.main-nav a.active {
  color: var(--white);
  border-bottom: 2px solid var(--white);
  padding-bottom: 2px;
}

/* ---- Page Hero ---- */

.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 5rem 0 4rem;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  line-height: 1.2;
  max-width: 48rem;
  margin-top: 0.75rem;
}

.page-hero-desc {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 640px) {
  .page-hero h1 { font-size: 3rem; }
}

/* ---- Dark Button ---- */

.btn-dark {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-dark:hover {
  background: var(--slate-800);
}

/* ---- Leader Photos ---- */

.leader-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 2px solid var(--slate-200);
}

.leader-card--full .leader-photo {
  width: 100px;
  height: 100px;
}

/* ---- Blog Article ---- */

.blog-article {
  max-width: 48rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--slate-500);
}

.blog-article h2 {
  font-size: 2.25rem;
  margin-bottom: 2rem;
}

.blog-article p {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--slate-700);
  margin-bottom: 1rem;
}

.blog-article ul {
  margin: 0.5rem 0 1.5rem 1.5rem;
}

.blog-article li {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}

.blog-article .btn-dark {
  margin-top: 1rem;
}

/* ---- About Text ---- */

.about-text p {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--slate-700);
  margin-bottom: 1.25rem;
}

/* ---- Contact Form ---- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: 2px;
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--slate-900);
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.contact-form textarea {
  resize: vertical;
  min-height: 7rem;
}

/* ---- Contact Details ---- */

.contact-details {
  margin-top: 2rem;
}

.contact-details p {
  font-size: 0.9375rem;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}

.contact-details a {
  color: var(--navy);
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

/* ---- Map ---- */

.map-embed {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
}

/* ---- Mobile Nav ---- */

@media (max-width: 1023px) {
  .menu-btn {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  .nav-cta {
    text-align: center;
    margin-top: 0.5rem;
  }
}
