/*
 * Copyright 2020 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

:root {
  /* font-size - main definition moved to base font sizes section */

  /* colors */
  --color-white: #fff;
  --color-darker-blue: #00274c;
  --color-blue: #27a9de;
  --color-dark-blue: #00203e;
  --color-gold: rgb(247 209 23);
  --color-black: #000;
  --color-mint: rgb(166 214 201);
  --color-orange: rgb(255 148 51);
  --link-color: #035fe6;
  --link-hover-color: #136ff6;
  --background-color: white;


  /* Accordion */
  --color-accordion-title: var(--color-mint);
  --color-accordion-body: var(--color-white);
  --color-accordion-border: var(--color-mint);
  --color-accordion-text: var(--color-dark-blue);
  --color-accordion-hover: var(--color-mint);
  --color-accordion-active: var(--color-mint);  

  /* fonts */
  --body-font-family: 'Montserrat-Regular';
  --thin-font-family: 'Montserrat-thin';
  --body-bold-family: 'Montserrat-bold';
  --heading-font-family: 'Montserrat-Regular';
  --semi-bold-font-family: 'Montserrat-semibold';

  /* body sizes */
  --body-font-size-2xl: 1.75rem;
  --body-font-size-xl: 1.625rem;
  --body-font-size-l: 1.5rem;
  --body-font-size-m: 1.25rem;
  --body-font-size-s: 1.125rem;
  --body-font-size-xs: 1rem;
  --body-font-size-xxs: 0.875rem;
  --body-font-size-3xs: 0.75rem;

  /* heading sizes */
  --heading-font-size-4xl: 7rem; /* 112px */
  --heading-font-size-3xl: 4rem; /* 66px */
  --heading-font-size-xxxl: 3.75rem; /* 60px */
  --heading-font-size-xxl: 3rem; /* 48px */
  --heading-font-size-xl: 2.5rem; /* 40px */
  --heading-font-size-l: 2rem; /* 32px */
  --heading-font-size-m: 1.5rem; /* 24px */
  --heading-font-size-s: 1.25rem; /* 20px */
  --heading-font-size-xs: 1.125rem; /* 18px */

/* Base font sizes */
--font-size-2xs: 0.625rem;    /* 10px */
--font-size-3xs: 0.7rem;    /* 11px */
--font-size-xs: 0.75rem;    /* 12px */
--font-size-sm: 0.875rem;   /* 14px */
--font-size-base: 1rem;     /* 16px */
--font-size-lg: 1.125rem;   /* 18px */
--font-size-xl: 1.25rem;    /* 20px */
--font-size-2xl: 1.5rem;    /* 24px */
--font-size-3xl: 1.875rem;  /* 30px */
--font-size-4xl: 2.25rem;   /* 36px */
--font-size-5xl: 3rem;      /* 48px */
--font-size-6xl: 3.75rem;   /* 60px */

/* Line heights optimized for readability */

/* Smaller text needs relatively more line height for readability */
--line-height-xs: 1.6;      /* For very small text, more spacing helps readability */
--line-height-sm: 1.5;      /* For small text */
--line-height-base: 1.5;    /* Good standard for body text */
--line-height-lg: 1.45;     /* Slightly tighter for larger text */
--line-height-xl: 1.4;      /* For heading text */
--line-height-2xl: 1.3;     /* For larger headings */
--line-height-3xl: 1.2;     /* For very large headings */
--line-height-4xl: 1.15;    /* For display text */
--line-height-5xl: 1.1;     /* For largest display text */
--line-height-6xl: 1.05;    /* For the largest text */

