:root {
  --primary: #3F51B5;
  --primary-dark: #303F9F;
  --primary-container: #E0E0FF;
  --on-primary: #FFFFFF;
  --on-primary-container: #00006E;
  --secondary: #5C6BC0;
  --surface: #FFFFFF;
  --surface-alt: #F3F3FA;
  --background: #F7F7FB;
  --on-surface: #1B1B1F;
  --on-surface-variant: #46464F;
  --outline: #E2E2EC;
  --outline-variant: #C4C6D0;
  --success: #2E7D32;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.08), 0 1px 3px 1px rgba(0,0,0,0.06);
  --shadow-2: 0 1px 3px rgba(0,0,0,0.08), 0 4px 8px 2px rgba(0,0,0,0.06);
  --radius-sm: 12px;
  --radius-lg: 24px;
  --font: "Roboto", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--on-surface);
  background: var(--background);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 28px;
  line-height: 1;
  display: inline-block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 720px;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
  color: var(--on-surface);
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--outline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--on-surface);
}
.brand:hover { text-decoration: none; }

.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--on-surface-variant);
  font-weight: 500;
}
.main-nav a:hover { color: var(--primary); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-1);
}
.btn--primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-2);
  text-decoration: none;
}

.btn--text {
  background: transparent;
  color: var(--primary);
}
.btn--text:hover { background: var(--primary-container); text-decoration: none; }

.btn--disabled {
  background: var(--outline);
  color: var(--on-surface-variant);
  cursor: not-allowed;
}

/* Hero */
.hero {
  padding: 72px 0 96px;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero__copy h1 {
  font-size: 2.75rem;
  color: var(--on-surface);
}

.hero__tagline {
  font-size: 1.25rem;
  color: var(--primary-dark);
  font-weight: 500;
  margin: 0 0 16px;
}

.hero__description {
  font-size: 1.05rem;
  color: var(--on-surface-variant);
  max-width: 480px;
  margin: 0 0 32px;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__carousel {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 560px;
}

.hero__shot {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  background: var(--surface);
  position: absolute;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__shot.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
}

/* Landscape screenshots (desktop/Linux/macOS captures) don't fit the phone
   frame treatment above -- instead they bleed across the whole hero as a
   large, faded backdrop that sits behind the copy text, rather than
   shrinking down to a tiny box at phone width. Orientation is detected in
   main.js (naturalWidth > naturalHeight) since Hugo only copies these
   files, it doesn't read their dimensions. */
.hero__shot--wide {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 220%;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
  background: none;
  transform: translate(-50%, -50%) translateY(12px);
  -webkit-mask-image:
    linear-gradient(to right, transparent, black 18%, black 82%, transparent),
    linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, black 18%, black 82%, transparent),
    linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  mask-composite: intersect;
}

.hero__shot--wide.is-active {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0.85;
  transform: translate(-50%, -50%) translateY(0);
}

.hero__dots {
  position: absolute;
  bottom: -36px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--outline-variant);
  cursor: pointer;
  padding: 0;
}

.hero__dot.is-active {
  background: var(--primary);
  width: 22px;
  border-radius: 4px;
  transition: width 0.2s ease;
}

/* Install */
.install {
  padding: 80px 0;
  background: var(--surface);
}

.tabs {
  max-width: 640px;
  margin: 0 auto;
}

.tabs__list {
  display: flex;
  gap: 4px;
  background: var(--surface-alt);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 28px;
}

.tabs__tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 16px;
  border-radius: 100px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tabs__tab.is-active {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-1);
}

.tabs__panel {
  display: none;
  text-align: center;
  padding: 8px 0;
}
.tabs__panel.is-active { display: block; }

.install-command {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--on-surface);
  color: #E8EAF6;
  font-family: "Roboto Mono", ui-monospace, monospace;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.install-command code { color: inherit; background: none; }

.copy-btn {
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: inherit;
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font);
}
.copy-btn:hover { background: rgba(255,255,255,0.1); }

.install-soon {
  color: var(--on-surface-variant);
  margin-bottom: 16px;
}

/* Features */
.features {
  padding: 80px 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-1);
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--on-surface-variant);
  margin: 0;
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--on-surface);
  color: #C8C9D6;
  padding: 40px 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #fff;
}

.footer-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #C8C9D6;
}
.footer-nav a:hover { color: #fff; }

.site-footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: #8E8FA3;
  width: 100%;
  text-align: center;
}

/* Text pages */
.text-page {
  padding: 56px 0 96px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--on-surface-variant);
  font-weight: 500;
}

.text-page__body h2 {
  text-align: left;
  font-size: 1.4rem;
  margin-top: 32px;
}

.text-page__body p, .text-page__body li {
  color: var(--on-surface-variant);
}

.text-page__body ul { padding-left: 22px; }

/* Responsive */
@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__description { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__carousel { margin-top: 24px; order: -1; }
  .main-nav ul { gap: 16px; }
}

@media (max-width: 520px) {
  .site-header__inner { height: 56px; }
  .hero { padding: 40px 0 72px; }
  .hero__copy h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
}
