/* ==========================================================================
   DBBM Concept — homepage styles
   Built from Figma dev-mode export (desktop 1920px / mobile 375px).
   Absolute Figma coordinates were translated into a fluid, responsive
   layout (flexbox/grid + clamp()) rather than copied literally.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, ol, li, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

/* ---------- Design tokens ---------- */
:root {
  --color-primary: #1E4E9E;
  --color-primary-dark: #163d80;
  --color-accent: #73C7D5;
  --color-accent-2: #55AFE3;
  --color-accent-3: #4F67AF;
  --color-text: #383838;
  --color-text-muted: #6b6f76;
  --color-bg: #FFFFFF;
  --color-bg-alt: #FAFAFA;
  --color-card: #FDFDFD;
  --color-border: rgba(0, 0, 0, 0.1);

  --font-main: 'Montserrat', 'Segoe UI', sans-serif;

  --container-max: 1320px;
  --container-pad: clamp(20px, 5vw, 80px);

  --radius-lg: 100px;
  --radius-md: 20px;

  --shadow-card: 0 20px 45px rgba(30, 78, 158, 0.08);
}

/* ---------- Base ---------- */
html { overflow-x: hidden; }
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

h1, h2, h3 { font-weight: 700; color: var(--color-text); line-height: 1.2; }
h1 { font-size: clamp(38px, 2.71vw, 52px); line-height: 1.2; font-weight: 400; color: var(--color-text); }
.hero-highlight { font-weight: 700; color: var(--color-primary); }
h2 { font-size: clamp(28px, 1.88vw, 36px); }
h3 { font-size: clamp(19px, 2vw, 22px); }
p { color: var(--color-text); }

