:root{
  --ink:#272727;
  --ink-soft:#30302f;
  --ecru:#fff2cc;
  --blue:#4472c4;
  --aptos:"Aptos", "Segoe UI", Arial, Helvetica, sans-serif;
  --page-pad:clamp(18px, 3vw, 48px);
}

*{ box-sizing:border-box; }
html,body{ margin:0; min-height:100%; }
html{ background:var(--ink); }
body{
  background:var(--ink);
  color:var(--ecru);
  font-family:var(--aptos);
  font-size:16px; /* 12 pt */
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
a{ color:inherit; }
button{ font:inherit; }

.site-shell{
  min-height:100vh;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  background:var(--ink);
}

/* Górny pasek */
.topbar{
  min-height:62px;
  padding:15px var(--page-pad) 13px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  background:var(--ink);
}
.brand{
  text-decoration:none;
  font-size:clamp(18px, 1.45vw, 23px);
  font-weight:400;
  letter-spacing:.005em;
  white-space:nowrap;
}
.topbar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:clamp(12px, 1.6vw, 22px);
  min-width:0;
  flex-wrap:nowrap;
}
.topbar-separator{
  width:1px;
  height:22px;
  flex:0 0 1px;
  background:rgba(255,242,204,.28);
}
.site-tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  white-space:nowrap;
}
.language-switch{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:30px;
}
.language-flag,
.video-mode-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  padding:2px;
  background:transparent;
  text-decoration:none;
  border-radius:2px;
  opacity:.8;
  transition:opacity .18s ease, transform .18s ease, background .18s ease;
}
.language-flag img{
  display:block;
  width:30px;
  height:20px;
  object-fit:cover;
  box-shadow:0 0 0 1px rgba(255,242,204,.18);
}
.language-flag:hover,
.language-flag:focus-visible,
.video-mode-toggle:hover,
.video-mode-toggle:focus-visible{
  opacity:1;
  transform:translateY(-1px);
  outline:none;
  background:rgba(255,242,204,.05);
}
.language-flag.is-disabled{
  opacity:.28;
  cursor:not-allowed;
  filter:saturate(.55);
}
.language-flag.is-disabled:hover{ transform:none; background:transparent; }
.video-mode-toggle img{
  display:block;
  width:27px;
  height:27px;
  object-fit:contain;
}
.nav{
  display:flex;
  align-items:center;
  gap:clamp(18px, 2.7vw, 40px);
}
.nav a{
  position:relative;
  text-decoration:none;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  white-space:nowrap;
  opacity:.84;
}
.nav a::after{
  content:"";
  position:absolute;
  left:0;
  right:100%;
  bottom:-7px;
  height:1px;
  background:var(--blue);
  transition:right .22s ease;
}
.nav a:hover,
.nav a.is-current{ opacity:1; }
.nav a:hover::after,
.nav a.is-current::after{ right:0; }

/* Okno z filmem. Na desktopie wypełnia wolną wysokość ekranu. */
.hero-wrap{
  min-height:0;
  padding:10px var(--page-pad);
  display:flex;
  align-items:stretch;
}
.hero-stage{
  position:relative;
  width:100%;
  min-height:0;
  height:100%;
  overflow:hidden;
  background:var(--ink-soft);
  isolation:isolate;
}
.video-stack,
.hero-video,
.video-shade{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.video-stack,
.hero-video{
  pointer-events:none;
}
.hero-wrap,
.hero-stage{
  touch-action:pan-y pinch-zoom;
}

.hero-video{
  object-fit:cover;
  opacity:0;
  transition:opacity .65s ease;
  background:var(--ink-soft);
}
.hero-video.is-active{ opacity:1; }
.video-shade{
  pointer-events:none;
  background:linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.02) 55%, rgba(0,0,0,.18) 100%);
}

/* Wspólna karta treści */
.content-panel{
  position:absolute;
  z-index:5;
  left:clamp(16px, 2.3vw, 36px);
  bottom:clamp(16px, 2.3vw, 36px);
  width:min(650px, calc(100% - 32px));
  max-height:calc(100% - 32px);
  padding:30px 34px;
  overflow:auto;
  overscroll-behavior:contain;
  background:rgba(39,39,39,.97);
  color:var(--ecru);
  box-shadow:0 12px 34px rgba(0,0,0,.24);
  opacity:0;
  transform:translateY(7px);
  transition:opacity .2s ease, transform .2s ease;
  scrollbar-width:thin;
  scrollbar-color:var(--blue) rgba(255,242,204,.12);
}
.content-panel.is-visible{
  opacity:1;
  transform:none;
}
.content-panel[hidden]{ display:none; }

