/* ==========================================================================
   EbSynth — shared stylesheet for guides, docs and blog pages.
   Plain modern CSS (custom properties, grid, clamp). No Bootstrap.
   Colors and fonts follow the landing page (style.css).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #000;
  --bg-glow: rgb(22, 27, 49);
  --bg-glow-soft: #0a0c17;
  --border: #262b3d;
  --border-strong: #424558;

  --text: #eceef4;
  --text-muted: #b5c3e2;
  --text-dim: #7f89a8;

  --accent: #00e7a2;
  --accent-hover: #32ffc1;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Exo 2', 'Inter', sans-serif;

  --fs-sm: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
  --fs-base: clamp(0.9375rem, 0.85rem + 0.4vw, 1.125rem);
  --fs-lead: clamp(1rem, 0.9rem + 0.5vw, 1.35rem);
  --fs-h3: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --fs-h3-lg: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  --fs-h2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --fs-h1: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem);

  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 0.75rem;

  --page-width: 72rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { color: var(--text); line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.01em; line-height: 1.12; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0; text-wrap: pretty; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--page-width));
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 8vw, 6rem);
  scroll-margin-top: 1rem;
}

.glow { background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--bg-glow), var(--bg-glow-soft) 60%, var(--bg)); }
/* Closing call to action, matching the landing page: thin bars above and
   below, a soft centered glow, icon, headline and the button */
