@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

:root {
  --canvas: #fff;
  --ink: #111;
  --accent: #546bed;
  --accent-hover: #4358d4;
  --slab: #f4f6fb;
  --footer: #26252d;
  --footer-ink: #fff;
  --muted: #6b7280;
  --promo: #5b3cff;
  --wrap: 1180px;
  --main: 770px;
  --side: 300px;
  --nav: 118px;
  --slider: 400px;
  --btn-r: 2px;
  --card-r: 20px;
  --t: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Montserrat, Arial, Helvetica Neue, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
}
.skip:focus { left: 8px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.wrap {
  width: min(var(--wrap), calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.header {
  background: var(--canvas);
  min-height: var(--nav);
  position: relative;
  border-bottom: 1px solid #eee;
}
.btn.header__ask--bar { display: none; }
.header__in {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 12px;
}
.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header__row--nav { flex-wrap: nowrap; }
.header__row--nav .nav { flex: 1; min-width: 0; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.logo img, .logo svg { width: 44px; height: 44px; }
.logo__name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.logo__tag {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.util {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
}
.util a { text-decoration: none; }
.util a:hover { color: var(--accent); }
.util small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}
.nav > li { position: relative; }
.nav > li > a { text-decoration: none; }
.nav > li > a[aria-current="page"],
.nav a:hover { color: var(--accent); }
.nav__drop {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 40;
  min-width: 220px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms;
}
.nav > li:hover > .nav__drop,
.nav > li:focus-within > .nav__drop {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.nav__drop a {
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 500;
}
.nav__drop a:hover { background: var(--slab); color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--btn-r);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t);
}
.btn:hover { background: var(--accent-hover); }
.btn--ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #ddd;
}
.btn--ghost:hover { background: var(--slab); }

#menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
}
#menu-btn span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}
#menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #fff;
  padding: 20px;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t) ease, visibility var(--t);
}
#menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#menu a { display: block; padding: 8px 0; text-decoration: none; font-weight: 600; }
#menu .sub { display: none; padding-left: 12px; }
#menu .sub.is-open { display: block; }
#menu .sub a { font-weight: 500; font-size: 14px; }
.sub-toggle {
  border: 0;
  background: var(--slab);
  padding: 6px 10px;
  margin: 0 0 8px;
  cursor: pointer;
}

/* Rail */
.g { display: grid; gap: 16px; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.fade { animation: fade-in var(--t) ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.rail {
  position: relative;
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  min-height: var(--slider);
  overflow: hidden;
  background: #1a1a1a;
  color: #fff;
}
.rail__track {
  display: flex;
  width: 100%;
  transition: transform 300ms ease;
  will-change: transform;
}
.rail__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: var(--slider);
  background: #222 center/cover no-repeat;
  position: relative;
  color: #fff;
}
.rail__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
}
.rail__copy {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 56px;
  text-align: center;
}
.rail__copy h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.2;
}
.rail__copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rail__ui {
  position: absolute;
  z-index: 2;
  inset: auto 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rail__dots { display: flex; gap: 8px; }
.rail__dots button,
.rail__ui .rail__prev,
.rail__ui .rail__next {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  cursor: pointer;
}
.rail__dots button.is-on { background: #fff; }
.rail__ui .rail__prev,
.rail__ui .rail__next {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 18px;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(var(--wrap), calc(100% - 32px));
  margin: 10px auto 32px;
  position: relative;
  z-index: 3;
}
.thumbs button {
  border: 0;
  padding: 0;
  background: #f0f0f2;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  min-height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
  opacity: .85;
  transition: opacity var(--t) ease;
}
.thumbs button[aria-current="true"] { opacity: 1; }
.thumbs button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255,255,255,.88), rgba(255,255,255,.28));
}
.thumbs span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 16px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* Split / cards */
.split {
  display: grid;
  grid-template-columns: minmax(0, var(--main)) var(--side);
  gap: 40px;
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto 40px;
  align-items: start;
}
.cards--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cards--vert { display: grid; gap: 20px; }
.cards--sm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cards--row { display: grid; gap: 16px; }
.card { text-decoration: none; overflow: hidden; }
.card img {
  width: 100%;
  aspect-ratio: 335 / 220;
  object-fit: cover;
  background: var(--slab);
  transition: transform .25s ease;
}
@media (hover: hover) {
  .card:hover img { transform: scale(1.04); }
  .card:hover h3 { color: var(--accent); }
}
.card h3 {
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}
.card p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.card--sm {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  align-items: center;
}
.card--sm img { aspect-ratio: 1; width: 100px; }
.card--row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: start;
}
.card--row img { aspect-ratio: 1; width: 100px; }

