/* Riso kit, home site extras: barcik.training (index, trainings, eu-ai-act, resources).
   Loaded after riso.css. Source of truth: training-ops/web/riso/home.css; build.py copies it
   to barcik-training/assets/riso/. Edit here, then rebuild.

   Same rules as riso.css: navy ink, flat inks, square corners, 2px borders, hard shadows,
   no gradients other than the highlighter stroke, nothing waits for JS to become visible. */

/* ---------- shared bits ---------- */
html { scroll-padding-top: 16px; }
.band > h3, .band .sub { font-size: 1.35rem; line-height: 1.1; margin-top: 40px; }
.lede a, .note a, .faq-body a, .item p a { color: var(--pink-ink); font-weight: 700; text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.btn, .btn-2 { min-height: 44px; }
.more { padding: 8px 0; }
.go { display: inline-block; padding: 9px 0; font-weight: 800; color: var(--pink-ink); text-underline-offset: 3px; }
.go:hover { background: linear-gradient(transparent 55%, var(--yellow) 55%); }
.tag { display: inline-block; align-self: flex-start; border: 1.5px solid var(--navy); padding: 1px 8px; font-size: 12.5px; font-weight: 700; background: var(--paper); }
.tag.y { background: var(--yellow); }
.tag.p { background: var(--pink); }
.muted { color: var(--muted); }

/* site bar: same component as the sister sites; taller tap targets on touch screens.
   On the homepage the mark itself is the current page: no underline under the logo. */
.sitebar .mark[aria-current] { box-shadow: none; }
@media (max-width: 860px) {
  .sitebar { padding-top: 10px; padding-bottom: 4px; }
  .sitebar a:not(.mark) { display: inline-flex; align-items: center; min-height: 40px; padding: 0; }
  .sitebar a[aria-current] { box-shadow: inset 0 -6px 0 -3px var(--pink); }
}

/* page masthead on subpages: reuses .masthead from riso.css */
.masthead .lede { font-size: 1.15rem; }
.masthead .actions { flex-basis: 100%; margin-top: 4px; }
.masthead h1 .quiet { color: var(--navy); text-shadow: none; }

/* ---------- home: hero ---------- */
.hero .photo img { object-position: center 15%; }
.hero .badges li { background: var(--panel); }
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero-side .photo { width: 100%; }
.ai-ready { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; padding: 11px 2px; font-size: 13.5px; font-weight: 700; color: var(--muted); text-decoration: none; }
.ai-ready:hover { color: var(--navy); }
.ai-ready:hover span { background: linear-gradient(transparent 55%, var(--yellow) 55%); }
.ai-ready i { font-style: normal; opacity: .5; }

/* services: four cards */
.svc .go { margin-top: auto; }
.svc .fact { font-size: 15px; }
.svc .go:hover { background: linear-gradient(transparent 55%, var(--yellow) 55%); }

/* about: text and list left, photo and numbers right */
.two .lede { color: var(--muted); font-size: 1.05rem; margin-top: 14px; }
.about-photo { border: 2px solid var(--navy); background: var(--yellow); box-shadow: 6px 6px 0 var(--blue); transform: rotate(-.8deg); margin-bottom: 26px; overflow: hidden; }
.about-photo img { display: block; width: 100%; height: 260px; object-fit: cover; object-position: center 30%; filter: grayscale(1) contrast(1.08); mix-blend-mode: multiply; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; list-style: none; }
.topics li { border: 2px solid var(--navy); padding: 5px 12px; font-size: 14.5px; font-weight: 700; background: var(--panel); }
.topics li:nth-child(5n+2) { background: var(--yellow); }

/* demo tiles on the home page: a short blurb, the rest is behind the click */
.row-wide .tile-demo .cap-blurb { display: -webkit-box; -webkit-line-clamp: 3; }
.two { align-items: start; }

/* link list: tags inside */
.links .tag { display: inline-block; margin-left: 8px; vertical-align: 2px; font-size: 11.5px; padding: 0 6px; color: var(--navy); }
.links span { font-size: 14.5px; }

/* the home footer carries a few links */
.sitefoot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin-top: 6px; }
.sitefoot nav a, .sitefoot p a { display: inline-block; padding: 10px 2px; }

