/* ============================================================
   Strona główna (index) — ładowany tylko na front page / stronie „start".
   Bloki ACF (usługi, realizacje) mają własny CSS w inc/blocks/.
   Dwukolumnowe układy: dopasowanie proporcji przez flex-grow kolumn.
   ============================================================ */

/* ---------- Nagłówek przezroczysty nad hero (klasa body: has-hero-header, is-scrolled z home.js) ---------- */
.has-hero-header .ct-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 30;
  transition: background .25s ease, border-color .25s ease;
}
.has-hero-header:not(.is-scrolled) .ct-header,
.has-hero-header:not(.is-scrolled) .ct-header [data-row] {
  background: transparent !important;
  border-color: transparent !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.has-hero-header:not(.is-scrolled) .ct-header .ct-menu-link,
.has-hero-header:not(.is-scrolled) .ct-header .site-title a,
.has-hero-header:not(.is-scrolled) .ct-header .ct-header-text,
.has-hero-header:not(.is-scrolled) .ct-header .ct-icon-container {
  color: var(--wp--preset--color--white) !important;
}
.has-hero-header:not(.is-scrolled) .ct-header .eniverse-icon-btn,
.has-hero-header:not(.is-scrolled) .ct-header .ct-header-cart > a,
.has-hero-header:not(.is-scrolled) .ct-header .ct-header-account > a {
  border-color: rgba(255, 255, 255, .4);
  color: var(--wp--preset--color--white);
}
.has-hero-header:not(.is-scrolled) .ct-header .ct-menu-link:hover { color: var(--wp--preset--color--accent) !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 92px;
  padding-bottom: 0;
  color: var(--wp--preset--color--white);
  background-color: #04060A;
  background-image:
    radial-gradient(ellipse 900px 320px at 50% 108%, rgba(226, 11, 12, .65), rgba(226, 11, 12, 0) 70%),
    linear-gradient(180deg, rgba(4, 6, 10, .25) 0%, rgba(4, 6, 10, .5) 55%, rgba(4, 6, 10, .88) 100%),
    url('../../img/hero-bg-top.jpg');
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center bottom, center, center top;
  background-repeat: no-repeat;
}

.hero__cols { gap: 72px; align-items: center; margin: 0; }
.wp-block-columns.hero__cols > .hero__col--text   { flex-grow: 1.08; }
.wp-block-columns.hero__cols > .hero__col--visual { flex-grow: .92; }

.hero__col--text { padding-top: 20px; animation: riseIn .7s ease both; }

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 40px;
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .65);
}
.hero__eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--wp--preset--color--accent); }

.hero .hero__title {
  margin: 0 0 32px;
  font-size: clamp(2rem, 1.1rem + 3.6vw, 3.75rem);
  line-height: .96;
  letter-spacing: .045em;
  color: var(--wp--preset--color--white);
  text-wrap: balance;
}

.hero__lead {
  max-width: 520px;
  margin: 0 0 44px;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .82);
  text-wrap: pretty;
}

.hero__actions { gap: 16px; padding-bottom: 30px; }
.hero__actions .wp-block-button__link { padding: 19px 28px; }
.hero .wp-block-button.is-style-fill .wp-block-button__link:hover {
  background: transparent;
  border-color: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--white);
}

/* Prawa strona: dekoracyjny „kod" + 4 boksy */
.hero__visual { position: relative; }

.hero__code {
  position: absolute;
  top: 50%;
  right: 34px;
  width: 460px;
  height: 460px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  transform: translateY(-50%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.hero__code pre {
  margin: 0;
  padding: 0;
  background: none;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: .78rem;
  line-height: 1.85;
  letter-spacing: 0;
  white-space: pre;
  color: rgba(255, 255, 255, .14);
  animation: codeScroll 14s linear infinite;
}
.hero__code .k { color: rgba(226, 11, 12, .4); }
.hero__code .p { color: rgba(255, 255, 255, .22); }

@keyframes codeScroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 152px);
  gap: 10px;
  width: max-content;
  margin-left: auto;
}

.stat-box {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  aspect-ratio: 1;
  padding: 18px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.stat-box--accent { background: rgba(226, 11, 12, .4); border-color: rgba(226, 11, 12, .5); }
.stat-box__value { margin: 0; font-size: 1.4375rem; font-weight: 500; line-height: 1.4; color: var(--wp--preset--color--white); }
.stat-box__label { margin: 6px 0 0; font-size: .5625rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; color: rgba(255, 255, 255, .55); }
.stat-box--accent .stat-box__label { color: rgba(255, 255, 255, .7); }

/* Pasek zaufania */
.hero__trust {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-top: 64px;
  padding: 28px 0 56px;
  border-top: 1px solid rgba(255, 255, 255, .15);
}
.hero__trust-label { margin: 0; font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; color: rgba(255, 255, 255, .55); }
.hero__logos {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .9);
}
.hero__logos p { margin: 0; transition: color .18s ease; }
.hero__logos p:hover { color: var(--wp--preset--color--accent); }

