:root {
  color-scheme: dark;
  --bg: #090b10;
  --bg-soft: #0f131b;
  --panel: rgba(255, 255, 255, 0.028);
  --panel-strong: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.085);
  --text: #f3f5f9;
  --muted: #aab4c5;
  --muted-strong: #c8d1df;
  --accent-sopho: #5a7cff;
  --accent-rallytap: #5fc8ff;
  --accent-warm: #d4deee;
  --card-sopho: #0d1017;
  --card-sopho-soft: #111621;
  --card-rallytap: #0d1016;
  --card-rallytap-soft: #101821;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 999px;
  --content: 1240px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  background:
    radial-gradient(circle at top left, rgba(90, 124, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(95, 200, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #090b10 0%, #07090d 100%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

.page-shell {
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.hero,
.products,
.principles,
.site-footer {
  position: relative;
}

main {
  flex: 1 0 auto;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 0 42px;
  text-align: center;
}

.hero-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.hero-mark__bar {
  display: block;
  height: 8px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--accent-warm), rgba(212, 222, 238, 0.16));
}

.hero-mark__bar--short {
  width: 64px;
}

.hero-mark__bar--long {
  width: 152px;
  background: linear-gradient(90deg, var(--accent-sopho), var(--accent-rallytap));
}

.section-label,
.product-name {
  margin: 0;
  font-family: "Montserrat", "Inter", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
}

.section-label {
  color: var(--muted);
  font-size: 0.9rem;
}

h1,
h2,
h3,
.footer-wordmark {
  margin: 0;
  font-family: "Montserrat", "Inter", sans-serif;
  font-weight: 500;
  letter-spacing: -0.03em;
}

h1 {
  margin-top: 0;
  font-size: clamp(3.8rem, 17vw, 9.2rem);
  line-height: 0.9;
}

.wordmark {
  font-family: "Prosto One", "Montserrat", sans-serif;
  font-size: clamp(2.72rem, 11.5vw, 6.2rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.98;
  text-transform: lowercase;
}

.hero-copy {
  max-width: 32rem;
  margin: 26px 0 0;
  color: var(--muted-strong);
  font-size: clamp(1.02rem, 3.8vw, 1.2rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: transform 160ms ease;
}

.button:hover,
.button:focus-visible,
.product-link:hover,
.product-link:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, rgba(90, 124, 255, 0.24), rgba(95, 200, 255, 0.18));
  border-color: rgba(255, 255, 255, 0.14);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.02);
}

.button--card {
  margin-top: 30px;
  width: fit-content;
  background: rgba(9, 11, 16, 0.92);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.products,
.principles {
  padding: 52px 0 0;
}

h2 {
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 0.98;
  margin: 40px 0;
  text-align: center;
}

.product-grid,
.principles-grid {
  display: grid;
  gap: 16px;
}

.product-card,
.principle {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow);
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px 22px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.24);
}

.product-card--sopho {
  background:
    radial-gradient(circle at top right, rgba(101, 120, 226, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.024)),
    linear-gradient(180deg, #1b2031, #10131b);
}

.product-card--rallytap {
  background:
    radial-gradient(circle at top left, rgba(82, 161, 226, 0.18), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.022)),
    linear-gradient(180deg, #18354f, #10202f);
}

.product-topline {
  display: flex;
  align-items: center;
  gap: 16px;
}

.product-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
}

