/* ------------------------------------------------------------------ *
   Perev — homepage styles
   Palette lifted straight from the extension popup so the site and the
   add-on feel like one product. Light is the default; dark mirrors the
   extension's dark theme.
 * ------------------------------------------------------------------ */

@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/crimson-pro-latin-400.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;
}
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/crimson-pro-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, 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;
}

:root {
  --bg:      #faf8f4;
  --surface: #ffffff;
  --accent:  #b5232c;
  --accent-ink: #ffffff;
  --text:    #1e1c1a;
  --muted:   #6e6864;
  --border:  #e0dad4;
  --shadow:  rgba(40, 30, 20, 0.08);
  --badge-bg: #f1ece5;

  --serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1080px;
}

html[data-theme='dark'] {
  --bg:      #1e1c1f;
  --surface: #26232a;
  --accent:  #d4956a;
  --accent-ink: #1e1c1f;
  --text:    #e6e1de;
  --muted:   #9e9895;
  --border:  #38343c;
  --shadow:  rgba(0, 0, 0, 0.45);
  --badge-bg: #322e37;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand__mark { border-radius: 8px; display: block; }
.brand__name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
}
.site-nav {
  margin-left: auto;
  display: flex;
  gap: 24px;
  font-size: 15px;
}
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--text); text-decoration: none; }

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover { transform: rotate(12deg); border-color: var(--accent); }
.theme-toggle__icon {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset -5px -3px 0 0 var(--surface);
  transition: background 0.2s;
}
html[data-theme='dark'] .theme-toggle__icon {
  background: var(--accent);
  box-shadow: none;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 30px;
}

.cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cta__note { font-size: 13.5px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px -6px var(--accent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px var(--accent); }
.btn--lg { font-size: 18px; padding: 16px 30px; }

/* ---------- Features ---------- */
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  text-align: center;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
}
.features {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 70px 24px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 24px;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-3px); border-color: var(--accent); }
.feature h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature p { color: var(--muted); font-size: 15.5px; }
.feature em { color: var(--text); font-style: italic; }

.feature-more { margin-top: 96px; }
.feature-more__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  text-align: center;
  letter-spacing: -0.01em;
  margin-bottom: 34px;
}
.feature-more .feature-grid { grid-template-columns: repeat(4, 1fr); }
.feature-more .feature h3 { font-size: 18px; }
.feature-more .feature p { font-size: 14.5px; }

/* ---------- Install ---------- */
.install {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 90px;
  text-align: center;
}
.install__mark { border-radius: 16px; margin-bottom: 22px; }
.install__lede { color: var(--muted); font-size: 18px; margin: 0 auto 28px; max-width: 44ch; }
.install .btn { margin: 0 auto; }
.install__sub { color: var(--muted); font-size: 14px; margin-top: 16px; }
kbd {
  font-family: var(--sans);
  font-size: 13px;
  background: var(--badge-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}
.site-footer__credits { margin-top: 8px; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 36px;
    gap: 40px;
  }
  .feature-grid,
  .feature-more .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-nav { display: none; }
  .feature-grid,
  .feature-more .feature-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
