/*
 * BookmarkUp site. Theme tokens mirror the extension: light on bare :root, dark
 * applied for a forced choice, for system dark, and undone for forced light.
 */
:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --fg-muted: #57606a;
  --surface: #f6f8fa;
  --surface-2: #ffffff;
  --border: #d0d7de;
  --brand: #0068f6;
  --brand-fg: #ffffff;
  --shadow: rgba(27, 31, 36, 0.1);
  --radius: 12px;
  color-scheme: light dark;
}
:root[data-theme="dark"] {
  --bg: #0d1117;
  --fg: #e6edf3;
  --fg-muted: #9198a1;
  --surface: #161b22;
  --surface-2: #1b222b;
  --border: #30363d;
  --brand: #2f86ff;
  --shadow: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --fg: #e6edf3;
    --fg-muted: #9198a1;
    --surface: #161b22;
    --surface-2: #1b222b;
    --border: #30363d;
    --brand: #2f86ff;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
}
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
h1,
h2,
h3 {
  line-height: 1.25;
}
h2 {
  font-size: 28px;
  margin: 0 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--fg);
}
.brand img {
  width: 28px;
  height: 28px;
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav a {
  color: var(--fg-muted);
  font-size: 15px;
}
.nav a:hover {
  color: var(--fg);
  text-decoration: none;
}
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
select {
  font: inherit;
  font-size: 14px;
  padding: 6px 8px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
/* Language select: globe sits over the control's left padding, so it shows in
   front of the current language but never on the dropdown option rows. */
.lang-ctrl {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-icon {
  position: absolute;
  inset-inline-start: 9px;
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}
#lang-select {
  padding-inline-start: 29px;
}
@media (max-width: 640px) {
  .nav a {
    display: none;
  }
}

/* Hero */
.hero {
  text-align: center;
  border-top: 0;
  padding: 80px 0 64px;
  background: radial-gradient(
    120% 120% at 50% -20%,
    color-mix(in srgb, var(--brand) 14%, transparent),
    transparent 60%
  );
}
.hero img.logo {
  width: 88px;
  height: 88px;
}
.hero h1 {
  font-size: 40px;
  margin: 16px auto 12px;
  max-width: 16ch;
}
.hero p.sub {
  color: var(--fg-muted);
  font-size: 18px;
  max-width: 60ch;
  margin: 0 auto 28px;
}
.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--brand);
  color: var(--brand-fg);
  border-color: var(--brand);
}
.btn-secondary {
  background: var(--surface);
  color: var(--fg);
}
.hero .note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--fg-muted);
}

/* Feature grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: 0 10px 26px -6px color-mix(in srgb, var(--brand) 35%, transparent);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.steps .card h3 {
  color: var(--brand);
}
.how-intro {
  color: var(--fg-muted);
  max-width: 70ch;
  margin: -8px 0 24px;
}

/* Screenshots carousel: one promo image at a time, with prev/next arrows. */
.carousel {
  position: relative;
}
.car-viewport {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.car-track {
  display: flex;
  transition: transform 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .car-track {
    transition: none;
  }
}
.car-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.car-arrow {
  /* Full-height column over the left/right 10% of the image: a big, easy hit
   * target. The middle 80% stays clickable to open the lightbox. */
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  line-height: 1;
  /* Fixed dark: the promo images are always light, so this reads in both themes. */
  color: #1f2328;
  background: transparent;
  border: 0;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.15s ease, background 0.15s ease;
}
/* Arrows reveal on hover; keep them shown when focused for keyboard users. */
.carousel:hover .car-arrow,
.car-arrow:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  /* Touch devices have no hover, so keep the arrows visible there. */
  .car-arrow {
    opacity: 1;
  }
}
.car-prev {
  left: 0;
}
.car-next {
  right: 0;
}
.car-arrow:hover {
  color: var(--brand);
}
/* A soft dark fade from the edge shows the clickable zone on hover. */
.car-prev:hover {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.22), transparent);
}
.car-next:hover {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.22), transparent);
}
.car-arrow:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.car-slide {
  cursor: zoom-in;
}

/* Lightbox: full-screen viewer opened by clicking a slide. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(2px);
}
.lightbox[hidden] {
  display: none;
}
.lb-img {
  max-width: min(1280px, 96vw);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lb-arrow,
.lb-close {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  /* Dark backing so the white icon stays visible over the light images too. */
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
}
.lb-arrow svg {
  width: 28px;
  height: 28px;
}
.lb-close svg {
  width: 24px;
  height: 24px;
}
.lb-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
}
.lb-prev {
  left: 16px;
}
.lb-next {
  right: 16px;
}
.lb-close {
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
}
.lb-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
}
.lb-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.lb-dot[aria-selected="true"] {
  background: #ffffff;
}
.lb-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.lb-arrow:hover,
.lb-close:hover {
  background: rgba(0, 0, 0, 0.7);
}
.lb-arrow:focus-visible,
.lb-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .lb-arrow {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
}
.car-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.car-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.car-dot[aria-selected="true"] {
  background: var(--brand);
}
.car-dot:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .car-arrow {
    font-size: 36px;
  }
}

/* Lists (privacy, install) */
.checklist,
.steps-list {
  max-width: 70ch;
  padding-left: 22px;
  color: var(--fg-muted);
}
.checklist li,
.steps-list li {
  margin: 10px 0;
}
.req {
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 16px;
}
#install .req {
  margin-top: 0;
}
.install-sub {
  font-size: 20px;
  margin: 30px 0 12px;
}
.install-cta {
  margin: 0;
}

/* FAQ */
.faq {
  max-width: 760px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--surface);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--fg);
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq-q::after {
  content: "+";
  color: var(--fg-muted);
}
.faq-q[aria-expanded="true"]::after {
  content: "\2212"; /* minus */
}
.faq-a {
  padding: 0 18px 16px;
  color: var(--fg-muted);
}
.faq-a[hidden] {
  display: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--fg-muted);
  font-size: 14px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer a {
  color: var(--fg-muted);
}
.site-footer a:hover {
  color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .card {
    transition: none;
  }
}
