/* thespine.tech — shared /vs/* page styles
   Owned by Phase 23 redesign. Linked from every /vs/<vendor>/index.html.
   Cream + ink + signal red palette, apex serif type, 9 motion patterns.
*/

:root {
  --bg: #f2ede3;
  --bg-deep: #e8e0d0;
  --ink: #1a1612;
  --ink-2: #5a5048;
  --ink-3: #6b6256;
  --rule: #d6cdb8;
  --accent: #d72631;
  --accent-soft: rgba(215, 38, 49, 0.08);
  --accent-deep: #a81d24;
  --display-apex: clamp(72px, 15vw, 360px);
  --display-xxl: clamp(56px, 11vw, 240px);
  --display-md: clamp(36px, 5vw, 80px);
  --body-xl: clamp(24px, 3vw, 36px);
  --body-lg: clamp(20px, 2vw, 28px);
  --leading-tight: 0.96;
  --leading-body: 1.5;
  --tracking-apex: -0.025em;
  --scroll-progress: 0;
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  --cursor-active: 0;
}

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

html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  scroll-behavior: smooth;
  cursor: none;
}
@media (hover: none), (max-width: 768px) {
  html,
  body {
    cursor: auto;
  }
}

/* Cursor — signal-red follower */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate3d(
      calc(var(--cursor-x) - 8px),
      calc(var(--cursor-y) - 8px),
      0
    )
    scale(calc(0.5 + var(--cursor-active) * 0.5));
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  will-change: transform;
}
.cursor::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.18;
  animation: cursor-pulse 2s ease-in-out infinite;
}
@keyframes cursor-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.18;
  }
  50% {
    transform: scale(1.6);
    opacity: 0.05;
  }
}
@media (hover: none), (max-width: 768px) {
  .cursor {
    display: none;
  }
}

/* Paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1, 0 0 0 0 0.09, 0 0 0 0 0.07, 0 0 0 0.025 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 1;
}
body > * {
  position: relative;
  z-index: 2;
}

/* Section */
.section {
  min-height: 100vh;
  width: 100vw;
  padding: 96px 64px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (max-width: 768px) {
  .section {
    padding: 80px 24px 56px;
    min-height: auto;
  }
}

/* Type */
.apex {
  font-size: var(--display-apex);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-apex);
  font-weight: 500;
  color: var(--ink);
  font-variation-settings:
    "opsz" 96,
    "SOFT" 0,
    "WONK" 0,
    "wght" calc(450 + var(--scroll-progress) * 250);
  margin-top: auto;
  margin-bottom: auto;
  will-change: font-variation-settings;
}
.apex em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings:
    "opsz" 96,
    "SOFT" 40,
    "WONK" 0,
    "wght" calc(450 + var(--scroll-progress) * 250);
}
.display-xxl {
  font-size: var(--display-xxl);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  font-weight: 500;
  font-variation-settings:
    "opsz" 96,
    "SOFT" 0,
    "wght" 550;
}
.display-xxl em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings:
    "opsz" 96,
    "SOFT" 40,
    "wght" 550;
}
.display-md {
  font-size: var(--display-md);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink-2);
}
.body-xl {
  font-size: var(--body-xl);
  line-height: var(--leading-body);
  letter-spacing: -0.005em;
  font-weight: 400;
  color: var(--ink);
  max-width: 920px;
  font-variation-settings:
    "opsz" 36,
    "SOFT" 0,
    "wght" 400;
}
.body-xl em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings:
    "opsz" 36,
    "SOFT" 30,
    "wght" 500;
}
.body-lg {
  font-size: var(--body-lg);
  line-height: var(--leading-body);
  font-weight: 400;
  color: var(--ink-2);
  max-width: 820px;
}