.product-logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.product-logo--sopho {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.product-logo--sopho img {
  width: 100%;
}

.product-logo--rallytap {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.product-logo--rallytap img {
  width: 100%;
}

.product-name {
  color: var(--muted);
  display: inline-flex;
  align-items: baseline;
  gap: 0.04em;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.product-name--sopho {
  color: #d6dde9;
}

.product-name--rallytap {
  color: #dbe4ef;
}

.product-name__base {
  color: #d4dce8;
}

.product-name__accent {
  background: linear-gradient(180deg, #dff0ff 0%, #76d4ff 35%, #2fa2ff 72%, #1b69d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.product-tag {
  margin: 16px 0 0;
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: clamp(1.36rem, 5vw, 2.12rem);
  font-weight: 500;
  line-height: 0.98;
  white-space: nowrap;
}

.product-copy,
.principle p {
  margin: 12px 0 0;
  max-width: 28rem;
  color: var(--muted-strong);
  font-size: 0.97rem;
}

.product-link {
  display: inline-flex;
  margin-top: 24px;
  color: var(--text);
  font-weight: 600;
}

.principle {
  padding: 20px;
}

.principle h3 {
  font-size: 1.2rem;
}

.principles--minimal .section-heading {
  margin-bottom: 18px;
}

.principles-copy {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.principles-lead,
.principles-subcopy {
  margin: 0;
  color: var(--muted-strong);
}

.principles-lead {
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: clamp(1.34rem, 4vw, 1.7rem);
  line-height: 1.2;
}

.principles-line {
  display: inline;
}

.principles-subcopy {
  margin-top: 10px;
  font-size: 1rem;
}

.site-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 56px;
}

.footer-wordmark {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  color: var(--muted);
}

.origin-page {
  flex: 1 0 auto;
}

.about-section {
  padding-top: 18px;
}

.about-row {
  display: grid;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
  align-items: start;
}

.about-card {
  padding: 20px 18px 18px;
  box-shadow: none;
  display: grid;
  justify-items: center;
  align-content: start;
}

.about-entry {
  margin: 0 auto;
}

.about-entry--sophos {
  width: min(150px, 100%);
}

.about-entry--mathema {
  width: min(175px, 100%);
}

.about-card h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(2rem, 4vw, 2.25rem);
  text-align: center;
}

.about-term {
  font-family: "Prosto One", "Montserrat", sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: steelblue;
}

.about-term a {
  color: inherit;
  text-decoration: none;
}

.about-list {
  margin: 12px 0 0;
  padding-left: 1.35rem;
  color: var(--muted-strong);
  display: block;
  text-align: left;
  list-style: decimal;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.about-list li+li {
  margin-top: 10px;
}

.about-list li {
  white-space: normal;
}

.about-closing {
  margin: 28px 0 0;
  color: var(--muted-strong);
  font-size: 1.04rem;
  text-align: center;
}

.about-closing__line {
  display: block;
  margin-top: 12px;
}

@media (min-width: 700px) {
  .page-shell {
    width: min(calc(100% - 48px), var(--content));
  }

  .hero {
    padding: 64px 0 0;
  }

  .products,
  .principles {
    padding-top: 72px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    max-width: 920px;
    margin: 0 auto;
    gap: 44px;
    padding: 18px 0 0;
  }

  .product-card--rallytap {
    transform: translateY(14px);
  }

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

  .site-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .about-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

}

@media (min-width: 700px) and (max-width: 979px) {
  .product-grid {
    gap: 28px;
  }

  .product-card {
    padding: 22px 20px;
  }

  .product-name {
    font-size: 1.5rem;
    letter-spacing: 0.12em;
  }

  .product-tag {
    font-size: clamp(1.22rem, 2.8vw, 1.72rem);
    line-height: 1.02;
  }

  .product-copy {
    font-size: 0.9rem;
  }
}

@media (min-width: 980px) {
  .page-shell {
    width: min(calc(100% - 72px), var(--content));
  }

  .hero {
    padding: 84px 0 0;
  }

  .hero-copy {
    max-width: 36rem;
    font-size: 1.22rem;
  }

  .wordmark {
    font-size: clamp(5.2rem, 7.6vw, 6.6rem);
    letter-spacing: 0.032em;
  }

  .product-card {
    padding: 24px;
    min-height: 228px;
  }

  .product-name {
    font-size: 1.5rem;
  }

  .product-tag {
    font-size: clamp(1.55rem, 2vw, 2.02rem);
    line-height: 1;
  }

  .principle {
    padding: 24px;
  }

  .origin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .hero {
    padding: 30px 0 30px;
  }

  .products {
    padding-top: 34px;
  }

  .section-heading {
    margin-bottom: 18px;
  }

  .product-grid {
    gap: 18px;
  }

  .product-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 22px 20px;
    align-items: center;
    text-align: center;
  }

  .product-topline {
    width: 100%;
    justify-content: center;
  }

  .product-tag,
  .product-copy {
    text-align: center;
  }

  .product-copy {
    max-width: 24rem;
  }

  .button--card {
    align-self: center;
    margin-top: 24px;
  }

  .site-footer {
    gap: 14px;
  }

  .about-row {
    gap: 18px;
  }

  .principles-line {
    display: block;
  }
}
