:root {
  font-family: "Aptos", "Segoe UI", sans-serif;
  line-height: 1.6;
  font-weight: 400;
  color: #1f2937;
  background: #f7f8fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --text: #1f2937;
  --muted: #5b6678;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --border: #d9e1ec;
  --accent: #027BC6;
  --accent-soft: rgba(2, 123, 198, 0.10);
  --ink: #0f172a;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(21, 94, 239, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(14, 116, 144, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fb 55%, #eef2f7 100%);
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

.site-header {
  width: 100%;
  border-bottom: 1px solid rgba(217, 225, 236, 0.95);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
}

.site-header-inner,
.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 0.9rem;
}

.page-shell {
  padding: 1.2rem 0 1.8rem;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.15rem 1rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(217, 225, 236, 0.95);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.6rem;
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
  border-bottom-color: rgba(2, 123, 198, 0.35);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
  gap: 1.5rem;
  align-items: center;
  padding: 2rem;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
  gap: 1.35rem;
  align-items: stretch;
}

.home-hero {
  display: grid;
  gap: 1.1rem;
}

.home-hero-title {
  margin: 0;
  width: 100%;
}

.home-about,
.hero-panel {
  padding: 1.65rem;
}

.home-about {
  padding: 0;
}

.home-visual {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: transparent;
}

.home-hero-graphic {
  width: min(100%, 440px);
  height: auto;
  display: block;
}

.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--accent);
}

h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  line-height: 1.1;
}

h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  line-height: 1.2;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

p {
  margin: 0 0 0.95rem;
  color: var(--muted);
}

.home-about h1 {
  max-width: 15ch;
}

.home-about p {
  max-width: 64ch;
}

.hero-copy p {
  max-width: 66ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button:hover {
  background: #0162A0;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(2, 123, 198, 0.25);
}

.button-secondary {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--border);
}

.button-secondary:hover {
  background: #f8fbff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

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

.hero-visual-static {
  min-height: 100%;
  align-items: center;
}

.hero-graphic-wrap {
  position: relative;
  width: min(100%, 380px);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, #e6eefc 0%, #ffffff 100%);
}

.hero-graphic-frame {
  width: min(100%, 440px);
  padding: 1rem;
}

.hero-graphic {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.panel,
.section-block,
.product-card,
.post-card,
.blog-post {
  padding: 1.45rem;
}

.section-block {
  display: grid;
  gap: 0.75rem;
}

.story-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.15rem;
}

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

.blog-list,
.related-links {
  display: grid;
  gap: 1rem;
}

.section-head {
  margin-bottom: 1rem;
}

.section-head p,
.blog-intro p {
  margin-bottom: 0;
}

.feature-grid article p,
.product-card p,
.post-card p,
.blog-post p,
.blog-post li,
.panel p {
  margin-bottom: 0;
}

.feature-grid article,
.product-card,
.post-card,
.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.feature-grid article {
  padding: 1.25rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.product-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.kicker,
.post-date,
.post-meta {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.product-tagline {
  color: var(--ink);
  font-weight: 700;
}

.post-excerpt {
  color: var(--accent);
  font-weight: 600;
}

.list-clean {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.list-clean li + li {
  margin-top: 0.5rem;
}

.blog-layout {
  display: grid;
  gap: 1.2rem;
}

.blog-post {
  display: grid;
  gap: 1rem;
}

.blog-post-header p {
  margin-bottom: 0;
}

.blog-post-summary {
  font-size: 1.05rem;
  color: var(--text);
}

.article-section {
  display: grid;
  gap: 0.75rem;
}

.article-section h2 {
  margin-bottom: 0;
}

.math-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.math-list li + li,
.blog-post ul li + li {
  margin-top: 0.45rem;
}

.blog-post-header {
  display: grid;
  gap: 0.5rem;
}

.related-links {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-card {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 0.2rem 0;
  margin-top: 0.7rem;
  border-top: 1px solid rgba(217, 225, 236, 0.95);
  color: #64748b;
  font-size: 0.93rem;
}

.footer a {
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 1.45rem;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.9rem 0;
  }

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

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

  .home-about p,
  .hero-copy p {
    max-width: none;
  }

  h1 {
    max-width: none;
  }

  nav {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .site-header-inner,
  .page-shell {
    width: min(1120px, calc(100% - 1rem));
  }

  nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
  }

  .nav-link {
    width: 100%;
    min-width: 0;
    padding: 0.6rem 0.4rem;
    text-align: center;
    border-bottom: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.03);
    justify-content: center;
  }

  .nav-link:hover {
    background: rgba(2, 123, 198, 0.07);
    border-bottom: none;
  }

  .nav-link.active {
    background: rgba(2, 123, 198, 0.10);
    border-bottom: none;
  }

  .product-header {
    align-items: flex-start;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .button {
    width: 100%;
  }

  .panel,
  .section-block,
  .product-card,
  .post-card,
  .blog-post {
    padding: 1.15rem;
  }
}