/* ============================================
   Visionmachine — shared styles
   bg: #4800ff  fg: #F5F2EC  accent: oklch(0.92 0.12 110)
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:root {
  --bg: #4800ff;
  --bg-deep: #2e009f;
  --fg: #f5f2ec;
  --fg-dim: rgba(245, 242, 236, 0.62);
  --fg-faint: rgba(245, 242, 236, 0.18);
  --line: rgba(245, 242, 236, 0.22);
  --accent: oklch(0.92 0.12 110);
  --shell-pad: clamp(20px, 4vw, 56px);
  --section-pad: clamp(72px, 10vw, 160px);
  --maxw: 1680px;
  --radius: 2px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter Tight", "Inter", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01","cv11";
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, video { display: block; max-width: 100%; }

/* Disable image saving / dragging across the site */
img, .placeholder, .slide, .lightbox-stage, .pj-banner, .vg-card .thumb, .press-card .thumb-wrap {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Image-protection toast */
.img-toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--fg); color: #1a004d;
  padding: 14px 22px; border-radius: 2px;
  font-size: 14px; line-height: 1.4;
  max-width: min(520px, calc(100vw - 40px));
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  z-index: 300;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
}
.img-toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }
.img-toast .lock {
  width: 28px; height: 28px; flex: 0 0 auto;
  border-radius: 50%; background: #1a004d; color: var(--fg);
  display: inline-flex; align-items: center; justify-content: center;
}
.img-toast .lock svg { width: 14px; height: 14px; }
.img-toast strong { font-weight: 500; display: block; margin-bottom: 2px; font-size: 12px; font-family: "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; opacity: .65; }

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  margin-right: 4px;
}
.lang-toggle button {
  padding: 6px 12px;
  background: transparent;
  color: var(--fg);
  transition: background .2s, color .2s;
  position: relative;
}
.lang-toggle button.is-active {
  background: var(--fg);
  color: var(--bg);
}
.lang-toggle button + button { border-left: 1px solid var(--line); }
@media (max-width: 880px) {
  .lang-toggle { margin-right: 0; }
  .lang-toggle button { padding: 5px 10px; font-size: 10px; }
}

::selection { background: var(--accent); color: #1a004d; }

.mono { font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-feature-settings: "zero","ss01"; }

/* ---------- Layout shell ---------- */
.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--shell-pad); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px var(--shell-pad);
  transition: background-color .35s var(--ease), backdrop-filter .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(72, 0, 255, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px; letter-spacing: 0.02em;
  text-transform: uppercase;
}
.logo-mark {
  width: 30px; height: 30px;
  background: url('img/visionmachine-logo.png') center/contain no-repeat;
  display: inline-block; flex: 0 0 auto;
}
.logo-mark--legacy {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--fg);
  position: relative;
  flex: 0 0 auto;
}
.logo-mark--legacy::after {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50%;
  background: var(--bg);
}
.logo-mark--legacy::before {
  content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px;
  width: 1.5px; background: var(--fg); transform: translateX(-50%);
}
.logo-text strong { font-weight: 600; }
.logo-text span { opacity: .6; margin-left: 6px; }

/* ---------- Nav ---------- */
.nav {
  display: flex; align-items: center; gap: 28px;
}
.nav-list {
  display: flex; gap: 22px; list-style: none; padding: 0; margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-list a { position: relative; padding: 6px 0; opacity: .85; transition: opacity .2s; }
.nav-list a:hover { opacity: 1; }
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--fg); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-list a:hover::after, .nav-list a.is-active::after { transform: scaleX(1); }

/* Socials — outline SVG icons, transparent background, no circle */
.socials { display: flex; gap: 18px; align-items: center; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-radius: 0;
  opacity: 0.92;
  transition: opacity .2s, transform .2s;
}
.socials a:hover { opacity: 1; transform: translateY(-1px); background: transparent; border: 0; }
.socials a svg { width: 100%; height: 100%; display: block; stroke: currentColor; fill: none; }
.socials a img { display: none; }
.site-footer .socials a { width: 30px; height: 30px; }

/* Menu toggle (mobile) */
.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 50%;
  align-items: center; justify-content: center;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--fg);
  transition: transform .3s var(--ease), top .2s, opacity .2s;
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* Tighter header at medium widths — keep socials visible only on wide screens */
@media (max-width: 1180px) {
  .nav-list { gap: 16px; font-size: 11px; }
  .site-header .socials { display: none; }
}