/* Word reveal */
.word {
  display: inline-block;
  opacity: 0;
  transform: translate3d(40px, 0, 0);
  filter: blur(8px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--d, 0) * 80ms);
}
.word.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* Eyebrow */
.eyebrow-page {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-3);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow-page .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(215, 38, 49, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}
.eyebrow-page .vs {
  background: var(--accent);
  color: var(--bg);
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 500;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 5px rgba(215, 38, 49, 0.14);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(215, 38, 49, 0.04);
  }
}
.eyebrow-foot {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  position: absolute;
  bottom: 76px;
  left: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow-foot .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(215, 38, 49, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}
@media (max-width: 768px) {
  .eyebrow-foot {
    left: 24px;
    bottom: 60px;
    font-size: 11px;
  }
}

/* VsRow */
.vs-table {
  margin-top: 80px;
  max-width: 1320px;
}
.vs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.vs-row:last-child {
  border-bottom: 1px solid var(--rule);
}
.vs-row .they {
  font-family: "Fraunces", serif;
  font-size: var(--body-lg);
  font-style: italic;
  line-height: var(--leading-body);
  color: var(--ink-3);
  font-variation-settings:
    "opsz" 24,
    "SOFT" 30,
    "wght" 400;
}
.vs-row .they::before {
  content: "“";
  font-family: serif;
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.15em;
  margin-right: 0.05em;
  color: var(--ink-3);
}
.vs-row .they::after {
  content: "”";
  font-family: serif;
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.4em;
  margin-left: 0.05em;
  color: var(--ink-3);
}
.vs-row .us {
  font-family: "Fraunces", serif;
  font-size: var(--display-md);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variation-settings:
    "opsz" 60,
    "SOFT" 0,
    "wght" 550;
}
.vs-row .us em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings:
    "opsz" 60,
    "SOFT" 40,
    "wght" 550;
}
.vs-row .row-label {
  grid-column: 1 / -1;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-3);
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .vs-row {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0;
  }
  .vs-row .us {
    font-size: clamp(28px, 7vw, 56px);
  }
}

/* Honest disadvantage */
.disadvantage {
  margin-top: 96px;
  padding: 56px;
  background: var(--bg-deep);
  border-left: 6px solid var(--accent);
  max-width: 920px;
}
.disadvantage .label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 20px;
}
.disadvantage .body {
  font-family: "Fraunces", serif;
  font-size: var(--body-xl);
  line-height: var(--leading-body);
  color: var(--ink);
  font-variation-settings:
    "opsz" 36,
    "SOFT" 0,
    "wght" 400;
}
.disadvantage .body em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings:
    "opsz" 36,
    "SOFT" 40,
    "wght" 500;
}
@media (max-width: 768px) {
  .disadvantage {
    padding: 32px 24px;
  }
}

/* CTA */
.cta-block {
  margin-top: 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.cta-primary {
  --magnet-x: 0;
  --magnet-y: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  padding: 24px 44px;
  border-radius: 4px;
  transform: translate3d(
    calc(var(--magnet-x) * 1px),
    calc(var(--magnet-y) * 1px),
    0
  );
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    box-shadow 0.3s ease;
  will-change: transform;
  box-shadow: 0 4px 20px rgba(215, 38, 49, 0.18);
}
.cta-primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 12px 40px rgba(215, 38, 49, 0.32);
}
.cta-primary .arrow {
  transition: transform 0.2s ease;
}
.cta-primary:hover .arrow {
  transform: translateX(8px);
}
.cta-secondary {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
}
.cta-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Marquee */
.ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  z-index: 100;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-roll 60s linear infinite;
  gap: 64px;
  padding-left: 32px;
}
.ticker-track > span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.ticker-track .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes ticker-roll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    cursor: auto;
  }
  .cursor,
  .cursor::before {
    display: none;
    animation: none;
  }
  .word {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .ticker-track {
    animation: none;
  }
  .cta-primary {
    transform: none;
    transition: none;
  }
  .eyebrow-page .dot,
  .eyebrow-foot .dot {
    animation: none;
  }
  .apex {
    font-variation-settings:
      "opsz" 96,
      "SOFT" 0,
      "WONK" 0,
      "wght" 550;
  }
  .apex em {
    font-variation-settings:
      "opsz" 96,
      "SOFT" 40,
      "WONK" 0,
      "wght" 550;
  }
}
