/* Scribe landing: Apple-style product page (cinema white, giant type, product as protagonist).
   Cantarell self-hosted (subset of the GNOME variable font, OFL). */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@font-face {
  font-family: "Cantarell";
  src: url("assets/fonts/Cantarell-VF.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --link: #0066cc;
  --surface: #f5f5f7;
  --hairline: rgba(0, 0, 0, 0.09);
  --video-bg: #101012;
  --shadow-hero: 0 30px 90px rgba(0, 0, 0, 0.22), 0 6px 24px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.08);
  --radius: 18px;
}

html[data-theme="dark"] {
  --bg: #0a0a0c;
  --text: #f5f5f7;
  --muted: #86868b;
  --accent: #2997ff;
  --link: #2997ff;
  --surface: #161617;
  --hairline: rgba(255, 255, 255, 0.12);
  --video-bg: #101012;
  --shadow-hero: 0 30px 90px rgba(0, 0, 0, 0.6), 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  font-family: "Cantarell", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  transition: background 320ms ease, color 320ms ease;
}

::selection { background: rgba(0, 113, 227, 0.28); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Nav: thin, translucent, sticky ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
  animation: nav-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-inner {
  max-width: 1080px; margin: 0 auto; height: 48px;
  display: flex; align-items: center; gap: 26px; padding: 0 22px;
}
.nav-logo { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-links a {
  font-size: 13.5px; color: var(--muted); text-decoration: none;
  transition: color 200ms ease;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-icon {
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 12px;
  transition: background 200ms ease;
}
.nav-icon:hover { background: rgba(125, 125, 125, 0.18); }
.nav-lang { width: auto; padding: 0 10px; border-radius: 999px; }
/* theme switch glyph */
#theme-switch::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, transparent 42%, currentColor 43% 55%, transparent 56%),
    conic-gradient(currentColor 0 50%, transparent 50% 100%);
  border: 1.5px solid currentColor;
}
.nav-cta {
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--accent);
  padding: 6px 15px; border-radius: 999px;
  transition: filter 200ms ease, transform 200ms ease;
}
.nav-cta:hover { filter: brightness(1.1); }
.nav-cta:active { transform: scale(0.97); }

/* ---------- Hero: giant centered statement, product underneath ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

.hero { text-align: center; padding: 108px 0 0; }
.hero-title {
  font-size: clamp(52px, 7.2vw, 92px);
  line-height: 1.02; font-weight: 700; letter-spacing: -0.045em;
  text-wrap: balance;
  animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-sub {
  font-size: clamp(21px, 2.4vw, 27px); color: var(--muted);
  max-width: 34ch; margin: 22px auto 0; text-wrap: balance;
  animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.hero-ctas {
  display: flex; align-items: center; justify-content: center; gap: 26px;
  margin-top: 34px;
  animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff;
  font-size: 18px; font-weight: 600;
  padding: 13px 30px; border-radius: 999px; text-decoration: none;
  transition: filter 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0, 113, 227, 0.38); }
.btn-primary:active { transform: scale(0.97); }
.btn-link {
  font-size: 18px; font-weight: 500; color: var(--link); text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }
.hero-chips {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 26px;
  animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}
.chip {
  font-family: "Adwaita Mono", "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 13px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 6px 14px;
}
.chip.ghost { border-style: dashed; }
.hero-video {
  margin: 64px auto 0; max-width: 920px;
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
.hero-video video {
  width: 100%; aspect-ratio: 1280 / 840; object-fit: contain;
  background: var(--video-bg); border-radius: var(--radius);
  box-shadow: var(--shadow-hero);
  outline: 1px solid var(--hairline); outline-offset: -1px;
}

/* ---------- Motion primitives ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }

.reveal { opacity: 0; }
.reveal.is-visible { animation: reveal-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------- Specs row ---------- */
.specs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px;
  padding: 110px 0 20px; text-align: center;
}
.spec h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.spec p { font-size: 15.5px; color: var(--muted); max-width: 34ch; margin: 0 auto; }
.spec-big {
  font-size: 44px !important; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text) !important; font-variant-numeric: tabular-nums;
  margin-bottom: 8px !important;
}
.spec a { color: var(--link); }
.spec code { font-family: "Adwaita Mono", "Fira Mono", monospace; font-size: 0.88em; }