/* Mobile drawer */
@media (max-width: 1024px) {
  .nav-list { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header .socials { display: none; }
  .site-header.is-open + .mobile-drawer,
  .mobile-drawer.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
}
.mobile-drawer {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  padding: 96px var(--shell-pad) 40px;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .25s;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-drawer ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: clamp(34px, 8vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.05;
}
.mobile-drawer ul a { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mobile-drawer .socials { display: flex; margin-top: 32px; }
.mobile-drawer .drawer-meta {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em; opacity: .6;
  margin-top: 24px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px var(--shell-pad) 32px;
  margin-top: 120px;
}
.footer-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 60px;
}
.footer-grid h4 {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  margin: 0 0 16px; opacity: .55; font-weight: 500;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-grid ul a { opacity: .85; }
.footer-grid ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer-tagline { font-size: clamp(20px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -0.02em; max-width: 22ch; }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em; opacity: .65;
  padding-top: 24px; border-top: 1px solid var(--line);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-tagline { grid-column: 1 / -1; font-size: 26px; }
}

/* ---------- Back to top (footer button) ---------- */
.back-to-top {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #ffffff;
  opacity: 0.85;
  cursor: pointer;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.back-to-top:hover { opacity: 1; transform: translateY(-2px); }
.back-to-top:focus-visible { outline: 1px solid rgba(255,255,255,0.6); outline-offset: 4px; border-radius: 2px; }
.back-to-top svg { display: block; width: 22px; height: 22px; }
.back-to-top .label,
.back-to-top .btt-icon {
  /* legacy spans no longer used — keep hidden if older HTML still has them */
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Page intro / heading helpers ---------- */
.page-intro {
  padding: 160px var(--shell-pad) 80px;
  max-width: var(--maxw); margin: 0 auto;
}
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  opacity: .65; margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.page-title {
  font-size: clamp(48px, 9vw, 140px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0 0 32px;
  text-wrap: pretty;
}
.page-lede {
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.45;
  max-width: 56ch;
  opacity: .85;
  font-weight: 400;
}

.section-title {
  font-size: clamp(34px, 5.5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0 0 48px;
  text-wrap: pretty;
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--filled { background: var(--fg); color: var(--bg); }
.btn--filled:hover { background: var(--accent); border-color: var(--accent); color: #1a004d; }
.btn .arrow { width: 14px; height: 14px; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
  transition: border-color .2s, gap .2s;
}
.text-link:hover { border-color: var(--fg); gap: 12px; }

/* ---------- SVG placeholder image ---------- */
.placeholder {
  position: relative;
  background-color: var(--bg-deep);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.placeholder::before {
  content: attr(data-label);
  position: absolute; left: 16px; bottom: 14px;
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  text-transform: uppercase; letter-spacing: .1em;
  opacity: .65;
}
.placeholder::after {
  content: attr(data-tag);
  position: absolute; right: 16px; top: 14px;
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  letter-spacing: .08em;
  opacity: .55;
}
.placeholder--ratio-16x9 { aspect-ratio: 16 / 9; }
.placeholder--ratio-4x3 { aspect-ratio: 4 / 3; }
.placeholder--ratio-1x1 { aspect-ratio: 1 / 1; }
.placeholder--ratio-3x4 { aspect-ratio: 3 / 4; }
.placeholder--ratio-21x9 { aspect-ratio: 21 / 9; }

/* Gradient variants — give placeholders a different mood */
.placeholder--v1 { background-image: url('img/placeholder-v1.jpg'); }
.placeholder--v2 { background-image: url('img/placeholder-v2.jpg'); }
.placeholder--v3 { background-image: url('img/placeholder-v3.jpg'); }
.placeholder--v4 { background-image: url('img/placeholder-v4.jpg'); }
.placeholder--v5 { background-image: url('img/placeholder-v5.jpg'); }
.placeholder--v6 { background-image: url('img/placeholder-v6.jpg'); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Newsletter modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 0, 70, 0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease);
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--fg); color: #1a004d;
  width: 100%; max-width: 460px;
  padding: 44px 40px 36px;
  position: relative;
  border-radius: 2px;
  transform: translateY(12px) scale(.98);
  transition: transform .4s var(--ease);
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
}
.modal-backdrop.is-open .modal { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #1a004d;
}
.modal-close:hover { background: rgba(72,0,255,0.08); }
.modal h3 { font-size: 32px; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 8px; font-weight: 500; }
.modal p { margin: 0 0 24px; font-size: 15px; opacity: .75; }
.modal form { display: flex; flex-direction: column; gap: 12px; }
.modal input[type="email"] {
  width: 100%; padding: 14px 16px;
  background: transparent; color: #1a004d;
  border: 1px solid rgba(26,0,77,0.25); border-radius: 2px;
  font: inherit; font-size: 15px;
  outline: none; transition: border-color .2s;
}
.modal input[type="email"]:focus { border-color: #1a004d; }
.modal button[type="submit"] {
  background: #1a004d; color: var(--fg);
  padding: 14px 22px; border-radius: 2px;
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  text-transform: uppercase; letter-spacing: .08em;
  transition: background .2s;
}
.modal button[type="submit"]:hover { background: var(--bg); }
.modal .modal-meta { font-family: "JetBrains Mono", monospace; font-size: 10px; opacity: .55; text-transform: uppercase; letter-spacing: .1em; margin-top: 16px; }

/* ---------- Utility ---------- */
.spacer-l { height: var(--section-pad); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.tag {
  display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- Global: square corners on all buttons ----------
   Buttons across the site should have straight corners, never rounded.
   This overrides per-page rules that set border-radius: 999px / 50% / 2px
   on <button> elements (filter chips, view toggles, modal buttons,
   slider arrows, lightbox controls, mobile-menu toggle, signout, etc.).
   Anchor-styled buttons (.btn, .button) and submit inputs are included
   for completeness. */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn,
.button,
a.btn,
a.button {
  border-radius: 0 !important;
}
