* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Roboto", "Segoe UI", sans-serif;
  background: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
}

.page {
  position: relative;
  z-index: 20;
  min-height: 100vh;
}

.container {
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
}

.app-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: transparent;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  isolation: isolate;
}

.app-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: color-mix(in srgb, var(--md-sys-color-surface-container-low) 76%, transparent);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .app-bar::before {
    background-color: color-mix(in srgb, var(--md-sys-color-surface-container-low) 58%, transparent);
    -webkit-backdrop-filter: blur(6px) saturate(150%);
    backdrop-filter: blur(6px) saturate(150%);
  }
}

main {
  padding-top: 64px;
}

.app-bar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-wordmark {
  width: min(188px, 36vw);
  max-width: 100%;
  opacity: 0;
  transform: translateY(-0.2rem) scale(0.985);
  transition:
    opacity 240ms ease,
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-bar.logo-docked .brand-wordmark {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
}

.top-nav md-text-button {
  --md-text-button-container-shape: var(--md-sys-shape-corner-full);
  --md-text-button-label-text-font: "Roboto";
  --md-text-button-label-text-size: 0.875rem;
  --md-text-button-label-text-weight: 500;
  --md-text-button-label-text-color: var(--md-sys-color-on-surface-variant);
}

.top-nav md-text-button:hover {
  --md-text-button-label-text-color: var(--md-sys-color-on-surface);
}

.app-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.app-actions md-filled-button {
  --md-filled-button-container-shape: var(--md-sys-shape-corner-full);
  --md-filled-button-label-text-font: "Roboto";
  --md-filled-button-label-text-size: 0.875rem;
  --md-filled-button-label-text-weight: 500;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: var(--md-sys-shape-corner-full);
  border: 0;
  background: transparent;
  color: var(--md-sys-color-on-secondary-container);
  user-select: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    transform 140ms ease,
    box-shadow 180ms ease;
}

.theme-switch:hover {
  transform: translateY(-1px);
}

.theme-switch:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.theme-switch-icon {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--md-sys-color-on-secondary-container);
  font-variation-settings:
    "FILL" 0,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
  transition:
    color 160ms ease,
    text-shadow 180ms ease;
}

.theme-switch.is-shining .theme-switch-icon {
  color: var(--md-sys-color-primary);
  text-shadow: 0 0 12px color-mix(in srgb, var(--md-sys-color-primary) 45%, transparent);
}

.hero-band {
  padding: clamp(1.75rem, 5vw, 4rem) 0 2.25rem;
}

.hero-logo-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.hero-logo {
  display: block;
  width: 70%;
  max-width: 100%;
  height: auto;
  transition: opacity 180ms linear;
}

.logo-fly {
  position: fixed;
  z-index: 60;
  width: 70%;
  height: auto;
  pointer-events: none;
  transform-origin: top left;
  will-change: left, top, width, opacity;
}

.hero-header {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: clamp(1rem, 2vw, 1.6rem);
  align-items: start;
}

.hero-left {
  padding: 0;
  align-self: start;
}

.label-large,
.eyebrow {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
  letter-spacing: 0.006rem;
  color: var(--md-sys-color-primary);
}

.display-large {
  margin: 0.62rem 0 0.85rem;
  font-size: 3.5625rem;
  line-height: 4rem;
  font-weight: 400;
  letter-spacing: -0.015rem;
}

.body-large,
.intro {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.031rem;
  color: var(--md-sys-color-on-surface-variant);
}

.announcement-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 0.75rem;
  padding: 0.38rem 0.72rem;
  border-radius: var(--md-sys-shape-corner-full);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-on-secondary-container) 24%, transparent);
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-size: 0.82rem;
  line-height: 1.2rem;
  font-weight: 500;
}

.announcement-pill-icon {
  font-size: 1rem;
  line-height: 1;
}

.announcement-pill a {
  color: inherit;
  text-underline-offset: 2px;
  font-weight: 600;
}