/* Calculated absolute line heights (if you prefer using px values) */
--line-height-xs-px: calc(var(--font-size-xs) * var(--line-height-xs));    /* ~19.2px */
--line-height-sm-px: calc(var(--font-size-sm) * var(--line-height-sm));    /* ~21px */
--line-height-base-px: calc(var(--font-size-base) * var(--line-height-base)); /* 24px */
--line-height-lg-px: calc(var(--font-size-lg) * var(--line-height-lg));    /* ~26.1px */
--line-height-xl-px: calc(var(--font-size-xl) * var(--line-height-xl));    /* 28px */
--line-height-2xl-px: calc(var(--font-size-2xl) * var(--line-height-2xl)); /* ~31.2px */
--line-height-3xl-px: calc(var(--font-size-3xl) * var(--line-height-3xl)); /* 36px */
--line-height-4xl-px: calc(var(--font-size-4xl) * var(--line-height-4xl)); /* ~41.4px */
--line-height-5xl-px: calc(var(--font-size-5xl) * var(--line-height-5xl)); /* 33px */
--line-height-6xl-px: calc(var(--font-size-6xl) * var(--line-height-6xl)); /* ~39.4px */


  /* mobile heading sizes */
  --heading-font-size-mobile-xxxl: 4rem;
  --heading-font-size-mobile-xxl: 3rem;
  --heading-font-size-mobile-xl: 2.5rem;
  --heading-font-size-mobile-l: 2rem;
  --heading-font-size-mobile-m: 1.6rem;
  --heading-font-size-mobile-s: 1.2rem;
  --heading-font-size-mobile-xs: 1rem;

  /* nav height */
  --nav-height: 64px;
  
  /* box-shadow */
  --box-shadow: 0 0 6px 0 rgb(0 0 0 / 50%);
  --border-gold: 1px solid var(--color-gold);
  --border-darker-blue: 1px solid var(--color-darker-blue);

  /* Spaces */
  --space-88: 86px; /* 7rem */
  --space-66: 66px; /* 5.5rem */
  --space-56: 56px; /* 4.67rem */
  --space-46: 46px; /* 3.83rem */
  --space-36: 36px; /* 3rem */
  --space-26: 26px; /* 2.17rem */
  --space-20: 20px; /* 1.67rem */
  --space-16: 16px; /* 1.33rem */
  --space-12: 12px; /* 1rem */
  --space-8: 8px; /* 0.67rem */
  --space-4: 4px; /* 0.33rem */
  --space-2: 2px; /* 0.17rem */
}

@font-face {
  ascent-override: 95%;
  font-family: roboto-fallback;
  size-adjust: 100.06%;
  src: local('Arial');
}

@media (width >= 900px) {
  :root {
    --heading-font-size-xxxl: 60px;
    --heading-font-size-xxl: 50px;
    --heading-font-size-xl: 40px;
    --heading-font-size-l: 36px;
    --heading-font-size-m: 30px;
    --heading-font-size-s: 24px;
    --heading-font-size-xs: 22px;
  }
}