/* ---------- Sections: statements ---------- */
section { padding: 96px 0 0; scroll-margin-top: 72px; }
.statement {
  font-size: clamp(34px, 4.8vw, 56px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.08;
  text-align: center; text-wrap: balance;
  max-width: 20ch; margin: 0 auto 16px;
}
.lead {
  font-size: 19px; color: var(--muted); max-width: 62ch;
  margin: 14px auto 0; text-align: center;
}
.lead + .lead { margin-top: 12px; }

/* ---------- Slider ---------- */
.shots { margin-top: 44px; }
.slider { display: flex; align-items: center; gap: 14px; }
.slider-view {
  flex: 1; min-width: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-card);
}
.slider-view img { display: block; width: 100%; height: auto; transition: opacity 250ms ease; }
.slider-view img.is-fading { opacity: 0; }
.slider-view figcaption {
  padding: 12px 18px; font-size: 13.5px; color: var(--muted);
  border-top: 1px solid var(--hairline); text-align: center;
}
.slider-arrow {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--bg);
  color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 200ms ease, background 200ms ease;
}
.slider-arrow:hover { transform: scale(1.1); background: var(--surface); }
.slider-arrow:active { transform: scale(0.96); }
.slider-thumbs { display: flex; gap: 10px; margin-top: 16px; overflow-x: auto; padding-bottom: 6px; justify-content: center; }
.slider-thumbs button {
  flex: none; width: 96px; border: 2px solid transparent; border-radius: 10px;
  padding: 0; cursor: pointer; background: none; overflow: hidden; opacity: 0.55;
  transition: opacity 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.slider-thumbs button:hover { opacity: 1; transform: translateY(-2px); }
.slider-thumbs button img { display: block; width: 100%; height: auto; }
.slider-thumbs button[aria-pressed="true"] { border-color: var(--accent); opacity: 1; }

/* ---------- Comparison tables ---------- */
#compare-tables { margin-top: 40px; }
#compare-tables .tbl-block { margin-top: 34px; }
#compare-tables .tbl-block h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: top; }
thead th {
  background: var(--surface);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 700;
}
tbody tr:last-child td { border-bottom: none; }
td:first-child, th:first-child { font-weight: 700; min-width: 150px; }
td.scribe-col { background: rgba(0, 113, 227, 0.07); }
html[data-theme="dark"] td.scribe-col { background: rgba(41, 151, 255, 0.1); }
.sym { font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }

.not-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 56px auto 14px; max-width: 62ch; }
/* ---------- Honest block: what Scribe does not do ---------- */
.honest-block {
  margin-top: 52px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 44px 48px;
}
.honest-title {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}
.honest-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 44px;
  max-width: none;
  padding-left: 0;
  margin: 0;
  font-size: 16px;
}
.honest-list li {
  position: relative;
  padding: 16px 0 16px 30px;
  border-top: 1px solid var(--hairline);
  line-height: 1.5;
  color: var(--text);
}
.honest-list li::before {
  content: "\2717";
  position: absolute;
  left: 0;
  top: 15px;
  color: var(--muted);
  font-weight: 700;
}
.honest-close {
  margin: 26px 0 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 62ch;
  color: var(--text);
}

/* ---------- Install: numbered steps, copy inside the box ---------- */
.step-num {
  display: inline-block;
  font-family: "Adwaita Mono", "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 10px;
}
.code-wrap { position: relative; }
.code-wrap .codebox { padding-right: 136px; }
.code-wrap .copy-btn { position: absolute; top: 10px; right: 10px; }
.soon-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}

