/* ==========================================================================
   Optimizing Mind — Warm Enterprise Theme
   ========================================================================== */

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

:root {
  --bg: #F7F5F0;
  --bg-card: #FFFFFF;
  --bg-soft: #EEEBE3;
  --ink: #2C2C2C;
  --ink-mid: #5A5A5A;
  --ink-light: #8A8A8A;
  --ink-faint: #C5C2BA;
  --sage: #4A7C59;
  --sage-light: rgba(74, 124, 89, 0.08);
  --sage-border: rgba(74, 124, 89, 0.2);
  --warm: #C4956A;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Plus Jakarta Sans', system-ui, sans-serif;
}

html {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(74, 124, 89, 0.2); }

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

/* ==========================================================================
   Skip to content
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--sage);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* Focus styles */

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

/* ==========================================================================
   Container
   ========================================================================== */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ink-faint);
}

body {
  padding-top: 3.5rem;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.425rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo:hover { opacity: 0.85; text-decoration: none; }

.logo img {
  height: auto;
  width: 190px;
}

.header nav { display: flex; gap: 1.75rem; }

.header nav a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink-light);
}

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

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4.5rem 2rem 3.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: var(--sage-light);
  border: 1px solid var(--sage-border);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: 1.25rem;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--sage);
  border-radius: 50%;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-mid);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.hero-desc strong {
  color: var(--ink);
  font-weight: 600;
}

/* CTA Button */

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--sage);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.25s;
  text-decoration: none;
}

.hero-cta:hover {
  background: #3D6A4B;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(74, 124, 89, 0.2);
  text-decoration: none;
  color: #fff;
}

.hero-cta svg { width: 0.85rem; height: 0.85rem; }

/* ==========================================================================
   Metric Cards
   ========================================================================== */

.metric-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--ink-faint);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.25s;
}

.metric-card:hover {
  border-color: var(--sage-border);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.08);
}

.metric-number {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.metric-number span { color: var(--sage); }

.metric-label {
  font-size: 0.8rem;
  color: var(--ink-light);
  line-height: 1.4;
}

/* ==========================================================================
   Features
   ========================================================================== */

.features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem 3.5rem;
}

.features-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.features-top h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.features-top span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.f-card {
  background: var(--bg-card);
  border: 1px solid var(--ink-faint);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.25s;
}

.f-card:hover {
  border-color: var(--sage-border);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.06);
}

.f-card-icon {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-light);
  border-radius: 8px;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.f-card-icon svg { width: 16px; height: 16px; }

.f-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.f-card p {
  font-size: 0.85rem;
  color: var(--ink-mid);
  line-height: 1.55;
  font-weight: 400;
}

/* ==========================================================================
   Demo Video
   ========================================================================== */

.demo {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem 3.5rem;
}

.demo-header {
  margin-bottom: 1.25rem;
}

.demo-header h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.demo-header p {
  font-size: 0.85rem;
  color: var(--ink-light);
}

.demo-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ink-faint);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.demo-wrap video {
  width: 100%;
  display: block;
}

/* ==========================================================================
   Origins / Articles
   ========================================================================== */

.origins {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem 3.5rem;
}

.origins h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.origin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--ink-faint);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--ink);
}

.origin-card:hover {
  border-color: var(--sage-border);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.06);
  text-decoration: none;
  color: var(--ink);
}

.origin-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.origin-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  background: var(--sage-light);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.origin-name {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}

.origin-arr {
  color: var(--ink-faint);
  font-size: 1rem;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: all 0.2s;
}

.origin-card:hover .origin-arr {
  color: var(--sage);
  transform: translateX(3px);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--ink-faint);
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.cta-section p {
  font-size: 0.9rem;
  color: var(--ink-mid);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--ink-faint);
  padding: 1.25rem 0;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-inner p { font-size: 0.75rem; color: var(--ink-light); }
.footer-inner a { font-size: 0.75rem; color: var(--ink-light); }

/* ==========================================================================
   Prose (Privacy Policy, legal pages)
   ========================================================================== */

.prose {
  max-width: 1080px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}

.prose h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.prose h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-faint);
}

.prose h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.prose h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.5rem 0 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
  color: var(--ink-mid);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.prose em {
  color: var(--ink-light);
  font-style: italic;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem 1.5rem;
  color: var(--ink-mid);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.prose li {
  margin-bottom: 0.375rem;
}

.prose ol.toc {
  margin: 0 0 1rem 1.25rem;
}

.prose ol.toc li {
  margin-bottom: 0.25rem;
}

.prose ol.toc a {
  font-size: 0.9375rem;
}

.prose address {
  font-style: normal;
  color: var(--ink-mid);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8rem 2rem;
  text-align: center;
}

.error-page h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.error-page p {
  font-size: 1rem;
  color: var(--ink-mid);
  margin-bottom: 2rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .header-inner { padding: 0.425rem 1rem; }
  .logo img { width: 140px; }
  .header nav { gap: 1rem; }
  .header nav a { font-size: 0.85rem; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 1.5rem 2.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .origin-left { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .footer-inner { flex-direction: column; gap: 0.4rem; text-align: center; }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes gentle {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge, .hero h1, .hero-desc, .hero-cta, .metric-stack {
  animation: gentle 0.7s ease-out both;
}

.hero h1 { animation-delay: 0.08s; }
.hero-desc { animation-delay: 0.15s; }
.hero-cta { animation-delay: 0.22s; }
.metric-stack { animation-delay: 0.15s; }

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  body { background: #fff; }
}