.skel {
  min-height: 48px;
  border: 1px dashed #c9cdd6;
  background: repeating-linear-gradient(-45deg, #fafafa, #fafafa 8px, #f0f2f6 8px, #f0f2f6 16px);
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
}

.slab {
  background: var(--slab);
  border-radius: var(--card-r);
  padding: 40px 28px;
  margin: 24px 0;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.slab p { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; }
.spacer { height: 100px; }

.home-h1 {
  margin: 0 0 8px;
  font-size: 39px;
  font-weight: 700;
  line-height: 1.2;
}

.side {
  display: grid;
  gap: 20px;
}
.side h2, .side h3 { margin: 0 0 8px; font-size: 16px; }
.find input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #ddd;
  padding: 0 10px;
}
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links a { display: block; padding: 6px 0; text-decoration: none; font-size: 14px; }
.side-links a:hover { color: var(--accent); }
.side-news { display: grid; gap: 10px; }
.guides-tile {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--promo);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  padding: 20px;
}
.media-row { display: grid; gap: 8px; }
.media-row img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #111; }

.tasks {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto 48px;
}
.tasks h2 { margin: 0 0 8px; font-size: 28px; text-align: center; }
.tasks > p { margin: 0 0 24px; text-align: center; color: var(--muted); }
.tasks__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.task {
  background: var(--slab);
  border-radius: var(--card-r);
  padding: 22px;
  text-decoration: none;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background-color var(--t) ease;
}
@media (hover: hover) {
  .task:hover { background: #e8ebf4; }
}
.task small { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.task h3 { margin: 0; font-size: 17px; }
.task span { margin-top: auto; color: var(--accent); font-size: 14px; font-weight: 600; }

.crumbs { font-size: 13px; color: var(--muted); margin: 16px 0; }
.prose { font-size: 16px; }
.prose h1 { font-size: 39px; font-weight: 700; line-height: 1.2; }
.prose h2 { font-size: 26px; font-weight: 700; margin: 36px 0 12px; }
.prose h3 { font-size: 17px; font-weight: 700; margin: 24px 0 8px; }
.prose p, .prose li { line-height: 1.55; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.2em; }

.ph {
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--slab);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.ph--32 { aspect-ratio: 3 / 2; }
.ph--11 { aspect-ratio: 1; }
.ph--34 { aspect-ratio: 3 / 4; }
.ph--169 { aspect-ratio: 16 / 9; }
.ph::after { content: attr(data-ph); }

.checks { list-style: none; margin: 0 0 24px; padding: 0; }
.checks li { padding: 8px 0 8px 28px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.techs { display: grid; gap: 20px; margin: 16px 0 28px; }
.tech {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  text-decoration: none;
  align-items: center;
}
.tech img, .tech .ph { aspect-ratio: 3 / 2; }
.tech h3 { margin: 0 0 6px; font-size: 18px; }
.tech span { color: var(--accent); font-size: 14px; font-weight: 600; }

.table-wrap { overflow-x: auto; margin: 16px 0 28px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left; }
.table th { background: var(--slab); font-weight: 600; }

.faq { margin: 16px 0 28px; }
.faq details { border-bottom: 1px solid #eee; padding: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 0; font-size: 15px; }

.form {
  display: grid;
  gap: 4px;
  background: var(--slab);
  border-radius: var(--card-r);
  padding: 24px;
  margin: 24px 0;
}
.form label { font-size: 13px; font-weight: 600; margin-top: 8px; }
.form input, .form textarea, .form select {
  width: 100%;
  border: 1px solid #ddd;
  padding: 8px;
  background: #fff;
}
.form .ask__check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 12px; }

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.chip {
  background: var(--slab);
  border-radius: var(--card-r);
  padding: 20px;
  min-height: 120px;
}
.chip small { color: var(--muted); font-size: 12px; font-weight: 600; }
.chip p { margin: 8px 0 0; font-weight: 600; }

.hero-calc {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  width: min(var(--wrap), calc(100% - 32px));
  margin: 24px auto 40px;
  align-items: start;
}
.calc {
  background: var(--slab);
  border-radius: 16px;
  padding: 24px;
}
.calc label { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 600; }
.calc input, .calc select { width: 100%; border: 1px solid #ddd; padding: 8px; background: #fff; }
.calc [data-result] { font-size: 28px; font-weight: 700; margin: 16px 0; }
.calc .muted { color: var(--muted); font-size: 13px; }

.case {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  margin: 0 0 20px;
}
.case img, .case .ph { aspect-ratio: 3 / 2; }
.case h3 { margin: 0; font-size: 16px; }
.case small { color: var(--muted); }

.proof { width: min(420px, 100%); margin: 16px 0 28px; }
.proof img, .proof .ph { aspect-ratio: 3 / 4; }

.map {
  min-height: 280px;
  background: var(--slab);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  margin: 16px 0 28px;
}

.offer { display: grid; gap: 12px; margin: 0 0 24px; }
.offer article { background: var(--slab); border-radius: 16px; padding: 16px 20px; }
.offer h3 { margin: 0 0 6px; }

.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 24px; }

/* Ask / top */
#ask {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17,17,17,.45);
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t) ease, visibility var(--t);
}
#ask.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#ask .ask__box {
  background: #fff;
  width: min(440px, 100%);
  padding: 24px;
  border-radius: 8px;
  transform: translateY(8px);
  transition: transform var(--t) ease;
}
#ask.is-open .ask__box { transform: none; }
#ask label { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 600; }
#ask input, #ask textarea {
  width: 100%;
  border: 1px solid #ddd;
  padding: 8px;
}
#ask .ask__check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; font-size: 12px; font-weight: 400; }
#top-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
#top-btn.is-on { opacity: 1; pointer-events: auto; }