.announcement-pill a:hover {
  text-decoration-thickness: 2px;
}

.center-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
  margin-bottom: 1.5rem;
}

.center-actions md-filled-button,
.center-actions md-outlined-button {
  --md-filled-button-container-shape: var(--md-sys-shape-corner-full);
  --md-outlined-button-container-shape: var(--md-sys-shape-corner-full);
  --md-filled-button-label-text-font: "Roboto";
  --md-outlined-button-label-text-font: "Roboto";
  --md-filled-button-label-text-size: 0.95rem;
  --md-outlined-button-label-text-size: 0.95rem;
  --md-filled-button-container-height: 44px;
  --md-outlined-button-container-height: 44px;
  --md-filled-button-horizontal-padding: 1.15rem;
  --md-outlined-button-horizontal-padding: 1.15rem;
}

.feature-list {
  background: var(--md-sys-color-surface-container);
  --md-list-container-color: transparent;
}

.feature-item {
  cursor: pointer;
  --md-list-item-container-shape: var(--md-sys-shape-corner-none);
  --md-list-item-container-color: transparent;
  --md-list-item-label-text-color: var(--md-sys-color-on-surface);
  --md-list-item-supporting-text-color: var(--md-sys-color-on-surface-variant);
  --md-list-item-leading-icon-color: var(--md-sys-color-on-surface-variant);
  --md-list-item-trailing-icon-color: var(--md-sys-color-on-surface-variant);
  --md-list-item-hover-state-layer-color: var(--md-sys-color-on-surface);
  --md-list-item-hover-state-layer-opacity: var(--md-sys-state-hover-opacity);
  --md-list-item-pressed-state-layer-color: var(--md-sys-color-on-surface);
  --md-list-item-pressed-state-layer-opacity: var(--md-sys-state-pressed-opacity);
}

.feature-item.is-active {
  --md-list-item-container-color: var(--md-sys-color-secondary-container);
  --md-list-item-label-text-color: var(--md-sys-color-on-secondary-container);
  --md-list-item-supporting-text-color: var(--md-sys-color-on-secondary-container);
  --md-list-item-leading-icon-color: var(--md-sys-color-on-secondary-container);
  --md-list-item-trailing-icon-color: var(--md-sys-color-on-secondary-container);
}

