/*
 * Plotsy brand layer, shared by the landing page and the home page.
 * The plotsy-home repo has its own copy: make the same change there.
 */
:root {
  --bg: #07060b;
  --bg-2: #0d0b14;
  --bg-3: #15121f;
  --ink: #f5f2fb;
  --ink-2: rgba(245, 242, 251, 0.74);
  --ink-3: rgba(245, 242, 251, 0.52);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #9900cc;
  --accent-hover: #ad14e3;
  --accent-2: #c266ff;
  --accent-glow: rgba(165, 40, 255, 0.5);
  --gold: #f3c969;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --r-xl: 2rem;
  --r-lg: 1.5rem;
  --bezel: 6px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* Film grain: one fixed layer, never on scrolling content. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { position: relative; padding-block: clamp(96px, 13vw, 176px); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: 16px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg);
  transform: translateY(-200%); transition: transform 0.4s var(--ease-out);
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* Type */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.h-xl { font-size: clamp(56px, 10.5vw, 168px); }
.h-lg { font-size: clamp(46px, 7.2vw, 112px); }
.h-md { font-size: clamp(36px, 4.6vw, 68px); }
.h-sm { font-size: clamp(26px, 2.6vw, 36px); line-height: 0.95; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.muted { color: var(--ink-3); }
.accent-text { color: var(--accent-2); }
.gradient-text {
  background: linear-gradient(100deg, #fff 10%, var(--accent-2) 55%, #ff7ad9 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
/* "Live" dot. The pulse is a scaled ring (transform + opacity) so it never repaints the page. */
.dot {
  position: relative; display: inline-block; flex: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff3d6e;
}
.dot::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: inherit; opacity: 0;
  animation: live 2.4s var(--ease-out) infinite;
}
@keyframes live {
  0% { transform: scale(1); opacity: 0.6; }
  70%, 100% { transform: scale(3.4); opacity: 0; }
}

/* Buttons: pill with the icon in its own circle. */
.btn {
  --h: 58px; --icon: 42px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  height: var(--h);
  padding: 0 calc((var(--h) - var(--icon)) / 2) 0 26px;
  border-radius: 999px;
  border: 0;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: 0.005em;
  white-space: nowrap;
  transition: transform 0.6s var(--ease-out), background-color 0.5s var(--ease-out), box-shadow 0.6s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn__icon {
  display: grid; place-items: center; flex: none;
  width: var(--icon); height: var(--icon); border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  transition: transform 0.6s var(--ease-spring), background-color 0.5s var(--ease-out);
}
.btn__icon svg { width: 18px; height: 18px; }
.btn:hover .btn__icon { transform: translate(2px, -1px) scale(1.06); }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 18px 50px -16px var(--accent-glow);
}
.btn--primary:hover { background: var(--accent-hover); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 22px 60px -14px var(--accent-glow); }
.btn--ghost { background: rgba(255, 255, 255, 0.06); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost .btn__icon { background: rgba(255, 255, 255, 0.08); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn--light { background: var(--ink); color: var(--bg); }
.btn--light .btn__icon { background: rgba(7, 6, 11, 0.08); }
.btn--sm { --h: 44px; --icon: 32px; font-size: 14.5px; padding-left: 18px; gap: 10px; }
.btn--sm .btn__icon svg { width: 15px; height: 15px; }
.btn--lg { --h: 66px; --icon: 50px; font-size: 17px; padding-left: 30px; }
.btn--block { width: 100%; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 600; font-size: 15px;
  border-bottom: 1px solid var(--line-2); padding-bottom: 3px;
  transition: border-color 0.5s var(--ease-out), gap 0.5s var(--ease-out);
}
.text-link:hover { border-color: var(--accent-2); gap: 12px; }

/* Double-bezel card: an outer tray holding the content plate. */
.bezel {
  padding: var(--bezel);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--line);
}
.bezel__core {
  height: 100%;
  border-radius: calc(var(--r-xl) - var(--bezel));
  background: var(--bg-2);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

/* Soft purple light behind sections. Decorative only. */
.glow {
  position: absolute; pointer-events: none; z-index: 0;
  width: 70vmax; height: 70vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(153, 0, 204, 0.32), rgba(153, 0, 204, 0) 70%);
}

/* Store badges */
.badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.badges a { display: block; transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out); opacity: 0.92; }
.badges a:hover { transform: translateY(-2px); opacity: 1; }
.badges img { height: 42px; width: auto; }

/* Scroll reveal. Hidden only while JS is running and motion is allowed;
   the inline head script removes .js again if the page script never starts. */
html.js:not(.reduced) .reveal { opacity: 0; transform: translateY(40px); }

/* Accordion (FAQ) */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform 0.6s var(--ease-out), background-color 0.5s var(--ease-out);
}
.faq summary .plus::before, .faq summary .plus::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px;
  background: var(--ink); transform: translate(-50%, -50%);
}
.faq summary .plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.6s var(--ease-out); }
.faq details[open] summary .plus { background: var(--accent); transform: rotate(180deg); }
.faq details[open] summary .plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq .answer { padding: 0 0 28px; color: var(--ink-2); max-width: 46em; }

/* Trailer dialog */
.trailer-dialog {
  width: min(100vw - 32px, 1120px); max-width: none; padding: 0; border: 0;
  background: #000; border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line-2);
}
.trailer-dialog::backdrop { background: rgba(4, 3, 8, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.trailer-dialog video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.trailer-dialog .close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55); color: #fff; box-shadow: inset 0 0 0 1px var(--line-2);
}
.trailer-dialog .close svg { width: 18px; height: 18px; }

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