/* ══════════════════════════════════════════════
   WebStudio — Component Classes
   Requires: tokens.css + theme.css loaded first
   ══════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--leading-normal);
}

/* ── Accessibility ── */
.skip-link {
  position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #000; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md); z-index: 999; font-weight: 600;
}
.skip-link:focus { top: var(--space-2); }

/* ── Layout ── */
.container { max-width: var(--container-max); margin: 0 auto; }
.section { padding: var(--section-py) var(--section-px); }
.section--alt { background: var(--bg-secondary); }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(var(--bg-primary-rgb, 8,8,8), 0.85);
}
.nav__inner {
  padding: var(--space-4) var(--section-px);
  max-width: var(--container-max); margin: 0 auto;
}
.nav__logo {
  font-family: var(--font-display); font-size: var(--text-h3);
  color: var(--text-primary); text-decoration: none;
}
.nav-link {
  color: var(--text-secondary); text-decoration: none; font-size: var(--text-sm);
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--transition-base);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* ── Hamburger ── */
.hamburger {
  background: none; border: none; color: var(--text-primary); cursor: pointer;
}

/* ── Mobile menu ── */
.mobile-menu {
  background: var(--bg-primary);
  transform: translateX(100%); transition: transform var(--transition-base);
}
body.menu-open .mobile-menu { transform: translateX(0); }
.mobile-menu__close {
  position: absolute; top: var(--space-6); right: var(--space-6);
  background: none; border: none; color: var(--text-primary); cursor: pointer;
}
.mobile-menu__link {
  color: var(--text-primary); text-decoration: none;
  font-family: var(--font-display); font-size: var(--text-h3);
  padding: var(--space-4);
}

/* ── Hero ── */
.hero {
  min-height: var(--hero-min-h);
  padding: var(--section-py) var(--section-px);
  position: relative; overflow: hidden;
}
.hero__title {
  font-size: var(--text-hero); font-family: var(--font-display);
  line-height: var(--leading-tight); color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}
.hero__title--uppercase {
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
}
.hero__subtitle {
  font-size: var(--text-lg); line-height: var(--leading-relaxed);
  color: var(--text-secondary); max-width: 600px;
  margin: var(--space-6) auto var(--space-8);
}

/* ── Hero Badge (pill above heading) ── */
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: rgba(var(--accent-rgb), 0.1);
  backdrop-filter: blur(8px);
  font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--tracking-ultra);
  color: var(--accent); margin-bottom: var(--space-6);
}
.hero-badge__icon { width: 1rem; height: 1rem; }

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--text-primary));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Glow Blobs (decorative hero background) ── */
.glow-blob {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(120px); opacity: 0.06; z-index: 0;
}
.glow-blob--primary {
  width: 500px; height: 500px;
  background: var(--accent);
}
.glow-blob--secondary {
  width: 350px; height: 350px;
  background: var(--text-primary);
}

/* ── CTA Button ── */
.cta-btn {
  display: inline-block; background: var(--accent); color: #000; font-weight: 600;
  border-radius: var(--radius-md); padding: var(--space-4) var(--space-8);
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.cta-btn:hover {
  background: var(--accent-hover); transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.4);
}
.cta-btn--sm { padding: var(--space-2) var(--space-6); font-size: var(--text-sm); }
.cta-btn--block { display: block; text-align: center; }
.cta-btn--submit {
  border: none; cursor: pointer; font-size: var(--text-base); font-family: var(--font-body);
}
.cta-btn--outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border); backdrop-filter: blur(4px);
}
.cta-btn--outline:hover {
  background: rgba(var(--accent-rgb), 0.1); border-color: var(--accent);
  transform: translateY(-2px); box-shadow: none;
}

/* ── Statement ── */
.statement {
  font-size: var(--text-statement); font-family: var(--font-display);
  text-transform: uppercase; line-height: var(--leading-snug);
  text-align: center; color: var(--text-primary);
}

/* ── Section Headings ── */
.heading-section {
  font-size: var(--text-h2); font-family: var(--font-display);
  line-height: var(--leading-tight); margin-bottom: var(--space-12);
}
.heading-section--center { text-align: center; }
.heading-section__accent {
  display: block; width: 3rem; height: 3px;
  background: var(--accent); border-radius: var(--radius-full);
  margin-top: var(--space-4);
}
.heading-section--center .heading-section__accent { margin-left: auto; margin-right: auto; }