.feature-selected-indicator {
  opacity: 0;
  transform: translateX(-0.25rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.feature-item.is-active .feature-selected-indicator {
  opacity: 1;
  transform: translateX(0);
}

.hero-right {
  min-width: 0;
  align-self: start;
}

.code-card {
  display: block;
  width: 100%;
  min-height: 560px;
  overflow: hidden;
  --md-filled-card-container-color: var(--md-sys-color-surface-container-lowest);
  --md-filled-card-container-shape: var(--md-sys-shape-corner-medium);
  --md-sys-color-outline-variant: var(--md-sys-color-surface-variant);
}

.code-head {
  min-height: 52px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium-size, 0.875rem);
  font-weight: var(--md-sys-typescale-label-medium-weight, 500);
  letter-spacing: var(--md-sys-typescale-label-medium-tracking, 0.04em);
}

.code-tabs {
  display: none;
}

.code-tabs:not([hidden]) {
  display: flex;
  gap: 0;
  background: var(--md-sys-color-surface-container-highest);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  padding: 0 1rem;
}

.code-tab {
  appearance: none;
  border: none;
  background: none;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: var(--md-sys-typescale-label-medium-size, 0.875rem);
  font-weight: var(--md-sys-typescale-label-medium-weight, 500);
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.code-tab:hover {
  color: var(--md-sys-color-on-surface);
}

.code-tab.is-active {
  color: var(--md-sys-color-primary);
  border-bottom-color: var(--md-sys-color-primary);
}

.code-file {
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.04em;
}

.code-dot {
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-tertiary);
}

pre {
  margin: 0;
  padding: 1rem 1.1rem 1.25rem;
  overflow: auto;
  min-height: 500px;
}

.video-panel {
  padding: 1rem 1.1rem 1.25rem;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-panel[hidden] {
  display: none !important;
}

.video-panel video {
  width: 100%;
  height: auto;
  max-height: 500px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: #000000;
}

.code-card pre code.hljs {
  padding: 0;
}

body.dark .hljs {
  background: var(--md-sys-color-surface-container-lowest);
}

code {
  font-family: "Roboto Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.45rem;
  color: var(--md-sys-color-on-surface);
}

/* ── Pipeline: "How it works" stepper ── */

.pipeline-band {
  padding: 2.5rem 0 3rem;
}

.pipeline-eyebrow {
  text-align: center;
  margin-bottom: 2rem;
}

.pipeline-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 1 240px;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pipeline-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pipeline-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pipeline-step.is-visible .pipeline-icon-ring {
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
}

.pipeline-icon-ring .material-symbols-rounded {
  font-size: 2rem;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.pipeline-headline {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.pipeline-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.35rem;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 22ch;
}

.pipeline-connector {
  flex: 0 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 24px;
  color: var(--md-sys-color-outline);
  opacity: 0;
  transition: opacity 0.4s ease 0.15s;
}

.pipeline-connector.is-visible {
  opacity: 1;
}

.pipeline-connector svg {
  width: 80px;
  height: 24px;
}

@media (max-width: 700px) {
  .pipeline-steps {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .pipeline-connector {
    padding-top: 0;
    transform: rotate(90deg);
    flex: 0 0 24px;
    margin: 2.25rem 0;
  }

  .pipeline-step {
    flex: none;
    width: 100%;
    max-width: 280px;
  }
}

/* ══════════════════════════════════════════════════════════
   Architecture section — shared
   ══════════════════════════════════════════════════════════ */

.arch-band {
  padding: 3rem 0 3.5rem;
}

.arch-subtitle {
  text-align: center;
  max-width: 52ch;
  margin: -1rem auto 2.5rem;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-large-size, 1rem);
  line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
}

/* ── Architecture: Split-Panel Illustration ── */

.arch-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  max-width: 800px;
  margin: 0 auto;
}

.arch-split-panel {
  padding: 1.5rem;
  border-radius: var(--md-sys-shape-corner-large);
}

.arch-split-panel--app {
  background: var(--md-sys-color-primary-container);
}

.arch-split-panel--store {
  background: var(--md-sys-color-tertiary-container);
}

.arch-split-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.arch-split-panel--app .arch-split-header {
  color: var(--md-sys-color-on-primary-container);
}

.arch-split-panel--store .arch-split-header {
  color: var(--md-sys-color-on-tertiary-container);
}

.arch-split-header .material-symbols-rounded {
  font-size: 1.5rem;
}

.arch-split-header h4 {
  margin: 0;
  font-size: var(--md-sys-typescale-title-small-size, 0.875rem);
  font-weight: var(--md-sys-typescale-title-small-weight, 500);
}

.arch-split-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.arch-split-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--md-sys-typescale-body-small-size, 0.75rem);
  font-family: "Roboto Mono", monospace;
}

.arch-split-panel--app .arch-split-item {
  color: var(--md-sys-color-on-primary-container);
}

.arch-split-panel--store .arch-split-item {
  color: var(--md-sys-color-on-tertiary-container);
}

.arch-split-item .material-symbols-rounded {
  font-size: 1.125rem;
  opacity: 0.7;
}

.arch-split-merge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  gap: 0.5rem;
}

.arch-split-merge-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-split-merge-logo .material-symbols-rounded {
  font-size: 1.75rem;
}

.arch-split-merge-label {
  font-size: var(--md-sys-typescale-label-small-size, 0.6875rem);
  font-weight: var(--md-sys-typescale-label-small-weight, 500);
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap;
}

