/* demo.zdavo.pl on a computer (index.html): the app inside a phone, the role to try beside it. Colours and type from
   packages/brand (palette: asphalt, lime, lilac, chalk; the app's light canvas inside the phone). */

@font-face {
  font-family: Urbanist;
  font-weight: 700;
  font-display: swap;
  src: url('/telefon/fonts/Urbanist-Bold-full.woff2') format('woff2');
}
@font-face {
  font-family: Urbanist;
  font-weight: 800;
  font-display: swap;
  src: url('/telefon/fonts/Urbanist-ExtraBold-full.woff2') format('woff2');
}
@font-face {
  font-family: Manrope;
  font-weight: 400;
  font-display: swap;
  src: url('/telefon/fonts/manrope-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2199;
}
@font-face {
  font-family: Manrope;
  font-weight: 400;
  font-display: swap;
  src: url('/telefon/fonts/manrope-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF;
}
@font-face {
  font-family: Manrope;
  font-weight: 700;
  font-display: swap;
  src: url('/telefon/fonts/manrope-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2199;
}
@font-face {
  font-family: Manrope;
  font-weight: 700;
  font-display: swap;
  src: url('/telefon/fonts/manrope-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF;
}

:root {
  --night: #101216;
  --asphalt: #15171c;
  --chalk: #f4f5f0;
  --lime: #c4f03a;
  --on-lime: #18210c;
  --lilac: #b9acff;
  --soft: #c9ced5;
  --muted: #9aa2ad;
  --quiet: #8e96a1;
  --canvas: #eef3f5;
  --display: Urbanist, system-ui, sans-serif;
  /* Set by demo.js to fit the phone in the window; these are a real phone's. */
  --screen-h: 844px;
  --scale: 1;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 720px at 76% 32%, rgba(185, 172, 255, 0.14), transparent 62%),
    radial-gradient(900px 620px at 6% 100%, rgba(196, 240, 58, 0.07), transparent 60%), var(--night);
  background-attachment: fixed;
  color: var(--chalk);
  font:
    400 16px/1.5 Manrope,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 48px);
}
.brand img {
  display: block;
  height: 30px;
  width: auto;
}
.pill {
  border: 1.5px solid #3d424a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--soft);
  white-space: nowrap;
}
.back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--soft);
  text-decoration: none;
  white-space: nowrap;
}
.back svg {
  width: 18px;
  height: 18px;
}
.back:hover {
  color: var(--chalk);
  background: rgba(255, 255, 255, 0.06);
}

/* Layout: the text on the left, the phone on the right; one column on a narrower window. */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 540px) auto;
  grid-template-areas:
    'intro device'
    'more device';
  grid-template-rows: auto 1fr;
  column-gap: clamp(48px, 7vw, 112px);
  justify-content: center;
  align-items: start;
  padding: 4px clamp(20px, 4vw, 48px) 40px;
}
.intro {
  grid-area: intro;
  padding-top: clamp(4px, 4vh, 48px);
}
.device {
  grid-area: device;
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.more {
  grid-area: more;
}

/* Text */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--lime);
  font: 800 13px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dash {
  width: 28px;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--lime) 0 8px, transparent 8px 12px);
}
h1 {
  margin: 0 0 18px;
  font: 800 clamp(40px, 4vw, 58px) / 1.02 var(--display);
  letter-spacing: -0.035em;
}
h1 em {
  display: block;
  font-style: normal;
  color: var(--lime);
}
.lead {
  max-width: 31em;
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--soft);
}

/* Roles: the student and the instructor switch the phone; the office opens the panel. */
.roles {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.role {
  appearance: none;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--chalk);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.role:hover {
  background: rgba(255, 255, 255, 0.08);
}
.role[aria-selected='true'] {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--on-lime);
}
.role:focus-visible,
.restart:focus-visible,
.back:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 3px;
}
.ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}
.ico svg {
  width: 21px;
  height: 21px;
}
.role[aria-selected='true'] .ico {
  background: rgba(21, 23, 28, 0.12);
}
.role b {
  display: block;
  font: 800 17px/1.15 var(--display);
}
.role small {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}
.role[aria-selected='true'] small {
  color: rgba(24, 33, 12, 0.72);
}
.office {
  border-style: dashed;
}

