/* ==========================================================================
   Reviorum — main.css
   Design tokens, font, scoped base styles, layout primitives.
   Every class is prefixed with "rv-" so nothing collides with WordPress core,
   Gutenberg (.wp-block-*, .has-*, .alignwide …) or plugin styles.
   ========================================================================== */

/* Inter, variable (100–900). Latin + Latin Extended subsets. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  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;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  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;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Neutrals */
  --rv-ink: #0e1320;
  --rv-ink-2: #343b4c;
  --rv-muted: #596173;
  --rv-faint: #9aa1b2;
  --rv-line: #e4e7ee;
  --rv-line-strong: #cdd2de;
  --rv-bg: #f3f4fa;
  --rv-surface: #fff;
  --rv-surface-2: #f7f8fc;

  /* Brand */
  --rv-accent: #4f46e5;
  --rv-accent-hover: #3f37c9;
  --rv-accent-soft: #eeeffe;
  --rv-accent-tint: #a5b4fc;
  --rv-night: #16143a;
  --rv-night-2: #23205a;
  --rv-night-3: #2a2766;
  --rv-night-text: #c9cbe8;
  --rv-sun: #f5b638;
  --rv-mint: #2dd4bf;

  /* Surface tints (section backgrounds) */
  --rv-lavender: #e9ebff;
  --rv-warm: #fff1de;

  /* Rating tones — used ONLY for ratings */
  --rv-pos: #15803d;
  --rv-warn: #b45309;
  --rv-neg: #b91c1c;
  --rv-pos-soft: #dcfce7;
  --rv-warn-soft: #fef3c7;
  --rv-neg-soft: #fee2e2;

  /* Category hues: tint / strong */
  --rv-hue-hosting: #e3ecff;   --rv-hue-hosting-strong: #2563eb;
  --rv-hue-ai: #efe7ff;        --rv-hue-ai-strong: #7c3aed;
  --rv-hue-casino: #ffe6ec;    --rv-hue-casino-strong: #be185d;
  --rv-hue-apps: #ddf5f1;      --rv-hue-apps-strong: #0d9488;
  --rv-hue-vpn: #e0f1fb;       --rv-hue-vpn-strong: #0369a1;
  --rv-hue-shop: #ffeadd;      --rv-hue-shop-strong: #c2410c;
  --rv-hue-finance: #e2f4e7;   --rv-hue-finance-strong: #15803d;
  --rv-hue-travel: #fcefd9;    --rv-hue-travel-strong: #a16207;

  /* Type */
  --rv-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --rv-fs-xs: 0.75rem;   /* 12 */
  --rv-fs-sm: 0.8125rem; /* 13 */
  --rv-fs-md: 0.875rem;  /* 14 */
  --rv-fs-base: 1rem;    /* 16 */
  --rv-fs-lg: 1.125rem;  /* 18 */
  --rv-fs-h3: 1.125rem;
  --rv-fs-h2: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --rv-fs-h1: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  --rv-lh: 1.55;

  /* Space */
  --rv-s-1: 0.25rem;
  --rv-s-2: 0.5rem;
  --rv-s-3: 0.75rem;
  --rv-s-4: 1rem;
  --rv-s-5: 1.25rem;
  --rv-s-6: 1.5rem;
  --rv-s-8: 2rem;
  --rv-s-10: 2.5rem;
  --rv-s-12: 3rem;
  --rv-s-section: clamp(3rem, 2rem + 3vw, 4.5rem);

  /* Shape */
  --rv-r-sm: 7px;
  --rv-r-md: 10px;
  --rv-r-lg: 14px;
  --rv-r-xl: 20px;
  --rv-r-pill: 999px;
  --rv-shadow-card: 0 10px 30px -14px rgba(14, 19, 32, 0.22);
  --rv-shadow-pop: 0 30px 60px -30px rgba(14, 19, 32, 0.35);

  /* Layout */
  --rv-container: 1320px;
  --rv-gutter: clamp(1rem, 0.6rem + 1.5vw, 1.5rem);
  --rv-header-h: 72px;
  /* WordPress sets --wp-admin--admin-bar--height on <html> when the admin bar is visible */
  --rv-top-offset: var(--wp-admin--admin-bar--height, 0px);

  --rv-focus: 0 0 0 3px #fff, 0 0 0 5px var(--rv-accent);
  --rv-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Base (scoped to the theme body class so WP admin screens stay untouched)
   -------------------------------------------------------------------------- */