.eyebrow {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.section-heading { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-heading-left { text-align: left; margin-inline: 0; }

.section-cta { display: flex; justify-content: center; margin-top: 48px; }

.divider {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-accent);
  margin: 14px auto 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: 0 10px 24px rgba(30,78,158,0.28); }
.btn-accent { background: var(--color-accent); color: #06323a; }
.btn-accent:hover { background: #5fb9c9; }
.btn:active { transform: translateY(1px); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 14px;
}

.logo img { height: 44px; width: auto; }

.main-nav { margin-inline: auto; }
.main-nav ul { display: flex; gap: 32px; }
.main-nav a {
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  transition: color .15s ease;
}
.main-nav a:hover { color: var(--color-primary); }

.btn-nav { padding: 12px 22px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 40px;
  column-gap: 0;
  align-items: center;
}

.hero-copy { margin-bottom: clamp(24px, 5vw, 64px); }

.hero-lead {
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.56;
  color: var(--color-text);
  margin: 20px 0 32px;
  max-width: 46ch;
}

.hero-media {
  border-radius: var(--radius-lg) 0 0 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  align-self: end;
  order: -1;
  margin-inline: calc(-1 * var(--container-pad));
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about {
  padding-top: 0;
  padding-bottom: clamp(48px, 7vw, 96px);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 40px;
  column-gap: 0;
  align-items: center;
}

.about-media {
  border-radius: 0 0 var(--radius-lg) 0;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  align-self: start;
  margin-inline: calc(-1 * var(--container-pad));
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.about-intro {
  font-size: 16px;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: 28px;
  max-width: 42ch;
}

.about-list { display: flex; flex-direction: column; gap: 24px; }
.about-list li { display: flex; align-items: center; gap: 20px; }
.about-list .diamond-num { position: static; flex-shrink: 0; font-size: 16px; }
.about-list p { font-size: 16px; line-height: 1.25; max-width: 40ch; }

/* ==========================================================================
   STATS
   ========================================================================== */
.stats {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2a5cb0 60%, var(--color-primary) 100%);
  padding-block: clamp(48px, 6vw, 72px);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  text-align: center;
}

.stat { display: flex; flex-direction: column; align-items: center; }
.stat-icon { width: 56px; height: 56px; object-fit: contain; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .95; }
.stat-number {
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 12px;
}
.stat-label { color: #fff; font-weight: 700; font-size: 18px; max-width: 22ch; }

/* ==========================================================================
   SPECIALIZATIONS
   ========================================================================== */
.specializations { padding-block: clamp(48px, 7vw, 96px); background: var(--color-bg-alt); }

.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.spec-card {
  background: var(--color-bg-alt);
  padding: 40px clamp(20px, 3vw, 48px);
  transition: background-color .2s ease;
}
.spec-card:hover { background: #fff; }
.spec-icon { width: 44px; height: 44px; margin-bottom: 18px; }
.spec-card h3 { margin-bottom: 10px; }
.spec-card p { color: var(--color-text-muted); font-size: 15px; max-width: 34ch; }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services { padding-block: clamp(48px, 7vw, 96px); }

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.service-card {
  position: relative;
  min-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
  transition: box-shadow .35s ease, transform .35s ease;
}
.service-card:hover {
  box-shadow: 0 24px 48px rgba(30, 78, 158, 0.32);
  transform: translateY(-4px);
}
.service-card-body {
  padding: 36px 30px;
  text-align: center;
  width: 100%;
}
.service-card h3 { color: #fff; font-size: clamp(20px, 2.4vw, 24px); }
.service-card .divider { background: var(--color-accent); }
.service-card ul { display: flex; flex-direction: column; gap: 10px; }
.service-card li {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
}

/* Photo layer sits behind the overlay/body and scales up on hover to "highlight" the picture */
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform .5s ease;
  z-index: -2;
}
.service-card:hover::after { transform: scale(1.1); }

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 78, 158, 0.08) 0%, rgba(30, 78, 158, 0.55) 42%, rgba(30, 78, 158, 0.95) 100%);
  transition: opacity .35s ease;
  z-index: -1;
}
.service-card:hover::before { opacity: 0.72; }

.service-card-body { position: relative; z-index: 1; }

.ph-support::after   { background-image: url("../assets/img/service-support.jpg"); }
.ph-analysis::after  { background-image: url("../assets/img/service-analysis.jpg"); }
.ph-docs::after       { background-image: url("../assets/img/service-docs.jpg"); }
.ph-3d::after         { background-image: url("../assets/img/service-3d.jpg"); }

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process { padding-block: clamp(48px, 7vw, 96px); background: var(--color-bg-alt); }

.process-list { display: flex; flex-direction: column; gap: 48px; }

.process-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  opacity: 1;
  filter: grayscale(0%);
  transition: opacity .35s ease, filter .35s ease;
}

/* Scrolling fades/desaturates every step except the one currently centered in the viewport (see js/script.js) */
.process-list.has-spotlight .process-step { opacity: .4; filter: grayscale(85%); }
.process-list.has-spotlight .process-step.is-active { opacity: 1; filter: grayscale(0%); }

.process-copy { position: relative; padding-left: 46px; }
.diamond-num {
  position: absolute;
  left: 0;
  top: 2px;
  width: 38px;
  height: 38px;
  background: var(--color-accent);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.diamond-num span { display: block; transform: rotate(-45deg); }
.process-copy h3 { margin-bottom: 10px; }
.process-copy p { color: var(--color-text-muted); max-width: 46ch; }

.process-media { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/10; }
.process-media img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { padding-block: clamp(48px, 7vw, 96px); }

.faq-list { display: flex; flex-direction: column; gap: 14px; max-width: 900px; }

.faq-item {
  background: var(--color-card);
  border: 1px solid rgba(30, 78, 158, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
  font-weight: 700;
  font-size: clamp(15px, 1.6vw, 18px);
}

.faq-icon { position: relative; flex-shrink: 0; width: 18px; height: 18px; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.faq-icon::before { left: 0; top: 8px; width: 18px; height: 2px; }
.faq-icon::after { left: 8px; top: 0; width: 2px; height: 18px; }
.faq-item.is-open .faq-icon::after { transform: rotate(90deg); opacity: 0; }

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.faq-answer > p {
  overflow: hidden;
  padding: 0 24px;
  color: var(--color-text-muted);
}
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-item.is-open .faq-answer > p { padding-bottom: 22px; }
.faq-answer { overflow: hidden; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  background: linear-gradient(160deg, var(--color-primary) 0%, #163d80 55%, #12305f 100%);
  padding-block: clamp(56px, 8vw, 110px);
  color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.contact-info h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); margin-bottom: 32px; }
.contact-info h2 span { display: block; color: var(--color-accent); margin-top: 6px; }

.contact-details { display: flex; flex-direction: column; gap: 18px; }
.contact-details li { display: flex; align-items: center; gap: 14px; font-size: 18px; }
.contact-details a { transition: color .15s ease; }
.contact-details a:hover { color: var(--color-accent); }

.contact-form-wrap {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 36px);
}
.contact-form-wrap h3 { color: #fff; font-size: 18px; margin-bottom: 22px; }

.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row .form-field { margin-bottom: 0; }
.form-field label { font-size: 13px; color: rgba(255,255,255,0.75); }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--color-text);
  font-size: 14px;
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #9aa0a8; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 22px;
  cursor: pointer;
}
.form-check input { margin-top: 3px; }
.form-check a { text-decoration: underline; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--color-accent);
}
.form-note--error { color: #ffb4b4; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: #fff; padding-block: 28px; border-top: 1px solid var(--color-border); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-logo img { height: 40px; width: auto; }

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { font-weight: 500; font-size: 13px; color: var(--color-primary); }
.footer-nav a:hover { text-decoration: underline; }

.footer-legal { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--color-text-muted); text-align: right; }

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  border-radius: 8px;
  flex-shrink: 0;
  transition: background-color .15s ease;
}
.back-to-top:hover { background: var(--color-primary-dark); }

/* ==========================================================================
   LEGAL PAGES (polityka-prywatnosci.html, regulamin.html)
   ========================================================================== */
.legal-hero {
  padding-block: clamp(40px, 6vw, 64px) clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--color-border);
}
.legal-hero .eyebrow { margin-bottom: 14px; }
.legal-hero h1 { font-weight: 700; color: var(--color-primary); font-size: clamp(30px, 4vw, 44px); }
.legal-hero .legal-updated { color: var(--color-text-muted); font-size: 14px; margin-top: 14px; }

