/* Tutinote – prezentační web. Barvy a písmo podle docs/design/tokens/tokens.css (vzhled 8B).
   Žádné zdroje třetích stran; písmo Inter je v /fonts (OFL, viz fonts/OFL.txt). */
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/inter-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/inter-semibold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/inter-extrabold.woff2') format('woff2');
}

:root {
  --bg: #ffffff;
  --soft: #eef0fa;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #5c5c61;
  --primary: #2a41e0;
  --primary-hover: #1f31b8;
  --on-primary: #ffffff;
  --tint: #d6ddff;
  --accent: #1f31b8;
  --line: #e5e5ea;
  --blue: #b9c6ff;
  --yellow: #ffd84d;
  --green: #8fe3b4;
  --coral: #ffa99c;
  --ok: #177a48;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--primary);
}
a:hover {
  color: var(--primary-hover);
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
  z-index: 20;
}
.skip:focus {
  top: 12px;
}

/* Tlačítka */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.18s cubic-bezier(0.3, 1.5, 0.5, 1),
    background-color 0.15s ease;
}
.btn:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn-ghost {
  background: var(--tint);
  color: var(--accent);
}
.btn-ghost:hover {
  background: #c4cefc;
  color: var(--accent);
}
.btn-lg {
  min-height: 54px;
  padding: 0 28px;
  font-size: 1.0625rem;
}

/* Hlavička */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex: none;
}
.brand img {
  width: 150px;
}
.menu {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 24px;
}
.links {
  display: flex;
  gap: 24px;
  flex: 1;
}
.links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.links a:hover {
  color: var(--primary);
}
.top-cta {
  display: flex;
  gap: 10px;
}
.menu-btn {
  display: none;
  margin-left: auto;
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--soft);
  color: var(--text);
  cursor: pointer;
}

/* Úvod */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 104px) 0 clamp(48px, 7vw, 88px);
  text-align: center;
  overflow: hidden;
}
.pill {
  display: inline-block;
  background: var(--tint);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 999px;
  padding: 5px 16px;
}
h1 {
  margin: 18px auto 0;
  max-width: 13em;
  font-weight: 800;
  font-size: clamp(2.5rem, 7.2vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.lead {
  margin: 22px auto 0;
  max-width: 34em;
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  color: var(--muted);
}
.cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.deco {
  position: absolute;
  border-radius: 28%;
  pointer-events: none;
}
.deco-1 {
  width: 84px;
  height: 84px;
  background: var(--yellow);
  left: 6%;
  top: 22%;
  --r: -12deg;
  animation: float 7s ease-in-out infinite;
}
.deco-2 {
  width: 96px;
  height: 96px;
  background: var(--green);
  border-radius: 50%;
  right: 7%;
  top: 14%;
  animation: float 8s ease-in-out infinite 0.6s;
}
.deco-3 {
  width: 60px;
  height: 60px;
  background: var(--coral);
  right: 13%;
  top: 46%;
  --r: 14deg;
  animation: float 6.5s ease-in-out infinite 1.2s;
}

.demo {
  margin: 40px auto 0;
  max-width: 560px;
}
.demo-input {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--soft);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  text-align: left;
  font-size: 1.25rem;
  font-weight: 600;
}
.demo-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.demo-text {
  white-space: nowrap;
  overflow: hidden;
}
.caret {
  width: 2px;
  height: 1.3em;
  background: var(--primary);
  animation: caret 1s steps(1) infinite;
}

.tiles {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}
.tile {
  border-radius: var(--r-xl);
  padding: 22px 22px 18px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s ease;
}
.tile h2 {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.tile p {
  font-size: 0.9375rem;
}
.tile-blue {
  background: var(--blue);
}
.tile-yellow {
  background: var(--yellow);
}
.tile-green {
  background: var(--green);
}
.tile-coral {
  background: var(--coral);
}
.mini {
  margin-top: auto;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 14px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.875rem;
}
.ln {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  transform-origin: left;
}
.ln.short {
  width: 60%;
}
.ref {
  align-self: flex-start;
  background: var(--tint);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: 999px;
  padding: 1px 10px;
}
.mini-card {
  perspective: 600px;
  align-items: stretch;
  justify-content: center;
}
.flip {
  position: relative;
  display: block;
  height: 100px;
  transform-style: preserve-3d;
  animation: flip 6s var(--ease) infinite;
}
.face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
  border-radius: var(--r-md);
  background: var(--soft);
  font-weight: 800;
  font-size: 1.125rem;
  backface-visibility: hidden;
}
.face.back {
  transform: rotateY(180deg);
  font-weight: 600;
  font-size: 0.9375rem;
}
.mini-quiz .q {
  font-weight: 700;
}
.mini-quiz .a {
  border-radius: 10px;
  padding: 6px 10px;
  background: var(--soft);
  font-weight: 600;
}
.mini-quiz .pick {
  animation: pick 5s ease infinite;
}

/* Sekce */
.sec {
  padding: clamp(56px, 8vw, 104px) 0;
}
.sec-soft {
  background: var(--soft);
}
.h2 {
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  max-width: 18em;
  text-wrap: balance;
}
.sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 36em;
}
h3 {
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.steps {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.step {
  background: var(--soft);
  border-radius: var(--r-xl);
  padding: 26px;
}
.step p {
  margin-top: 8px;
  color: var(--muted);
}
.num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
  margin-bottom: 18px;
}

.cards {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: var(--shadow);
}
.sec:not(.sec-soft) .card {
  background: var(--soft);
  box-shadow: none;
}
.valid {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
}
.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card-wide {
  grid-column: 1 / -1;
}
.pilot-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.card p {
  margin-top: 8px;
  color: var(--muted);
}

/* Živý kvíz */
.quiz {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}
.checks {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checks li {
  position: relative;
  padding-left: 32px;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tint);
}
.checks li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  width: 5px;
  height: 9px;
  border: solid var(--accent);
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg);
}
.quiz-demo {
  position: relative;
  padding: 0 0 60px;
}
.screen {
  margin-right: 130px;
  background: var(--text);
  color: #ffffff;
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow: 0 24px 48px rgb(28 28 30 / 0.18);
}
.screen-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  color: #c7c7cc;
}
.screen-q {
  margin: 14px 0 16px;
  font-weight: 800;
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ans {
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  font-weight: 600;
}
.ans b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.6);
}
.ans-a {
  background: var(--blue);
}
.ans-b {
  background: var(--yellow);
}
.ans-c {
  background: var(--green);
}
.ans-d {
  background: var(--coral);
}
.timer {
  display: block;
  margin-top: 16px;
  height: 8px;
  border-radius: 4px;
  background: #3a3a3c;
  overflow: hidden;
}
.timer span {
  display: block;
  height: 100%;
  background: var(--yellow);
  transform-origin: left;
  animation: timer 8s linear infinite;
}
.phone {
  position: absolute;
  right: 0;
  bottom: -10px;
  width: 180px;
  background: var(--surface);
  border-radius: 26px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.875rem;
  box-shadow: 0 18px 40px rgb(28 28 30 / 0.2);
  border: 1px solid var(--line);
}
.phone-q {
  font-weight: 700;
}
.phone-a {
  background: var(--soft);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 600;
}
.phone-pick {
  animation: pick 8s ease infinite;
}
.phone-ok {
  color: var(--ok);
  font-weight: 600;
  animation: okay 8s ease infinite;
}