/* ── Card ── */
.card {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: var(--space-8); box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}
.card-hover {
  transition: transform var(--transition-base), box-shadow var(--transition-base),
              border-color var(--transition-base);
}
.card-hover:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-rgb), 0.2);
}
.card__icon {
  color: var(--accent); margin-bottom: var(--space-4);
  transition: transform var(--transition-fast);
}
.card-hover:hover .card__icon { transform: translateY(-2px); }
.card__title {
  font-size: var(--text-h3); font-family: var(--font-display);
  margin-bottom: var(--space-2);
}
.card__text { font-size: var(--text-sm); color: var(--text-secondary); }

/* ── About ── */
.about__image {
  border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3; background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
}
.about__image--showcase {
  aspect-ratio: 3/4; border-radius: var(--radius-xl);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.about__image-placeholder { color: var(--text-muted); font-size: var(--text-sm); }
.about__years { font-size: var(--text-h1); font-family: var(--font-display); color: var(--accent); line-height: var(--leading-tight); }
.about__years-label { font-size: var(--text-sm); color: var(--text-muted); text-transform: uppercase; padding-bottom: 0.3rem; }
.about__text {
  font-size: var(--text-base); color: var(--text-secondary);
  line-height: var(--leading-relaxed); margin-bottom: var(--space-8);
}

/* ── Services grid ── */
.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

/* ── Bento Grid (asymmetric card layout) ── */
.bento-grid {
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto);
}
.bento-grid__item--tall { grid-row: span 2; }
.bento-grid__item--wide { grid-column: span 2; }
.bento-grid__item--feature {
  position: relative; overflow: hidden;
}
.bento-grid__item--feature img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius-md);
}
.bento-grid__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  border-radius: var(--radius-md);
}
.bento-grid__overlay-text {
  position: absolute; bottom: var(--space-6); left: var(--space-6);
  color: #fff; font-family: var(--font-display); font-size: var(--text-h3);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-grid__item--tall,
  .bento-grid__item--wide { grid-row: span 1; grid-column: span 1; }
}

/* ── Stats / Numbers ── */
.count-number {
  font-size: var(--text-h1); font-family: var(--font-display);
  color: var(--accent); line-height: var(--leading-tight);
}
.count-label {
  font-size: var(--text-sm); color: var(--text-muted);
  text-transform: uppercase; margin-top: var(--space-2);
}

/* ── Testimonials ── */
.testimonial { position: relative; }
.testimonial__quote {
  color: var(--accent); opacity: 0.2; font-size: 4rem;
  font-family: serif; position: absolute;
  top: var(--space-4); left: var(--space-6); line-height: 1;
}
.testimonial__text {
  font-size: var(--text-base); font-style: italic;
  color: var(--text-secondary); line-height: var(--leading-relaxed);
  margin-top: var(--space-8);
}
.testimonial__author {
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text-primary); margin-top: var(--space-4);
}
.testimonials-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

/* ── FAQ ── */
.faq-q {
  background: none; border: none; color: var(--text-primary);
  font-size: var(--text-lg); font-weight: 600; cursor: pointer; padding: 0;
}
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height var(--transition-base);
  padding-top: var(--space-4);
}
.faq-item.active .faq-a { max-height: 500px; }
.faq-item { border-bottom: 1px solid var(--border); padding: var(--space-6) 0; }
.faq-icon {
  color: var(--accent); font-size: 1.5rem; flex-shrink: 0;
  margin-left: var(--space-4); transition: transform var(--transition-base);
}
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer { font-size: var(--text-base); color: var(--text-secondary); }
.faq-container { max-width: 800px; margin: 0 auto; }

/* ── Forms ── */
.form-label {
  font-size: var(--text-sm); color: var(--text-secondary);
  display: block; margin-bottom: var(--space-2);
}
.form-input {
  width: 100%; padding: var(--space-3) var(--space-4);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: var(--text-base); font-family: var(--font-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.3);
}
textarea.form-input { resize: vertical; }

