/* ==========================================================================
   DACHY DOROX — STYLE
   System tokenów: granat/prawie czarny + stonowane złoto + biel/jasna szarość
   ========================================================================== */

:root {
  /* Kolory */
  --navy: #0B1420;
  --navy-2: #101B2C;
  --gold: #B7924B;
  --gold-light: #D3AF6E;
  --white: #FFFFFF;
  --offwhite: #F3F1EC;
  --text-muted: #4A5260;
  --text-muted-dark: #8FA0B5;
  --line-dark: #26374A;
  --line-light: #DDD9CE;

  /* Typografia */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Odstępy */
  --space-section: 96px;
  --space-section-mobile: 64px;
  --radius-sm: 3px;
  --sticky-bar-height: 58px;

  /* Ruch */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 320ms;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  color: var(--white);
  background: var(--navy);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--sticky-bar-height);
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--space-section) 0; }
@media (max-width: 768px) {
  section { padding: var(--space-section-mobile) 0; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}

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

h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 20px;
}

.section-intro {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-intro p {
  color: var(--text-muted-dark);
  font-size: 17px;
  margin-top: 12px;
}

.on-light .section-intro p { color: var(--text-muted); }

/* Focus visible dla dostępności */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 200;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: top var(--duration) var(--ease);
}
.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   PRZYCISKI
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 28px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}
.btn-gold:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.06); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }

.btn-block { width: 100%; }

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background var(--duration) var(--ease), padding var(--duration) var(--ease), border-color var(--duration) var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(11, 20, 32, 0.96);
  backdrop-filter: blur(6px);
  padding: 14px 0;
  border-bottom-color: var(--line-dark);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  font-size: 15px;
  color: var(--white);
  position: relative;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right var(--duration) var(--ease);
}
.main-nav a:hover::after { right: 0; }

.nav-links { display: flex; gap: 32px; list-style: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 860px) {
  .nav-links, .header-cta { display: none; }
  .nav-toggle { display: block; }

  .main-nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--navy-2);
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
  }
  .main-nav.is-open .nav-links a {
    padding: 16px 24px;
    width: 100%;
    display: block;
    border-bottom: 1px solid var(--line-dark);
  }
  .main-nav.is-open .nav-links a::after { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-top: 120px;
  padding-bottom: 96px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media picture,
.hero-media img { width: 100%; height: 100%; }

/* Overlay: przyciemnienie skoncentrowane pod tekstem, ok. 45-55% u dołu, jaśniej u góry */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 20, 32, 0.78) 0%,
    rgba(11, 20, 32, 0.5) 30%,
    rgba(11, 20, 32, 0.22) 55%,
    rgba(11, 20, 32, 0.08) 75%,
    rgba(11, 20, 32, 0.04) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  color: var(--white);
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
}

