:root {
  --brand: #0176d3;
  --brand-dark: #014486;
  --brand-deep: #032d60;
  --text: #181818;
  --text-weak: #5c5c5c;
  --border: #e5e5e5;
  --bg: #ffffff;
  --bg-shade: #f3f3f3;
  --bg-brand-soft: #eef4fb;
  --radius: 0.5rem;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Salesforce Sans",
    Roboto, Helvetica, Arial, sans-serif;
  --maxw: 64rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: var(--shadow);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--text-weak);
  font-weight: 600;
  font-size: 0.9375rem;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-brand {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
}

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

.btn-neutral {
  background: #fff;
  color: var(--brand);
  border-color: #c9c9c9;
}

.btn-neutral:hover {
  background: var(--bg-shade);
}

/* Hero */
.hero {
  background: radial-gradient(
      ellipse at top left,
      var(--bg-brand-soft) 0%,
      transparent 55%
    ),
    linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
  padding: 5rem 0 4.5rem;
}

.hero-inner {
  max-width: 48rem;
}

.eyebrow,
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 0.75rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
  color: var(--brand-deep);
  letter-spacing: -0.02em;
}

.hero-title .accent {
  color: var(--brand);
}

.hero-sub {
  font-size: 1.1875rem;
  color: var(--text-weak);
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0 0 0.75rem;
  color: var(--brand-deep);
  letter-spacing: -0.01em;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--text-weak);
  max-width: 42rem;
  margin: 0 0 2.5rem;
}

/* Model + formula */
.model {
  background: var(--bg-shade);
  text-align: center;
}

.model .section-lead {
  margin-left: auto;
  margin-right: auto;
}

.formula {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15em;
  margin: 1.5rem 0 3rem;
  line-height: 1;
  font-weight: 700;
  color: var(--brand-deep);
}

.formula .f-paren {
  font-size: clamp(3.5rem, 11vw, 7rem);
  font-weight: 300;
  color: var(--brand);
}

.formula .f-term {
  font-size: clamp(2.75rem, 8vw, 5rem);
}

.formula .f-op {
  font-size: clamp(1.75rem, 5vw, 3rem);
  color: var(--text-weak);
  margin: 0 0.2em;
}

.formula .f-exp {
  font-size: clamp(1.75rem, 5vw, 3rem);
  color: var(--brand);
  align-self: flex-start;
  margin-top: 0.2em;
  margin-left: 0.1em;
}

.formula-legend {
  max-width: 52rem;
  margin: 0 auto;
}

.legend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.legend-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 3rem;
  padding: 0 0.75rem;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.legend-text {
  margin: 0;
  color: var(--text-weak);
}

.model-callout {
  max-width: 44rem;
  margin: 3rem auto 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--brand);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-deep);
  text-align: left;
}

/* Grid + cards */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--bg-brand-soft);
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: var(--brand-deep);
}

.card-body {
  margin: 0;
  color: var(--text-weak);
}

/* Band */
.band {
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 100%);
  color: #fff;
  padding: 4rem 0;
}

.band-inner {
  max-width: 44rem;
  text-align: center;
}

.band-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0 0 1rem;
}

.band-body {
  font-size: 1.1875rem;
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.92);
}

.band-contact .btn-brand {
  background: #fff;
  color: var(--brand-dark);
}

.band-contact .btn-brand:hover {
  background: var(--bg-shade);
}

/* Subscription tiers */
.tier {
  position: relative;
}

.tier-featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
}

.tier-badge {
  position: absolute;
  top: -0.75rem;
  right: 1.25rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.625rem;
  border-radius: 1rem;
}

.tier-tagline {
  color: var(--text-weak);
  font-style: italic;
  margin: 0 0 1rem;
}

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

.tier-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.75rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.tier-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.5rem;
  height: 0.875rem;
  border: solid var(--brand);
  border-width: 0 0.15rem 0.15rem 0;
  transform: rotate(45deg);
}

.tier-note {
  text-align: center;
  color: var(--text-weak);
  max-width: 38rem;
  margin: 2rem auto 1.5rem;
}

.center {
  text-align: center;
}

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-weak);
  font-size: 0.9375rem;
}

.footer-inner .brand-name {
  color: var(--brand-deep);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 48rem) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .site-nav {
    gap: 1rem;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

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