.content-panel h2{
  margin:0 0 22px;
  padding-bottom:11px;
  border-bottom:1px solid var(--blue);
  font-size:24px; /* odpowiednik ok. 18 pt */
  line-height:1.12;
  font-weight:400;
  letter-spacing:0;
}

/* Strona startowa */
.content-panel--home{
  left:50%;
  right:auto;
  top:50%;
  bottom:auto;
  width:min(680px, calc(100% - 32px));
  padding:25px 30px 27px;
  transform:translate(-50%, calc(-50% + 7px));
}
.content-panel--home.is-visible{
  transform:translate(-50%, -50%);
}
.home-title{
  margin:0 0 18px;
  font-size:24px;
  line-height:1.15;
  font-weight:400;
}
.home-text{
  margin:0;
  font-size:16px; /* 12 pt */
  line-height:1.52;
  text-align:left;
}
.home-text span{ display:block; }

/* O KANCELARII */
.content-panel--about{
  width:min(820px, calc(100% - 32px));
  padding:30px 52px 26px;
}
.about-cards{ position:relative; }
.about-card{ display:none; }
.about-card.is-active{ display:block; animation:cardIn .2s ease both; }
@keyframes cardIn{
  from{ opacity:0; transform:translateX(6px); }
  to{ opacity:1; transform:none; }
}
.about-card p{
  margin:0 0 12px;
  text-align:justify;
  font-size:16px;
  line-height:1.48;
  hyphens:auto;
}
.bio-flow::after{ content:""; display:block; clear:both; }
.portrait{
  float:left;
  width:190px;
  max-width:33%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  margin:1px 24px 10px 0;
  border:0;
}

.card-arrow{
  position:absolute;
  z-index:9;
  top:50%;
  transform:translateY(-50%);
  width:38px;
  height:58px;
  border:0;
  padding:0;
  background:transparent;
  color:var(--blue);
  font-family:var(--aptos);
  font-size:47px;
  font-weight:300;
  line-height:1;
  cursor:pointer;
  opacity:.8;
}
.card-arrow:hover,
.card-arrow:focus-visible{ opacity:1; outline:none; }
.card-arrow--prev{ left:5px; }
.card-arrow--next{ right:5px; }
.card-count{
  margin-top:12px;
  text-align:right;
  font-size:10px;
  letter-spacing:.1em;
  color:rgba(255,242,204,.58);
}

.experience-list{
  margin:0;
  padding:0;
  columns:2;
  column-gap:34px;
  font-size:16px;
  line-height:1.42;
  text-align:justify;
  hyphens:auto;
}
.experience-list li{
  list-style:none;
  break-inside:avoid;
  position:relative;
  margin:0 0 10px;
  padding-left:15px;
}
.experience-list li::before{
  content:"■";
  position:absolute;
  left:0;
  top:.05em;
  color:var(--ecru);
  font-size:.58em;
}

.education-list{
  margin:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px 42px;
}
.education-list div{
  min-width:0;
  padding:0;
}
.education-list dt,
.education-list dd{
  margin:0;
  font-size:16px;
  line-height:1.4;
}
.education-list dt{ font-weight:400; }
.education-list dd{
  margin-top:2px;
  color:rgba(255,242,204,.78);
}