/* ---------- Final call to action ---------- */
.cta-final {
  padding: 128px 0 104px;
  text-align: center;
}
.cta-title {
  font-size: clamp(34px, 4.8vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin-bottom: 18px;
}
.cta-sub {
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 auto 30px;
}
.cta-final .hero-ctas { justify-content: center; margin-bottom: 22px; }

/* ---------- Signature and footer links ---------- */
.signature { margin-top: 22px; font-size: 15px; font-style: italic; color: var(--muted); }
.signature span { margin: 0 6px; }
.signature a { color: var(--muted); text-decoration: none; font-style: normal; }
.signature a:hover { color: var(--text); text-decoration: underline; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 14px;
}
.footer-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-links svg { opacity: 0.55; transition: opacity 200ms ease-out; }
.footer-links a:hover svg { opacity: 1; }
.sources { font-size: 13px; color: var(--muted); margin: 26px auto 0; max-width: 62ch; }

/* ---------- Install ---------- */
.install-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 22px; margin-top: 44px; align-items: start; }
.install-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.install-card p { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.flathub-card { border: 1.5px dashed var(--hairline); border-radius: var(--radius); padding: 22px; }
.codebox {
  background: var(--video-bg); color: #f0efee;
  border-radius: 12px; padding: 16px 18px;
  font-family: "Adwaita Mono", "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 12.5px; line-height: 1.75; overflow-x: auto; margin-bottom: 10px;
}
.copy-btn {
  border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 16px; cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.copy-btn:hover { background: var(--surface); }
.copy-btn:active { transform: scale(0.96); }
.reqs { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
.reqs h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.reqs p { font-size: 15px; color: var(--muted); }

/* ---------- About ---------- */
.about-text { max-width: 62ch; margin: 26px auto 0; text-align: center; }
.about-text p { font-size: 18.5px; line-height: 1.65; margin-bottom: 18px; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600;
  padding: 11px 26px; border-radius: 999px; text-decoration: none; margin-top: 8px;
  transition: filter 220ms ease, transform 220ms ease;
}
.btn-secondary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-secondary:active { transform: scale(0.97); }
section#about { text-align: center; padding-bottom: 40px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 96px; padding: 34px 22px;
  background: var(--surface); border-top: 1px solid var(--hairline);
  text-align: center; font-size: 13px; color: var(--muted);
}
.footer .muted { margin-top: 5px; font-size: 12px; }

/* ---------- Install tabs ---------- */
.tabs {
  position: relative;
  display: inline-flex;
  gap: 2px;
  margin-top: 36px;
  padding: 4px;
  background: var(--surface);
  border-radius: 999px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 200ms ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tabs-indicator {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.06);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), width 260ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.tab-panels { margin-top: 26px; max-width: 800px; }
.tab-panel { animation: panel-in 340ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.tab-panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tab-hint { font-size: 16px; margin-bottom: 14px; }
.tab-note { font-size: 13.5px; color: var(--muted); margin-top: 12px; max-width: 68ch; }
.tab-panel .soon-badge { display: inline-block; }

/* ---------- Scroll effects ---------- */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--accent);
  z-index: 100;
  pointer-events: none;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  box-shadow: 0 1px 0 var(--hairline), 0 8px 24px rgba(0, 0, 0, 0.06);
}
.spec {
  transform-style: preserve-3d;
  transition: transform 280ms ease, box-shadow 280ms ease;
}
.slider-view { overflow: hidden; }
.slider-view img { transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1); }
.slider-view:hover img { transform: scale(1.015); }
.hero-video video { will-change: transform; }
.btn-primary { position: relative; overflow: hidden; }

/* ---------- Scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(125, 125, 125, 0.4) transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero { padding-top: 72px; }
  .hero-title { font-size: clamp(40px, 10vw, 60px); }
  .hero-sub { font-size: 19px; }
  .hero-video { margin-top: 44px; }
  .specs { grid-template-columns: 1fr; gap: 36px; padding: 72px 0 10px; }
  section { padding-top: 72px; }
  .statement { font-size: clamp(30px, 7vw, 42px); }
  .slider { flex-direction: column; }
  .slider-arrow { display: none; }
  .install-grid { grid-template-columns: 1fr; }
  .reqs { grid-template-columns: 1fr; }
  .nav-cta { padding: 6px 12px; }
  .honest-block { padding: 30px 22px; margin-top: 40px; }
  .honest-list { grid-template-columns: 1fr; gap: 0; }
  .cta-final { padding: 84px 0 64px; }
  .code-wrap .codebox { padding-right: 16px; padding-bottom: 48px; }
  .code-wrap .copy-btn { top: auto; bottom: 10px; right: 10px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .hero-title, .hero-sub, .hero-ctas, .hero-chips, .hero-video, .nav { opacity: 1 !important; transform: none !important; filter: none !important; }
  .reveal { opacity: 1 !important; }
}