.bar { height: 2px; background: linear-gradient(to right, #000, #121622, #4a536e, #121622, #000); }
.cta {
  /* everything is sized from the headline, in the landing page's proportions */
  --h: clamp(1.9rem, 1.3rem + 2vw, 2.75rem);
  text-align: center;
  padding-block: calc(var(--h) * 2.6);
  background: radial-gradient(ellipse 65% 60% at 50% 50%, var(--bg-glow), var(--bg));
}
.cta__icon { width: calc(var(--h) * 1.8); height: auto; margin-inline: auto; }
.cta h2 { margin-top: calc(var(--h) * 0.8); font-size: var(--h); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
.cta .button {
  margin-top: calc(var(--h) * 0.75);
  min-height: calc(var(--h) * 1.15);
  padding-inline: calc(var(--h) * 0.65);
  font-size: max(0.95rem, var(--h) * 0.36);
}

/* Vertical rhythm */
.flow > * + * { margin-top: var(--flow, 1rem); }

/* ---------- Brand logo ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 1.15em; height: auto; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem); }
.hero__grid {
  display: grid;
  gap: clamp(2rem, 7vw, 8rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: 1fr 475px; }
}
/* 475px = exactly half of the 950px screenshot, so its UI text stays sharp */
.hero__shot { justify-self: center; width: 100%; max-width: 475px; }
.lead { max-width: 33rem; font-size: var(--fs-lead); line-height: 1.45; color: var(--text); }
.text-center { text-align: center; }

/* ---------- Media ---------- */
.media { margin: 0; }
.media > img,
.media > video {
  width: 100%;
  border-radius: var(--radius);
}
/* thin frame around the hero screenshot; drawn outside the box, so the
   picture keeps its exact pixel size */
.media > img { box-shadow: 0 0 0 1px var(--border-strong); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  line-height: 1.2;
  padding: 0 1.8rem;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: 150ms ease-in;
}
.button--main { background: var(--accent); color: #000; }
.button--main:hover { background: var(--accent-hover); color: #000; }
.button--outline { background: transparent; color: #d9def3; border: 1px solid #d9def3; font: inherit; font-weight: 500; cursor: pointer; }
.button--outline:hover { background: #d9def3; color: #000; }

/* ---------- "Desktop only" notice (phones) ----------
   Same look and placement as the landing page modal. */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}
.modal {
  position: fixed;
  top: 75%;
  left: 50%;
  z-index: 1001;
  width: min(90%, 400px);
  padding: 1.5rem;
  border: 1px solid #4a536e;
  border-radius: 0.375rem;
  background: #181c2c;
  text-align: center;
  translate: -50% -50%;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}
.modal-overlay.is-open,
.modal.is-open { opacity: 1; }
.modal h2 { margin-bottom: 1rem; font-size: 1.6rem; font-weight: 800; }
.modal p { margin-bottom: 1.5rem; font-size: 0.875rem; line-height: 1.5; }
.modal .button { min-width: 13ch; min-height: 2.8rem; }
body.modal-open { overflow: hidden; }

/* ---------- Footer ----------
   Same content as the landing page footer. Desktop: links left, social icons
   right. Mobile: everything centered, Terms/Privacy/Company on the first line,
   the e-mail on its own line below, then the icons. */
.site-footer { padding-block: clamp(2rem, 5vw, 3.5rem); font-size: var(--fs-sm); line-height: 1.4; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 0.75rem; }
.site-footer__links a + a::before { content: "\00b7"; display: inline-block; margin-inline: 0.9rem; color: var(--text-muted); }
.site-footer__links .site-footer__mail { order: 1; flex-basis: 100%; }
.site-footer__social { display: flex; gap: 1.5rem; font-size: 1.25rem; }
/* the e-mail moves to the end on mobile, so the first remaining link has no dot */
.site-footer__links a:nth-child(2)::before { content: none; }
@media (min-width: 48rem) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .site-footer__links { justify-content: flex-start; }
  .site-footer__links .site-footer__mail { order: 0; flex-basis: auto; }
  .site-footer__links a:nth-child(2)::before { content: "\00b7"; }
  .site-footer__social { font-size: 1.35rem; }
}

/* ==========================================================================
   Settings guide components
   ========================================================================== */

/* Examples: three columns, title + video + values, all centered */
.examples {
  display: grid;
  gap: 2.5rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
@media (min-width: 40rem) {
  .examples { grid-template-columns: repeat(3, 1fr); }
}
.example { text-align: center; }
.example h3 { margin-bottom: 1rem; }
/* labels right-aligned, values left-aligned, meeting on the video's center line */
.example__values {
  display: grid;
  line-height: 1.4;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.75rem;
  margin: 1.1rem 0 0;
  font-size: var(--fs-sm);
}
.example__values > div { display: contents; }
.example__values dt { color: var(--text-dim); text-align: right; }
.example__values dd { margin: 0; color: var(--text); font-weight: 600; text-align: left; font-variant-numeric: tabular-nums; }

/* Quick guide: one row per setting, video left, text right */
.guide-list {
  display: grid;
  gap: clamp(3.5rem, 9vw, 7rem);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
.guide-row {
  display: grid;
  gap: 1.25rem clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  scroll-margin-top: 1rem;
}
.guide-row > div { max-width: 36rem; }
@media (min-width: 60rem) {
  .guide-row { grid-template-columns: 3fr 2fr; }
}
.guide-row h3 { font-size: var(--fs-h3-lg); font-weight: 700; letter-spacing: -0.015em; line-height: 1.12; }
.guide-row p { margin-top: 0.75rem; font-size: var(--fs-base); }
/* Optional one-line "best for" verdict between the name and the details */
.guide-row p.guide-row__tagline { display: flex; align-items: center; gap: 0.35em; margin-top: 0.6rem; font-size: var(--fs-lead); line-height: 1.25; color: var(--accent); font-weight: 600; }
.guide-row p.guide-row__tagline + p { margin-top: 1rem; }
/* arrow in front of the verdict */
.guide-row__tagline::before {
  content: "";
  flex: none;
  width: 0.95em;
  height: 0.95em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8h11M9 3.5L13.5 8 9 12.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Quick fixes table: symptom on the left, short fix chips on the right */
.fixes {
  width: 100%;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  border-collapse: collapse;
}
.fixes th {
  padding: 0 0 0.75rem;
  line-height: 1.4;
  text-align: left;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-strong);
}
.fixes td {
  padding: clamp(0.75rem, 2vw, 1rem) 0;
  line-height: 1.4;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.fixes td:first-child { color: var(--text); padding-right: 1.5rem; }
.fixes td:last-child { width: 40%; }
.fixes tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.fix { color: var(--text); font-weight: 600; white-space: nowrap; }
.fix b { color: var(--accent); margin-left: 0.15em; }

/* ---------- Three-panel comparison video ----------
   A clean video of three equal panels; labels and dividers are drawn by the
   page so they stay sharp at any size. class="is-pick" on a label marks the
   better result in green. */
.compare {
  position: relative;
  margin: 0;
  container-type: inline-size;
}
.compare__pic {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.compare__pic > video { width: 100%; }
/* thin dividers between the panels */
.compare__pic::before,
.compare__pic::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #000;
  z-index: 1;
}
.compare__pic::before { left: 33.333%; }
.compare__pic::after { left: 66.667%; }
/* label chips along the top */
.compare__labels {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 3.2%;
  font-size: clamp(0.68rem, 1.8cqi, 0.82rem);
  font-weight: 600;
  line-height: 1;
}
.compare__labels span {
  justify-self: center;
  padding: 0.5em 0.9em;
  border-radius: 999px;
  background: rgba(8, 10, 18, 0.72);
  color: var(--text);
  backdrop-filter: blur(6px);
}
/* the better result: green text and outline on the same dark pill,
   so it reads on light and dark footage alike */
.compare__labels .is-pick {
  box-shadow: inset 0 0 0 1.5px var(--accent);
  color: var(--accent);
}

/* ---------- Click-to-play video ----------
   Set up by the page script for every <video data-player>. The video is its
   own control. A stopped video shows a play glyph in its center;
   a playing video shows nothing, also on hover. */
video[data-player] { cursor: pointer; }
.has-player { position: relative; }
.player {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: clamp(2.75rem, 8.5cqi, 3.75rem);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 10, 18, 0.55);
  color: #fff;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: opacity 0.25s, background-color 0.15s;
}
/* clicks always land on the button itself, never on the glyph inside it */
.player svg { width: 40%; height: 40%; pointer-events: none; }
.player:hover { background: rgba(8, 10, 18, 0.75); }
.player:focus-visible { border-radius: 50%; }
/* a playing video is clean: the glyph is gone and clicks go to the video */
.is-playing > .player { opacity: 0; pointer-events: none; }
/* keyboard only: a focused button on a playing video shows a pause glyph */
.is-playing > .player:focus-visible { opacity: 1; }

/* ---------- Pixel-exact video sizes on desktop ----------
   From 1216px window width up, the column is exactly 1152px and videos
   display at whole-pixel sizes: hero 475x477, quick guide 720x405,
   examples 360x360. */
@media (min-width: 76rem) {
  .guide-row { grid-template-columns: 720px 1fr; column-gap: 3rem; }
  .examples { gap: 2.25rem; }
}