body {
  background-color: var(--color-dark-blue);
  color: var(--color-dark-blue);

  /* Keep body painted under the splash overlay so LCP can measure the early
     hero title. FOUC is still covered by html::before until .appear. */
  display: block;
  font-family: var(--body-font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  margin: 0;
  position: relative;
}

/* Skip link: visually hidden until keyboard focus — no layout change at rest */
.skip-link {
  background: var(--color-dark-blue, #00203e);
  border: 2px solid var(--color-gold, #c9a227);
  color: var(--color-white, #fff);
  font-family: var(--body-font-family);
  font-size: var(--font-size-sm, 0.875rem);
  left: var(--space-8, 0.5rem);
  padding: var(--space-8, 0.5rem) var(--space-16, 1rem);
  position: absolute;
  text-decoration: none;
  top: -100px;
  z-index: 10001;
}

.skip-link:focus,
.skip-link:focus-visible {
  outline: 2px solid var(--color-gold, #c9a227);
  outline-offset: 2px;
  top: var(--space-8, 0.5rem);
}

/* Clear keyboard focus without changing mouse hover look */
:focus-visible {
  outline: 2px solid var(--color-gold, #c9a227);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.appear)::before,
  html:has(body.appear)::after {
    transition: none;
  }
}

/* Page load overlay with logo - shows until body receives 'appear' class.
   Logo width mirrors header .nav-brand img (100px mobile / 128px from 900px). */
html::before {
  background-color: var(--color-dark-blue);

  /* WebP splash logo (~4.7KB) with PNG fallback for older browsers */
  background-image: url('/images/logo-load.png');
  background-image: image-set(
    url('/images/logo-load.webp') type('image/webp'),
    url('/images/logo-load.png') type('image/png')
  );
  background-position: center 42%;
  background-repeat: no-repeat;
  background-size: 150px auto;
  content: '';
  height: 100vh;
  left: 0;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 9999;

  /* transition: opacity 0.5s ease-out, visibility 0.5s ease-out; */
}

@media (width >= 900px) {
  html::before {
    background-size: 128px auto;
  }
}

/* Page load overlay text - sits below the logo above.
   Font styling mirrors header .nav-brand p (same font-family, size, transform). */

/* html::after {
  color: var(--color-white);
  content: 'Prywatna Szkoła Podstawowa\A i Przedszkole';
  font-family: var( --body-font-family);
  font-size: var(--font-size-xs);
  left: 0;
  position: fixed;
  text-align: center;
  text-transform: uppercase;
  top: calc(42% + 65px);
  white-space: pre;
  width: 100vw;
  z-index: 10000;
}

@media (width >= 600px) {
  html::after {
    font-size: var(--font-size-sm);
  }
} */

/* Hide overlay when body receives 'appear' class */
html:has(body.appear)::before,
html:has(body.appear)::after {
  /* opacity: 0; */
  pointer-events: none;
  visibility: hidden;
}

/* Critical first-slide LCP shell (painted from head before scroll-hero.css).
   Must match GSAP resting state (title at 80vh) so later decorate/GSAP does
   not resize the LCP node. */
.scroll-hero .scroll-hero-container {
  background-color: var(--color-dark-blue, #00203e);
  min-height: 100vh;
  position: relative;
  width: 100%;
}

.scroll-hero .screen-section.is-lcp-first {
  background-color: var(--color-dark-blue, #00203e);
  height: 100vh;
  height: 100dvh;
  left: 0;
  overflow: hidden;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1;
}

.scroll-hero .screen-section.is-lcp-first > p {
  margin: 0;
}

.scroll-hero .screen-section.is-lcp-first .screen,
.scroll-hero .screen-section.is-lcp-first .screen-inner {
  height: 100%;
  position: relative;
  width: 100%;
}

.scroll-hero .screen-section.is-lcp-first .strapline {
  color: var(--color-white, #fff);
  left: 0;
  margin: 0 auto;
  position: absolute;
  right: 0;
  text-align: center;
  top: 80vh;
  transform: translateY(-50%);
  width: 90%;
  z-index: 10;
}

.scroll-hero .screen-section.is-lcp-first .main-title {
  font-family: var(--body-font-family);
  font-size: 32px;
  font-weight: normal;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 0 18px rgb(0 0 0 / 25%);
}

.scroll-hero .screen-section.is-lcp-first .title-part {
  display: block;
  margin: 5px 0;
}

.scroll-hero .screen-section.is-lcp-first .title-part-0 {
  font-family: var(--semi-bold-font-family), var(--body-font-family);
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
}

/* body::before {
  background: linear-gradient(
    180deg,
    rgb(0 0 0 / 70%) 0%,
    rgb(0 0 0 / 50%) 50%,
    rgb(0 0 0 / 0%) 100%
  );
  content: "";
  height:200px;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 2;
  } */

/* Splash dismissal is handled by html:has(body.appear)::before */

/* header {
  height: var(--nav-height);
} */

h1, h2, h3,
h4, h5, h6 {
  font-family: var(--heading-font-family);
  font-weight: normal;
  line-height: 1.4;
  margin-bottom: .5em;
  margin-top: 1em;
  scroll-margin: calc(var(--nav-height) + 1em);
}

h1 { 
  font-size: var(--heading-font-size-xl);

  @media (width >= 900px) {
    font-size: var(--heading-font-size-xxl);
  }
}

h2 {
  font-size: var(--heading-font-size-l);
  margin-top: .5em;

  @media (width >= 900px) {
    font-size: var(--heading-font-size-xl);
  }
}

h3 {
    font-size: var(--heading-font-size-m);
    
    @media (width >= 900px) {
        font-size: var(--heading-font-size-l);
  }
}

h4 {
  font-family: var(--body-font-family-light); 
  font-size: var(--heading-font-size-s);

  @media (width >= 900px) {
    font-size: var(--heading-font-size-m);
  }
}

h5 { 
  font-family: var(--heading-font-family);
  font-size: var(--heading-font-size-xs);

  @media (width >= 900px) {
    font-size: var(--heading-font-size-s);
  }
}

h6 { 
    font-size: var(--heading-font-size-xs);
}

p, dl, ol, ul, pre, blockquote {
  margin-bottom: 1em;
  margin-top: 1em;
}

b, strong {
  font-family: var(--body-bold-family);
}

code, pre {
  font-family: var(--fixed-font-family);
  font-size: var(--body-font-size-s);
}

code {
  padding: .125em;
}

pre {
  overflow: scroll;
}

main pre {
  background-color: var(--light-color);
  border-radius: .25em;
  overflow-x: auto;
  padding: 1em;
  white-space: pre;
}

/* links */
a:any-link {
  color: var(--color-black);
  font-family: var(--body-bold-family);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.canvy a {
    color: var(--color-white);
}

a:any-link:hover,
a:any-link:focus {
  color: var(--color-black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

ul {
  list-style-type: square;
  list-style-position: inside;
  margin: 0;
  padding: 0;
}

ul li {
  margin-bottom: var(--space-8);

}

ul li::marker {
  color: var(--color-black);
}

/* buttons */
.button-container{
  & strong a.button{
    border: none;
    font-size: var(--heading-font-size-m);
  }
}

.button-container  a.button:any-link, button {
  background-color: var(--color-dark-blue);
  border: 1px solid var(--color-gold);
  box-sizing: border-box;
  color: var(--color-white);
  cursor: pointer;
  display: inline-block;
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-s);
  font-style: normal;
  font-weight: 600;
  margin: 16px 0;
  overflow: hidden;
  padding: 14px 30px;
  padding: var(--space-16) var(--space-36);
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: wrap;
  position: relative;
  transition: all 0.3s ease;
}

/* Pseudo arrow icon for buttons */
.button-container a.button:any-link::after,
.button-container button::after {
  content: '→';
  color: var(--color-white);
  font-size: 1.2em;
  margin-left: var(--space-8);
  transition: transform 0.3s ease;
  display: inline-block;
}

/* Arrow shift animation on hover and focus */
.button-container a.button:hover::after, 
.button-container a.button:focus::after, 
button:hover::after, 
button:focus::after {
  transform: translateX(4px);
  color: var(--color-white);
}

.button-container a.button:hover, 
.button-container a.button:focus, 
button:hover, 
button:focus  {
  color: var(--color-white);
  cursor: pointer;
}

button:disabled, button:disabled:hover {
  background-color: var(--light-color);
  cursor: unset;
}

a.button.secondary, button.secondary {
  background-color: unset;
  border: 2px solid currentcolor;
  color: var(--text-color)
}

main img {
  height: auto;
  margin: 0;
  max-width: 100%;
  width: auto;
}

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  width: auto;
}

/* sections */
.section {
    background: var(--color-white);
    position: relative;
    z-index: 1;
}

@media (width >= 600px) {
  main .section {
    padding: 0;
  }
}

@media (width >= 900px) {
  .section {
    background: var(--color-white);

    /* padding: 0 0 4rem 0; */
  }
}
    
main .section > div {
  margin-inline: auto;
  max-width: 900px;
}

/* section metadata */
main .section.light,
main .section.highlight {
  background-color: var(--light-color);
}

body.post main .hero-container {
  margin-top: 0;
  position: relative;
}

body.post main .section > div  {
    margin-inline: auto;
    max-width: 900px;
}

body.podstrona footer.footer-wrapper {
  bottom: 0;
  position: fixed;
  width: 100%;
}

body.podstrona main {
    margin-right: 400px;
}

main .default-content-wrapper {
  padding: var(--space-16);

  @media (width >= 900px) {
    padding: var(--space-16) var(--space-36);
  }
}

.yellow, .zolty {
background-color: var(--color-gold);
box-shadow: 0 0 0 100vmax var(--color-gold);
clip-path: inset(0  -100vmax);
}

.orange, .pomarancz {
  background-color: var(--color-orange);
  box-shadow: 0 0 0 100vmax var(--color-orange);
  clip-path: inset(0  -100vmax);
}

.mint, .mintowy {
  background-color: var(--color-mint);
  box-shadow: 0 0 0 100vmax var(--color-mint);
  clip-path: inset(0  -100vmax);
}

.dark-blue, .ciemny-niebieski {
  background-color: var(--color-dark-blue);
  color: var(--color-white);
  box-shadow: 0 0 0 100vmax var(--color-dark-blue);
  clip-path: inset(0  -100vmax);
}

.canvy {
    background-color: #3552C8;
    color: var(--color-white);
    box-shadow: 0 0 0 100vmax #3552C8;
    clip-path: inset(0  -100vmax);
  }

  .canvy li::marker {
    color: var(--color-white);
  }


/* Text alignment from Google Docs - Global styles */
[data-align="left"] {
  text-align: left;
}

[data-align="center"] {
  text-align: center;
}

[data-align="right"] {
  text-align: right;
}

[data-align="justify"] {
  text-align: justify;
}

/* Ensure all child elements inherit the alignment */
[data-align="left"] * {
  text-align: left;
}

[data-align="center"] * {
  text-align: center;
}

[data-align="right"] * {
  text-align: right;
}

[data-align="justify"] * {
  text-align: justify;
}