/* =========================================================
   Studio KERO — stylesheet
   Dark, lime-accent brand system. Mobile-first, no framework.
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, table { margin: 0; padding: 0; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Design tokens ---------- */
:root {
  --bg:        #0a0a0a;
  --bg-panel:  #131313;
  --bg-panel-2:#181818;
  --border:    #2a2a2a;
  --border-soft: #202020;
  --text:      #f5f5f5;
  --text-muted:#adadad;
  --text-dim:  #7a7a7a;
  --accent:    #bed754;
  --accent-2:  #c9e35b;
  --accent-ink:#1a2405; /* text on accent background */
  --danger:    #e2665a;

  --font-head: "Raleway", sans-serif;
  --font-body: "Source Sans Pro", sans-serif;
  --font-nav:  "Poppins", sans-serif;

  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --gap: clamp(1.25rem, 2vw, 2.5rem);

  color-scheme: dark;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-nav);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 700; }

p.lede { font-size: 1.1rem; color: var(--text-muted); }

.accent { color: var(--accent); }
strong { font-weight: 700; color: var(--text); }
.body-copy strong { color: var(--accent); font-weight: 700; }

.section {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  border-bottom: 1px solid var(--border-soft);
}
.section:last-of-type { border-bottom: 0; }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Decorative sparkles ---------- */
.sparkle {
  position: absolute;
  color: var(--border);
  font-size: 1.4rem;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}
.sparkle::before { content: "+"; }
.hero { position: relative; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-nav);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95em 1.6em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--text-muted); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-soft);
}
/* The blur lives on a pseudo-element, not on .site-header itself, because
   backdrop-filter/filter on an element creates a new containing block for
   its position:fixed descendants (.main-nav, .header-socials on mobile) —
   that squashed the mobile menu into the header's own box instead of the
   viewport. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand img { height: 48px; width: auto; }
.brand span { font-size: 0.95rem; white-space: nowrap; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.main-nav a {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.6em 1.05em;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.header-socials { display: flex; align-items: center; gap: 0.9rem; }
.header-socials a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.header-socials a:hover { border-color: var(--accent); color: var(--accent); }
.header-socials svg { width: 16px; height: 16px; fill: currentColor; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.icon-close { display: none; }
.nav-open .icon-menu { display: none; }
.nav-open .icon-close { display: block; }

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    /* Starts at the true viewport top and tucks under the header (below,
       via z-index) rather than being butted up against a hardcoded "header
       height" offset — that seam left a hairline gap showing unblurred page
       content. Content is pushed clear of the header via padding-top instead. */
    inset: 0 0 auto 0;
    z-index: -1;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: calc(77px + 1.5rem) 1.5rem 1.5rem;
    gap: 0.75rem;
    max-height: 100vh;
    transform: translateY(-8px);
    /* Fading this via opacity (background included) let page content behind
       show through, faintly, whenever the transition hadn't fully settled —
       visibility keeps the panel fully opaque and only animates the slide. */
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
    overflow-y: auto;
  }
  .main-nav a { text-align: center; padding: 0.9em 1.2em; }
  .header-socials {
    position: fixed;
    left: 1.5rem;
    right: 1.5rem;
    top: var(--mobile-nav-socials-top, 340px);
    justify-content: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.2s;
  }
  .nav-open .main-nav,
  .nav-open .header-socials {
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: transform 0.2s ease;
  }
  .nav-toggle { display: inline-flex; z-index: 1; }
  .brand { position: relative; z-index: 1; }
}

/* ---------- Hero ---------- */
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 3rem);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.hero h1 strong { color: var(--accent); }
.hero p { margin-top: 1.1rem; color: var(--text-muted); max-width: 46ch; }
.hero .btn-row { margin-top: 1.9rem; }
.hero-art { position: relative; }
.hero-art img {
  margin-inline: auto;
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-inline: auto; }
  .hero .btn-row { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 260px; }
}
@media (max-width: 560px) {
  /* At this width the two hero buttons no longer fit on one line and wrap;
     match their widths so the stack looks intentional instead of ragged. */
  .hero .btn-row { flex-direction: column; align-items: stretch; }
  .hero .btn-row .btn { width: 100%; }
}

