@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@800,900&f[]=general-sans@400,500,600,700,800&display=swap');

:root {
  color-scheme: light;
  --ink: #101513;
  --ink-soft: #2f3834;
  --muted: #4a5651; /* Bumping contrast from #5a6762 to #4a5651 for WCAG AAA margin */
  --paper: #f7f8f4;
  --surface: #ffffff;
  --surface-2: #edf2ec;
  --line: #dce3dd;
  --line-strong: #b9c5be;
  --green: #0d6f58;
  --green-bright: #5de1bd;
  --shadow: 0 28px 90px rgba(16, 21, 19, 0.12);
  --shadow-soft: 0 16px 42px rgba(16, 21, 19, 0.08);
  --font: "General Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Cabinet Grotesk", "General Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(93, 225, 189, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(33, 88, 244, 0.10), transparent 24%),
    linear-gradient(180deg, rgba(237, 242, 236, 0.72), rgba(247, 248, 244, 0) 520px),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6; /* Enhanced readability scale */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Premium subtle grain texture overlay for organic luxury depth (light theme) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.032'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

/* Ensure content sits above grain */
header, main, footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  padding: 8px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

.container {
  width: min(1160px, calc(100% - 48px)); /* Optimized 8px-grid boundary alignment (was 44px) */
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(220, 227, 221, 0.82);
  background: rgba(247, 248, 244, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px; /* Standardized 8px-grid boundary */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  font-family: var(--font-display);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.hero {
  min-height: calc(100svh - 72px);
  padding: 120px 0 80px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.hero-layout {
  display: flex;
  justify-content: center;
}

.hero-copy {
  max-width: 760px;
}

.zen-hero {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 16px; /* Optimized to 16px to match 8px rhythm (was 14px) */
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

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

h1 {
  max-width: 680px;
  margin: 0 auto 32px; /* Standardized 32px matching 8px rhythm (was 28px) */
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: 0.98;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 58ch;
  margin: 0 auto 48px; /* Standardized 48px matching 8px rhythm */
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.prose {
  max-width: 75ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px; /* Standardized 16px matching 8px rhythm (was 12px) */
  justify-content: center;
}

.button {
  min-height: 48px; /* Standardized 48px matching 8px rhythm (was 46px) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px; /* Standardized 24px matching 8px rhythm (was 20px) */
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.button:active {
  transform: translateY(0) scale(0.985); /* Tactile active state compression */
}

.button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.button.primary {
  background: var(--ink);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--green);
  border-color: var(--green);
}

.button.secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--ink);
}

.section {
  padding: 80px 0;
}

.split-heading {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px; /* Standardized 40px matching 8px rhythm (was 36px) */
  align-items: start;
  margin-bottom: 32px;
}

.split-heading h2,
.contact h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.08;
  font-weight: 850;
}

h3 {
  margin-bottom: 16px;
  font-size: 23px;
  line-height: 1.18;
  font-weight: 850;
}

article p,
.systems-list p,
.systems-list div p {
  max-width: 72ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.systems {
  padding: 80px 0;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.systems-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 64px;
  align-items: start;
}

.systems-layout h2 {
  max-width: 590px;
  margin-bottom: 0;
  font-size: clamp(31px, 4.4vw, 52px);
  line-height: 1.08;
  font-weight: 850;
}

.systems-list {
  border-top: 1px solid var(--line-strong);
}

.systems-list div {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-strong);
  transition: transform 160ms ease;
}

.systems-list div:hover {
  transform: translateX(4px); /* Slightly increased for optical tactile movement */
}

.systems-list h3 {
  margin-bottom: 8px;
}

/* Architecture Section styles */
.border-top {
  border-top: 1px solid var(--line);
}

.layers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.layer-card {
  padding: 32px;
  background: linear-gradient(145deg, var(--paper) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.layer-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--line-strong);
}

.layer-card:active {
  transform: translateY(-0.5px) scale(0.99); /* Gentle depth active state response */
}

.layer-num {
  display: inline-block;
  padding: 4px 10px;
  background: var(--surface-2);
  color: var(--green);
  font-family: var(--font-display);
  font-weight: 850;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.layer-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.layer-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 0;
}

@media (max-width: 920px) {
  .layers-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.contact {
  padding: 64px 0;
  background: var(--ink);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.contact .eyebrow {
  color: var(--green-bright);
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px; /* Standardized 32px matching 8px rhythm (was 34px) */
}

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px; /* Standardized 16px matching 8px rhythm (was 18px) */
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.footer p {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  gap: 16px; /* Standardized 16px matching 8px rhythm (was 18px) */
}

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

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .split-heading,
  .systems-list div,
  .layer-card,
  .contact-inner {
    animation: rise 420ms ease-out both;
  }

  .layer-card:nth-child(1) { animation-delay: 80ms; }
  .layer-card:nth-child(2) { animation-delay: 120ms; }
  .layer-card:nth-child(3) { animation-delay: 160ms; }
  .layer-card:nth-child(4) { animation-delay: 200ms; }
  .layer-card:nth-child(5) { animation-delay: 240ms; }
  .layer-card:nth-of-type(6) { animation-delay: 280ms; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
    padding-top: 56px; /* Standardized to 56px matching 8px rhythm */
  }

  .hero-layout,
  .split-heading,
  .systems-layout {
    grid-template-columns: 1fr;
    gap: 32px; /* Standardized to 32px matching 8px rhythm */
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 32px, 1160px); /* Bumper padding on edges for mobile comfort (aligned to 8px) */
  }

  .header-inner {
    min-height: 64px;
  }

  .nav {
    gap: 16px; /* Standardized to 16px matching 8px rhythm */
    font-size: 13px;
  }

  .hero {
    padding: 48px 0 40px; /* Aligned to 8px rhythm */
  }

  h1 {
    font-size: 44px;
  }

  .lead {
    font-size: 17px;
  }

  .button {
    width: 100%;
  }

  .section,
  .systems {
    padding: 56px 0;
  }

  .systems-list div {
    padding: 32px 0; /* More balanced mobile spacing */
  }

  .systems-layout {
    gap: 24px;
  }

  .contact-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Zen simplicity additions for above-the-fold calm layout */
.key-card {
  margin: 48px auto; /* Perfect 48px matching 8px rhythm */
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px; /* Standardized to 32px 32px for symmetric 8px grid (was 32px 36px) */
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.key-label {
  font-size: 12px; /* Enhanced font size for WCAG contrast and readability (was 11px) */
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px; /* Standardized to 16px (was 14px) */
}

.key-row {
  display: flex;
  align-items: center;
  gap: 16px; /* Standardized to 16px (was 12px) */
  background: var(--surface-2);
  padding: 12px 16px; /* Standardized to perfect 8px increments (was 10px 14px) */
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 16px; /* Standardized to 16px (was 12px) */
}

#cta-key-masked {
  font-family: monospace;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.5px;
  flex: 1;
}

.key-copy-btn {
  margin-left: auto;
  background: var(--ink);
  color: #fff;
  border: none;
  min-height: 44px; /* Standardized 44px minimum touch target for mobile accessibility */
  padding: 12px 20px; /* Standardized symmetric comfort padding */
  border-radius: 6px;
  font-size: 14px; /* Enhanced readability for text label */
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Standardized to 8px (was 6px) */
  transition: background 0.15s ease, transform 0.15s ease;
}

.key-copy-btn:hover {
  background: var(--green);
}

.key-copy-btn:active {
  transform: scale(0.96); /* Instant tactile press compression feedback */
}

.key-copy-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.key-feedback {
  font-size: 12px; /* Enhanced legibility floor (was 11px) */
  color: var(--green);
  font-weight: 700;
  margin: 8px 0 16px; /* Standardized 8px and 16px metrics (was 4px and 12px) */
  display: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.key-launch {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* Standardized 44px minimum touch target for mobile */
  font-size: 14px; /* Enhanced readability floor (was 13px) */
  font-weight: 800;
  color: var(--green);
  transition: color 0.15s ease, transform 0.15s ease;
  gap: 8px; /* Standardized to 8px (was 6px) */
}

.key-launch:hover {
  color: var(--ink);
}

.key-launch:active {
  transform: scale(0.98); /* Tactile click compression feedback */
}

.key-launch:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.quiet-contact {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.quiet-contact:hover {
  color: var(--ink);
}
