:root {
  --ink: #0b1220;
  --muted: #647084;
  --subtle: #8b95a7;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.16);
  --paper: #fbfcfd;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --brand: #0f6d82;
  --brand-strong: #08495a;
  --mint: #10b981;
  --blue: #2563eb;
  --rose: #e11d48;
  --amber: #d97706;
  --radius: 16px;
  --shadow-sm: 0 8px 28px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 22px 70px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 34px 110px rgba(15, 23, 42, 0.18);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 42%, #eef5f7 100%);
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

body.nav-open {
  overflow: hidden;
}

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

img,
svg {
  display: block;
}

.shell,
.section-shell {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 28px));
  min-height: 64px;
  margin: 12px auto 0;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(20px) saturate(160%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  font-size: 0.98rem;
  font-weight: 760;
}

.brand img {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 109, 130, 0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  font-size: 0.92rem;
  font-weight: 680;
}

.nav a {
  min-width: 104px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #425066;
  text-align: center;
  transition: color 160ms ease, background 160ms ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--ink);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  letter-spacing: 0;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 42vh;
  padding: 96px 0 42px;
  text-align: center;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 18px;
  font-size: clamp(4.2rem, 10vw, 8.5rem);
  line-height: 0.86;
  white-space: nowrap;
}

.lead {
  max-width: 720px;
  margin: 0 auto 30px;
  color: #475569;
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.app-store-button {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  gap: 12px;
  padding: 7px 17px 8px 14px;
  border: 1px solid #050505;
  border-radius: 12px;
  color: #fff;
  background: #050505;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.app-store-button:hover {
  transform: translateY(-2px);
  background: #171717;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.26);
}

.store-mark svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
}

.app-store-button small,
.app-store-button strong {
  display: block;
  line-height: 1;
}

.app-store-button small {
  margin-bottom: 4px;
  font-size: 0.68rem;
  font-weight: 650;
}

.app-store-button strong {
  font-size: 1.28rem;
  font-weight: 760;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 6px;
  color: var(--ink);
  font-weight: 760;
}

.text-link::after {
  content: "->";
  margin-left: 8px;
  color: var(--brand);
}

.showcase {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.92)),
    #fff;
  box-shadow: var(--shadow-md);
}

.showcase-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.showcase-heading .eyebrow {
  margin-bottom: 10px;
}

.showcase-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.65rem, 2.8vw, 3.1rem);
  line-height: 0.98;
}

.showcase-heading > p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.screen-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.screen-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  min-height: 0;
  padding: 18px 18px 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.screen-card img {
  display: block;
  width: 100%;
  height: 350px;
  margin-top: auto;
  object-fit: contain;
  object-position: top;
  filter: saturate(0.94) contrast(0.99);
}

.screen-card-large {
  grid-row: auto;
}

.screen-card figcaption {
  display: grid;
  gap: 8px;
  min-height: 98px;
  order: -1;
}

.screen-card figcaption span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.screen-card figcaption strong {
  color: var(--ink);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: 1.35;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 74px 0 88px;
}

.principles article,
.feature-grid article,
.library-grid article {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-sm);
}

.principles article {
  min-height: 230px;
  padding: 26px;
}

.principles span,
.feature-grid span,
.library-grid span,
.oss-feature span {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.principles h2 {
  margin: 28px 0 10px;
  font-size: clamp(1.6rem, 2.4vw, 2.25rem);
  line-height: 1.02;
}

.principles p,
.feature-grid p,
.flow-list p,
.download p,
.oss-feature p,
.library-grid a,
.site-footer {
  color: var(--muted);
}

.section {
  padding: 92px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 4.6rem);
  line-height: 0.96;
}

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

.feature-grid article {
  min-height: 250px;
  padding: 24px;
}

.feature-grid h3,
.library-grid h3 {
  margin: 34px 0 10px;
  font-size: 1.25rem;
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(260px, 0.52fr);
  gap: 42px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-md);
}

.flow-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.flow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  width: 100%;
  padding: 18px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.flow-step:hover,
