/* ============================================================================
   Supahuman AI Studio — corporate site styling layer.
   Pairs with /studio/_ds/colors_and_type.css (design tokens + fonts) and
   /studio.js (parallax, scroll-reveal, nav shadow, hover/focus shim).
   Everything is scoped under .sh-studio so it never touches VETos styles.
   ========================================================================== */

.sh-studio {
  --accent: #1890FF;
  font-family: var(--font-body);
  color: var(--fg-2);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.sh-studio *,
.sh-studio *::before,
.sh-studio *::after { box-sizing: border-box; }
.sh-studio img { display: block; max-width: 100%; }
.sh-studio ::selection { background: rgba(24, 144, 255, 0.18); }
html { scroll-behavior: smooth; }

/* Text wordmark used where a client/partner logo image isn't available. */
.sh-wordmark {
  font-family: var(--font-heading);
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--fg-1);
  opacity: 0.6;
  transition: opacity 0.2s;
}
.sh-wordmark--on-dark { color: #fff; opacity: 0.86; }

/* Hamburger — hidden on desktop, shown when the link row collapses. */
.sh-nav-burger { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--fg-1); cursor: pointer; }
.sh-nav-burger:hover { background: var(--light-bg-100); }

@media (max-width: 900px) {
  .sh-studio h1 { font-size: clamp(34px, 8vw, 52px) !important; }
  .sh-studio .sh-grid-2,
  .sh-studio .sh-grid-3,
  .sh-studio .sh-grid-4 { grid-template-columns: 1fr !important; }
  .sh-studio .sh-split { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Nav links collapse into a hamburger dropdown */
  .sh-nav-burger { display: inline-flex; }
  .sh-studio nav[data-studio-nav] .sh-nav-links {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--border-subtle);
    padding: 10px 20px 16px; box-shadow: 0 16px 32px -16px rgba(15, 26, 54, 0.25);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .sh-studio nav[data-studio-nav].sh-nav-open .sh-nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .sh-studio nav[data-studio-nav] .sh-nav-links a { padding: 12px 8px !important; margin: 0 !important; font-size: 16px !important; border-radius: 8px; }
  .sh-studio nav[data-studio-nav] .sh-nav-links a:hover { background: var(--light-bg-100); }
  /* The CTA folds into the dropdown as a full-width primary button. */
  .sh-studio nav[data-studio-nav] .sh-nav-links .sh-nav-cta { margin-top: 10px !important; padding: 13px 16px !important; text-align: center; color: #fff !important; box-shadow: none; }
  .sh-studio nav[data-studio-nav] .sh-nav-links .sh-nav-cta:hover { background: var(--accent, #1890FF); }
}

/* Hero stat strip: when it stacks to one column, drop the column dividers and
   left-indent so each stat sits flush-left with a clean top rule between. */
@media (max-width: 900px) {
  .sh-hero-stats > div { padding: 22px 0 4px !important; border-left: 0 !important; }
  .sh-hero-stats > div + div { border-top: 1px solid rgba(255,255,255,0.12); }
}

/* Build/Run/Secure trio: same treatment — neutralise the column dividers and
   side padding when it stacks, so every item is flush-left. */
@media (max-width: 900px) {
  .sh-trio > div { padding-left: 0 !important; padding-right: 0 !important; border-left: 0 !important; border-right: 0 !important; }
  .sh-trio > div + div { border-top: 1px solid var(--border-subtle); padding-top: 26px !important; }
}

/* Tighter padding + headings on small phones */
@media (max-width: 560px) {
  .sh-studio section, .sh-studio header { padding-left: 20px !important; padding-right: 20px !important; }
  .sh-studio h2 { font-size: clamp(26px, 7vw, 34px) !important; }
}

/* ---- Subtle motion + depth (all gated by prefers-reduced-motion) ---------- */

/* Living glow: a slow, low-contrast drift on the dark sections. */
.sh-aura {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(620px 420px at 72% 28%, rgba(116, 35, 249, 0.13), transparent 60%);
  will-change: transform;
  animation: sh-aura-drift 26s ease-in-out infinite alternate;
}
@keyframes sh-aura-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

/* Logo marquee: calm continuous scroll, pause on hover, soft edge fade. */
.sh-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.sh-marquee__track { display: flex; align-items: center; width: max-content; animation: sh-marquee 72s linear infinite; }
.sh-marquee:hover .sh-marquee__track { animation-play-state: paused; }
@keyframes sh-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Cursor spotlight on the feature cards. */
.sh-spotlight { position: relative; isolation: isolate; }
.sh-spotlight > * { position: relative; z-index: 1; }
.sh-spotlight::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: 18px; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(24, 144, 255, 0.13), transparent 62%);
  opacity: 0; transition: opacity 0.3s ease;
}
.sh-spotlight:hover::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .sh-aura { animation: none; }
  .sh-marquee { -webkit-mask-image: none; mask-image: none; }
  .sh-marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}

/* Delivery-journey visual (Approach page): 5 connected nodes that collapse on mobile. */
.sh-journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sh-journey__line { position: absolute; top: 27px; left: 9%; right: 9%; height: 2px; background: linear-gradient(90deg, #1890FF, #7423F9); opacity: 0.32; border-radius: 2px; }
@media (max-width: 760px) {
  .sh-journey { grid-template-columns: repeat(2, 1fr); gap: 30px 14px; }
  .sh-journey__line { display: none; }
}

/* Legal hub cards (/legals): hover lift. */
.sh-legal-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--border-default); }

/* Legal documents (/legals): sticky table-of-contents + readable long-form body. */
.sh-legal-wrap { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 230px 1fr; gap: 56px; align-items: start; }
.sh-legal-toc { position: sticky; top: 90px; }
.sh-legal-toc__label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 14px; }
.sh-legal-toc nav { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 140px); overflow: auto; }
.sh-legal-toc a { font-size: 13px; line-height: 1.4; color: var(--fg-2); text-decoration: none; border-left: 2px solid var(--border-subtle); padding: 2px 0 2px 12px; transition: color .15s, border-color .15s; }
.sh-legal-toc a:hover { color: var(--accent, #1890FF); border-color: var(--accent, #1890FF); }

.sh-legal { max-width: 760px; color: var(--fg-2); font-size: 15.5px; line-height: 1.7; }
.sh-legal h2 { font-family: var(--font-heading); font-weight: 400; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; color: var(--fg-1); margin: 46px 0 14px; scroll-margin-top: 90px; }
.sh-legal h2:first-child { margin-top: 0; }
.sh-legal h3 { font-family: var(--font-heading); font-weight: 400; font-size: 18.5px; color: var(--fg-1); margin: 30px 0 10px; scroll-margin-top: 90px; }
.sh-legal h4 { font-size: 15px; font-weight: 600; color: var(--fg-1); margin: 22px 0 8px; }
.sh-legal p { margin: 0 0 14px; }
.sh-legal a { color: var(--accent, #1890FF); text-decoration: none; }
.sh-legal a:hover { text-decoration: underline; }
.sh-legal ul { margin: 0 0 16px; padding-left: 22px; }
.sh-legal li { margin: 0 0 8px; }
.sh-legal strong { color: var(--fg-1); font-weight: 600; }
.sh-legal-hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 36px 0; }
.sh-legal-table { overflow-x: auto; margin: 4px 0 22px; border: 1px solid var(--border-subtle); border-radius: 12px; }
.sh-legal-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sh-legal-table th, .sh-legal-table td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.sh-legal-table th { background: var(--light-bg-100); font-family: var(--font-heading); font-weight: 400; color: var(--fg-1); }
.sh-legal-table tr:last-child td { border-bottom: 0; }
@media (max-width: 860px) {
  .sh-legal-wrap { grid-template-columns: 1fr; gap: 26px; }
  .sh-legal-toc { position: static; }
  .sh-legal-toc nav { max-height: none; }
}

/* Hero film "theater": a muted preview loops in the card; "Play with sound"
   grows it to fill the screen and plays from the top with audio, then shrinks
   back on end / close / Escape / scroll. Mirrors the VETos homepage hero.
   Landscape build (16:9) on desktop; portrait build (9:16) on mobile. */
.sh-theater { width: 100%; }
.sh-theater-card { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid rgba(168,213,255,.18); border-radius: 20px; overflow: hidden; background: #0B1430; box-shadow: 0 40px 100px -40px rgba(24,144,255,.45); }
.sh-theater-card.expanding { z-index: 100001; border-radius: 14px; box-shadow: 0 50px 140px -30px rgba(0,0,0,.8); transition: top .42s cubic-bezier(.4,0,.2,1), left .42s cubic-bezier(.4,0,.2,1), width .42s cubic-bezier(.4,0,.2,1), height .42s cubic-bezier(.4,0,.2,1), border-radius .42s; }
.sh-theater-stage { position: absolute; inset: 0; }
.sh-theater-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.sh-theater-ph { width: 100%; }
.sh-theater-cta { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: inline-flex; align-items: center; gap: 13px; padding: 15px 26px 15px 16px; border: 0; border-radius: 999px; cursor: pointer; color: #fff; font-family: var(--font-heading, system-ui); font-size: 17px; font-weight: 600; background: linear-gradient(120deg, #1890FF, #7423F9); box-shadow: 0 18px 50px -10px rgba(24,144,255,.8); }
.sh-theater-cta::after { content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid rgba(255,255,255,.55); opacity: 0; animation: shTheaterPulse 2.6s ease-out infinite; pointer-events: none; }
@keyframes shTheaterPulse { 0% { opacity: .5; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.13); } }
.sh-theater-cta-play { width: 38px; height: 38px; border-radius: 999px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.sh-theater-cta-play svg { width: 17px; height: 17px; fill: #fff; margin-left: 3px; }
.sh-theater-card:hover .sh-theater-cta { filter: brightness(1.07); }
.sh-theater-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.sh-theater-muted { position: absolute; left: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(11,20,48,.6); color: rgba(232,236,247,.85); font-size: 11px; font-weight: 600; letter-spacing: .04em; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sh-theater-muted svg { width: 14px; height: 14px; }
.sh-theater-close { position: absolute; top: 16px; right: 18px; z-index: 2; width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(248,249,252,.25); background: rgba(15,26,54,.7); color: #fff; display: none; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sh-theater-close svg { width: 20px; height: 20px; }
.sh-theater-card.expanded .sh-theater-cta, .sh-theater-card.expanded .sh-theater-muted { display: none; }
.sh-theater-card.expanded .sh-theater-close { display: grid; }
.sh-theater-backdrop { position: fixed; inset: 0; z-index: 100000; background: rgba(5,9,22,.93); opacity: 0; transition: opacity .42s ease; }
.sh-theater-backdrop[hidden] { display: none; }
.sh-theater-backdrop.open { opacity: 1; }
@media (max-width: 760px) {
  .sh-theater-card { aspect-ratio: 9 / 16; width: min(86vw, 52vh); margin: 0 auto; }
  .sh-theater-cta { font-size: 15px; padding: 13px 22px 13px 14px; }
  .sh-theater-cta-play { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-theater-card.expanding, .sh-theater-backdrop { transition: none; }
  .sh-theater-cta::after { animation: none; }
}

/* Static poster for a lazy theater (the heavy embed loads only on click). */
.sh-theater-poster { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 28px 30px; cursor: pointer; background: radial-gradient(820px 440px at 82% 14%, rgba(116,35,249,0.28), transparent 60%), radial-gradient(720px 440px at 6% 104%, rgba(24,144,255,0.24), transparent 60%), #0B1430; }
.sh-theater-logo { align-self: flex-start; width: 160px; max-width: 48%; height: auto; opacity: 0.9; }
.sh-theater-poster-meta { position: relative; z-index: 1; max-width: 80%; }
.sh-theater-poster-title { font-family: var(--font-heading); font-size: clamp(18px, 2.2vw, 26px); line-height: 1.12; letter-spacing: -0.02em; color: #fff; }
.sh-theater-poster-sub { margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(232,236,247,0.6); }
@media (max-width: 560px) { .sh-theater-poster { padding: 20px; } }

/* Cross-brand hand-off overlay (AI Studio → VETos). Matches the chooser transition. */
.sh-xfer { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px; color: #fff; background: linear-gradient(155deg, #0a1024 0%, #141e42 100%); animation: shXferIn .35s ease both; }
.sh-xfer__mark { font-family: var(--font-heading, system-ui, sans-serif); font-weight: 600; font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.02em; }
.sh-xfer__msg { font-size: 15px; letter-spacing: .02em; color: rgba(255,255,255,.7); }
.sh-xfer__bar { width: 220px; max-width: 60vw; height: 3px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; margin-top: 6px; }
.sh-xfer__bar span { display: block; height: 100%; width: 38%; border-radius: 3px; background: linear-gradient(90deg, #1890FF, #7423F9); animation: shXferSweep .8s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes shXferIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shXferSweep { from { transform: translateX(-120%); } to { transform: translateX(385%); } }
@media (prefers-reduced-motion: reduce) { .sh-xfer, .sh-xfer__bar span { animation: none; } }