/* ---------- O nas ---------- */
.onas__cols { gap: 80px; align-items: flex-start; margin: 0; }
.wp-block-columns.onas__cols > .onas__text { flex-grow: 1; }
.wp-block-columns.onas__cols > .onas__list { flex-grow: 1.25; }

.onas__text .is-style-eyebrow { margin-bottom: 28px; }
.onas__text .wp-block-heading { margin-bottom: 22px; text-wrap: balance; }
.onas__text .lead { max-width: 400px; margin-bottom: 36px; }

.onas-link.link-arrow a {
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--wp--preset--color--black);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  transition: color .18s ease, border-color .18s ease;
}
.onas-link.link-arrow a:hover { border-color: var(--wp--preset--color--accent); }

.feature-list {
  display: grid;
  gap: 1px;
  background: var(--wp--preset--color--border);
  border-block: 1px solid var(--wp--preset--color--border);
}
.feature-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0;
  background: var(--wp--preset--color--white);
}
.feature-row__num { margin: 0; padding-left: 4px; font-size: .6875rem; letter-spacing: .16em; color: var(--wp--preset--color--accent); }
.feature-row__title { margin: 0 0 8px; }
.feature-row__text { max-width: 520px; margin: 0; font-size: 1rem; line-height: 1.65; color: rgba(26, 26, 26, .7); }

/* ---------- Usługi (ciemna sekcja z tłem) ---------- */
.services-section {
  color: var(--wp--preset--color--white);
  background-color: #04060A;
  background-image:
    linear-gradient(180deg, rgba(4, 6, 10, .25) 0%, rgba(4, 6, 10, .5) 55%, rgba(4, 6, 10, .88) 100%),
    url('../../img/hero-bg-top.jpg');
  background-size: 100% 100%, cover;
  background-position: center, center top;
  background-repeat: no-repeat;
}
.services-section .is-style-eyebrow { color: rgba(255, 255, 255, .55); }
.services-section .wp-block-heading { color: var(--wp--preset--color--white); }

/* ---------- Nagłówki sekcji: eyebrow + H2 ---------- */
.section-head .is-style-eyebrow { margin-bottom: 24px; }
.section-head .wp-block-heading { margin: 0; }
.section-head .lead { margin-top: 14px; max-width: 480px; }
.section-head .section-head__aside { max-width: 430px; margin-top: 0; }

/* ---------- Referencje ---------- */
.testimonials-section { background: linear-gradient(180deg, var(--wp--preset--color--white) 70%, var(--wp--preset--color--surface) 70%); }

.testimonials { gap: 20px; margin: 0; }
.testimonials > .wp-block-column { display: flex; }

.testimonials .testimonial.is-style-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 36px 32px;
  box-shadow: 0 -10px 20px -12px rgba(0, 0, 0, .12), -10px 0 20px -12px rgba(0, 0, 0, .1), 10px 0 20px -12px rgba(0, 0, 0, .1);
  transition: border-color .2s ease;
}
.testimonial::before {
  content: "\201E";
  margin-bottom: 20px;
  font-family: var(--wp--preset--font-family--heading);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--wp--preset--color--accent);
}
.testimonial::after {
  content: "";
  position: absolute;
  top: 24px;
  right: 24px;
  width: 22px;
  height: 22px;
  opacity: .3;
  background: url('../../img/icon-chat.png') center / contain no-repeat;
}
.testimonial__text { flex: 1; margin: 0 0 32px; font-size: 1.0625rem; line-height: 1.7; text-wrap: pretty; }
.testimonial__author { padding-top: 18px; border-top: 1px solid var(--wp--preset--color--border); }
.testimonial__name { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--wp--preset--color--black); }
.testimonial__role { margin: 6px 0 0; font-size: .625rem; letter-spacing: .16em; text-transform: uppercase; line-height: 1.5; color: var(--wp--preset--color--muted); }

/* ---------- FAQ ---------- */
.faq__cols { gap: 80px; align-items: flex-start; margin: 0; }
.wp-block-columns.faq__cols > .faq__intro { flex-grow: .8; }
.wp-block-columns.faq__cols > .faq__list  { flex-grow: 1.4; }