.arch-split-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface-container);
  border: 2px solid var(--md-sys-color-primary);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.arch-split-result .material-symbols-rounded {
  font-size: 1.5rem;
  color: var(--md-sys-color-primary);
}

.arch-split-result p {
  margin: 0;
  font-size: var(--md-sys-typescale-body-large-size, 1rem);
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
}

@media (max-width: 600px) {
  .arch-split {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .arch-split-merge {
    flex-direction: row;
    padding: 0.5rem 0;
  }
}

.platform-band {
  padding: 1rem 0 3.5rem;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.surface-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 1.05rem;
  overflow: hidden;
  --md-filled-card-container-color: var(--md-sys-color-surface-container-highest);
  --md-filled-card-container-shape: var(--md-sys-shape-corner-medium);
}

.surface-card::after {
  content: attr(data-bg-icon);
  position: absolute;
  right: 0.55rem;
  bottom: 0.4rem;
  font-family: "Material Symbols Rounded";
  font-size: 5rem;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 48;
  color: var(--md-sys-color-on-surface);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.surface-card > * {
  position: relative;
  z-index: 1;
}

.surface-card-head {
  display: flex;
  align-items: center;
}

.surface-card h3 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2rem;
  letter-spacing: 0;
  font-weight: 400;
}

.surface-card p {
  margin: 0.45rem 0 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1rem;
  line-height: 1.5rem;
  letter-spacing: 0.031rem;
}

.site-footer {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 1.5rem 0 1rem;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.site-footer-logo {
  width: min(170px, 55vw);
  max-width: 100%;
  height: auto;
}

.site-footer-tagline {
  margin: 0;
  max-width: 44ch;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.95rem;
  line-height: 1.45rem;
}

.site-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 1rem;
}

.site-footer-group h4 {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  line-height: 1.2rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-surface-variant);
}

.site-footer-group a {
  display: block;
  width: fit-content;
  margin: 0.2rem 0;
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.4rem;
}

.site-footer-group a:hover {
  color: var(--md-sys-color-primary);
}

.site-footer-meta {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.site-footer p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  line-height: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 1080px) {
  .display-large {
    font-size: 2.8125rem;
    line-height: 3.25rem;
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .code-card {
    min-height: 440px;
  }

  pre {
    min-height: 380px;
  }

  .video-panel {
    min-height: 380px;
  }

  .video-panel video {
    max-height: 380px;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 740px) {
  .container {
    width: min(1200px, calc(100% - 1.5rem));
  }

  .app-bar-inner {
    min-height: 60px;
  }

  main {
    padding-top: 60px;
  }

  .top-nav {
    display: none;
  }

  .app-actions {
    gap: 0.4rem;
  }

  .brand-wordmark {
    width: min(165px, 42vw);
  }

  .hero-band {
    padding-top: 1.45rem;
  }

  .center-actions {
    margin-top: 0.75rem;
    margin-bottom: 1.2rem;
    gap: 0.55rem;
  }

  .display-large {
    font-size: 2.25rem;
    line-height: 2.75rem;
  }

  .announcement-pill {
    font-size: 0.78rem;
    line-height: 1.1rem;
  }

  .site-footer {
    padding-top: 1.25rem;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .site-footer-nav {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

/* ── Flow Demo Band ────────────────────────────────── */
.flow-demo-band {
  padding: 1rem 0 2.5rem;
}

.flow-demo-subtitle {
  text-align: center;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0.5rem auto 1.5rem;
  line-height: 1.5;
}

.flow-demo-wrapper {
  width: 100%;
  height: 500px;
  border-radius: var(--md-sys-shape-corner-extra-large, 28px);
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);
  background: var(--md-sys-color-surface-container-lowest, #fff);
}

@media (max-width: 700px) {
  .flow-demo-wrapper {
    height: 350px;
    border-radius: var(--md-sys-shape-corner-large, 16px);
  }
}
