/* darwin3.cz site layout. Colours, fonts, spaces and radii come from
   /brand/tokens.css, buttons, chips and badges from /brand/components.css. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-text); font-size: 16px; line-height: 26px;
}
img, svg { max-width: 100%; }
a { color: var(--link); }
h1, h2, h3, p, ul, ol { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--space-6); }
.nb { white-space: nowrap; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--brand-navy); color: var(--on-navy);
}
.site-header .wrap { display: flex; align-items: center; gap: var(--space-6); min-height: 72px; max-width: 1280px; }
.site-logo { display: block; flex: 0 0 auto; line-height: 0; }
.site-logo img { width: 140px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.site-nav a {
  color: var(--on-navy); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand-orange); }
.site-nav a:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 4px; border-radius: 2px; }
.site-nav .d3-btn { color: var(--on-cta); font-family: var(--font-text); }
.site-nav .d3-btn:hover { color: var(--on-cta); filter: brightness(1.08); }
/* the customer portal login, always visible in the header */
.site-login { flex: 0 0 auto; color: var(--on-navy); white-space: nowrap; }
.site-login:hover { filter: brightness(1.12); }
.site-login img { width: 20px; height: auto; }
.login-short { display: none; }
.menu-toggle { display: none; }

@media (max-width: 1200px) {
  .site-header .wrap { flex-wrap: wrap; min-height: 64px; gap: var(--space-3); }
  .site-logo img { width: 120px; }
  .site-login { margin-left: auto; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; padding: 0;
    background: transparent; color: var(--on-navy); border: 2px solid rgba(255,255,255,.5);
    border-radius: var(--radius-md); cursor: pointer;
  }
  .menu-toggle:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
  .site-nav { order: 10; display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; padding-bottom: var(--space-4); }
  .site-header.open .site-nav { display: flex; }
  .site-nav a { padding: var(--space-3) 0; border-top: 1px solid rgba(255,255,255,.12); }
  .site-nav .d3-btn { margin-top: var(--space-3); border-top: 0; }
}
@media (max-width: 520px) {
  .site-login { padding: var(--space-3) var(--space-4); }
  .login-long { display: none; }
  .login-short { display: inline; }
}