.faq__sticky { position: sticky; top: 120px; }
.faq__sticky .is-style-eyebrow { margin-bottom: 24px; }
.faq__sticky .wp-block-heading { margin-bottom: 20px; text-wrap: balance; }
.faq__sticky .lead { max-width: 320px; font-size: 1rem; }

/* ---------- Blog (core/query) ---------- */
.blog-query .wp-block-post-template { gap: 20px; margin: 0; padding: 0; list-style: none; }
.blog-card {
  position: relative;
  height: 100%;
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--border);
  transition: border-color .2s ease, transform .2s ease;
}
.blog-card:hover { border-color: var(--wp--preset--color--accent); transform: translateY(-4px); }
.blog-card__image { margin: 0; background: var(--wp--preset--color--border); }
.blog-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-card__body { padding: 26px 28px 30px; }
.blog-card__meta { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: .625rem; letter-spacing: .16em; text-transform: uppercase; }
.blog-card__cat { position: relative; z-index: 1; margin: 0; }
.blog-card__cat a { color: var(--wp--preset--color--accent); }
.blog-card__date { margin: 0; color: var(--wp--preset--color--muted); }
.blog-card__title { margin: 0; font-size: 1.375rem; line-height: 1.15; }
.blog-card__title a { color: var(--wp--preset--color--black); }
.blog-card__title a::after { content: ""; position: absolute; inset: 0; }

/* ---------- CTA „Zrealizuj swój projekt" ---------- */
.cta-card { overflow: hidden; border: 1px solid var(--wp--preset--color--border); }

.cta-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 32px;
  background: var(--wp--preset--color--black);
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cta-card__bar p { margin: 0; }
.cta-card__bar-title { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--wp--preset--color--white); }
.cta-card__bar-title::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--wp--preset--color--accent); }
.cta-card__bar-note { white-space: nowrap; color: rgba(255, 255, 255, .45); }

.cta-card__body { padding: 56px 56px 44px; }
.cta-card__title { max-width: 760px; margin: 0 0 22px; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.5rem); line-height: 1.15; text-wrap: balance; }
.cta-card__lead { max-width: 640px; margin: 0 0 36px; font-size: 1rem; line-height: 1.7; color: rgba(26, 26, 26, .72); text-wrap: pretty; }

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 48px;
  max-width: 780px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.check-list li { position: relative; padding-left: 27px; font-size: .9375rem; line-height: 1.5; }
.check-list li::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 15px;
  height: 15px;
  background: var(--wp--preset--color--accent);
  -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.5'%3E%3Cpath d='M5 12l4 4L19 7'/%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.5'%3E%3Cpath d='M5 12l4 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cta-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.cta-card__mail { margin: 0; font-size: .875rem; color: var(--wp--preset--color--muted); }
.cta-card__mail a { color: var(--wp--preset--color--ink); text-decoration: underline; }
.cta-card__mail a:hover { color: var(--wp--preset--color--accent); }

.cta-card__note {
  margin: 0;
  padding: 20px 56px;
  background: var(--wp--preset--color--surface);
  border-top: 1px solid var(--wp--preset--color--border);
  font-size: .8125rem;
  line-height: 1.6;
  color: rgba(26, 26, 26, .75);
}

/* ---------- RWD ---------- */
@media (max-width: 1024px) {
  .hero { padding-top: 56px; }
  .hero__cols { gap: 40px; }
  .hero__code { width: 340px; height: 340px; }
  .onas__cols, .faq__cols { gap: 40px; }
  .hero__trust { gap: 28px; }
  .cta-card__body { padding: 40px 28px; }
  .cta-card__note { padding: 20px 28px; }
  .testimonials { flex-wrap: wrap; }
}

@media (max-width: 781px) {
  .hero__cols { gap: 32px; }
  .hero__stats { grid-template-columns: repeat(2, 148px); margin: 24px auto 0; }
  .hero__code { right: -12px; width: 240px; height: 240px; }
  .hero__trust { flex-direction: column; gap: 20px; text-align: center; }
  .hero__logos { flex-wrap: wrap; justify-content: center; gap: 20px; }
  .faq__sticky { position: static; }
  .testimonials-section { padding-bottom: 36px; }
}

@media (max-width: 640px) {
  .hero { padding-top: 44px; }
  .check-list { grid-template-columns: 1fr; gap: 14px; }
  .cta-card__bar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 20px; }
  .cta-card__body { padding: 28px 18px; }
  .cta-card__note { padding: 16px 18px; }
  .feature-row { gap: 16px; padding: 22px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__code pre, .hero__col--text { animation: none; }
}