/* ── Contact details ── */
.contact-label {
  font-size: var(--text-sm); color: var(--text-muted);
  text-transform: uppercase; margin-bottom: var(--space-1);
}
.contact-value {
  font-size: var(--text-lg); color: var(--accent);
  text-decoration: none; font-weight: 600;
}
.contact-address { font-size: var(--text-base); color: var(--text-secondary); }
.contact-badge {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: var(--space-4); text-align: center; margin-top: var(--space-4);
}
.contact-badge__text { font-size: var(--text-sm); color: var(--accent); font-weight: 600; }

/* ── Map ── */
.map-embed { border: 0; border-radius: var(--radius-md); }

/* ── Footer ── */
.footer {
  background: var(--bg-footer); color: var(--text-secondary);
  padding: var(--space-16) var(--section-px) var(--space-8);
}
.footer__logo {
  font-family: var(--font-display); font-size: var(--text-h3);
  color: var(--text-primary); margin-bottom: var(--space-4);
}
.footer__tagline { font-size: var(--text-sm); color: var(--text-muted); }
.footer__heading {
  font-size: var(--text-sm); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: var(--space-4); font-weight: 600;
}
.footer-link { color: var(--text-secondary); text-decoration: none; font-size: var(--text-sm); }
.footer-link:hover { color: var(--text-primary); }
.footer__bottom {
  border-top: 1px solid var(--border); padding-top: var(--space-6); text-align: center;
}
.footer__copyright { font-size: var(--text-xs); color: var(--text-muted); }
.footer__copyright a { color: var(--text-muted); text-decoration: underline; }

/* ── Social icons ── */
.social-icon {
  color: var(--text-muted); transition: color var(--transition-fast);
}
.social-icon:hover { color: var(--accent); }

/* ── GSAP hooks (no CSS — JS-only targets) ──
   .gsap-hero, .gsap-heading, .gsap-card
   These classes are used by GSAP ScrollTrigger for animation targeting.
   They carry no visual styles — do not add CSS rules for them.
*/

/* ── Gallery / Realizacje ── */
.gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-4);
}
.gallery-img {
  border-radius: var(--radius-md); object-fit: cover;
  aspect-ratio: 4/3; cursor: pointer; width: 100%;
}
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.9); opacity: 0;
  transition: opacity var(--transition-base);
}
.lightbox.active { opacity: 1; }

/* ── Pricing / Cennik ── */
.pricing-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: var(--space-10); border: 1px solid var(--border);
}
.pricing-card--popular {
  border-color: var(--accent); box-shadow: var(--shadow-glow);
}
.pricing-card__name { font-size: var(--text-h3); font-family: var(--font-display); }
.pricing-card__price { font-size: var(--text-h1); color: var(--accent); }

/* ── Glass Card (glassmorphism) ── */
.glass-card {
  background: rgba(var(--accent-rgb), 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-8);
}
.glass-card__glow {
  position: absolute; top: -4rem; right: -4rem;
  width: 16rem; height: 16rem; border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.08);
  filter: blur(60px); pointer-events: none;
}

/* ── Logo Marquee ("Zaufali nam") ── */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.marquee-track {
  display: flex; gap: var(--space-12);
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
.marquee-item {
  opacity: 0.4; transition: opacity var(--transition-fast);
  font-size: var(--text-lg); font-weight: 700;
  color: var(--text-muted); letter-spacing: var(--tracking-tight);
}
.marquee-item:hover { opacity: 1; }

/* ── Status Ping (pulsing dot) ── */
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.status-dot {
  position: relative; display: inline-flex;
  width: 0.5rem; height: 0.5rem;
}
.status-dot::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%; background: #22c55e;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.status-dot::after {
  content: ''; position: relative;
  display: inline-flex; width: 100%; height: 100%;
  border-radius: 50%; background: #22c55e;
}

/* ── Social Proof (overlapping avatars + text) ── */
.social-proof {
  display: flex; align-items: center; gap: var(--space-3);
}
.social-proof__avatars {
  display: flex;
}
.social-proof__avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 2px solid var(--bg-primary); object-fit: cover;
  margin-left: -0.5rem;
}
.social-proof__avatar:first-child { margin-left: 0; }
.social-proof__text {
  font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary);
}