.hero p.lead {
  font-size: 18px;
  color: rgba(255,255,255,0.92);
  max-width: 560px;
  margin-bottom: 36px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-micro {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

@media (max-width: 640px) {
  .hero { min-height: 92vh; padding-bottom: 64px; align-items: flex-end; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* ==========================================================================
   PASEK KOMPETENCJI
   ========================================================================== */

.competency {
  background: var(--navy);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.competency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.competency-item {
  padding: 40px 28px;
  border-left: 1px solid var(--line-dark);
}
.competency-item:first-child { border-left: none; }

.competency-item .icon { margin-bottom: 18px; }

.competency-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.competency-item p {
  font-size: 14px;
  color: var(--text-muted-dark);
}

@media (max-width: 860px) {
  .competency-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .competency-item {
    border-left: none;
    border-bottom: 1px solid var(--line-dark);
    padding: 28px 20px;
  }
  .competency-item:nth-child(odd) { border-right: 1px solid var(--line-dark); }
  .competency-item:nth-child(3), .competency-item:nth-child(4) { border-bottom: none; }
}

/* ==========================================================================
   USŁUGI
   ========================================================================== */

.services { background: var(--navy); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.service-item {
  padding: 32px;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  transition: background var(--duration) var(--ease);
}
.service-item:hover { background: var(--navy-2); }

.service-item .icon { margin-bottom: 16px; }

.service-item h3 {
  font-size: 19px;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.service-item p {
  color: var(--text-muted-dark);
  font-size: 16px;
}

.services-cta {
  margin-top: 40px;
  text-align: center;
}
.services-cta a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 3px;
}

@media (max-width: 860px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   WIEDZA TECHNICZNA + ADNOTACJE
   ========================================================================== */

.technical { background: var(--offwhite); color: var(--navy); }

.technical .eyebrow { color: var(--gold); }
.technical h2 { color: var(--navy); max-width: 480px; }

/*
  Jeden wspólny DOM (bez duplikacji treści) dla mobile i desktop:
  kolejność w HTML = zdjęcie, blok, zdjęcie, blok... (idealna dla mobile).
  Na desktopie jawnie mapujemy nieparzyste dzieci (zdjęcia) do kolumny 1,
  a parzyste (bloki tekstu) do kolumny 2, wiersz po wierszu.
*/
.technical-flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.technical-flow .block { max-width: 520px; }
.technical-flow .block h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy);
}
.technical-flow .block p {
  color: var(--text-muted);
  font-size: 15.5px;
}

/*
  Zdjęcie z adnotacją techniczną (sygnatura marki).
  Proporcje 3:2 (zamiast dawnego kwadratu) - bardziej naturalny, "poziomy"
  kadr, wyraźnie niższy niż szerszy. object-fit: cover przycina każde
  zdjęcie do tych proporcji; domyślnie z środka kadru (object-position:
  center), a tam, gdzie najważniejszy detal siedzi bliżej góry/dołu
  oryginalnego zdjęcia, dajemy indywidualny object-position (klasy niżej).
*/
.annotated-photo { position: relative; }
.annotated-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}
/* Indywidualne pozycjonowanie kadru tam, gdzie środek zdjęcia nie wystarcza */
.annotated-photo img.obj-top { object-position: center 20%; }
.annotated-photo img.obj-bottom { object-position: center 40%; }

.annotation {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.annotation .leader {
  width: 28px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.annotation .label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: var(--gold);
}

@media (max-width: 640px) {
  /* Czytelność drobnego tekstu na mobile - te same style, nieco większy rozmiar */
  .eyebrow { font-size: 13px; }
  .annotation .label { font-size: 14px; }
  .upload-field .upload-hint { font-size: 14px; }
  .site-footer { font-size: 13.5px; }
  .form-alt-contact { font-size: 15px; }
}

@media (min-width: 861px) {
  .technical-flow {
    grid-template-columns: 3fr 2fr;
    column-gap: 56px;
    row-gap: 36px;
    align-items: start;
  }
  .technical-flow > *:nth-child(1) { grid-column: 1; grid-row: 1; }
  .technical-flow > *:nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; }
  .technical-flow > *:nth-child(3) { grid-column: 1; grid-row: 2; }
  .technical-flow > *:nth-child(4) { grid-column: 2; grid-row: 2; align-self: center; }
  .technical-flow > *:nth-child(5) { grid-column: 1; grid-row: 3; }
  .technical-flow > *:nth-child(6) { grid-column: 2; grid-row: 3; align-self: center; }
  .technical-flow > *:nth-child(7) { grid-column: 1; grid-row: 4; }
  .technical-flow > *:nth-child(8) { grid-column: 2; grid-row: 4; align-self: center; }
}

/* ==========================================================================
   PROCES WSPÓŁPRACY
   ========================================================================== */

.process { background: var(--navy); }

.process-timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  position: relative;
  margin-top: 24px;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 0; right: 0;
  height: 1px;
  background: var(--line-dark);
}

.process-step {
  position: relative;
  padding-top: 40px;
}

.process-step .num {
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  background: var(--navy);
  padding-right: 10px;
}

.process-step h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 14.5px;
  color: var(--text-muted-dark);
}

@media (max-width: 860px) {
  .process-timeline {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .process-timeline::before {
    top: 0; bottom: 0; left: 13px; right: auto;
    width: 1px; height: auto;
  }
  .process-step {
    padding-top: 0;
    padding-left: 44px;
    padding-bottom: 28px;
  }
  .process-step .num {
    position: absolute;
    top: 0; left: 0;
    background: var(--navy);
    padding-right: 0;
    width: 28px;
  }
}

/* ==========================================================================
   FORMULARZ
   ========================================================================== */

.quote-section {
  background: var(--navy-2);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.quote-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.quote-header { text-align: center; margin-bottom: 40px; }
.quote-header .eyebrow { text-align: center; }
.quote-header p { color: var(--text-muted-dark); margin-top: 12px; }

.quote-form {
  background: var(--offwhite);
  color: var(--navy);
  padding: 40px;
  border-radius: var(--radius-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group { margin-bottom: 20px; }
.form-row .form-group { margin-bottom: 0; }

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group .required { color: var(--gold); }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* Honeypot - pole ukryte przed ludźmi, widoczne dla botów */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Upload zdjęć */
.upload-field {
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
  position: relative;
}
.upload-field:hover { background: rgba(183, 146, 75, 0.06); }
.upload-field input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-field .icon { margin: 0 auto 10px; }
.upload-field .upload-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.upload-field .upload-hint { font-size: 13px; color: var(--text-muted); }

.upload-previews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.upload-fallback {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}
.upload-fallback a {
  color: var(--navy);
  border-bottom: 1px solid var(--line-light);
}

.upload-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line-light);
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb button {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(11,20,32,0.85);
  color: var(--white);
  border: none;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
.form-consent input { margin-top: 3px; }

.form-status {
  margin-top: 16px;
  font-size: 14px;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success { color: #2E6B4F; }
.form-status.is-error { color: #A23B3B; }

.form-alt-contact {
  text-align: center;
  margin-top: 24px;
  font-size: 14.5px;
  color: var(--text-muted-dark);
}
.form-alt-contact a { color: var(--gold-light); border-bottom: 1px solid var(--gold-light); }

@media (max-width: 640px) {
  .quote-form { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ==========================================================================
   KONTAKT / STOPKA
   ========================================================================== */

.contact-section { background: var(--navy); }

.contact-grid {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
}
.contact-item .icon { flex-shrink: 0; }

.site-footer {
  border-top: 1px solid var(--line-dark);
  padding: 28px 0;
  font-size: 13px;
  color: var(--text-muted-dark);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 640px) {
  .contact-grid { flex-direction: column; gap: 20px; }
  .site-footer { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   STICKY MOBILE BAR
   ========================================================================== */

.sticky-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--sticky-bar-height);
  background: var(--navy);
  border-top: 1px solid var(--line-dark);
  display: none;
  z-index: 90;
  transform: translateY(100%);
  transition: transform var(--duration) var(--ease);
}
.sticky-bar.is-visible { transform: translateY(0); }

@media (max-width: 860px) {
  .sticky-bar { display: flex; }
}

.sticky-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--white);
}
.sticky-bar a:first-child { border-right: 1px solid var(--line-dark); }
.sticky-bar .icon { color: var(--gold); }

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   IKONY (SVG liniowe, stroke dziedziczy currentColor)
   ========================================================================== */

.icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  color: var(--gold);
  flex-shrink: 0;
}
.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
