/* Inter, served from the site (Latin and Latin Extended, for Lithuanian) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Colours of the extension's popup, light by default and dark with a dark system theme.
   The hero keeps the popup header's rain photo and logo in both themes. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f1f1f1;
  --surface-2: #e4e4e4;
  --border: rgba(0, 0, 0, 0.1);
  --text: #252525;
  --muted: #5c666b;
  --accent: #0079c2;
  --red: #eb1c24;
  --red-button: #d3141c;
  --header-bg: rgba(255, 255, 255, 0.88);
  --shadow: rgba(0, 0, 0, 0.18);
  --radius: 10px;
  --max-width: 1120px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark: the 3MF Sanitizer palette, slate surfaces with sky/indigo glows and a faint grid */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020617;
    --surface: rgba(15, 23, 42, 0.55);
    --surface-2: #1e293b;
    --border: rgba(255, 255, 255, 0.1);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #7dd3fc;
    --header-bg: rgba(2, 6, 23, 0.8);
    --shadow: rgba(2, 6, 23, 0.55);
    --icon: #7dd3fc;
    --title-gradient: linear-gradient(135deg, #f8fafc 10%, #7dd3fc 55%, #818cf8 100%);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
code { background: var(--surface-2); border-radius: 4px; padding: 1px 5px; font-size: 0.9em; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; }
h3 { font-size: 19px; color: var(--accent); }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.accent { color: var(--red); }

.container { width: min(100% - 32px, var(--max-width)); margin-inline: auto; }
.container--narrow { max-width: 780px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 20; background: var(--bg); padding: 8px 12px; border-radius: var(--radius); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 20px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.site-nav a:hover { color: var(--text); }
.lang-switch { display: flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; }
.lang-switch img { width: 24px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.button:hover { transform: translateY(-1px); }
.button svg { width: 18px; height: 18px; fill: currentColor; }
.button--primary { background: var(--red-button); color: #ffffff; }
.button--primary:hover { background: var(--red); }
.button--ghost { color: var(--text); border-color: var(--border); background: transparent; }
.button--ghost:hover { border-color: var(--muted); }
.button--small { padding: 7px 12px; font-size: 14px; }

/* Hero: the popup header's rain photo and logo */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 56px 0 64px;
  text-align: center;
  color: #ffffff;
  background: #0d1a21;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("images/header_0.webp") center / cover no-repeat;
  filter: grayscale(1) brightness(0.45);
  transform: scale(1.05);
}
/* Connected particles drifting behind the hero content, like the popup header (main.js) */
.hero__particles { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero__logo { width: min(100%, 520px); margin: 0 auto 8px; }
/* The logo is the page heading, its alt text is the heading's text */
.hero__heading { margin: 0 0 12px; }
.hero__tagline { max-width: 720px; margin: 0 auto 28px; font-size: 18px; color: #e3eaed; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero .button--ghost { color: #ffffff; border-color: rgba(255, 255, 255, 0.4); }
.hero .button--ghost:hover { border-color: #ffffff; }
.hero__version { margin: 18px 0 0; font-size: 14px; color: #b9c7cd; }

/* Sections */
.section { padding: 72px 0; }
.section--alt { background: var(--surface); }
.section__intro { max-width: 760px; margin-bottom: 32px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.section--alt .card { background: var(--bg); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature p:last-child { margin-bottom: 0; }
.feature__icon { display: block; margin-bottom: 14px; }
.feature__icon svg { display: block; width: 36px; height: 36px; fill: var(--red); }
.feature__note {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.shots figure { margin: 0; }
.shots img { border-radius: var(--radius); box-shadow: 0 8px 28px var(--shadow); transition: transform 0.2s; }
.shots a:hover img { transform: scale(1.01); }
.shots figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }
/* An odd last screenshot is centred in its row */
.shots figure:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 12px); }

.install { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.install__card { display: flex; flex-direction: column; align-items: flex-start; }
.install__card p { flex: 1; }
.install__more { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.install__more ol { padding-left: 20px; margin: 0; }
.install__more li { margin-bottom: 8px; }

.faq { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style-position: inside; }
.faq summary::marker { color: var(--red); }
.faq p { padding: 0 20px 16px; margin: 0; }

.support { text-align: center; }
.support .hero__actions .button--ghost { color: var(--text); border-color: var(--border); }

.prose h2 { font-size: 22px; margin-top: 32px; }
.prose ul { padding-left: 20px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; font-size: 14px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 12px; }
.footer__links a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer__links a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .lang-switch { margin-left: auto; }
  .install, .install__more { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .shots { grid-template-columns: 1fr; }
  .shots figure:last-child:nth-child(odd) { width: auto; }
  .section { padding: 56px 0; }
  .brand span { display: none; }
  .site-header .button span { display: none; }
}

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

/* Dark surfaces, after the base rules so they win */
@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(900px 520px at 12% -8%, rgba(56, 189, 248, 0.18), transparent 52%),
      radial-gradient(720px 420px at 92% 4%, rgba(99, 102, 241, 0.16), transparent 48%),
      var(--bg);
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
      linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
  }

  .section__intro h2, .support h2, .prose h1 {
    display: inline-block;
    background: var(--title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .card, .faq { background: rgba(2, 6, 23, 0.5); backdrop-filter: blur(12px); }
  .section--alt .card, .section--alt .faq { background: rgba(2, 6, 23, 0.5); }
  .card:hover, .faq:hover { border-color: rgba(56, 189, 248, 0.3); }
  .feature__icon svg { fill: var(--icon); }
  .feature__note { background: rgba(56, 189, 248, 0.1); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.2); }
  .faq summary::marker { color: var(--accent); }
  .shots img { box-shadow: 0 24px 80px var(--shadow); }
  .hero { background: #020617; border-bottom: 1px solid var(--border); }
  /* Starry night instead of the rain photo, kept in colour and anchored to its hills */
  .hero::before { background: url("images/header_night.webp") center bottom / cover no-repeat; filter: none; }
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: #0f172a; }
  ::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: #64748b; }
}