/* ---------- cards in a grid (subpages) ---------- */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; margin-top: 28px; }
.item { padding: 20px 22px 14px; display: flex; flex-direction: column; gap: 8px; }
.item h3 { font-size: 1.3rem; line-height: 1.08; }
.item p { font-size: 15px; color: var(--muted); }
.item .go { margin-top: auto; }
.item .go + .go { margin-top: -6px; }
.item ul { list-style: none; }
.item li { padding: 8px 0; border-top: 1.5px solid var(--navy); font-size: 15px; }
.item li:first-child { border-top: 0; padding-top: 2px; }
.item .note { font-size: 14px; color: var(--muted); font-style: italic; padding-top: 10px; border-top: 2px dotted var(--navy); margin-top: 4px; }
.grid3.books { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.book-item { flex-direction: row; gap: 20px; align-items: flex-start; }
.book-item > img { flex: 0 0 110px; width: 110px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border: 2px solid var(--navy); box-shadow: 4px 4px 0 var(--pink); transform: rotate(-1.5deg); }
.book-item > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.book-item .langs-row { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: -10px; }

/* two columns of text + cards (eu-ai-act) */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; margin-top: 8px; }
.split h2 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); line-height: 1.05; }
.split .stack { display: grid; gap: 22px; }
.split .lede { color: var(--muted); font-size: 1.05rem; margin-top: 12px; max-width: 58ch; }
.ticks { list-style: none; margin-top: 18px; }
.ticks li { padding: 11px 0; border-top: 2px solid var(--navy); font-weight: 600; }
.ticks li:last-child { border-bottom: 2px solid var(--navy); }
.minis { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.minis div { border: 2px solid var(--navy); background: var(--panel); padding: 10px 16px 8px; min-width: 104px; }
.minis b { display: block; font-stretch: 78%; font-weight: 800; font-size: 2rem; line-height: 1; color: var(--blue); text-shadow: .05em .05em 0 var(--pink); }
.minis span { font-size: 13.5px; font-weight: 700; color: var(--muted); }

/* role-specific trainings: a printed list, duration on the right */
.roles { list-style: none; margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 34px; }
.roles li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-top: 2px solid var(--navy); }
.roles h3 { font-size: 1.2rem; line-height: 1.1; }
.roles p { font-size: 14.5px; color: var(--muted); margin-top: 3px; }
.roles .dur { flex: 0 0 auto; font-weight: 800; font-size: 14px; background: var(--yellow); border: 2px solid var(--navy); padding: 2px 9px; }

/* deadlines */
.notice { background: var(--panel); border: 2px solid var(--navy); box-shadow: 6px 6px 0 var(--pink); padding: 20px 24px; margin-top: 26px; max-width: 880px; }
.notice h3 { font-size: 1.3rem; line-height: 1.1; margin-bottom: 8px; }
.notice p, .notice li { font-size: 15.5px; }
.notice ul { padding-left: 1.1em; }
.notice li { margin-top: 6px; }
.timeline { list-style: none; margin: 34px 0 6px; max-width: 880px; border-left: 3px solid var(--navy); }
.timeline li { position: relative; padding: 0 0 30px 30px; }
.timeline li::before { content: ''; position: absolute; left: -11px; top: 4px; width: 16px; height: 16px; border: 2px solid var(--navy); background: var(--dot, var(--yellow)); transform: rotate(45deg); }
.timeline .when { display: inline-block; font-weight: 800; font-size: 15px; background: var(--dot, var(--yellow)); border: 2px solid var(--navy); padding: 1px 9px; margin-bottom: 8px; }
.timeline h3 { font-size: 1.3rem; line-height: 1.1; margin-bottom: 6px; }
.timeline p { color: var(--muted); font-size: 15.5px; max-width: 70ch; }
.timeline .d1 { --dot: var(--pink); }
.timeline .d2 { --dot: var(--orange); }
.timeline .d3 { --dot: var(--yellow); }
.timeline .d4 { --dot: var(--green); }
.timeline .d4 .when { color: var(--paper); }

/* FAQ: native disclosure, one open at a time via name="faq" */
.faq-note { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--pink-ink); }
.faq { margin-top: 22px; max-width: 880px; border-bottom: 2px solid var(--navy); }
.faq details { border-top: 2px solid var(--navy); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 1.2rem; line-height: 1.15; }
.faq summary::after { content: '+'; flex: 0 0 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--navy); font-weight: 800; font-size: 20px; line-height: 1; }
.faq summary:hover h3 { background: linear-gradient(transparent 55%, var(--yellow) 55%); }
.faq details[open] summary::after { content: '\2212'; background: var(--yellow); }
.faq-body { padding: 0 48px 20px 0; font-family: var(--font-read); font-size: 16px; line-height: 1.6; }
.faq-body ul { padding-left: 1.2em; margin: 6px 0; }

/* video embed */
.frame { margin-top: 26px; border: 2px solid var(--navy); box-shadow: 6px 6px 0 var(--blue); background: var(--panel); }
.frame iframe { display: block; width: 100%; height: 400px; border: 0; }

