/*
Theme Name: DK Engineering
Description: Witryna biura konstrukcji budowlanych DK Engineering.
Version: 1.0.0
Author: DK Engineering
Text Domain: dk-engineering
*/
:root {
  color-scheme: light;
  --paper: #f8f8f5;
  --ink: #181923;
  --muted: #535462;
  --accent: #483ca0;
  --accent-deep: #352a85;
  --line: #d9d9e0;
  --tint: #eeedf5;
  --dark: #23203c;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.23em; }
a:focus-visible, button:focus-visible { outline: 3px solid #6d5be0; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.1; }
p, li { overflow-wrap: break-word; }

.wrap { width: min(1320px, calc(100% - 6.4vw)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; top: 0.5rem; left: 1rem; translate: 0 -180%; padding: 0.75rem 1rem; background: white; }
.skip-link:focus { translate: 0; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 81px; display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.7rem); }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; margin-right: auto; flex: none; text-decoration: none; font-size: 1.28rem; font-weight: 750; letter-spacing: -0.045em; }
.brand img { width: 46px; height: 41px; object-fit: contain; mix-blend-mode: multiply; }
.brand b { font-weight: 620; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(0.9rem, 2.6vw, 2.25rem); }
.nav a { text-decoration: none; color: var(--muted); font-weight: 650; }
.nav a:hover, .site-footer a:hover { color: var(--accent); text-decoration: underline; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  line-height: 1.22;
  font-weight: 700;
  text-align: center;
}

.button-header { border-color: #bdb9ce; padding-inline: 1.2rem; color: var(--accent-deep); }
.button-header:hover { background: var(--tint); }
.button-primary { background: var(--accent); color: white; }
.button-primary:hover { background: var(--accent-deep); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(0, 1.07fr);
  gap: clamp(1.7rem, 4.5vw, 4.8rem);
  align-items: stretch;
  padding-block: clamp(1.6rem, 4.3vw, 4.4rem) clamp(2.6rem, 5vw, 5rem);
}

.hero-copy { align-self: center; padding-block: clamp(0rem, 1.8vw, 2rem); }
.section-label { color: var(--accent-deep); font-size: 0.875rem; line-height: 1.35; font-weight: 750; letter-spacing: 0.105em; text-transform: uppercase; }
.hero h1 { margin-block: 1rem 1.45rem; font-size: clamp(2.7rem, 5.45vw, 5.2rem); font-weight: 750; letter-spacing: -0.073em; line-height: 0.99; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-intro { max-width: 34rem; color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.225rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: 1.85rem; }
.text-link { padding-block: 0.5rem; font-weight: 670; }
.text-link:hover { color: var(--accent); }
.hero-visual { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: clamp(335px, 38vw, 535px); overflow: hidden; border: 1px solid #323247; background: #20252e; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 51% 47%; filter: saturate(0.66); }
.hero-visual figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.8rem 1.05rem; background: #232337; color: #edeafa; font-size: 0.875rem; }
.hero-visual figcaption span:last-child { color: #c1b9ec; }

.section { padding-block: clamp(2.5rem, 6vw, 5.4rem); }
#oferta { border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr); align-items: end; gap: 1rem 3rem; margin-bottom: clamp(1.65rem, 3.4vw, 2.7rem); }
.section h2 { margin-top: 0.65rem; font-size: clamp(2rem, 3.7vw, 3.65rem); letter-spacing: -0.055em; font-weight: 740; }
.section-heading > p { color: var(--muted); max-width: 32rem; font-size: 1.0625rem; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: #fff; }
.service { padding: clamp(1.1rem, 2.45vw, 2.15rem); border-top: 3px solid var(--accent); }
.service + .service { border-left: 1px solid var(--line); }
.service h3, .support h3, .team-list h3 { font-size: clamp(1.15rem, 1.7vw, 1.58rem); letter-spacing: -0.035em; }
.service p { margin-top: 1rem; color: var(--muted); }
.service ul { padding-left: 1.15rem; margin-block: 1.15rem 0; }
.service li { margin-top: 0.45rem; }
.service li::marker { color: var(--accent); }
.support { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.55rem 1.25rem; padding: 1.15rem clamp(1.1rem, 2.45vw, 2.15rem); background: var(--tint); }
.support p { color: var(--muted); }

.examples { background: var(--dark); color: white; }
.examples .section-label { color: #c7bfff; }
.examples .section-heading > p { color: #dedbeb; }
.work-grid, .tool-grid { display: grid; gap: clamp(0.9rem, 1.7vw, 1.5rem); }
.work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.example { display: flex; min-width: 0; flex-direction: column; overflow: hidden; text-decoration: none; background: #fff; color: var(--ink); border: 1px solid transparent; }
.example:hover { border-color: #9686e6; }
.example img {
  width: 100%;
  height: auto;
  padding: clamp(0.8rem, 2vw, 1.9rem);
  aspect-ratio: 1.53;
  object-fit: contain;
  transition: transform 180ms ease-out;
}
.example:hover img { transform: scale(1.055); }
.example-copy { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.95rem 1rem; border-top: 1px solid #e5e4eb; background: #fbfbfa; flex: 1; position: relative; }
.example-copy strong { font-size: 1.05rem; line-height: 1.3; }
.example-copy span { color: var(--muted); font-size: 0.9rem; }
.tool { border-color: var(--line); }
.tool img { aspect-ratio: 1.64; padding: 0.65rem; }

.team { background: var(--tint); }
.team-inner { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(0, 1fr); gap: 1.65rem clamp(2rem, 7vw, 8rem); align-items: center; }
.team-inner p:not(.section-label), .contact-inner p:not(.section-label) { margin-top: 1rem; max-width: 42rem; color: var(--muted); font-size: 1.0625rem; }
.team-list { border-top: 1px solid #c9c5dd; }
.team-list > div { display: grid; grid-template-columns: 1fr; gap: 0.2rem; padding-block: 1rem; border-bottom: 1px solid #c9c5dd; }
.team-list a { width: fit-content; color: var(--accent-deep); }
.team-list span { color: var(--muted); font-size: 0.875rem; }
.contact { background: var(--accent-deep); color: white; }
.contact-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.65rem clamp(2rem, 6vw, 6rem); align-items: center; }
.contact-inner .section-label { color: #e0dafa; }
.contact-inner p:not(.section-label) { color: #f0ecff; }
.contact-action { display: grid; justify-items: center; align-content: center; gap: 0.6rem; }
.button-contact { min-width: 10rem; background: white; color: var(--accent-deep); }
.button-contact:hover { background: #eeeaff; }
.contact a:focus-visible, .examples a:focus-visible { outline-color: #d1c7ff; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.4rem; font-size: 0.9rem; color: var(--muted); }
.site-footer span { font-weight: 750; color: var(--ink); }

.image-dialog { max-width: min(1040px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow: auto; padding: 0; border: 1px solid var(--line); color: var(--ink); background: #fff; }
.image-dialog::backdrop { background: rgb(22 19 38 / 83%); }
.image-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.05rem; background: var(--tint); }
.image-dialog-header h2 { font-size: clamp(1rem, 3vw, 1.4rem); }
.image-dialog-header button { min-height: 42px; border: 1px solid #bdb9ce; padding: 0.45rem 0.8rem; border-radius: 4px; font: inherit; font-weight: 650; color: var(--accent-deep); background: #fff; cursor: pointer; }
.image-dialog-picture { width: auto; max-height: calc(100dvh - 7rem); object-fit: contain; margin-inline: auto; }

@media (max-width: 1030px) {
  .wrap { width: min(1320px, calc(100% - 3rem)); }
  .hero h1 { font-size: clamp(2.65rem, 5.5vw, 4rem); }
  .hero { gap: clamp(1.5rem, 3.6vw, 3rem); }
}

@media (max-width: 790px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.5rem, 8.5vw, 4.4rem); }
  .hero-visual { min-height: 0; grid-template-rows: auto auto; }
  .hero-visual img { height: auto; aspect-ratio: 1.65; }
  .section-heading, .team-inner { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .service + .service { border-left: 0; border-top: 1px solid var(--line); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 530px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.7rem; padding-block: 0.6rem; }
  .brand { font-size: 1.13rem; }
  .brand img { width: 39px; height: 35px; }
  .nav { grid-column: 1 / -1; grid-row: 2; gap: 0.15rem 1.25rem; }
  .nav a { padding-block: 0.42rem; font-size: 0.935rem; }
  .button-header { grid-column: 2; grid-row: 1; min-height: 42px; padding-inline: 0.8rem; }
  .hero { padding-top: 1.7rem; }
  .hero h1 { margin-block: 0.75rem 1rem; }
  .hero-actions { margin-top: 1.3rem; }
  .work-grid, .contact-inner { grid-template-columns: 1fr; }
  .contact-action { justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .example img { transition: none; }
}