/* ── Pill / Tag ── */
.pill {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  font-size: var(--text-xs); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
}

/* ── Section Transition (gradient divider between sections) ── */
.section-transition {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.3), transparent);
  border: none;
}

/* ── Floating Animation (decorative elements) ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.float { animation: float 6s ease-in-out infinite; }
.float--slow { animation-duration: 8s; }
.float--delay { animation-delay: 2s; }

/* ── Stats Row (inline stats in hero) ── */
.stats-row {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: rgba(var(--accent-rgb), 0.05);
  backdrop-filter: blur(8px); padding: var(--space-6);
}
.stats-row__value {
  font-size: var(--text-h2); font-family: var(--font-display);
  color: var(--text-primary); line-height: var(--leading-tight);
}
.stats-row__label {
  font-size: var(--text-xs); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  margin-top: var(--space-1);
}
.stats-row__divider {
  width: 1px; background: var(--border); align-self: stretch;
}

/* ── Horizontal Scroll Gallery (portfolio with caption overlay) ── */
.hscroll {
  overflow: hidden; position: relative;
}
.hscroll__track {
  display: flex; gap: var(--space-6);
  /* GSAP animates translateX; no CSS animation */
}
.hscroll__item {
  flex: 0 0 clamp(280px, 40vw, 500px);
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 3/4;
}
.hscroll__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition-slow);
}
.hscroll__item:hover img { transform: scale(1.05); }
.hscroll__caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: var(--space-6);
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
}
.hscroll__caption-title {
  font-family: var(--font-display); font-size: var(--text-lg);
}
.hscroll__caption-sub {
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); opacity: 0.7;
  margin-top: var(--space-1);
}

/* ── Image Swap Card (hover reveals second image) ── */
.swap-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 1/1;
  cursor: pointer;
}
.swap-card__base,
.swap-card__hover {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity var(--transition-base);
}
.swap-card__hover { opacity: 0; }
.swap-card:hover .swap-card__base { opacity: 0; }
.swap-card:hover .swap-card__hover { opacity: 1; }
.swap-card__label {
  position: absolute; bottom: var(--space-4); left: var(--space-4);
  z-index: 1; color: #fff;
  font-family: var(--font-display); font-size: var(--text-sm);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ── Split Feature (two columns, image + text + CTA) ── */
.split-feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-8); min-height: 60vh;
}
.split-feature__media {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
}
.split-feature__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition-slow);
}
.split-feature__media:hover img { transform: scale(1.03); }
.split-feature__content {
  display: flex; flex-direction: column;
  justify-content: center; gap: var(--space-6);
  padding: var(--space-8) 0;
}
.split-feature__eyebrow {
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: var(--tracking-ultra); color: var(--accent);
  font-weight: 600;
}
.split-feature__title {
  font-size: var(--text-h2); font-family: var(--font-display);
  line-height: var(--leading-tight);
}
.split-feature__text {
  font-size: var(--text-base); color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}
@media (max-width: 768px) {
  .split-feature { grid-template-columns: 1fr; }
}

/* ── Blob SVG Decorations ── */
.blob-decor {
  position: absolute; pointer-events: none; z-index: 0;
  opacity: 0.06;
}
.blob-decor--accent { color: var(--accent); }
.blob-decor--muted { color: var(--text-muted); }
.blob-decor svg { width: 100%; height: 100%; fill: currentColor; }

/* ── Photo Quote Grid (images + woven quote) ── */
.photo-quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.photo-quote-grid__img {
  border-radius: var(--radius-lg); overflow: hidden;
}
.photo-quote-grid__img img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 4/3;
}
.photo-quote-grid__quote {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: var(--space-8);
}
.photo-quote-grid__quote-text {
  font-size: var(--text-lg); font-style: italic;
  color: var(--text-secondary); line-height: var(--leading-relaxed);
}
.photo-quote-grid__quote-sig {
  margin-top: var(--space-4); max-width: 120px; opacity: 0.6;
}
@media (max-width: 768px) {
  .photo-quote-grid { grid-template-columns: 1fr; }
}

/* ── Utility spacing (use Tailwind where possible, these are fallbacks) ── */
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }
