/* MedStudio – presentation website (www.medstudio.sk).
   Style from Lukáš's intro design (medstudio-uvod.html): one warm sand
   surface, everything is relief on it. Raised things catch light from the top
   left, wells are pressed in, ink is the only contrast. Instrument Sans. */

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --surface: #E8DFCD;
  --light: #F8F3E9;
  --shade: rgba(70, 58, 35, .3);
  --well: #DED5C3;
  --ink: #18191B;
  --ink2: #3F4246;
  --recess: #8A826F;
  --raise: -7px -7px 12px var(--light), 12px 12px 22px var(--shade);
  --raise-sm: -4px -4px 8px var(--light), 6px 6px 12px var(--shade);
  --press: inset 3px 4px 7px rgba(70, 58, 35, .28), inset -2px -2px 4px var(--light);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 17px/1.55 "Instrument Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--ink); }
a:hover { color: var(--ink2); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--light); padding: 8px 12px; border-radius: 10px; z-index: 20; }
.skip:focus { left: 8px; }

.raised { background: var(--surface); box-shadow: var(--raise); }
.well { background: var(--well); box-shadow: var(--press); }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: flex-end; padding: 24px 40px; min-height: 92px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; font-weight: 550; }
.nav a { text-decoration: none; color: var(--ink2); padding: 6px 0; }
.nav a:hover { color: var(--ink); }
@media (max-width: 600px) { .top { padding: 16px 20px; min-height: 64px; justify-content: center; } .nav { gap: 4px 20px; font-size: 14px; } }

