/* Veloris eDetail — portfolio demo
   Stage is authored at the Figma frame size (2160 x 1620) and scaled to fit. */

@font-face { font-family: "InterED"; font-weight: 400; src: url("../fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "InterED"; font-weight: 500; src: url("../fonts/Inter-Medium.woff") format("woff"); }
@font-face { font-family: "InterED"; font-weight: 600; src: url("../fonts/Inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "InterED"; font-weight: 700; src: url("../fonts/Inter-Bold.woff") format("woff"); }
@font-face { font-family: "InterED"; font-weight: 800; src: url("../fonts/Inter-ExtraBold.woff") format("woff"); }
@font-face { font-family: "InterED"; font-weight: 900; src: url("../fonts/Inter-Black.woff") format("woff"); }

/* Brand display font "Intro" — drop licensed files into /fonts with these names
   and they are picked up automatically; until then Inter stands in. */
/* Intro is supplied in Regular only — bold weights of the Intro family fall back to Inter */
/* Intro Demo (Fontfabric free licence, web use permitted) — caps-only, used for uppercase elements */

@font-face { font-family: "InterCapsED"; font-weight: 100 900; src: url("../fonts/Inter-ExtraBold.woff") format("woff"); }

:root {
  --blue: #0b5d63;
  --blue-2: #138a8f;
  --red: #f08c3c;
  --red-2: #f6a65d;
  --ink: #333333;
  --muted: #999999;
  --line: #cde5e2;
  --line-2: #eff7f5;
  --navy: #052b2e;
  --shadow: 30px 30px 30px rgba(5, 43, 46, .15);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --inter: "InterED", "Inter", "Helvetica Neue", Arial, sans-serif;
  --intro: "InterED", "Inter", Arial, sans-serif;
  --caps: "InterCapsED", "InterED", Arial, sans-serif;
  --condcaps: "InterCapsED", "InterED", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #e8f3f1; }
body { font-family: var(--inter); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: none; }

#viewport { position: fixed; inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); display: flex; align-items: center; justify-content: center; }
#stage { position: absolute; left: 50%; top: 50%; width: 2160px; height: 1620px; overflow: hidden; transform-origin: 0 0; background: #fff; }

/* ---------- typography helpers (sizes are stage px, i.e. Figma px) ---------- */
.inter { font-family: var(--inter); }
.intro { font-family: var(--intro); font-weight: 500; }
.intro-b { font-family: var(--intro); font-weight: 700; }
.intro-k { font-family: var(--intro); font-weight: 900; }
.intro-cond { font-family: var(--condcaps); font-weight: 800; letter-spacing: .01em; }
.b { font-weight: 700; }
.blue { color: var(--blue); } .red { color: var(--red); } .white { color: #fff; } .muted { color: var(--muted); }
sup { font-size: .55em; line-height: 0; vertical-align: .75em; font-weight: inherit; }
.upper { text-transform: uppercase; }
.caps { font-family: var(--caps) !important; font-weight: 800 !important; letter-spacing: -.01em; }

/* ---------- layout primitives ---------- */
.abs { position: absolute; }
.slide { position: absolute; inset: 0; visibility: hidden; opacity: 0; z-index: 1; }
.slide.is-active { visibility: visible; opacity: 1; z-index: 2; }
.slide.is-leaving { visibility: visible; z-index: 1; }
.slide .bg { position: absolute; inset: 0; }
.slide .bg svg { position: absolute; left: 0; top: 0; width: 2160px; height: 1620px; overflow: visible; }

.card { position: absolute; background: #fff; border: 2px solid var(--line); border-radius: 60px; box-shadow: var(--shadow); }
.tag { position: absolute; height: 39px; padding: 0 15px; border-radius: 15px; background: var(--red); color: #fff; font: 400 30px/41px var(--caps); letter-spacing: .02em; }
.title { position: absolute; left: 100px; top: 168px; width: 1618px; font: 400 64px/80px var(--inter); color: var(--ink); }
.title b { font-weight: 700; }
.lead { font: 400 42px/56px var(--inter); color: var(--ink); }
.lead .k { font-family: var(--intro); font-weight: 900; }
.rot { transform: rotate(-90deg); transform-origin: center; white-space: nowrap; }

/* ---------- slide transitions ---------- */
.slide.enter-next { animation: inNext .55s var(--ease) both; }
.slide.enter-prev { animation: inPrev .55s var(--ease) both; }
.slide.enter-fade { animation: inFade .45s ease both; }
.slide.is-leaving.leave-next { animation: outNext .55s var(--ease) both; }
.slide.is-leaving.leave-prev { animation: outPrev .55s var(--ease) both; }
.slide.is-leaving.leave-fade { animation: outFade .45s ease both; }
@keyframes inNext { from { transform: translateX(6%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inPrev { from { transform: translateX(-6%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes outNext { to { transform: translateX(-4%); opacity: 0; } }
@keyframes outPrev { to { transform: translateX(4%); opacity: 0; } }
@keyframes outFade { to { opacity: 0; } }

/* ---------- build-in animations ----------
   Any element with data-a="…" starts hidden and plays when its slide becomes active.
   Delay comes from --d (ms) set inline: style="--d:400ms". */
[data-a] { opacity: 0; }
.is-active [data-a] { animation-duration: .7s; animation-timing-function: var(--ease); animation-fill-mode: both; animation-delay: var(--d, 0ms); }
.is-active [data-a="fade"]  { animation-name: aFade; }
.is-active [data-a="up"]    { animation-name: aUp; }
.is-active [data-a="down"]  { animation-name: aDown; }
.is-active [data-a="left"]  { animation-name: aLeft; }
.is-active [data-a="right"] { animation-name: aRight; }
.is-active [data-a="pop"]   { animation-name: aPop; animation-timing-function: cubic-bezier(.3, 1.5, .5, 1); }
.is-active [data-a="grow"]  { animation-name: aGrowY; transform-origin: 50% 100%; animation-duration: .9s; }
.is-active [data-a="growdown"] { animation-name: aGrowY; transform-origin: 50% 0; animation-duration: .9s; }
.is-active [data-a="growx"] { animation-name: aGrowX; transform-origin: 0 50%; animation-duration: .9s; }
.is-active [data-a="spin"]  { animation-name: aSpin; animation-duration: 1.4s; }
.is-active [data-a="draw"]  { animation-name: aFade; }
.is-active [data-a="draw"] .stroke { stroke-dasharray: var(--len, 4000); stroke-dashoffset: var(--len, 4000); animation: aDraw 1.2s var(--ease) var(--d, 0ms) both; }
@keyframes aFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes aUp    { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes aDown  { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: none; } }
@keyframes aLeft  { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes aRight { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@keyframes aPop   { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes aGrowY { from { opacity: 1; transform: scaleY(0); } to { opacity: 1; transform: none; } }
@keyframes aGrowX { from { opacity: 1; transform: scaleX(0); } to { opacity: 1; transform: none; } }
@keyframes aSpin  { from { opacity: 0; transform: rotate(-35deg) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes aDraw  { to { stroke-dashoffset: 0; } }

/* ---------- persistent chrome ---------- */
#chrome { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
#chrome > * { pointer-events: auto; }
#topbar { position: absolute; left: 0; top: 0; width: 2160px; height: 90px; background: #fff; box-shadow: 0 4px 50px rgba(11, 93, 99, .25); z-index: 3; }
.tb-icon { position: absolute; top: 0; width: 80px; height: 90px; display: flex; align-items: flex-start; justify-content: center; padding-top: 16px; cursor: pointer; }
.tb-icon img { width: 60px; height: 60px; display: block; }
.tb-icon::before { content: ""; position: absolute; left: 0; top: 0; width: 80px; height: 8px; background: transparent; transition: background .2s; }
.tb-icon.is-on::before, .tb-icon:active::before { background: var(--red); }

#tb-brand { position: absolute; left: 892px; top: 0; width: 377px; height: 90px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); cursor: pointer; display: flex; align-items: center; justify-content: center; padding-top: 6px; font: 700 36px/42px var(--intro); color: var(--blue); }
#tb-brand sup { font-size: .5em; vertical-align: .9em; }
#tb-brand::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: transparent; transition: background .2s; }
#tb-brand:hover::before, #tb-brand.is-open::before, #tb-brand.is-current::before { background: var(--red); }

#menu-scrim { position: absolute; inset: 90px 0 0 0; z-index: 2; display: none; }
#menu-scrim.is-open { display: block; }
#submenu { position: absolute; left: 524px; top: 90px; width: 375px; background: #fff; box-shadow: var(--shadow); z-index: 2; transform-origin: 50% 0; opacity: 0; transform: translateY(-14px); pointer-events: none; transition: opacity .25s ease, transform .3s var(--ease); }
#submenu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mi { position: relative; height: 65px; display: flex; align-items: center; padding: 0 20px; font: 600 26px/32px var(--inter); color: var(--blue); background: #fff; border-bottom: 1px solid var(--line); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.mi:last-child { border-bottom: 0; }
.mi:hover, .mi.is-hover { background: var(--blue); color: #fff; }
.mi.is-active { height: 68px; background: var(--blue); color: #fff; justify-content: center; }
.mi.is-active::before { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 100%; background: var(--red); }
.mi .arrow { position: absolute; right: 12px; top: 50%; width: 0; height: 0; margin-top: -14px; border-left: 28px solid var(--red); border-top: 14px solid transparent; border-bottom: 14px solid transparent; opacity: 0; transition: opacity .15s; }
.mi.has-sub.is-active .arrow, .mi.has-sub:hover .arrow, .mi.has-sub.is-hover .arrow { opacity: 1; }
#submenu2 { position: absolute; left: 899px; top: 90px; width: 375px; background: #fff; box-shadow: var(--shadow); z-index: 2; opacity: 0; transform: translateX(-14px); pointer-events: none; transition: opacity .2s ease, transform .25s var(--ease); }
#submenu2.is-open { opacity: 1; transform: none; pointer-events: auto; }
#submenu2 .mi { justify-content: center; }

#footer-note { position: absolute; left: 100px; top: 1536px; width: 1700px; height: 40px; font: 400 30px/40px Arial, var(--inter); letter-spacing: .02em; text-transform: uppercase; color: var(--navy); opacity: .45; white-space: nowrap; }
#footer-company { position: absolute; left: 1864px; top: 1536px; width: 206px; height: 39px; }
#brand-logo { position: absolute; left: 1794px; top: 161px; width: 266px; height: 147px; }
#chrome.hide-footer #footer-note, #chrome.hide-footer #footer-company { display: none; }
#chrome.hide-logo #brand-logo { display: none; }
#chrome.hide-all { display: none; }

/* ---------- popups (sources, instructions) ---------- */
.popup { position: absolute; inset: 0; z-index: 60; display: none; }
.popup.is-open { display: block; }
.popup .dim { position: absolute; inset: 0; background: rgba(11, 93, 99, .18); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: aFade .3s ease both; }
.popup .sheet { position: absolute; left: 100px; top: 340px; width: 1960px; height: 1140px; background: #fff; border: 2px solid var(--line); border-radius: 60px; box-shadow: var(--shadow); padding: 60px 60px 100px; animation: aUp .45s var(--ease) both; overflow: hidden; }
.popup h2 { font: 700 36px/44px var(--intro); color: var(--blue); margin-bottom: 34px; }
.popup .close { position: absolute; right: 50px; top: 30px; width: 56px; height: 56px; border-radius: 50%; background: var(--line); cursor: pointer; }
.popup .close::before, .popup .close::after { content: ""; position: absolute; left: 14px; top: 26px; width: 28px; height: 4px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.popup .close::after { transform: rotate(-45deg); }
.popup ol { font: 400 24px/32px var(--inter); color: var(--ink); padding-left: 40px; }
.popup ol li { margin-bottom: 14px; padding-left: 6px; }
.popup .pager { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; gap: 14px; align-items: center; }
.popup .pager button { appearance: none; border: 0; width: 56px; height: 40px; border-radius: 20px; background: var(--line-2); color: var(--blue); font: 700 26px/40px var(--inter); cursor: pointer; }
.popup .pager .dots { display: flex; gap: 10px; }
.popup .pager .dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.popup .pager .dots i.on { background: var(--blue); }
.popup .page { display: none; } .popup .page.on { display: block; }

/* ---------- reusable chart pieces ---------- */
.axis-l { position: absolute; border-left: 4px solid var(--line); }
.axis-b { position: absolute; border-bottom: 4px solid var(--line); }
.gridline { position: absolute; height: 0; border-top: 2px solid var(--line-2); }
.ytick { position: absolute; width: 60px; text-align: right; font: 500 24px/30px var(--intro); color: var(--muted); }
.bar { position: absolute; border-radius: 15px 15px 0 0; }
.bar .v { position: absolute; left: 0; right: 0; top: 18px; text-align: center; font: 700 40px/40px var(--intro); color: #fff; }
.bar.blue { background: var(--blue); } .bar.red { background: var(--red); }
.bar.short .v { top: -52px; }
.bar.blue.short .v { color: var(--blue); } .bar.red.short .v { color: var(--red); }
.xlabel { position: absolute; text-align: center; font: 700 24px/30px var(--intro); color: var(--ink); }
.pcircle { position: absolute; width: 164px; height: 164px; border-radius: 50%; }
.pcircle svg { position: absolute; inset: 0; }
.pcircle span { position: absolute; left: 0; right: 0; top: 35px; text-align: center; font: 700 16px/18px var(--intro); color: var(--muted); }
.legend { position: absolute; display: flex; align-items: center; gap: 14px; font: 500 24px/27px var(--intro); color: var(--ink); white-space: nowrap; }
.legend i { width: 41px; height: 40px; border-radius: 15px; flex: none; margin-right: 0; }

/* tab card (Figma "Tab") */
.tabcard { position: absolute; left: 0; top: 0; width: 2160px; height: 1620px; pointer-events: none; overflow: visible; }
.tab-hit { position: absolute; cursor: pointer; }
.tab-label { position: absolute; font: 400 42px/56px var(--caps); text-transform: uppercase; white-space: nowrap; }

/* hub */
.go-btn { position: absolute; width: 269px; height: 269px; border-radius: 50%; background: var(--red); box-shadow: 0 30px 100px rgba(240, 140, 60, .5); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.go-btn:active { transform: scale(.95); }
.go-btn svg { width: 110px; height: 84px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 30px 100px rgba(240, 140, 60, .5), 0 0 0 0 rgba(240, 140, 60, .35); } 50% { box-shadow: 0 30px 100px rgba(240, 140, 60, .5), 0 0 0 26px rgba(240, 140, 60, 0); } }
.is-active .go-btn.pulse { animation: aPop .7s cubic-bezier(.3, 1.5, .5, 1) var(--d, 0ms) both, pulse 2.4s ease-in-out calc(var(--d, 0ms) + .8s) infinite; }

@media (prefers-reduced-motion: reduce) {
  .is-active [data-a], .slide.enter-next, .slide.enter-prev, .slide.enter-fade { animation: none !important; opacity: 1 !important; transform: none !important; }
}

.title.intro { font-family: var(--intro); font-weight: 500; }
.title.intro b { font-weight: 700; }

.hl { background: #fff; color: var(--blue); border-radius: 12px; padding: 0 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.photo { position: absolute; border-radius: 60px; border: 2px solid var(--line); box-shadow: var(--shadow); overflow: hidden; object-fit: cover; }
.line-svg { position: absolute; left: 0; top: 0; width: 2160px; height: 1620px; overflow: visible; pointer-events: none; }

/* SmPC viewer */
.popup .sheet.smpc-sheet { top: 130px; height: 1460px; padding: 50px 60px 40px; display: flex; flex-direction: column; }
.smpc-sheet h2 { margin-bottom: 8px; padding-right: 90px; }
.smpc-meta { font: 400 24px/32px var(--inter); color: var(--muted); margin-bottom: 24px; }
.smpc-meta a { color: var(--blue); font-weight: 700; }
.smpc-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; background: #edf6f4; border-radius: 24px; padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.smpc-scroll img { width: 1180px; max-width: 100%; height: auto; aspect-ratio: 910 / 1287; background: #fff; box-shadow: 0 6px 24px rgba(5, 43, 46, .12); display: block; }

/* scrollable data table (safety) */
.tscroll { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: none; }
.tscroll::-webkit-scrollbar { display: none; }
.tscroll .tr { position: relative; margin: 0 51px 0 64px; border-bottom: 4px solid var(--line); }
.tscroll .tr > div:first-child { left: 3px !important; }
.tscroll .tr.sub { height: 72px; background: rgba(226, 241, 238, .5); display: flex; align-items: center; padding-left: 15px; font: 700 36px/42px var(--intro); color: var(--blue); }
.paper { display: block; border-radius: 60px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.paper img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* wipe reveals for rendered diagrams */
.is-active [data-a="wipe-d"] { animation-name: aWipeD; animation-duration: 1.4s; }
.is-active [data-a="wipe-r"] { animation-name: aWipeR; animation-duration: 1.2s; }
@keyframes aWipeD { from { opacity: 1; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes aWipeR { from { opacity: 1; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

/* patient portrait cards */
.pcard { position: absolute; width: 440px; height: 410px; background: #fff; border: 2px solid var(--line); border-radius: 30px; display: flex; flex-direction: column; align-items: center; padding-top: 26px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.pcard:active { transform: scale(.97); }
.pcard:hover { box-shadow: var(--shadow); }
.pcard img { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; }
.pcard b { font: 700 40px/52px var(--inter); color: var(--blue); margin-top: 14px; }
.pcard span { font: 400 26px/32px var(--inter); color: #333; text-align: center; padding: 0 30px; min-height: 64px; }
.pcard i { font: 700 24px/40px var(--inter); font-style: normal; color: var(--blue); background: #e2f1ee; border-radius: 10px; padding: 0 16px; margin-top: 6px; }
.backlink { height: 55px; padding: 0 22px; border: 2px solid var(--blue); border-radius: 15px; font: 700 28px/51px var(--inter); color: var(--blue); background: #fff; cursor: pointer; white-space: nowrap; }
.backlink:active { background: #e2f1ee; }

/* ---- portfolio demo additions ---- */
#demo-badge { position: absolute; left: 1290px; top: 22px; padding: 10px 26px; border-radius: 30px; background: #f08c3c; color: #fff; font: 700 26px/32px var(--inter); letter-spacing: .04em; z-index: 60; white-space: nowrap; pointer-events: none; }
.smpc-demo { margin: auto; max-width: 1200px; padding: 60px; background: #fff; border-radius: 24px; font: 400 36px/50px var(--inter); color: #333; text-align: center; }
.smpc-demo b { display: block; font: 800 48px/60px var(--inter); color: #0b5d63; margin-bottom: 20px; }
#nav-hint { position: fixed; right: 14px; bottom: 10px; font: 500 12px/16px -apple-system, Inter, sans-serif; color: #88a3a0; z-index: 100; pointer-events: none; }