/* Ceník */
.plans {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.plan {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.plan > p:not(.price):not(.credits) {
  color: var(--muted);
}
.price {
  margin-top: 8px;
}
.price strong {
  font-weight: 800;
  font-size: clamp(2.25rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}
.price span {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
}
.credits {
  font-weight: 600;
}
.plan .checks {
  margin: 6px 0 14px;
}
.plan .btn {
  margin-top: auto;
}
.plan-b {
  border: 2px solid var(--tint);
}
.note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 44em;
}

.trial {
  background: var(--yellow);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* Kontakt */
.pilot {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 64px);
}
.pilot p {
  margin-top: 14px;
  max-width: 36em;
  font-size: 1.125rem;
}
.pilot .mail {
  margin-top: 26px;
}
.pilot .mail a {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 26px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}
.pilot :focus-visible {
  outline-color: var(--surface);
}

/* Patička */
.foot {
  background: var(--soft);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.9375rem;
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.foot-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.operator {
  margin-top: 20px;
  max-width: 60em;
}
.privacy {
  margin-top: 10px;
  max-width: 60em;
}

.err {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding: 64px 0;
}
.err p {
  color: var(--muted);
}

/* Pohyb: jeden orchestrovaný nástup v úvodu, jemné odhalení sekcí při posunu (jen se skriptem). */
.js .tile {
  animation: tile 0.9s var(--ease) both;
}
.js .tile:nth-child(2) {
  animation-delay: 0.12s;
}
.js .tile:nth-child(3) {
  animation-delay: 0.24s;
}
.js .tile:nth-child(4) {
  animation-delay: 0.36s;
}
.js .tiles .ln {
  animation: line 0.8s var(--ease) both 0.9s;
}
.js .rv.pre {
  opacity: 0;
  transform: translateY(40px);
}
.js .rv.in {
  transition:
    opacity 0.7s ease,
    transform 0.7s var(--ease);
}
@media (hover: hover) {
  .tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgb(28 28 30 / 0.14);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--r, 0deg));
  }
  50% {
    transform: translateY(-14px) rotate(var(--r, 0deg));
  }
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
@keyframes tile {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes line {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes flip {
  0%,
  42% {
    transform: rotateY(0);
  }
  50%,
  92% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
@keyframes pick {
  0%,
  55% {
    background: var(--soft);
    color: var(--text);
  }
  65%,
  100% {
    background: var(--primary);
    color: var(--on-primary);
  }
}
@keyframes timer {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}
@keyframes okay {
  0%,
  62% {
    opacity: 0;
  }
  70%,
  100% {
    opacity: 1;
  }
}

/* Tablet a telefon */
@media (max-width: 1000px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quiz {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
@media (max-width: 860px) {
  .menu-btn {
    display: inline-flex;
    align-items: center;
  }
  .js .menu {
    display: none;
  }
  .js .menu.open {
    display: flex;
  }
  .menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 20px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgb(28 28 30 / 0.08);
  }
  .links {
    flex-direction: column;
    gap: 0;
  }
  .links a {
    font-size: 1.0625rem;
    width: 100%;
  }
  .top-cta {
    flex-direction: column;
  }
  .top-cta .btn {
    width: 100%;
  }
  .steps,
  .cards,
  .plans {
    grid-template-columns: 1fr;
  }
  .deco {
    display: none;
  }
}
@media (max-width: 640px) {
  .tiles {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 12px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    scroll-padding-left: 20px;
  }
  .tile {
    flex: none;
    width: 78%;
    min-height: 300px;
    scroll-snap-align: start;
  }
  .cta .btn {
    width: 100%;
  }
  .demo-input {
    font-size: 1.0625rem;
  }
  .phone {
    position: static;
    width: auto;
    margin-top: 14px;
    box-shadow: none;
  }
  .screen {
    margin-right: 0;
  }
  .quiz-demo {
    padding: 0;
  }
  .answers {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .rv.pre {
    opacity: 1;
    transform: none;
  }
  .phone-ok {
    opacity: 1;
  }
}
