.home {
  --home-rail: #f0efe9;
  --home-desk: #f7f6f1;
  --home-page: #fdfcf9;
  --home-seam: #e9e9e3;
  background: var(--canvas);
}

@media (prefers-color-scheme: dark) {
  .home {
    --home-rail: #1b1b1b;
    --home-desk: #1f1f1f;
    --home-page: #252525;
    --home-seam: #171717;
  }
}

.home .wrap {
  width: min(1240px, calc(100% - 56px));
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.home .site-header {
  background: color-mix(in srgb, var(--canvas) 90%, transparent);
}

.home .header-row {
  min-height: 68px;
}

.home .brand span {
  color: var(--muted);
}

.home-hero {
  min-height: min(790px, calc(100vh - 68px));
  display: flex;
  align-items: center;
  padding: 88px 0 92px;
  overflow: hidden;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(390px, 0.82fr) minmax(560px, 1.18fr);
  gap: clamp(52px, 6vw, 88px);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.product-kicker,
.section-label,
.storage-type {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 650px;
  margin: 18px 0 0;
  font-size: clamp(48px, 5.2vw, 72px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.hero-lead {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.home .actions {
  margin-top: 34px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 20px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-facts li::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-strong);
  content: "";
}

.product-preview {
  min-width: 0;
  margin: 0;
}

.preview-window {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--home-rail);
  box-shadow: 0 30px 80px rgb(20 24 20 / 13%), 0 3px 12px rgb(20 24 20 / 8%);
  overflow: hidden;
}

.preview-window::after {
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--surface) 65%, transparent);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.preview-titlebar {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--home-seam);
  padding: 0 14px;
  color: var(--muted);
  font-size: 10px;
}

.preview-app-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.preview-app-name img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.preview-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preview-sync::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  content: "";
}

.preview-workbench {
  height: 430px;
  display: grid;
  grid-template-columns: 54px 178px minmax(0, 1fr);
}

.preview-rail {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--home-seam);
  padding: 13px 8px 10px;
}

.preview-rail > img {
  width: 26px;
  height: 26px;
  margin-bottom: 9px;
  border-radius: 7px;
}

.rail-action {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--muted);
}

.rail-action svg,
.feature-icon svg,
.client-badge svg,
.file-symbol svg,
.export-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-action-primary {
  margin-bottom: 5px;
  background: var(--accent-strong);
  color: #fff;
}

.rail-action.is-active {
  background: var(--accent-soft);
  color: var(--ink);
}

.rail-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-top: auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.preview-list {
  border-right: 1px solid var(--home-seam);
  background: var(--home-desk);
  padding: 0 8px;
}

.preview-list-heading,
.preview-editorbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--home-seam);
}

.preview-list-heading {
  padding: 0 5px;
  font-size: 12px;
}

.preview-list-heading span {
  color: var(--subtle);
  font-size: 16px;
}

.preview-note {
  position: relative;
  margin-top: 5px;
  border-radius: 9px;
  padding: 10px 10px 11px 13px;
}

.preview-note strong,
.preview-note span,
.preview-note small {
  display: block;
}

.preview-note strong {
  font-size: 11px;
}

.preview-note span {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 9px;
  white-space: nowrap;
}

.preview-note small {
  margin-top: 7px;
  color: var(--subtle);
  font-size: 8px;
}

.preview-note.is-selected {
  background: var(--accent-soft);
}

.preview-note.is-selected::before {
  position: absolute;
  inset: 9px auto 9px 0;
  width: 2px;
  border-radius: 2px;
  background: var(--accent-strong);
  content: "";
}

.preview-editor {
  min-width: 0;
  background: var(--home-desk);
}

.preview-editorbar {
  background: var(--home-rail);
  padding: 0 14px;
  font-size: 10px;
}

.preview-modes {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--home-desk);
  padding: 2px;
}

.preview-modes b {
  border-radius: 5px;
  padding: 3px 6px;
  color: var(--subtle);
  font-size: 8px;
  font-weight: 650;
}

.preview-modes b.is-active {
  background: var(--home-page);
  color: var(--ink);
}