/* PRAKTYKA */
.content-panel--practice{
  width:min(740px, calc(100% - 32px));
}
.practice-card{ display:none; }
.practice-card.is-active{ display:block; animation:cardIn .2s ease both; }
.practice-tiles{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:2px;
}
.practice-tile{
  min-height:88px;
  padding:16px 18px;
  border:1px solid rgba(68,114,196,.8);
  background:rgba(255,242,204,.03);
  color:var(--ecru);
  cursor:pointer;
  text-align:left;
  font-size:16px;
  line-height:1.35;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  transition:background .18s ease, border-color .18s ease, transform .18s ease;
}
.practice-tile:hover,
.practice-tile:focus-visible{
  background:rgba(68,114,196,.12);
  border-color:var(--blue);
  transform:translateY(-1px);
  outline:none;
}
.practice-copy p{
  margin:0 0 18px;
  font-size:16px;
  line-height:1.54;
  text-align:justify;
  hyphens:auto;
}
.practice-copy p:last-child{ margin-bottom:0; }
.practice-back{
  display:inline-block;
  margin:0 0 11px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--blue);
  cursor:pointer;
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.practice-back:hover,
.practice-back:focus-visible{ color:#6f98df; outline:none; }

/* KONTAKT + formularz kontaktowy */
.content-panel--contact{
  width:min(560px, calc(100% - 32px));
  padding:0;
  overflow:visible;
  background:transparent;
  box-shadow:none;
  transition:opacity .2s ease, transform .2s ease, width .25s ease;
}
.content-panel--contact.has-form{
  width:min(1160px, calc(100% - 32px));
}
.contact-layout{
  display:grid;
  grid-template-columns:minmax(0, 560px);
  gap:18px;
  align-items:end;
}
.content-panel--contact.has-form .contact-layout{
  grid-template-columns:minmax(0, 560px) minmax(0, 560px);
}
.contact-card,
.contact-form-card{
  position:relative;
  padding:28px 32px 30px;
  background:rgba(39,39,39,.97);
  box-shadow:0 12px 34px rgba(0,0,0,.24);
  color:var(--ecru);
}
.contact-form-card{
  animation:contactIn .22s ease both;
}
.contact-form-card[hidden]{ display:none; }
@keyframes contactIn{
  from{ opacity:0; transform:translateX(12px); }
  to{ opacity:1; transform:none; }
}
.contact-title,
.contact-form-title{
  margin:0;
  padding-bottom:0 !important;
  border-bottom:0 !important;
  font-size:24px;
  line-height:1.15;
  font-weight:400;
}
.contact-rule{
  height:1px;
  background:var(--blue);
  margin:18px 0 23px;
}
.contact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px 32px;
  align-items:start;
  font-size:16px;
}
.contact-grid address{ font-style:normal; }
.contact-grid a{ text-underline-offset:3px; }
.contact-util{
  text-decoration:underline;
  color:var(--blue);
}
.contact-cta,
.contact-submit{
  width:100%;
  display:block;
  margin-top:27px;
  padding:8px 12px 7px;
  border:1px solid var(--ecru);
  background:transparent;
  color:var(--ecru);
  text-align:center;
  text-decoration:none;
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, border-color .18s ease;
}
.contact-cta:hover,
.contact-cta:focus-visible,
.contact-submit:hover,
.contact-submit:focus-visible{
  background:var(--ecru);
  color:var(--ink);
  border-color:var(--ecru);
  outline:none;
}
.contact-form-close{
  position:absolute;
  top:15px;
  right:18px;
  border:0;
  background:transparent;
  color:rgba(255,242,204,.62);
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.contact-form-close:hover,
.contact-form-close:focus-visible{ color:var(--ecru); outline:none; }
.contact-form{ margin:0; }
.form-row--two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px;
}
.form-field{
  display:block;
  margin:0 0 26px;
  font-size:16px;
}
.form-field span{ display:block; margin-bottom:7px; }
.form-field input,
.form-field textarea{
  width:100%;
  border:0;
  border-bottom:1px solid var(--blue);
  border-radius:0;
  padding:5px 2px 7px;
  background:transparent;
  color:var(--ecru);
  font:inherit;
  outline:none;
}
.form-field input:focus,
.form-field textarea:focus{ border-bottom-color:#6f98df; }
.form-field--message{ margin-top:4px; }
.form-field textarea{
  min-height:120px;
  resize:vertical;
}
.contact-form-status{
  min-height:1.5em;
  margin:10px 0 0;
  font-size:13px;
  color:rgba(255,242,204,.82);
}
.contact-form-status.is-error{ color:#ffd6d6; }
.contact-form-status.is-success{ color:#d9ffd9; }

/* Polityka prywatności — trzy karty na tle strony. */
.privacy-layer{
  position:fixed;
  z-index:50;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(18px, 4vw, 54px);
  background:rgba(18,18,18,.62);
  backdrop-filter:blur(2px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.privacy-layer[hidden]{ display:none; }
.privacy-panel{
  position:relative;
  width:min(920px, 100%);
  max-height:min(86vh, 820px);
  padding:30px 56px 26px;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  background:rgba(39,39,39,.985);
  color:var(--ecru);
  box-shadow:0 18px 50px rgba(0,0,0,.42);
  scrollbar-width:thin;
  scrollbar-color:var(--blue) rgba(255,242,204,.12);
}
.privacy-panel:focus{ outline:none; }
.privacy-card{ display:none; }
.privacy-card.is-active{ display:block; animation:cardIn .2s ease both; }
.privacy-card h2{
  margin:0 0 20px;
  padding-bottom:11px;
  border-bottom:1px solid var(--blue);
  font-size:24px;
  line-height:1.12;
  font-weight:400;
}
.privacy-card p,
.privacy-bullets{
  font-size:16px;
  line-height:1.48;
  text-align:justify;
  hyphens:auto;
}
.privacy-card p{ margin:0 0 12px; }
.privacy-numbered{ padding-left:0; }
 .privacy-bullets{
  margin:5px 0 14px;
  padding:0;
  list-style:none;
}
.privacy-bullets li{
  position:relative;
  margin:0 0 7px;
  padding-left:17px;
}
.privacy-bullets li::before{
  content:"■";
  position:absolute;
  left:0;
  top:.12em;
  color:var(--ecru);
  font-size:.58em;
}
.privacy-close{
  position:absolute;
  top:13px;
  right:16px;
  z-index:3;
  border:0;
  padding:2px 6px;
  background:transparent;
  color:var(--blue);
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.privacy-close:hover,
.privacy-close:focus-visible{ color:var(--ecru); outline:none; }
.privacy-arrow--prev{ left:7px; }
.privacy-arrow--next{ right:7px; }
.privacy-count{ margin-top:10px; }
body.privacy-open{ overflow:hidden !important; }

/* Dolny pasek */
.footer{
  min-height:38px;
  padding:9px var(--page-pad) 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  font-size:10px;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:rgba(255,242,204,.86);
  background:var(--ink);
}
.footer-left{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}
.footer-privacy{
  border:0;
  padding:0;
  background:transparent;
  color:rgba(255,242,204,.72);
  font:inherit;
  letter-spacing:inherit;
  text-transform:inherit;
  cursor:pointer;
  text-decoration:none;
}
.footer-privacy:hover,
.footer-privacy:focus-visible{
  color:var(--ecru);
  text-decoration:underline;
  text-underline-offset:3px;
  outline:none;
}
.footer-note{ opacity:.7; text-decoration:none; }
.footer a.footer-note:hover{ opacity:1; text-decoration:underline; text-underline-offset:3px; }

/* Na typowym ekranie desktopowym cała kompozycja mieści się w jednym oknie. */
@media (min-width:901px) and (hover:hover) and (pointer:fine){
  html,body{ height:100%; overflow:hidden; }
  .site-shell{ height:100dvh; min-height:0; }
}

@media (max-width:900px), (hover:none) and (pointer:coarse){
  html{ min-height:100%; height:auto; overflow-x:hidden; overflow-y:auto; overscroll-behavior-y:auto; }
  body{ min-height:100%; height:auto; overflow:visible; touch-action:auto; }
  .site-shell{ min-height:100vh; height:auto; overflow:visible; touch-action:auto; }
  .topbar{
    align-items:flex-start;
    flex-direction:column;
    gap:12px;
  }
  .topbar-actions{
    width:100%;
    justify-content:flex-start;
    gap:12px;
    flex-wrap:nowrap;
  }
  .nav{ justify-content:flex-start; gap:clamp(12px, 3vw, 24px); }
  .site-tools{ margin-left:0; }
  .hero-wrap{
    min-height:calc(100svh - 120px);
    height:auto;
    padding:14px var(--page-pad);
    align-items:flex-start;
    overflow:visible;
    touch-action:auto;
  }
  .hero-stage{
    min-height:730px;
    height:auto;
    overflow:visible;
    touch-action:auto;
  }

  /* Android: strona startowa nie może być osobnym scrollerem.
     Gest pionowy ma przechodzić do natywnego scrolla dokumentu. */
  .content-panel--home{
    overflow:visible;
    overscroll-behavior:auto;
    touch-action:auto;
  }
  /* Na telefonach/tabletach długie karty uczestniczą w przepływie strony.
     Dzięki temu przewija się cała strona, a nie trudno dostępne wewnętrzne okno. */
  .content-panel:not(.content-panel--home){
    position:relative;
    left:auto;
    right:auto;
    top:auto;
    bottom:auto;
    width:calc(100% - 28px);
    max-height:none;
    margin:14px;
    overflow:visible;
    overscroll-behavior:auto;
    touch-action:auto;
    transform:none !important;
    opacity:1;
  }
  .content-panel--about{ padding:30px 52px 26px; }
  .experience-list{ columns:1; }
  .content-panel--contact,
  .content-panel--contact.has-form{
    width:calc(100% - 28px);
    max-height:none;
    overflow:visible;
  }
  .content-panel--contact.has-form .contact-layout{ grid-template-columns:1fr; }
  /* Polityka prywatności: na urządzeniach dotykowych tylko warstwa zewnętrzna
     przewija się pionowo. Usuwamy zagnieżdżony scroll karty, który na części
     Androidów zatrzymywał gest przesuwania. */
  .privacy-layer{
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:auto;
    touch-action:pan-y;
    -webkit-overflow-scrolling:touch;
    backdrop-filter:none;
  }
  .privacy-panel{
    max-height:none;
    overflow:visible;
    overscroll-behavior:auto;
    touch-action:auto;
    -webkit-overflow-scrolling:auto;
  }
  body.privacy-open{ overflow:visible !important; }
}

@media (max-width:620px){
  :root{ --page-pad:15px; }
  .topbar{ min-height:auto; padding:14px var(--page-pad) 13px; }
  .brand{ font-size:19px; }
  .nav a{ font-size:9px; letter-spacing:.08em; }
  .topbar-actions{ gap:8px; overflow-x:auto; scrollbar-width:none; }
  .topbar-actions::-webkit-scrollbar{ display:none; }
  .nav{ gap:9px; }
  .nav a{ font-size:8.5px; }
  .topbar-separator{ height:18px; }
  .site-tools{ gap:7px; }
  .language-flag img{ width:28px; height:18px; }
  .video-mode-toggle img{ width:24px; height:24px; }
  .hero-wrap{ min-height:760px; padding:12px; }
  .hero-stage{ min-height:736px; }
  .content-panel{
    width:calc(100% - 20px);
    padding:24px 22px;
  }
  .content-panel:not(.content-panel--home){
    left:auto;
    right:auto;
    top:auto;
    bottom:auto;
    max-height:none;
    overflow:visible;
    touch-action:auto;
  }
  .content-panel--about{ padding:25px 38px 22px; }
  .content-panel h2,
  .home-title,
  .contact-title{ font-size:22px; }
  .home-text span{ display:inline; }
  .home-text span::after{ content:" "; }
  .portrait{
    float:none;
    display:block;
    width:145px;
    max-width:100%;
    margin:0 0 15px;
  }
  .about-card p,
  .practice-copy p,
  .contact-grid{ font-size:16px; }
  .practice-tiles,
  .education-list,
  .contact-grid{ grid-template-columns:1fr; }
  .practice-tile{ min-height:70px; font-size:16px; padding:14px 15px; }
  .experience-list{ font-size:16px; }
  .card-arrow{ width:30px; font-size:41px; }
  .card-arrow--prev{ left:1px; }
  .card-arrow--next{ right:1px; }
  .content-panel--home{
    left:50%; top:50%; bottom:auto;
    width:calc(100% - 20px);
    max-height:none;
    overflow:visible;
    overscroll-behavior:auto;
    touch-action:auto;
    transform:translate(-50%, calc(-50% + 7px));
  }
  .content-panel--home.is-visible{ transform:translate(-50%, -50%); }
  .content-panel--contact,
  .content-panel--contact.has-form{
    left:auto;
    bottom:auto;
    width:calc(100% - 20px);
    margin:10px;
    padding:0;
    max-height:none;
    overflow:visible;
  }
  .contact-card, .contact-form-card{ padding:24px 22px; }
  .contact-layout,
  .content-panel--contact.has-form .contact-layout{ grid-template-columns:1fr; }
  .form-row--two{ grid-template-columns:1fr; gap:0; }
  .footer{ flex-direction:column; align-items:flex-start; gap:5px; }
  .footer-left{ flex-wrap:wrap; gap:5px 12px; }
  .privacy-layer{ padding:10px; align-items:flex-start; overflow-y:auto; touch-action:pan-y; }
  .privacy-panel{ width:100%; max-height:none; min-height:calc(100svh - 20px); padding:24px 38px 22px; overflow:visible; overscroll-behavior:auto; touch-action:auto; }
  .privacy-card p, .privacy-bullets{ font-size:16px; text-align:left; }
  .privacy-arrow{ top:52%; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto !important;
    transition:none !important;
    animation:none !important;
  }
  .hero-video:not(.is-active){ display:none; }
}