.legal-content {
  max-width: 780px;
  padding-block: clamp(40px, 6vw, 72px);
}
.legal-content h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  margin-top: 44px;
  margin-bottom: 14px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 14px; max-width: 68ch; }
.legal-content ul { margin: 0 0 14px; padding-left: 22px; list-style: disc; max-width: 68ch; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--color-primary); text-decoration: underline; }
.legal-content strong { font-weight: 700; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
  margin-top: 8px;
}
.back-link:hover { text-decoration: underline; }

/* ==========================================================================
   RESPONSIVE — tablet & up
   ========================================================================== */
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .process-step { grid-template-columns: 1fr 1fr; }
  .process-step:nth-child(even) .process-copy { order: 2; }
  .process-step:nth-child(even) .process-media { order: 1; }
}

/* ==========================================================================
   RESPONSIVE — desktop nav breakpoint
   ========================================================================== */
@media (max-width: 959px) {
  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 85vw);
    height: 100vh;
    background: #fff;
    padding: 100px 32px 32px;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -12px 0 40px rgba(0,0,0,0.08);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 20px; }
  .main-nav a { font-size: 16px; }

  .btn-nav { display: none; }
  .nav-toggle { display: flex; }
}

@media (min-width: 960px) {
  :root { --radius-lg: clamp(100px, 8vw, 150px); }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-copy { padding-right: clamp(24px, 4vw, 64px); }
  .hero-media { order: 0; margin-inline: 0; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-copy { padding-left: clamp(24px, 4vw, 64px); }
  .about-media { margin-inline: 0; }
  .spec-grid { grid-template-columns: repeat(4, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; }
  .service-card { min-height: 360px; }
}