.preview-document {
  height: calc(100% - 48px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 18px;
  border-inline: 1px solid var(--line);
  background: var(--home-page);
}

.preview-source,
.preview-rendered {
  min-width: 0;
  padding: 28px 18px;
  font-size: 9px;
  line-height: 1.75;
}

.preview-source {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.preview-source .md-title {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.preview-source .md-list {
  color: var(--ink);
}

.preview-source .md-code {
  margin-top: 5px;
  color: var(--success);
}

.preview-rendered {
  color: var(--muted);
}

.preview-rendered h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.preview-rendered p {
  margin: 0 0 13px;
}

.preview-rendered ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.preview-rendered li {
  position: relative;
  margin-top: 5px;
  padding-left: 18px;
}

.preview-rendered li::before {
  position: absolute;
  top: 3px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: "";
}

.preview-rendered li.is-done::before {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: inset 0 0 0 2px var(--home-page);
}

.preview-rendered code {
  border-radius: 4px;
  background: var(--accent-soft);
  padding: 2px 4px;
  color: var(--accent);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.product-preview figcaption {
  margin: 13px 4px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.home-section {
  border-top: 1px solid var(--line);
  padding: 104px 0;
}

.home-section-heading {
  max-width: 700px;
}

.home-section-heading h2 {
  margin: 15px 0 0;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 630;
  letter-spacing: -0.035em;
  line-height: 1.16;
  text-wrap: balance;
}

.home-section-heading > p:last-child {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
  margin-top: 62px;
}

.feature-item {
  border-top: 1px solid var(--line-strong);
  padding-top: 22px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-item h3 {
  margin: 24px 0 0;
  font-size: 18px;
  font-weight: 680;
}

.feature-item p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.storage-section {
  background: var(--paper);
}

.storage-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(60px, 8vw, 120px);
  align-items: start;
}

.storage-heading {
  position: sticky;
  top: 116px;
}

.storage-options {
  border-top: 1px solid var(--line-strong);
}

.storage-option {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
}

.storage-number {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.storage-option h3 {
  margin: 7px 0 0;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.storage-option div > p:not(.storage-type) {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.storage-option a,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.storage-option a:hover,
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.storage-option-nas {
  position: relative;
}

.storage-option-nas::before {
  position: absolute;
  inset: -1px auto -1px 0;
  width: 3px;
  border-radius: 3px;
  background: var(--accent-strong);
  content: "";
}

.storage-availability {
  display: block;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}

.portability-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(460px, 1.18fr);
  gap: clamp(60px, 9vw, 132px);
  align-items: center;
}

.portability-copy {
  max-width: 520px;
}

.portability-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.file-tree {
  padding: 24px 26px 22px;
}

.file-tree-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  color: var(--muted);
  font-size: 11px;
}

.file-tree-heading span:first-child {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.file-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row.file-child {
  padding-left: 30px;
}

.file-symbol {
  width: 26px;
  height: 26px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
}

.file-symbol svg {
  width: 18px;
  height: 18px;
}

.file-md {
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
}

.export-summary {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 15px 26px;
}

.export-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.export-summary > span:nth-child(2) {
  min-width: 0;
}

.export-summary strong,
.export-summary small {
  display: block;
}

.export-summary strong {
  font-size: 13px;
}

.export-summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.export-ready {
  margin-left: auto;
  color: var(--success);
  font-size: 11px;
  font-weight: 750;
}

.clients-section {
  background: var(--paper);
}

.clients-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 46px;
}

.download-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

.download-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.home .client-badge {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
}

.download-card .client-copy strong {
  font-size: 14px;
}

.download-card .client-copy span {
  max-width: 170px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-card .release-state {
  white-space: nowrap;
}

.download-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.home .footer-row {
  min-height: 86px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.footer-links a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.home .site-footer p {
  margin-left: 10px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .home-hero {
    min-height: 0;
  }

  .home-hero-grid {
    grid-template-columns: minmax(330px, 0.8fr) minmax(500px, 1.2fr);
    gap: 48px;
  }

  .preview-workbench {
    grid-template-columns: 50px 150px minmax(0, 1fr);
  }

  .preview-source,
  .preview-rendered {
    padding-inline: 14px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 42px 34px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .home-hero {
    padding: 74px 0 80px;
  }

  .home-hero-grid,
  .storage-layout,
  .portability-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 680px;
  }

  .product-preview {
    width: min(100%, 680px);
    margin-inline: auto;
  }

  .storage-heading {
    position: static;
  }

  .storage-layout,
  .portability-layout {
    gap: 52px;
  }

  .portability-copy {
    max-width: 680px;
  }
}

@media (max-width: 620px) {
  .home .wrap {
    width: min(100% - 32px, 1240px);
  }

  .home .header-row {
    min-height: 60px;
  }

  .home-hero {
    padding: 58px 0 64px;
  }

  .home-hero-grid {
    gap: 48px;
  }

  .hero-copy h1 {
    margin-top: 14px;
    font-size: 42px;
    letter-spacing: -0.04em;
  }

  .hero-lead {
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.75;
  }

  .hero-facts {
    gap: 6px 16px;
  }

  .preview-window {
    border-radius: 15px;
  }

  .preview-titlebar {
    height: 38px;
  }

  .preview-workbench {
    height: 360px;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .preview-rail {
    padding-inline: 5px;
  }

  .preview-rail > img {
    width: 24px;
    height: 24px;
  }

  .rail-action {
    width: 30px;
    height: 30px;
  }

  .preview-list {
    display: none;
  }

  .preview-editorbar {
    height: 44px;
    padding-inline: 10px;
  }

  .preview-document {
    height: calc(100% - 44px);
    grid-template-columns: 1fr;
    margin-inline: 10px;
  }

  .preview-source {
    display: none;
  }

  .preview-rendered {
    padding: 28px 24px;
    font-size: 10px;
  }

  .preview-rendered h2 {
    font-size: 20px;
  }

  .product-preview figcaption {
    text-align: left;
  }

  .home-section {
    padding: 72px 0;
  }

  .home-section-heading h2 {
    font-size: 34px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 44px;
  }

  .feature-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 16px;
  }

  .feature-item h3 {
    align-self: center;
    margin: 0;
  }

  .feature-item p {
    grid-column: 2;
  }

  .storage-option {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .portability-panel {
    border-radius: 14px;
  }

  .file-tree {
    padding-inline: 18px;
  }

  .export-summary {
    padding-inline: 18px;
  }

  .clients-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .desktop-client-action {
    display: none;
  }

  .download-grid {
    margin-top: 34px;
  }

  .download-card {
    padding: 17px;
  }

  .home .footer-row {
    min-height: 0;
    padding-block: 28px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-left: 0;
  }

  .home .site-footer p {
    margin-left: 0;
  }
}

@media (prefers-color-scheme: dark) {
  .preview-window {
    box-shadow: 0 30px 80px rgb(0 0 0 / 34%), 0 3px 12px rgb(0 0 0 / 28%);
  }

  .preview-window::after {
    border-color: rgb(255 255 255 / 5%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .download-card {
    transition: none;
  }
}