.rv-body {
  margin: 0;
  background: var(--rv-bg);
  color: var(--rv-ink);
  font-family: var(--rv-font);
  font-size: var(--rv-fs-base);
  line-height: var(--rv-lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.rv-body *,
.rv-body *::before,
.rv-body *::after { box-sizing: border-box; }

/* [hidden] must win over component display rules (filters, tabs, toggles) */
.rv-body [hidden] { display: none; }

.rv-body img,
.rv-body svg { max-width: 100%; }
.rv-body img { height: auto; display: block; }

.rv-body a { color: var(--rv-accent); text-decoration: none; }
.rv-body a:hover { color: var(--rv-accent-hover); }

.rv-body :focus-visible { outline: none; box-shadow: var(--rv-focus); border-radius: 4px; }

/* :where() keeps specificity at one class so component rules (.rv-input …) win */
.rv-body :where(button, input, select, textarea) { font: inherit; color: inherit; }
/* Fieldsets default to min-width: min-content and overflow narrow screens */
.rv-body :where(fieldset) { min-width: 0; }

.rv-body h1, .rv-body h2, .rv-body h3, .rv-body h4 { margin: 0; letter-spacing: -0.02em; }
.rv-body p { margin: 0; }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.rv-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.rv-main { flex: 1 0 auto; }

.rv-container {
  width: 100%;
  max-width: var(--rv-container);
  margin-inline: auto;
  padding-inline: var(--rv-gutter);
}
.rv-container--narrow { max-width: 1180px; }

.rv-section { padding-block: var(--rv-s-section) 0; }
.rv-section--last { padding-bottom: var(--rv-s-section); }
.rv-section--band { margin-top: var(--rv-s-section); padding-block: 4rem 4.5rem; }
.rv-section--lavender { background: var(--rv-lavender); }
.rv-section--warm { background: var(--rv-warm); }
.rv-section--night { background: var(--rv-night); color: #fff; }

.rv-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--rv-s-4);
  flex-wrap: wrap;
  margin-bottom: var(--rv-s-6);
}
.rv-section__title { font-size: var(--rv-fs-h2); line-height: 1.2; font-weight: 700; }
.rv-section__sub { margin-top: 6px; color: var(--rv-muted); font-size: 0.9375rem; }
.rv-section__more { font-size: var(--rv-fs-md); font-weight: 600; white-space: nowrap; }

.rv-grid { display: grid; gap: var(--rv-s-4); margin: 0; padding: 0; list-style: none; }
.rv-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rv-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rv-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rv-layout-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--rv-s-6);
  align-items: start;
}

.rv-stack { display: flex; flex-direction: column; gap: var(--rv-s-4); }

/* --------------------------------------------------------------------------
   Helpers
   -------------------------------------------------------------------------- */
.rv-visually-hidden {
  position: absolute !important; /* must win over any component rule */
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.rv-skip-link {
  position: absolute;
  left: var(--rv-s-4);
  top: calc(var(--rv-top-offset) - 100px);
  z-index: 1000;
  padding: var(--rv-s-3) var(--rv-s-4);
  background: var(--rv-ink);
  color: #fff;
  border-radius: var(--rv-r-md);
  font-weight: 600;
}
.rv-body .rv-skip-link:focus { top: calc(var(--rv-top-offset) + var(--rv-s-4)); color: #fff; }

.rv-meta { font-size: var(--rv-fs-sm); color: var(--rv-muted); }
.rv-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .rv-body *,
  .rv-body *::before,
  .rv-body *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