/* sections */
.section { padding: var(--space-16) 0; }
.section--fog { background: var(--surface-fog); }
.section--navy { background: var(--brand-navy); color: var(--on-navy); }
.section--night { background: var(--brand-night); color: var(--on-navy); }
.section--navy a, .section--night a { color: #ff8f40; }
.section-head { max-width: 760px; margin-bottom: var(--space-12); }
.section-head .eyebrow { display: block; color: var(--link); margin-bottom: var(--space-3); text-transform: uppercase; }
.section--navy .section-head .eyebrow, .section--night .section-head .eyebrow { color: var(--brand-orange); }
.section-head .h2 { margin-bottom: var(--space-4); }
.section--navy .lead, .section--night .lead { color: #dfe4f5; }
.muted { color: var(--ink-muted); }

/* hero */
.hero { background: var(--brand-navy); color: var(--on-navy); overflow: hidden; }
/* the text column takes "Pokladní systém," on one line at the full width */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-12); align-items: center; padding-top: var(--space-16); padding-bottom: var(--space-16); }
.hero .eyebrow { display: block; color: var(--brand-orange); text-transform: uppercase; margin-bottom: var(--space-4); }
.hero .display { margin-bottom: var(--space-6); }
.hero .lead { color: #dfe4f5; max-width: 34em; margin-bottom: var(--space-8); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.d3-btn--on-navy { background: transparent; color: var(--on-navy); border-color: rgba(255,255,255,.7); }
.d3-btn--on-navy:hover { border-color: #fff; }
.hero-note { margin-top: var(--space-6); color: #b4bde0; }
/* "Objednat předvedení" or straight the iPub Updater for the visitor's system,
   the other systems as small links */
.hero-actions { align-items: center; }
.hero-or { color: var(--on-navy); align-self: center; }
.download-note { margin: var(--space-4) 0 0; color: #b4bde0; max-width: 36em; }
.hero-more { margin-top: var(--space-8); }
.download-others { display: block; margin-top: var(--space-1); }
.download-note a { color: var(--on-navy); }

/* the tile mosaic: app-shaped tiles in brand-night on brand-navy, one in colour */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mosaic span { aspect-ratio: 160 / 98; border-radius: var(--radius-sm); background: var(--brand-night); }
.mosaic .m-pivo { background: var(--tile-pivo); }
.mosaic .m-wide { grid-column: span 2; aspect-ratio: auto; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: var(--space-8); padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .hero .display { font-size: 44px; line-height: 50px; }
  .mosaic { grid-template-columns: repeat(6, 1fr); }
  .mosaic span:nth-child(n+13) { display: none; }
}

/* three reasons */
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.reason { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-8); box-shadow: var(--shadow-card); }
.reason .h3 { margin: var(--space-4) 0 var(--space-3); }
.reason ul { margin-top: var(--space-4); padding: 0; list-style: none; }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 32px; margin-bottom: var(--space-2); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px;
  background: url("/brand/ikony/aplikace/check.svg") center / contain no-repeat;
}
@media (max-width: 860px) { .reasons { grid-template-columns: 1fr; } }

/* platforms and scale, on brand-night */
.scale { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.scale-card { background: var(--brand-navy); border-radius: var(--radius-lg); padding: var(--space-8); }
.scale-card--wide { grid-column: 1 / -1; }
.scale-card .h3 { margin-bottom: var(--space-3); }
.scale-card p { color: #dfe4f5; max-width: 62em; }
.platforms { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.platforms span {
  font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 22px;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  border: 2px solid var(--brand-orange); color: var(--on-navy);
}
@media (max-width: 860px) { .scale { grid-template-columns: 1fr; } .scale-card { padding: var(--space-6); } }

/* hardware for the PC variant from i-o.cz: intro with the partner card,
   four category cards with product photos, a button to the shop */
.hw-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-12); align-items: start; margin-bottom: var(--space-12); }
.hw-intro .section-head { margin-bottom: 0; }
.hw-partner { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-8); box-shadow: var(--shadow-card); }
.hw-logo { display: inline-block; line-height: 0; margin-bottom: var(--space-6); border-radius: var(--radius-sm); }
.hw-logo img { width: 212px; height: auto; }
.hw-logo:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.hw-partner .checks li:last-child { margin-bottom: 0; }
.hw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); margin-bottom: var(--space-8); }
.hw-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.hw-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(18,31,83,0.22); }
.hw-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.hw-photo { display: block; background: #fff; padding: var(--space-4) var(--space-4) 0; }
.hw-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; mix-blend-mode: multiply; }
.hw-text { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-6) var(--space-6); border-top: 3px solid var(--brand-orange); }
.hw-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 28px; }
.hw-title::after { content: "\00a0→"; color: var(--link); }
.hw-card:hover .hw-title { color: var(--link); }
.hw-text .small { color: var(--ink-muted); }
.hw-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); }
@media (prefers-reduced-motion: reduce) { .hw-card { transition: none; } .hw-card:hover { transform: none; } }
@media (max-width: 1000px) { .hw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .hw-intro { grid-template-columns: 1fr; gap: var(--space-8); margin-bottom: var(--space-8); }
  .hw-partner { padding: var(--space-6); }
}
/* on a phone the cards lie flat: the photo on the left, the text on the right */
@media (max-width: 560px) {
  .hw-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .hw-card { flex-direction: row; }
  .hw-photo { flex: 0 0 104px; display: flex; align-items: center; padding: var(--space-2); }
  .hw-text { flex: 1 1 auto; justify-content: center; padding: var(--space-4); border-top: 0; border-left: 3px solid var(--brand-orange); }
  .hw-title { font-size: 18px; line-height: 24px; }
}

/* two-column text + facts */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.split .lead { margin-bottom: var(--space-6); }
.split p + p { margin-top: var(--space-4); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--space-8); } }
.facts { display: grid; gap: var(--space-4); }
.fact { display: flex; gap: var(--space-4); align-items: flex-start; background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-6); }
.section--fog .fact { background: var(--surface); }
.section--navy .fact { background: var(--brand-night); }
.fact .body-strong { display: block; margin-bottom: var(--space-1); }
.big-number { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 50px; color: var(--brand-orange); }

/* all features */
/* the columns drop the last group's bottom margin, so the space below is set here */
.feature-groups { columns: 3 300px; column-gap: var(--space-8); margin-bottom: var(--space-12); }
.feature-group { break-inside: avoid; margin-bottom: var(--space-8); }
.feature-group .h3 { font-size: 20px; line-height: 28px; margin-bottom: var(--space-3); padding-bottom: var(--space-2); border-bottom: 2px solid var(--brand-orange); }
.feature-group ul { list-style: none; padding: 0; }
.feature-group li { padding: 3px 0; }
.feature-group a { color: var(--ink); text-decoration: none; }
.feature-group a:hover { color: var(--link); text-decoration: underline; }
.feature-group a::after { content: " →"; color: var(--link); }

/* steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); counter-reset: none; }
.steps li { display: flex; flex-direction: column; gap: var(--space-3); }
.steps .body-strong { font-size: 18px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .steps li { flex-direction: row; align-items: flex-start; } }

/* contact: the cards, and the forms with a switch between them */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--space-6); align-items: start; }
.contact-cards { display: grid; gap: var(--space-4); }
.contact-card { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-8); }
.section:not(.section--fog) .contact-card { background: var(--surface-fog); }
.contact-card .eyebrow { display: block; color: var(--ink-muted); text-transform: uppercase; margin-bottom: var(--space-2); }
.contact-card a { color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 30px; }
.contact-card a:hover { color: var(--link); }
.contact-forms { background: var(--surface-fog); border-radius: var(--radius-lg); padding: var(--space-8); }
.form-switch { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); padding: var(--space-1); margin-bottom: var(--space-6); background: var(--surface); border-radius: var(--radius-md); }
.form-switch label { position: relative; }
.form-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.form-switch span { display: block; padding: var(--space-2) var(--space-6); border-radius: var(--radius-sm); font-weight: 700; color: var(--ink-muted); }
.form-switch input:checked + span { background: var(--brand-navy); color: var(--on-navy); }
.form-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.form-hint { margin-bottom: var(--space-4); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-4); }
.field { display: block; margin-bottom: var(--space-4); }
.field span { display: block; margin-bottom: var(--space-1); font-weight: 600; font-size: 14px; line-height: 20px; }
.field input, .field textarea {
  display: block; width: 100%; padding: var(--space-3) var(--space-4);
  font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius-md);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.turnstile-slot--shown { margin-bottom: var(--space-4); }
.form-result { margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); background: var(--surface); border-left: 4px solid var(--brand-slate); border-radius: var(--radius-md); }
.form-result:empty { display: none; }
.form-result--success { border-left-color: var(--brand-navy); font-weight: 600; }
.form-result--danger { border-left-color: var(--cta); }
.form-note { margin-top: var(--space-4); color: var(--ink-muted); }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .contact-forms { padding: var(--space-6) var(--space-4); }
  .form-switch { display: flex; flex-wrap: nowrap; }
  .form-switch label { flex: 1 1 0; }
  .form-switch span { padding: var(--space-2) var(--space-3); text-align: center; }
  .field-row { grid-template-columns: 1fr; }
}

/* footer */
.site-footer { background: var(--brand-night); color: #b4bde0; padding: var(--space-12) 0; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: start; }
.site-footer .sign { display: flex; align-items: center; gap: var(--space-3); color: var(--on-navy); margin-bottom: var(--space-3); }
.site-footer .sign img { width: 120px; height: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); justify-content: flex-end; }
.site-footer a { color: #dfe4f5; text-decoration: none; }
.site-footer a:hover { color: var(--brand-orange); }
@media (max-width: 860px) { .site-footer .wrap { grid-template-columns: 1fr; } .site-footer nav { justify-content: flex-start; } }

/* manual */
.page-head { background: var(--brand-navy); color: var(--on-navy); padding: var(--space-12) 0; }
.page-head .eyebrow { display: block; color: var(--brand-orange); text-transform: uppercase; margin-bottom: var(--space-3); }
.page-head .h1 { margin-bottom: var(--space-4); }
.page-head .lead { color: #dfe4f5; max-width: 40em; }
.manual { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-12); padding-top: var(--space-12); padding-bottom: var(--space-16); }
.toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; font-size: 14px; line-height: 22px; padding-right: var(--space-2); }
.toc summary { display: none; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc > div > ol > li { margin-bottom: var(--space-3); }
.toc > div > ol > li > a { font-family: var(--font-display); font-weight: 700; color: var(--ink); text-decoration: none; }
.toc ol ol { margin: var(--space-1) 0 0 var(--space-3); }
.toc ol ol a { color: var(--ink-muted); text-decoration: none; }
.toc a:hover { color: var(--link); }
.manual-body { max-width: 760px; }
.manual-group { margin-bottom: var(--space-16); }
.manual-group > .h2 { padding-bottom: var(--space-3); border-bottom: 2px solid var(--brand-orange); margin-bottom: var(--space-4); }
.manual-group > .intro { margin-bottom: var(--space-8); color: var(--ink-muted); }
.feature { padding: var(--space-6) 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature .h3 { font-size: 22px; line-height: 30px; margin-bottom: var(--space-3); }
.feature p + p, .feature p + ul, .feature ul + p, .feature ol + p, .feature p + ol { margin-top: var(--space-3); }
.feature ul, .feature ol { padding-left: var(--space-6); }
.feature li { margin-bottom: var(--space-1); }
.where { display: block; margin-top: var(--space-3); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.where strong { color: var(--ink); font-weight: 600; }
.key { font-family: var(--font-text); font-weight: 700; font-size: 0.92em; letter-spacing: .2px; padding: 1px 6px; border-radius: 4px; background: var(--surface-fog); white-space: nowrap; }
.feature:target .h3 { color: var(--link); }
.back-top { display: inline-block; margin-top: var(--space-4); font-size: 14px; }
@media (max-width: 960px) {
  .manual { grid-template-columns: 1fr; gap: var(--space-6); padding-top: var(--space-6); }
  .toc { position: static; max-height: none; overflow: visible; background: var(--surface-fog); border-radius: var(--radius-lg); padding: var(--space-4); }
  .toc summary { display: block; cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
  .toc[open] summary { margin-bottom: var(--space-3); }
}