/* ---------- First screen (the intro design) ---------- */
.home { min-height: calc(100vh - 92px); min-height: calc(100svh - 92px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px 96px; max-width: 1228px; margin: 0 auto; }
.hero-pic { display: block; width: 100%; overflow: hidden; }
.hero {
  width: 100%; height: auto; aspect-ratio: 1600 / 600; display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}
.intro { max-width: 560px; text-align: center; margin-top: -8px; }
h1 { font-size: 24px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-top: 36px; }
@media (max-width: 600px) { h1 { font-size: 20px; } .hero { width: 128%; max-width: none; margin-left: -14%; } .home { min-height: calc(100svh - 64px); } }

/* Lit pills: light and shadow follow the pointer. */
.lit {
  --lx: -.4; --ly: -.5; --px: 30%; --py: 20%; --tx: 0px; --ty: 0px; --spot: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 550; text-decoration: none;
  border-radius: 999px; padding: 17px 36px; min-height: 56px;
  transform: translate(var(--tx), var(--ty));
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .2s;
}
.lit-up { color: var(--ink); background-color: var(--surface); background-image: radial-gradient(150px circle at var(--px) var(--py), rgba(255, 252, 243, calc(var(--spot) * .95)), transparent 65%); box-shadow: calc(var(--lx) * 7px) calc(var(--ly) * 7px) 9px var(--light), calc(var(--lx) * -14px) calc(var(--ly) * -14px) 16px var(--shade); }
.lit-ink { color: #F4F3F0; background-color: var(--ink); background-image: radial-gradient(140px circle at var(--px) var(--py), rgba(255, 244, 222, calc(var(--spot) * .3)), transparent 65%); box-shadow: calc(var(--lx) * -16px) calc(var(--ly) * -16px) 18px rgba(70, 58, 35, .38); }
.lit-up:hover { color: var(--ink); }
.lit-ink:hover { color: #F4F3F0; }
.lit-up:active { transform: translate(var(--tx), var(--ty)) scale(.98); box-shadow: inset 3px 4px 8px rgba(70, 58, 35, .32), inset -2px -2px 5px var(--light); }
.lit-ink:active { transform: translate(var(--tx), var(--ty)) scale(.98); box-shadow: inset 3px 4px 8px rgba(0, 0, 0, .7); }
.lit.big { font-size: clamp(20px, 3.4vw, 30px); letter-spacing: -0.02em; padding: 24px 48px; min-height: 80px; }

/* Entrance, as in the intro: ink fades in, relief rises out of the surface. */
.t, .hero { animation: ink-in 1s cubic-bezier(.4, 0, .2, 1) both; }
.lit.m { animation: rise 1s cubic-bezier(.4, 0, .2, 1) both; }
.d1 { animation-delay: .05s !important; } .d2 { animation-delay: .1s !important; } .d3 { animation-delay: .15s !important; }
@keyframes ink-in { from { opacity: 0; } }
@keyframes rise { from { box-shadow: 0 0 0 rgba(70, 58, 35, 0), 0 0 0 rgba(248, 243, 233, 0); background-color: var(--surface); color: rgba(24, 25, 27, 0); } }

/* ---------- Sections ---------- */
.sec { max-width: 1080px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) 24px; scroll-margin-top: 8px; }
.head { max-width: 620px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
h2 { font-size: clamp(30px, 4.2vw, 40px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.08; }
.head p { margin-top: 16px; font-size: 19px; line-height: 1.45; color: var(--ink2); }
h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; }
.center { text-align: center; margin-top: 44px; }

/* Player demo */
.player { max-width: 760px; margin: 0 auto; border-radius: 32px; padding: clamp(14px, 2.4vw, 22px); }
.screen { position: relative; border-radius: 20px; aspect-ratio: 16 / 9; min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(18px, 3vw, 30px); gap: 16px; }
.case { font-size: clamp(20px, 3vw, 28px); font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; max-width: 16ch; color: var(--ink2); text-shadow: 0 1px 0 var(--light); }
.decision { background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--raise-sm); display: grid; gap: 12px; opacity: 0; transform: translateY(10px); animation: come .7s cubic-bezier(.2, .8, .2, 1) 2.6s forwards; }
.decision p { font-size: 15px; font-weight: 650; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.opt { font-size: 14px; font-weight: 550; text-align: center; padding: 11px 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--raise-sm); }
.opt.picked { animation: press .4s ease 3.9s forwards; }
.timeline { display: flex; align-items: center; gap: 14px; padding: 18px 8px 4px; font-size: 13px; font-weight: 550; color: var(--ink2); font-variant-numeric: tabular-nums; }
.track { position: relative; flex: 1; height: 12px; border-radius: 99px; overflow: hidden; }
.played { position: absolute; inset: 0 auto 0 0; width: 37%; border-radius: 99px; background: var(--ink); transform-origin: left; animation: play 2.6s cubic-bezier(.4, .1, .3, 1) both; }
.player figcaption { padding: 14px 8px 6px; font-size: 15px; color: var(--ink2); }
.js .player:not(.run) * { animation-play-state: paused; }
@keyframes play { from { transform: scaleX(0); } }
@keyframes come { to { opacity: 1; transform: none; } }
@keyframes press { to { background: var(--well); box-shadow: var(--press); } }
@media (max-width: 560px) {
  .screen { aspect-ratio: auto; }
  .options { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* Raised tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 28px; margin-top: clamp(44px, 6vw, 72px); }
.tiles li { border-radius: 24px; padding: 26px 26px 28px; }
.tiles p { margin-top: 8px; color: var(--ink2); font-size: 16px; }

/* Routes: one pressed-in list */
.routes { border-radius: 28px; padding: 8px clamp(18px, 3.4vw, 36px); max-width: 860px; margin: 0 auto; }
.routes li { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 4px 24px; padding: 22px 0; border-top: 1px solid rgba(70, 58, 35, .16); box-shadow: 0 -1px 0 rgba(248, 243, 233, .7); }
.routes li:first-child { border-top: 0; box-shadow: none; }
.routes p { color: var(--ink2); font-size: 16px; }
@media (max-width: 600px) { .routes li { grid-template-columns: minmax(0, 1fr); } }

/* Report sample */
.report { max-width: 760px; margin: 0 auto; border-radius: 32px; padding: clamp(22px, 4vw, 40px); }
.tag { font-size: 14px; color: var(--ink2); }
.finding { margin-top: 10px; font-size: clamp(19px, 2.4vw, 22px); line-height: 1.35; font-weight: 550; letter-spacing: -0.015em; }
.compare { margin-top: 28px; display: grid; gap: 16px; font-size: 15px; }
.compare .row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.4rem; align-items: center; gap: 14px; }
.compare .row span:first-child { color: var(--ink2); }
.compare b { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.meter { display: block; height: 14px; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--ink); }
.meter i.before { background: var(--recess); }
.points { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px 28px; color: var(--ink2); font-size: 16px; }
.points li { padding-left: 20px; position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--well); box-shadow: inset 1px 2px 3px rgba(70, 58, 35, .4), inset -1px -1px 2px var(--light); }

/* Steps: a real sequence, so numbered */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 28px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { display: flex; flex-direction: column; align-items: flex-start; }
.n { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 650; box-shadow: var(--raise-sm); margin-bottom: 18px; }
.steps p { margin-top: 8px; color: var(--ink2); font-size: 16px; }

/* Facts */
.facts { border-radius: 28px; padding: 8px clamp(18px, 3.4vw, 36px); max-width: 760px; margin: 0 auto; }
.facts li { padding: 18px 0; border-top: 1px solid rgba(70, 58, 35, .16); box-shadow: 0 -1px 0 rgba(248, 243, 233, .7); }
.facts li:first-child { border-top: 0; box-shadow: none; }

.contact { padding-bottom: clamp(72px, 10vw, 128px); }
.contact .center { margin-top: 0; }

/* ---------- Footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 10px 28px; padding: 28px 24px 44px; font-size: 14px; color: var(--ink2); }
.foot a { color: var(--ink2); }
.foot a:hover { color: var(--ink); }
.brand { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.brand span { color: var(--recess); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .t, .m, .hero { animation-duration: .01s !important; animation-delay: 0s !important; }
  .lit { transition: none; transform: none; }
  .played, .decision, .opt.picked { animation: none; }
  .decision { opacity: 1; transform: none; }
  .opt.picked { background: var(--well); box-shadow: var(--press); }
}

.contact-mail { margin-top: 28px; color: var(--muted, #5E594C); font-size: 17px; }
.contact-mail a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