.flow-step.is-active {
  border-color: rgba(15, 23, 42, 0.1);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.flow-step span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border-radius: 10px;
  color: var(--brand);
  background: rgba(15, 109, 130, 0.1);
  font-size: 0.78rem;
  font-weight: 820;
}

.flow-step.is-active span {
  color: #fff;
  background: var(--ink);
}

.flow-step h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.flow-step p {
  margin-bottom: 0;
}

.flow-screen {
  margin: 0;
  justify-self: center;
  width: min(100%, 260px);
  padding: 9px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 28px;
  background: linear-gradient(180deg, #fff, #eef3f7);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.flow-screen img {
  width: 100%;
  max-height: 565px;
  object-fit: cover;
  object-position: top;
  border-radius: 21px;
  transition: opacity 140ms ease;
}

.download {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  margin: 40px auto 0;
  padding: 30px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.download img {
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 109, 130, 0.22);
}

.download h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
}

.download p {
  max-width: 520px;
  margin-bottom: 0;
}

.open-source {
  padding-bottom: 72px;
}

.oss-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 30px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 28px;
  background: #0b1220;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.oss-feature h3 {
  max-width: 640px;
  margin: 16px 0 12px;
  font-size: clamp(1.7rem, 3vw, 3.2rem);
  line-height: 1;
}

.oss-feature p {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.oss-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.oss-links a {
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 720;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.library-grid article {
  padding: 22px;
}

.library-grid h3 {
  margin-top: 24px;
}

.library-grid a {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.site-footer > span:first-child {
  color: var(--ink);
  font-weight: 780;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink);
  font-weight: 680;
}

.legal-shell {
  width: min(860px, calc(100% - 44px));
  margin-inline: auto;
  padding: 82px 0 96px;
}

.legal-shell h1 {
  margin-bottom: 16px;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.9;
}

.legal-shell > p {
  margin-bottom: 42px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
}

.legal-shell section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.legal-shell h2 {
  margin-bottom: 10px;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.legal-shell p {
  color: var(--muted);
}

.legal-shell a {
  color: var(--brand-strong);
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .hero h1 {
    font-size: clamp(3.4rem, 11vw, 6.8rem);
  }

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

  .flow-layout,
  .oss-feature {
    grid-template-columns: 1fr;
  }

  .oss-links {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    top: 8px;
    min-height: 62px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 82px 14px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    box-shadow: var(--shadow-md);
  }

  body.nav-open .nav {
    display: flex;
  }

  .nav a {
    min-width: 0;
    padding: 13px;
  }

  .hero {
    min-height: 0;
    padding: 70px 0 32px;
  }

  .hero h1 {
    font-size: clamp(3.15rem, 16vw, 5rem);
  }

  .hero h1,
  .section-heading h2 {
    white-space: normal;
  }

  .app-store-button,
  .text-link {
    width: 100%;
    justify-content: center;
  }

  .showcase,
  .download,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .showcase {
    border-radius: 26px;
    padding: 20px;
  }

  .showcase-heading {
    display: grid;
    gap: 12px;
  }

  .showcase-heading > p {
    max-width: none;
    text-align: left;
  }

  .screen-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 2px 10px;
    scroll-snap-type: x mandatory;
  }

  .screen-card {
    flex: 0 0 76%;
    scroll-snap-align: center;
    min-height: 0;
  }

  .screen-card-large {
    grid-row: auto;
  }

  .screen-card img {
    height: 360px;
  }

  .screen-card figcaption {
    min-height: 0;
  }

  .principles,
  .feature-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .principles {
    padding: 52px 0 64px;
  }

  .section {
    padding: 68px 0;
  }

  .feature-grid article,
  .principles article {
    min-height: 0;
  }

  .flow-step {
    grid-template-columns: 1fr;
  }

  .flow-layout {
    padding: 16px;
  }

  .flow-screen {
    width: min(100%, 230px);
  }

  .download {
    padding: 24px;
  }

  .oss-feature {
    padding: 24px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .lead {
    font-size: 1rem;
  }

  .screen-card {
    flex-basis: 72%;
  }
}
