﻿/* CannaLnx · Endocannabinoid System hero player (Views/Home/_EcsHero.cshtml, Scripts/ecs-hero.js).
   Replaces the landing-page hero photo. Dark panel; the site's hero text turns white where it overlays the panel. */
.ecs-hero-head { text-align: center; padding: 30px 20px 14px; }
.ecs-hero-head h2 { font-size: 28px; font-weight: 400; margin: 0; }
/* The band keeps the page height steady; the panel inside it starts full-bleed and, as the page scrolls,
   pulls in from the edges and rounds its corners (the vars are set by ecs-hero.js). Height is fitted to the
   viewport by the script so the whole panel is on screen under the masthead without scrolling. */
.ecs-hero-band { height: var(--ecs-h, 560px); margin-bottom: 8px; }
.ecs-hero { position: relative; height: 100%; width: calc(100% - 2 * var(--ecs-inset, 0px)); margin: 0 auto; border-radius: var(--ecs-radius, 0px); background: #001B36; overflow: hidden; color: #eef3f2; }
.ecs-sub { position: absolute; z-index: 2; top: 22px; left: 0; right: 0; margin: 0 auto; padding: 0 40px; text-align: center; color: #ffffff; font-family: "IBM Plex Sans", "Open Sans", Arial, sans-serif; font-weight: 300; font-size: 19px !important; line-height: 1.4 !important; max-width: 50ch; text-wrap: balance; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.ecs-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ecs-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 10%, rgba(255,255,255,.035), transparent 60%); }
.ecs-cap { position: absolute; right: max(40px, calc((100% - 1180px) / 2 + 40px)); bottom: 36px; width: min(36ch, 42%); z-index: 2; opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; text-align: left; }
.ecs-cap.on { opacity: 1; transform: none; }
.ecs-cap .n { font-family: "IBM Plex Mono", Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #a9b7b8; margin: 0 0 8px; display: flex; gap: 10px; align-items: center; }
.ecs-cap .n::before { content: ""; width: 22px; height: 1px; background: #a9b7b8; }
.ecs-cap h3 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 300; font-size: clamp(1.5rem, 2.4vw, 2.3rem); line-height: 1.08; margin: 0 0 8px; color: #eef3f2; letter-spacing: -.01em; }
.ecs-cap p { margin: 0; color: #a9b7b8; font-size: 15px !important; line-height: 1.45 !important; font-family: "IBM Plex Sans", "Open Sans", Arial, sans-serif; font-weight: 300; }
.ecs-ui { position: absolute; left: max(40px, calc((100% - 1180px) / 2 + 40px)); bottom: 32px; z-index: 2; display: flex; align-items: center; gap: 14px; font-family: "IBM Plex Mono", Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #a9b7b8; }
.ecs-play { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(238,243,242,.25); background: rgba(255,255,255,.06); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ecs-play:hover { background: rgba(255,255,255,.14); }
.ecs-play .ic { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #eef3f2; margin-left: 2px; }
.ecs-play.playing .ic { width: 8px; height: 9px; border: 0; border-left: 2.5px solid #eef3f2; border-right: 2.5px solid #eef3f2; margin-left: 0; }
.ecs-dots { display: flex; gap: 6px; }
.ecs-dots i { display: block; width: 18px; height: 3px; border-radius: 2px; background: rgba(238,243,242,.18); cursor: pointer; transition: background .3s; }
.ecs-dots i.on { background: #eef3f2; }
.ecs-ui a { color: #eef3f2; text-decoration: none; border-bottom: 1px solid rgba(238,243,242,.3); padding-bottom: 1px; }
.ecs-ui a:hover { border-bottom-color: #eef3f2; }
/* the site's hero copy follows the panel at every width (it used to overlay the photo) */
.ecs-hero-wrap .toplefttext { position: relative !important; top: auto !important; left: auto !important; width: auto !important; margin-top: 26px; }
/* explore rail (modes) and chips (topics) */
.ecs-rail { position: absolute; z-index: 3; left: max(40px, calc((100% - 1180px) / 2 + 40px)); top: 86px; display: flex; flex-direction: column; gap: 6px; }
.ecs-rail button, .ecs-chips button { font-family: "IBM Plex Mono", Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #a9b7b8; background: #0A2C4D; border: 1px solid rgba(238,243,242,.2); border-radius: 999px; padding: 7px 14px; cursor: pointer; text-align: left; transition: background .2s, color .2s, border-color .2s; }
.ecs-rail button:hover, .ecs-chips button:hover { background: #123A60; color: #eef3f2; }
.ecs-rail button.on, .ecs-chips button.on { background: #eef3f2; color: #001B36; border-color: #eef3f2; }
/* explore layout: menu in a left column (rail, then topics in up to two columns), biology centre-right, caption right */
.ecs-chips { position: absolute; z-index: 3; left: calc(max(40px, (100% - 1180px) / 2 + 40px) + 140px); top: 28px; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 6px; max-height: 330px; max-width: 420px; }
.ecs-chips button { text-transform: none; letter-spacing: .02em; font-size: 12.5px; padding: 6px 12px; white-space: nowrap; }
.ecs-hero.explore .ecs-sub { display: none; }
.ecs-hero.explore .ecs-rail { top: 28px; }
.ecs-hero.explore .ecs-cap p b { color: #eef3f2; font-weight: 500; }
.ecs-link { color: #8fd49a; text-decoration: none; border-bottom: 1px solid rgba(143,212,154,.4); }
.ecs-link:hover { border-bottom-color: #8fd49a; color: #8fd49a; }
.ecs-hero.condition.hot canvas { cursor: pointer; }   /* set by ecs-hero.js while the mouse is over a body site */
.ecs-hero.condition .ecs-chips { max-height: none; }   /* one column, so the body map has room beside it */
.ecs-hero.explore .ecs-cap { width: min(40ch, 30%); }
/* fullscreen */
.ecs-hero.is-fs, .ecs-hero:fullscreen { width: 100vw; height: 100vh; margin: 0; border-radius: 0; }
.ecs-fs { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(238,243,242,.25); background: rgba(255,255,255,.06); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; color: #eef3f2; }
.ecs-fs:hover { background: rgba(255,255,255,.14); }
.ecs-fs svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ecs-hero.is-fs .ecs-fs .exp { display: none; }
.ecs-hero:not(.is-fs) .ecs-fs .col { display: none; }

/* ---------- phones and small tablets: the panel stacks — menu, stage, caption, controls — nothing overlaid ---------- */
@media (max-width: 1100px) {
  .ecs-hero-head { padding: 18px 16px 8px; }
  .ecs-hero-head h2 { font-size: 22px; }
  .ecs-hero-band { height: auto; }
  .ecs-hero { height: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 0 12px; }
  .ecs-hero > * { position: static !important; }
  .ecs-sub { order: 1; padding: 0 16px; font-size: 13px !important; line-height: 1.35 !important; margin: 0; text-align: left; max-width: none; }
  .ecs-rail { order: 2; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
  .ecs-rail button { padding: 8px 12px; font-size: 10.5px; letter-spacing: .05em; min-height: 36px; }
  .ecs-chips { order: 3; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 0 16px; max-width: none; max-height: none; }
  .ecs-chips button { padding: 7px 11px; font-size: 11.5px; min-height: 34px; }
  .ecs-hero canvas { order: 4; width: 100%; height: clamp(200px, 56vw, 330px); display: block; }
  .ecs-hero.explore canvas { height: clamp(280px, 80vw, 380px); }   /* topic pictures need head-room for the molecule, its label and the evidence line */
  .ecs-cap, .ecs-hero.explore .ecs-cap { order: 5; width: auto; max-width: none; padding: 0 16px; opacity: 1; transform: none; }
  .ecs-cap .n { font-size: 10.5px; margin-bottom: 4px; }
  .ecs-cap h3 { font-size: 1.2rem; margin-bottom: 5px; }
  .ecs-cap p { font-size: 13px !important; line-height: 1.4 !important; }
  .ecs-hero.explore .ecs-cap p { font-size: 12.5px !important; }
  .ecs-hero.explore .ecs-sub { display: none; }
  .ecs-ui { order: 6; padding: 0 16px; gap: 10px; margin-top: 8px; }
  .ecs-play, .ecs-fs { width: 38px; height: 38px; }
  /* the tour has no chip rows, so it gets a taller stage and larger type */
  .ecs-hero:not(.explore) canvas { height: clamp(210px, 58vw, 360px); }
  .ecs-hero:not(.explore) .ecs-sub { font-size: 14.5px !important; }
  .ecs-hero:not(.explore) .ecs-cap .n { font-size: 11.5px; }
  .ecs-hero:not(.explore) .ecs-cap h3 { font-size: 1.5rem; }
  .ecs-hero:not(.explore) .ecs-cap p { font-size: 15px !important; line-height: 1.45 !important; }
  .ecs-dots i { width: 20px; height: 4px; }
  .ecs-hero.is-fs, .ecs-hero:fullscreen { padding: 0; gap: 0; }
  .ecs-hero.is-fs canvas, .ecs-hero:fullscreen canvas { height: 100vh; }
  .ecs-hero.is-fs .ecs-cap, .ecs-hero:fullscreen .ecs-cap, .ecs-hero.is-fs .ecs-ui, .ecs-hero:fullscreen .ecs-ui { position: absolute !important; }
}
