/* Colors follow the extension theme (src/shared/styles/main.css). Accent: Persian red. */
:root {
  color-scheme: light dark;
  --accent: #cc3333;
  --accent-strong: #b02a2a;
  --bg: #ffffff;
  --bg-alt: #f7f8f9;
  --card: #ffffff;
  --fg: oklch(14.5% 0 0);
  --muted: oklch(43.9% 0 0);
  --line: color-mix(in srgb, var(--fg) 10%, transparent);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  --radius: 16px;
  --font:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-strong: #e2503f;
    --bg: #1e1f22;
    --bg-alt: #17181b;
    --card: #2b2d31;
    --fg: #ffffff;
    --muted: oklch(70.8% 0 0);
    --line: color-mix(in srgb, var(--fg) 10%, transparent);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.wrap {
  width: min(1140px, 100% - 2.5rem);
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.center {
  text-align: center;
  justify-content: center;
}

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--fg);
  background: var(--line);
}

.icon-link {
  display: inline-flex;
}

.icon-link svg,
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- hero ---- */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(1rem, 3vw, 2rem);
  background:
    radial-gradient(
      ellipse 70% 80% at 90% 0%,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent
    ),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
}

.accent {
  color: var(--accent-strong);
}

.lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem 0.625rem 0.875rem;
  border-radius: 14px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.08),
    0 12px 32px rgb(0 0 0 / 0.14);
}

.chrome-logo {
  width: 34px;
  height: 34px;
  flex: none;
}

.badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  /* The same in the centered last section as in the hero. */
  text-align: start;
}

.badge-text small {
  font-size: 0.75rem;
  opacity: 0.75;
}

.badge-text strong {
  font-size: 1.0625rem;
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
}

.button.ghost {
  border: 1px solid var(--line);
  color: var(--fg);
}

.button.ghost:hover {
  background: var(--line);
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

.ticks li::before {
  content: '✓';
  margin-inline-end: 0.4rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.hero-media .shot,
.video {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video {
  position: relative;
  display: block;
  padding: 0;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.play svg {
  width: 76px;
  height: 76px;
  padding: 20px 18px 20px 22px;
  border-radius: 50%;
  background: var(--accent);
  fill: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  transition: transform 0.15s ease;
}

.video:hover .play svg,
.video:focus-visible .play svg {
  transform: scale(1.08);
}

/* ---- sections ---- */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section.alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-title {
  max-width: 22ch;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.card .icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-strong);
}

.card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.125rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.gallery figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

.privacy-box {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 820px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.privacy-box h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.privacy-box p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.icon.big {
  flex: none;
  width: 48px;
  height: 48px;
  color: var(--accent-strong);
}

.text-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.final h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

/* ---- privacy policy and other text pages ---- */
.prose {
  max-width: 780px;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.prose h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.5rem;
}

.prose h3 {
  margin-top: 1.75rem;
  font-size: 1.1875rem;
}

.prose a {
  color: var(--accent-strong);
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--line);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

.prose th {
  background: var(--bg-alt);
}

/* ---- footer ---- */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.footer-row p {
  margin: 0;
}

.footer-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-row a {
  text-decoration: none;
}

.footer-row a:hover {
  color: var(--fg);
}

.footer-row .small {
  flex-basis: 100%;
}

/* ---- small screens ---- */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .nav a:not(.icon-link) {
    padding-inline: 0.5rem;
  }

  .privacy-box {
    flex-direction: column;
  }

  .cta-row > * {
    width: 100%;
    justify-content: center;
  }
}

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

  .store-badge,
  .play svg {
    transition: none;
  }
}