/* Footer */
.foot {
  background: var(--footer);
  color: var(--footer-ink);
  padding: 48px 0 24px;
}
.foot__grid {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr;
  gap: 24px;
}
.foot h2 { margin: 0 0 12px; font-size: 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot a { text-decoration: none; font-size: 14px; color: inherit; }
.foot .logo { color: #fff; }
.foot a:hover { color: #c5cdff; }
.foot li { margin: 0 0 8px; }
.foot .muted { color: #b0b0b8; font-size: 13px; }
.copy {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid #3a3942;
  font-size: 12px;
  color: #9a9aa3;
}

@media (max-width: 73.99em) {
  .util small { display: none; }
  .nav { font-size: 12px; gap: 6px 12px; }
}
@media (max-width: 69.99em) {
  .tasks__grid { grid-template-columns: 1fr 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .g-3, .g-4 { grid-template-columns: 1fr 1fr; }
  .chips { grid-template-columns: 1fr 1fr; }
  .examples { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 63.99em) {
  .tech { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; }
}
@media (max-width: 55.99em) {
  .split { grid-template-columns: 1fr; }
  .cards--grid { grid-template-columns: 1fr 1fr; }
  .hero-calc { grid-template-columns: 1fr; }
}
@media (max-width: 48em) {
  .header { min-height: 95px; }
  .util { display: none; }
  .header__row--nav { display: none; }
  #menu-btn { display: block; }
  .btn.header__ask--bar { display: inline-flex; justify-self: end; }
  .header__row--top {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
  }
  .logo { justify-self: center; margin: 0; }
  .thumbs { grid-template-columns: 1fr 1fr; margin-top: 8px; }
  .cards--grid, .cards--sm, .tasks__grid, .foot__grid, .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .home-h1, .prose h1 { font-size: 28px; }
  .rail__copy { padding: 72px 0 56px; }
  .chips, .examples { grid-template-columns: 1fr; }
}
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.19, 1, .22, 1), transform .6s cubic-bezier(.19, 1, .22, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .rail__track { transition: none !important; }
}
