/* V13.41 — PL | EN switch, home hero brand line, "translation in progress" bar.
   Loaded on every page (added by scripts/v13-16-i18n.mjs). */

/* ---------- PL | EN switch (two plain links; the active language is a non-clickable span) ---------- */
.cg-language.cg-lang-switch{display:flex;align-items:center;gap:0;margin-left:18px;position:relative;z-index:1002;font-family:inherit;font-size:12px;font-weight:700;letter-spacing:.12em;line-height:1;white-space:nowrap}
.cg-lang-switch .cg-lang-opt{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 10px;color:#8d8a84;text-decoration:none;border-bottom:2px solid transparent;transition:color .15s,border-color .15s}
.cg-lang-switch a.cg-lang-opt:hover,.cg-lang-switch a.cg-lang-opt:focus-visible{color:#fff;border-bottom-color:rgba(255,255,255,.35);outline:none}
.cg-lang-switch .cg-lang-opt.is-active{color:#fff;border-bottom-color:#c4262b;cursor:default}
.cg-lang-switch .cg-lang-sep{color:rgba(255,255,255,.28);font-weight:400;user-select:none}
.cg-lang-switch .cg-l-long{display:none}
/* Phones: one square button with the OTHER language in red (white frame), in line with the header icons */
@media(max-width:700px){
  html body .site-header .cg-lang-switch{margin-left:auto;margin-right:6px}
  html body .site-header .cg-media-shortcuts{margin-left:0}
  .cg-lang-switch .cg-lang-opt.is-active,.cg-lang-switch .cg-lang-sep{display:none}
  .cg-lang-switch a.cg-lang-opt{width:40px;height:40px;min-height:0;min-width:0;padding:0;box-sizing:border-box;border:1px solid #fff;color:#e5383b;font-size:12px;letter-spacing:.06em}
  .cg-lang-switch a.cg-lang-opt:hover,.cg-lang-switch a.cg-lang-opt:focus-visible{color:#ff5a5e;border-color:#fff;background:rgba(229,56,59,.14);outline:none}
  html[data-theme="light"] .cg-lang-switch a.cg-lang-opt{color:#a51d21;border-color:#171717;background:transparent}
  html[data-theme="light"] .cg-lang-switch a.cg-lang-opt:hover,html[data-theme="light"] .cg-lang-switch a.cg-lang-opt:focus-visible{color:#7d1518;border-color:#171717;background:rgba(165,29,33,.08)}
}
html[data-theme="light"] .cg-lang-switch .cg-lang-opt{color:#666}
html[data-theme="light"] .cg-lang-switch a.cg-lang-opt:hover,html[data-theme="light"] .cg-lang-switch a.cg-lang-opt:focus-visible{color:#0e0e0e;border-bottom-color:rgba(0,0,0,.35)}
html[data-theme="light"] .cg-lang-switch .cg-lang-opt.is-active{color:#0e0e0e;border-bottom-color:#a51d21}
html[data-theme="light"] .cg-lang-switch .cg-lang-sep{color:rgba(0,0,0,.3)}

/* ---------- Home hero: brand line + phrase ---------- */
.hero h1.cg-hero-title{font-size:clamp(30px,3.3vw,54px);line-height:1.02;letter-spacing:-.02em;max-width:640px}
.hero h1.cg-hero-title .cg-hero-brand{display:block;margin:0 0 .5em;padding-left:.7em;border-left:.16em solid #c4262b;color:#fff;font-size:.42em;line-height:1;letter-spacing:.2em;font-weight:800}
.hero h1.cg-hero-title .cg-hero-phrase{display:block;color:inherit}
@media(max-width:980px){
  .hero h1.cg-hero-title{font-size:clamp(28px,7.2vw,44px)}
}
@media(max-width:600px){
  .hero h1.cg-hero-title{font-size:clamp(26px,7.4vw,34px)}
  #home .hero h1.cg-hero-title,#home h1.cg-red-title.cg-hero-title{font-size:clamp(26px,7.4vw,34px)}
}
html[data-theme="light"] .hero h1.cg-hero-title .cg-hero-brand{color:#171717}

/* ---------- English pages: one narrow bar above untranslated text ---------- */
.cg-tr-bar{margin:0 0 18px;padding:9px 14px;border-left:3px solid #c4262b;background:rgba(255,255,255,.05);color:#d6d1c7;font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;line-height:1.4}
html[data-theme="light"] .cg-tr-bar{background:rgba(0,0,0,.05);color:#333}

/* ===== E1e: header — logo mark, language next to the media icons, search as an icon, MORE menu fix, MEDIA button on phones ===== */
/* logo mark in front of the wordmark (no markup change; the file sits next to the stylesheet's ../assets) */
.site-header .brand{display:flex;align-items:center}
.site-header .brand::before{content:"";flex:none;width:36px;height:36px;background:url(../assets/cg-logo-header.webp) center/contain no-repeat}
@media(max-width:1439px){.site-header .brand::before{width:34px;height:34px}}
@media(max-width:700px){.site-header .brand::before{width:30px;height:30px;margin-right:0}}
/* desktop: [media icons] [PL | EN] [theme] together on the right */
@media(min-width:981px){
  .site-header .cg-media-shortcuts{order:5;margin-left:0;margin-right:0}
  .site-header .cg-language.cg-lang-switch{order:4;margin-left:auto;margin-right:18px}
  .site-header .cg-theme-toggle{order:6}
}
/* search as a magnifier where the full menu is visible (the drawer below 1160 px keeps the word) */
@media(min-width:1160px){
  .site-header .main-nav a[href$="search/"]{font-size:0;letter-spacing:0;width:22px;min-width:22px;display:inline-flex;align-items:center;justify-content:center}
  .site-header .main-nav a[href$="search/"]::before{content:"";display:block;width:18px;height:18px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") center/contain no-repeat}
}
/* MORE dropdown: the generic ".main-nav a" rule (12px, padding 16px 0) was overriding the menu items (also on production) */
@media(min-width:981px){
  .site-header .main-nav .cg-nav-more-link{display:block;padding:10px 16px;font-size:11px;font-weight:600;line-height:1.2;letter-spacing:.09em;opacity:1;white-space:nowrap}
  .site-header .main-nav .cg-nav-more-menu{padding:6px 0}
}
/* phones: ONE media button; it opens a centred bar with the two shortcuts */
.cg-media-toggle,.cg-media-bar{display:none}
@media(max-width:700px){
  html body .site-header .cg-media-shortcuts a{display:none}
  html body .site-header .cg-media-shortcuts .cg-media-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;margin:0;border:1px solid rgba(255,255,255,.28);border-radius:0;background:transparent;color:#f0eee8;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .cg-media-toggle svg,.cg-media-bar svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  html body .site-header .cg-media-toggle[aria-expanded="true"]{border-color:#c9472b;background:rgba(201,71,43,.16);color:#fff}
  .cg-media-bar{position:fixed;left:0;right:0;z-index:1001;display:flex;justify-content:center;gap:12px;padding:10px 12px;background:#111;border-bottom:1px solid rgba(255,255,255,.16);box-shadow:0 12px 24px rgba(0,0,0,.45)}
  .cg-media-bar[hidden]{display:none}
  .cg-media-bar button{flex:1 1 0;max-width:170px;min-height:46px;display:flex;align-items:center;justify-content:center;gap:10px;padding:0 10px;border:1px solid rgba(255,255,255,.3);border-radius:0;background:transparent;color:#f0eee8;font:600 12px/1 ui-monospace,Menlo,Consolas,monospace;letter-spacing:.12em;cursor:pointer}
  .cg-media-bar button:hover,.cg-media-bar button:focus-visible{border-color:#c9472b;background:rgba(201,71,43,.14);color:#fff;outline:none}
  .cg-media-bar svg{width:19px;height:19px}
  html[data-theme="light"] body .site-header .cg-media-shortcuts .cg-media-toggle{border-color:rgba(26,26,26,.28);color:#181818}
  html[data-theme="light"] body .site-header .cg-media-shortcuts .cg-media-toggle[aria-expanded="true"]{border-color:#a51d21;background:rgba(165,29,33,.1);color:#0e0e0e}
  html[data-theme="light"] .cg-media-bar{background:#f4f3ef;border-bottom-color:rgba(26,26,26,.18);box-shadow:0 12px 24px rgba(0,0,0,.18)}
  html[data-theme="light"] .cg-media-bar button{border-color:rgba(26,26,26,.3);color:#181818}
}

/* V13.42: Polish home hero takes the same footprint as the English one (same number of lines, same line boxes), so both languages sit at the same height */
@media(min-width:1101px){
  html[lang="pl"] #home .hero-content{max-width:860px}
  html[lang="pl"] #home h1.cg-hero-title{max-width:780px}
  html[lang="pl"] #home h1.cg-hero-title .cg-hero-phrase{font-size:.72em;line-height:1.4167}
  html[lang="pl"] #home .hero-copy{font-size:calc(clamp(17px,1.7vw,24px)*.86);line-height:1.686}
}
@media(min-width:701px) and (max-width:1100px){
  html[lang="pl"] #home h1.cg-hero-title .cg-hero-phrase{font-size:.7em;line-height:1.457}
  html[lang="pl"] #home .hero-copy{font-size:calc(clamp(17px,1.7vw,24px)*.86);line-height:1.686}
}
@media(max-width:700px){
  html[lang="pl"] #home h1.cg-hero-title .cg-hero-phrase{font-size:.68em;line-height:1.5}
}
@media(max-width:400px){
  html[lang="pl"] #home .hero-copy{font-size:calc(14.5px*.93);line-height:1.527}
}