.cta .actions { justify-content: center; }
.cta .alt { margin-top: 18px; margin-bottom: 0; font-size: 15px; }
.cta .alt a { color: var(--pink-ink); font-weight: 700; display: inline-block; padding: 10px 0; }
.cta p { max-width: 60ch; margin-left: auto; margin-right: auto; }

/* ---------- training catalog: markup written by training-ops/catalog/generate_site.py ---------- */
/* generated cards carry .reveal from the old design; they are simply visible */
.reveal { opacity: 1; transform: none; }
.section-header { max-width: 760px; }
.section-header .label { display: block; font-weight: 700; font-size: 15px; color: var(--pink-ink); margin-bottom: 6px; }
.section-header h2 { display: inline; font-size: clamp(1.8rem, 4.4vw, 2.6rem); line-height: 1.1;
  background: linear-gradient(transparent 55%, var(--yellow) 55%); padding: 0 4px; margin-left: -4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.section-header p { color: var(--muted); font-size: 1.05rem; margin-top: 14px; max-width: 62ch; }
.section-header p:last-child { margin-top: 20px; }
.offer-group { font-size: 1.6rem; line-height: 1.1; margin: 46px 0 20px; padding-bottom: 8px; border-bottom: 2px solid var(--navy); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.offer-card { position: relative; display: flex; flex-direction: column; padding: 20px 22px 18px; background: var(--panel); border: 2px solid var(--navy); box-shadow: 5px 5px 0 var(--blue); }
.offer-card h4 { font-stretch: 78%; font-weight: 800; letter-spacing: -0.01em; font-size: 1.35rem; line-height: 1.08; margin-bottom: 10px; text-wrap: balance; }
.offer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; }
.offer-tag { font-size: 12.5px; font-weight: 700; border: 1.5px solid var(--navy); padding: 1px 8px; }
.offer-duration { font-size: 14px; font-weight: 800; }
.offer-badge { position: absolute; top: -13px; right: -8px; background: var(--yellow); border: 2px solid var(--navy); font-size: 12.5px; font-weight: 800; padding: 2px 10px; transform: rotate(4deg); }
.offer-tagline { font-family: var(--font-read); font-size: 15.5px; line-height: 1.55; margin-bottom: 12px; }
.offer-audience { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.offer-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 14px; border: 2px solid var(--navy); background: var(--paper); color: var(--navy); font-weight: 800; font-size: 14.5px; text-decoration: none; }
.offer-btn:hover { background: var(--yellow); }
.offer-btn-primary { background: var(--pink); box-shadow: 3px 3px 0 var(--navy); font-size: 15px; }
.offer-btn-primary:hover { background: var(--pink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--navy); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 30px; }
  .hero-side { align-items: flex-start; }
  .hero-side .photo { max-width: 250px; }
  .about-photo img { height: 220px; }
  .frame iframe { height: 340px; }
}
/* four services: 4 across, 2 x 2, or stacked; never 3 + 1 */
@media (min-width: 561px) and (max-width: 1099px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* tablet: keep the photo beside the words */
@media (min-width: 561px) and (max-width: 860px) {
  .hero { grid-template-columns: 1fr 240px; gap: 36px; }
  .hero-side .photo { max-width: none; }
}
/* phone: the name and the photo share the first screen; everything else runs full width */
@media (max-width: 560px) {
  .hero { grid-template-columns: minmax(0, 1fr) 38%; gap: 0 18px; align-items: start; padding: 14px 0 40px; }
  .hero > div:first-child, .hero-side { display: contents; }
  .hero .role { grid-column: 1; grid-row: 1; align-self: end; }
  .hero h1 { grid-column: 1; grid-row: 2; font-size: clamp(3.2rem, 17vw, 4.6rem); margin: 8px 0 0; }
  .hero .photo { grid-column: 2; grid-row: 1 / 3; align-self: end; max-width: none; box-shadow: 6px 6px 0 var(--pink); }
  .hero .tagline { grid-column: 1 / -1; margin-top: 24px; font-size: 1.15rem; }
  .hero .badges { grid-column: 1 / -1; margin-bottom: 22px; }
  .hero .btn { grid-column: 1 / -1; justify-self: start; }
  .ai-ready { grid-column: 1 / -1; justify-content: flex-start; margin-top: 14px; }
}
@media (max-width: 480px) {
  .masthead .lede { font-size: 1.05rem; }
  .grid3, .grid3.books, .offer-grid { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr; }
  .roles li { flex-direction: column; gap: 6px; }
  .book-item > img { flex-basis: 88px; width: 88px; }
  .faq-body { padding-right: 0; }
  .timeline li { padding-left: 24px; }
  .minis div { min-width: 0; flex: 1 1 90px; }
}
