/* ==========================================================================
   Paint Studio — landing pages (home + one page per task).
   Builds on tokens.css; the editor's component sheet is not loaded here.
   ========================================================================== */

html {
  height: auto;
  /* in-page links (#tools) stop below the sticky header, not under it */
  scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body.site {
  height: auto;
  min-height: 100%;
  overflow: auto;
  overscroll-behavior: auto;
  touch-action: auto;
  font-size: 15.5px;
  line-height: 1.65;
  background: var(--bg-0);
}

/* the stage glow stays put behind the page, however long it is */
body.site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--stage);
  pointer-events: none;
}

.site a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* visually hidden, still read by screen readers and still focusable */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.site kbd,
.site code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: var(--r-xs);
  background: var(--bg-2);
  border: 1px solid var(--stroke-2);
}

/* --------------------------------- buttons -------------------------------- */

.site .btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--stroke-2);
  box-shadow: var(--sh-inset);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast),
    box-shadow var(--t-fast);
}

.site .btn:hover {
  background: var(--bg-3);
  border-color: var(--stroke-3);
}

.site .btn:active {
  transform: translateY(1px);
}

.site .btn .icon {
  width: 18px;
  height: 18px;
}

/* the file picker is a <label> around a visually hidden input: the ring shows
   when the input inside has keyboard focus */
.site label.btn:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site .btn-primary {
  color: var(--accent-text);
  background: linear-gradient(180deg, var(--accent-fill), color-mix(in oklab, var(--accent-fill) 82%, #000));
  border-color: transparent;
  box-shadow: 0 1px 10px var(--accent-glow), var(--sh-inset);
}

/* hover never gets lighter than --accent-fill, so the label keeps its contrast */
.site .btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-fill), color-mix(in oklab, var(--accent-fill) 92%, #000));
  border-color: transparent;
  box-shadow: 0 2px 16px var(--accent-glow), var(--sh-inset);
}

.site .btn-ghost {
  background: transparent;
}

.site .btn-lg {
  height: auto;
  min-height: 48px;
  padding: 10px 24px;
  font-size: 15.5px;
  line-height: 1.3;
  text-align: center;
  /* long labels (“Začít s prázdným plátnem”) wrap on narrow phones */
  white-space: normal;
  border-radius: var(--r-lg);
}

/* --------------------------------- header --------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 10px
    max(20px, env(safe-area-inset-left, 0px));
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text) !important;
  text-decoration: none;
}

.site-brand em {
  font-style: normal;
  font-weight: 450;
  color: var(--text-2);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 2px 10px var(--accent-glow);
}

.brand-mark .icon {
  width: 17px;
  height: 17px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 14px;
}

.site-nav > a:not(.btn) {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 550;
}

.site-nav > a:not(.btn):hover {
  color: var(--text);
}

.langs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  border: 1px solid var(--stroke);
}

.lang {
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  color: var(--text-2) !important;
}

.lang.is-current {
  color: var(--text) !important;
  background: var(--bg-4);
}

/* ---------------------------------- main ---------------------------------- */

.site main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.hero {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 56px 0 34px;
  text-align: center;
}

.hero h1 {
  max-width: 22ch;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 720;
  line-height: 1.12;
  letter-spacing: -1px;
}

.lead {
  max-width: 62ch;
  font-size: 17px;
  color: var(--text-2);
}

.crumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}

.crumbs a {
  color: var(--text-2);
  text-decoration: none;
}

/* the drop box is the main call to action of every page */
.drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(640px, 100%);
  margin-top: 10px;
  padding: 34px 24px 26px;
  border-radius: var(--r-xl);
  border: 2px dashed var(--stroke-3);
  background: color-mix(in oklab, var(--bg-1) 78%, transparent);
  box-shadow: var(--sh-2);
  transition: border-color var(--t-med), background var(--t-med), transform var(--t-med);
}

.drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.01);
}

.drop.is-busy {
  opacity: 0.7;
  pointer-events: none;
}

.drop-icon {
  width: 42px !important;
  height: 42px !important;
  color: var(--accent);
  stroke-width: 1.4 !important;
}

.drop-title {
  font-size: 19px;
  font-weight: 650;
}

.drop-hint {
  font-size: 13.5px;
  color: var(--text-3);
}

.drop-blank-link {
  font-size: 14px;
  font-weight: 550;
}

.drop-busy {
  font-weight: 600;
  color: var(--accent);
}

.drop-error {
  max-width: 46ch;
  font-size: 14px;
  font-weight: 550;
  color: var(--danger);
}

.drop-blank {
  border-style: solid;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  list-style: none;
  font-size: 13.5px;
  color: var(--text-2);
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust .icon {
  width: 16px;
  height: 16px;
  color: var(--ok);
}

/* --------------------------------- blocks --------------------------------- */

.block {
  padding: 38px 0;
  border-top: 1px solid var(--stroke);
}

.block > h2,
.prose h2 {
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin-bottom: 16px;
}

.prose > *,
.faq > * {
  max-width: 760px;
}

.prose h2 {
  font-size: 21px;
  margin: 26px 0 8px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.features p,
.faq p {
  color: var(--text-2);
}

.steps ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 18px 18px 58px;
  border-radius: var(--r-lg);
  background: var(--bg-1);
  border: 1px solid var(--stroke);
  box-shadow: var(--sh-1);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 17px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-text);
  background: var(--accent-fill);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 40px;
}

.features h2 {
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 6px;
}

.faq h3 {
  font-size: 16px;
  font-weight: 650;
  margin-top: 18px;
}

.faq h3 + p {
  margin-top: 4px;
}

/* ------------------------------- tool cards ------------------------------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 10px;
  list-style: none;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--bg-1);
  border: 1px solid var(--stroke);
  box-shadow: var(--sh-1);
  color: var(--text) !important;
  text-decoration: none;
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-md);
  color: var(--accent);
  background: var(--accent-soft);
}

.tool-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.35;
}

.tool-text strong {
  font-size: 14.5px;
}

.tool-text span {
  font-size: 12.5px;
  color: var(--text-3);
}

/* --------------------------------- footer --------------------------------- */

.site-foot {
  border-top: 1px solid var(--stroke);
  background: var(--bg-1);
}

.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 32px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 36px 20px calc(36px + env(safe-area-inset-bottom, 0px));
  font-size: 13.5px;
  color: var(--text-2);
}

.foot-about {
  display: grid;
  gap: 10px;
  align-content: start;
}

.site-foot h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.foot-links {
  columns: 3 160px;
  column-gap: 20px;
  list-style: none;
}

.foot-links li {
  break-inside: avoid;
  padding: 2px 0;
}

.foot-links a {
  color: var(--text-2);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--text);
}

/* -------------------------------- responsive ------------------------------- */

@media (max-width: 760px) {
  .site-head {
    gap: 10px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav > a:not(.btn) {
    display: none;
  }

  /* icon-only button: the label stays for screen readers */
  .site-nav .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .site-nav .btn {
    width: 38px;
    padding: 0;
  }

  .hero {
    padding: 34px 0 24px;
  }

  .steps ol,
  .features,
  .foot-inner {
    grid-template-columns: 1fr;
  }
}