/* What to try */
.tasks h2 {
  margin: 28px 0 14px;
  font: 800 13px/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.tasks ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: task;
}
.tasks li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  counter-increment: task;
  font-size: 16px;
  line-height: 1.5;
  color: #e5e8e3;
}
.tasks li::before {
  content: counter(task);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: -3px;
  border-radius: 10px;
  background: rgba(196, 240, 58, 0.14);
  color: var(--lime);
  font: 800 14px/1 var(--display);
}
.note {
  max-width: 32em;
  margin: 24px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--quiet);
}
.qr {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 440px;
  margin-top: 22px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}
.qr svg {
  flex: none;
  width: 78px;
  height: 78px;
  border-radius: 10px;
  stroke: none;
}
.qr p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--soft);
}
.qr b {
  display: block;
  margin-bottom: 4px;
  font: 800 16px/1.3 var(--display);
  color: var(--chalk);
}

/* The phone: a real phone's screen (390 px wide, the app's own layout), scaled down only when the window is short. */
.slot {
  width: calc(414px * var(--scale));
  height: calc((var(--screen-h) + 24px) * var(--scale));
}
.phone {
  position: relative;
  width: 414px;
  height: calc(var(--screen-h) + 24px);
  padding: 12px;
  border-radius: 58px;
  background: linear-gradient(145deg, #3b3f46, #22252b 40%, #30333a);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 50px 90px -24px rgba(0, 0, 0, 0.7);
  transform: scale(var(--scale));
  transform-origin: 0 0;
}
/* Side buttons */
.phone::before,
.phone::after {
  content: '';
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: #2b2e34;
}
.phone::before {
  left: -3px;
  top: 168px;
  height: 58px;
  box-shadow: 0 76px 0 #2b2e34;
}
.phone::after {
  right: -3px;
  top: 214px;
  height: 92px;
}
.screen {
  position: relative;
  width: 390px;
  height: var(--screen-h);
  overflow: hidden;
  border-radius: 46px;
  background: var(--canvas);
  isolation: isolate;
}
.screen iframe {
  display: block;
  width: 390px;
  height: 100%;
  border: 0;
  background: var(--canvas);
}
.boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: var(--canvas);
  color: #52616b;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.booting .boot {
  opacity: 1;
}
.boot img {
  animation: breathe 1.6s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    transform: scale(0.92);
    opacity: 0.7;
  }
}
.restart {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font:
    700 13px/1 Manrope,
    system-ui,
    sans-serif;
  cursor: pointer;
}
.restart svg {
  width: 16px;
  height: 16px;
}
.restart:hover {
  color: var(--chalk);
  background: rgba(255, 255, 255, 0.06);
}

.noscript {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 20px;
  color: var(--soft);
}

@media (max-width: 979px) {
  .stage {
    grid-template-columns: minmax(0, 560px);
    grid-template-areas: 'intro' 'device' 'more';
    grid-template-rows: none;
    row-gap: 36px;
  }
  .intro {
    padding-top: 12px;
  }
  .device {
    position: static;
  }
}

/* A laptop's low window: the same page, tighter, so the text fits beside the phone. */
@media (min-width: 980px) and (max-height: 860px) {
  h1 {
    font-size: clamp(36px, 3.5vw, 50px);
    margin-bottom: 14px;
  }
  .lead {
    margin-bottom: 20px;
    font-size: 16px;
  }
  .role {
    min-height: 60px;
    padding: 10px 12px;
  }
  .tasks h2 {
    margin: 22px 0 12px;
  }
  .tasks ol {
    gap: 9px;
  }
  .tasks li {
    font-size: 15px;
  }
  .note {
    margin-top: 18px;
    font-size: 13.5px;
  }
  .qr {
    margin-top: 16px;
  }
  .qr svg {
    width: 66px;
    height: 66px;
  }
}
@media (min-width: 980px) and (max-height: 700px) {
  .qr {
    display: none;
  }
}

/* Two columns on a narrow window: the role cards drop their icons to keep the words on one line. */
@media (min-width: 980px) and (max-width: 1179px) {
  .role {
    grid-template-columns: minmax(0, 1fr);
  }
  .role .ico {
    display: none;
  }
}

@media (max-width: 520px) {
  .pill {
    display: none;
  }
  .roles {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot img {
    animation: none;
  }
  .boot,
  .role {
    transition: none;
  }
}