/* ---------- Service overview cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.service-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-card:hover { border-color: var(--border); transform: translateY(-3px); }
.service-card .thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  margin-bottom: 1.1rem;
}
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.service-card h3 { margin-bottom: 0.4rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ---------- Feature rows (alternating image/text) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.feature-row + .feature-row { margin-top: clamp(3rem, 6vw, 5rem); }
.feature-row.reverse { grid-template-columns: 1.15fr 0.85fr; }
.feature-row.reverse .feature-art { order: 2; }
.feature-art img {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-inline: auto;
}
.feature-copy p { color: var(--text-muted); margin-top: 0.75rem; }
.feature-copy p:first-of-type { margin-top: 1rem; }
.feature-copy .btn-row { margin-top: 1.5rem; }

@media (max-width: 780px) {
  .feature-row,
  .feature-row.reverse { grid-template-columns: 1fr; text-align: center; }
  .feature-row.reverse .feature-art { order: -1; }
  .feature-art { order: -1; }
  .feature-art img { max-width: 200px; }
  .feature-copy .btn-row { justify-content: center; }
}

/* ---------- Social icon buttons (client / case cards) ---------- */
.social-icons { display: flex; gap: 0.55rem; margin-top: 0.9rem; }
.social-icons a {
  width: 34px;
  height: 34px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-icons a:hover { border-color: var(--accent); color: var(--accent); }
.social-icons svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Contact ---------- */
.contact-copy p { color: var(--text-muted); margin-top: 1rem; max-width: 75ch; }
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.8rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.contact-card .icon {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  background: var(--bg-panel-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.contact-card .icon svg { width: 18px; height: 18px; fill: currentColor; }
.contact-card .icon + span { min-width: 0; }
.contact-card .label { font-size: 0.78rem; color: var(--text-dim); letter-spacing: 0.04em; text-transform: uppercase; }
.contact-card .value { font-weight: 700; font-family: var(--font-nav); font-size: 1rem; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .contact-cards { grid-template-columns: 1fr; }
}

/* ---------- Pricing cards ---------- */
.pricing-intro h2 { margin-bottom: 1.1rem; }
.pricing-intro p { max-width: 75ch; margin-top: 0.9rem; }
.pricing-intro p:first-of-type { margin-top: 0; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  align-items: stretch;
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pricing-card:hover { border-color: var(--border); transform: translateY(-3px); }
.pricing-card h3 { font-size: 1.05rem; }
.pricing-card .price { display: flex; align-items: baseline; gap: 0.3em; margin: 0.6rem 0 1.4rem; }
.pricing-card .price .amount { font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; }
.pricing-card .price .period { font-size: 0.8rem; color: var(--text-dim); }

.price-features { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.6rem; flex: 1; }
.price-features li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.price-features li.on { color: var(--text); }
.price-features li.on::before { background: var(--accent); }
.price-features li.off { color: var(--text-dim); text-decoration: line-through; text-decoration-color: var(--border); }
.price-features li.off::before { background: var(--border); }
.price-features li.divider { padding-bottom: 0.85rem; margin-bottom: 0.15rem; border-bottom: 1px solid var(--border-soft); }
.price-features li.plain { padding-left: 0; font-weight: 400; }
.price-features li.plain::before { display: none; }

.pricing-card.featured {
  background: var(--bg-panel-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 40px -20px rgba(190, 215, 84, 0.35);
}
.pricing-card .badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-nav);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35em 0.8em;
  border-radius: var(--radius-pill);
}

@media (max-width: 980px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ---------- Additional-services table ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}
.addon-table { min-width: 640px; }
.addon-table th, .addon-table td {
  padding: 0.95rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
}
.addon-table thead th {
  font-family: var(--font-nav);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-panel);
}
.addon-table tbody tr:last-child td { border-bottom: 0; }
.addon-table td:first-child { max-width: 46ch; }
.addon-table td em { color: var(--text-dim); font-style: normal; font-size: 0.87rem; display: block; margin-top: 0.2rem; }
.addon-table td:last-child { white-space: nowrap; font-weight: 700; color: var(--accent); font-family: var(--font-nav); }
.price-note { margin-top: 1.3rem; color: var(--text-dim); font-size: 0.85rem; }
.table-block + .table-block { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* ---------- Work / Realizacje ---------- */
.work-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.work-tabs button {
  font-family: var(--font-nav);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.7em 1.3em;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.work-tabs button:hover { color: var(--text); }
.work-tabs button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.work-panel { display: none; }
.work-panel.is-active { display: block; }

.case-list { display: grid; gap: 1rem; }
.case-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.4rem;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  transition: border-color 0.2s ease;
}
.case-card:hover { border-color: var(--border); }
.case-card .thumb { aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden; }
.case-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.case-card p { color: var(--text-muted); font-size: 0.95rem; }

@media (max-width: 640px) {
  .case-card { grid-template-columns: 96px 1fr; padding: 0.9rem; gap: 1rem; }
  .case-card p { font-size: 0.88rem; }
}
@media (max-width: 460px) {
  .case-card { grid-template-columns: 1fr; text-align: center; }
  .case-card .thumb { max-width: 140px; margin-inline: auto; }
  .case-card .social-icons { justify-content: center; }
}

.gallery-group + .gallery-group { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.gallery-group h3 {
  font-family: var(--font-nav);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
}
.gallery-grid button {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-grid button:hover img { transform: scale(1.06); }

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  text-align: center;
  color: var(--text-dim);
}
.empty-state strong { display: block; color: var(--text-muted); font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 0.4rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 88vh; border-radius: var(--radius-sm); }
.lightbox-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.lightbox-close svg { width: 18px; height: 18px; }

/* ---------- Views (Home / Oferta / Realizacje) ---------- */
.view { display: none; }
.view.is-active { display: block; }

.back-row { margin-bottom: 1.5rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-nav);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.5rem; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-brand img { height: 52px; width: auto; }
.footer-brand span { font-family: var(--font-head); font-weight: 800; font-size: 0.9rem; }
.footer-meta { color: var(--text-dim); font-size: 0.85rem; text-align: right; }
.footer-meta a { color: var(--text-muted); }
.footer-meta a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .site-footer .wrap { flex-direction: column; text-align: center; }
  .footer-meta { text-align: center; }
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
