/* =========================================================
   SKANDIHOUSE — design system
   Ciemny, kanciasty, skandynawski. Złoto + biel na grafitcie.
   ========================================================= */

:root {
  --bg:        #0F1116;
  --bg-2:      #14171D;
  --bg-3:      #1A1E26;
  --bg-card:   #171B22;
  --line:      rgba(199, 164, 105, 0.28);
  --line-soft: rgba(255, 255, 255, 0.08);
  --gold:      #C7A469;
  --gold-br:   #E4C88A;
  --gold-deep: #A8823F;
  --text:      #F3F0EC;
  --muted:     #A5A49B;
  --muted-2:   #74736C;

  --f-sans: "Helvetica Neue", "Segoe UI", Arial, system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 74px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(199,164,105,0.06), transparent 60%),
    linear-gradient(180deg, #0d0f13 0%, var(--bg) 30%);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--gold); color: #12140f;
  padding: 10px 16px; z-index: 1000; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Typografia ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.12; }
.h-xl { font-size: clamp(2.4rem, 5.4vw, 4.1rem); letter-spacing: -0.01em; }
.h-lg { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -0.005em; }
.h-md { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
p { margin: 0 0 1rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.text-muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); opacity: 0.7; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--gold); background: transparent; color: var(--gold);
  cursor: pointer; transition: all .22s ease; border-radius: 0;
}
.btn:hover { background: var(--gold); color: #14140d; }
.btn-solid { background: var(--gold); color: #14140d; }
.btn-solid:hover { background: var(--gold-br); border-color: var(--gold-br); }
.btn-ghost { border-color: var(--line-soft); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }

/* ---------- Nagłówek / nawigacja ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 15, 19, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { height: 40px; width: auto; }
.brand-name { font-size: 1.32rem; font-weight: 700; letter-spacing: 0.12em; }
.brand-name .bn-1 { color: var(--text); }
.brand-name .bn-2 { color: var(--gold); }

.primary-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  position: relative; display: block; padding: 12px 16px;
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); transition: color .2s;
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a.is-active { color: var(--gold); }
.primary-nav a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .24s ease;
}
.primary-nav a:hover::after, .primary-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
  justify-content: center; align-items: center; background: none; border: 1px solid var(--line-soft); cursor: pointer; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); transition: .25s; }
.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); }

/* ---------- Sekcje ---------- */
section { position: relative; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.divider { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 auto; max-width: 520px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider-pine {
  width: 22px; height: 30px; flex: 0 0 auto;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='30' viewBox='0 0 22 30'%3E%3Cg fill='%23C7A469'%3E%3Cpolygon points='11,1 16,9 6,9'/%3E%3Cpolygon points='11,7 19,18 3,18'/%3E%3Cpolygon points='11,13 21,26 1,26'/%3E%3Crect x='9' y='26' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(80px, 13vw, 170px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(15,17,22,0.35), rgba(15,17,22,0.92) 78%),
    var(--hero-image, none);
  background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px);
  background-size: 100% 46px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}
.hero-inner { max-width: 780px; }
.hero .lead { max-width: 54ch; margin-top: 20px; }
.hero-frame { position: relative; }
.hero-frame::before {
  content: ""; position: absolute; left: calc(-1 * var(--gutter)); top: -10px; bottom: -10px; width: 2px;
  background: linear-gradient(var(--gold), transparent);
}

/* ---------- Cechy (3 kolumny) ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line-soft); }
.feature { padding: clamp(28px, 3.4vw, 44px); border-right: 1px solid var(--line-soft); }
.feature:last-child { border-right: none; }
.feature .num { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--gold); }
.feature h3 { margin: 14px 0 12px; font-size: 1.4rem; letter-spacing: 0.02em; }
.feature p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- Kafelki teaser ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.tile {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  transition: border-color .25s, transform .25s;
}
.tile:hover { border-color: var(--gold); transform: translateY(-4px); }
.tile-media { aspect-ratio: 4/3; background: var(--bg-3); position: relative; overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile-media img { transform: scale(1.05); }
.tile-media.placeholder { display: grid; place-items: center; }
.tile-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.tile-body h3 { font-size: 1.35rem; margin-bottom: 10px; }
.tile-body p { color: var(--muted); font-size: 0.97rem; flex: 1; }
.tile-link { margin-top: 18px; color: var(--gold); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; display: inline-flex; gap: 8px; }
.tile-link::after { content: "→"; transition: transform .2s; }
.tile:hover .tile-link::after { transform: translateX(4px); }

/* placeholder – złoty monogram jako znak wodny */
.ph-mark { width: 46%; opacity: 0.14; }

/* ---------- Wiersze obraz–tekst (Technologia / O nas) ---------- */
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.media-row + .media-row { margin-top: clamp(48px, 7vw, 96px); }
.media-row.reverse .media-row-text { order: 2; }
.media-row.reverse .media-row-media { order: 1; }
.media-row-media { aspect-ratio: 4/3; background: var(--bg-3); border: 1px solid var(--line-soft); position: relative; display: grid; place-items: center; overflow: hidden; }
.media-row-media img { width: 100%; height: 100%; object-fit: cover; }
.media-row-text .eyebrow { margin-bottom: 14px; }
.media-row-text h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 16px; }
.media-row-text p { color: var(--muted); }

/* ---------- Projekty (katalog → PDF) ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.project-card {
  position: relative; display: block; background: var(--bg-card);
  border: 1px solid var(--line-soft); overflow: hidden; transition: border-color .25s, transform .25s;
}
.project-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.project-media { aspect-ratio: 3/2; background: var(--bg-3); position: relative; display: grid; place-items: center; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .project-media img { transform: scale(1.06); }
.project-area { position: absolute; top: 14px; left: 14px; background: rgba(15,17,22,0.85); border: 1px solid var(--gold); color: var(--gold); font-size: 0.78rem; letter-spacing: 0.1em; padding: 6px 12px; }
.project-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(11,13,17,0.72); opacity: 0; transition: opacity .28s;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay .btn { pointer-events: none; }
.project-body { padding: 22px 24px 26px; }
.project-body h3 { font-size: 1.3rem; margin-bottom: 8px; }
.project-body p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.project-nopdf .project-overlay { background: rgba(11,13,17,0.5); }
.badge-soon { position: absolute; bottom: 14px; right: 14px; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-soft); padding: 5px 10px; }

/* ---------- Wyposażenie ---------- */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.level { border: 1px solid var(--line-soft); padding: 30px 28px 32px; background: var(--bg-card); position: relative; }
.level::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-br)); }
.level h3 { font-size: 1.3rem; margin-bottom: 12px; }
.level p { color: var(--muted); font-size: 0.96rem; }
.level ul { list-style: none; margin: 18px 0 0; padding: 0; }
.level li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--text); font-size: 0.95rem; }
.level li::before { content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border: 1px solid var(--gold); transform: rotate(45deg); }

.options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.option { background: var(--bg-card); border: 1px solid var(--line-soft); transition: border-color .25s, transform .25s; }
.option:hover { border-color: var(--gold); transform: translateY(-4px); }
.option-media { aspect-ratio: 1/1; background: var(--bg-3); display: grid; place-items: center; overflow: hidden; }
.option-media img { width: 100%; height: 100%; object-fit: cover; }
.option-body { padding: 20px 22px 24px; }
.option-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.option-body p { color: var(--muted); font-size: 0.92rem; margin: 0; }

.note-standard { display: flex; gap: 14px; align-items: flex-start; border-left: 2px solid var(--gold); padding: 14px 20px; background: var(--bg-2); margin-bottom: 40px; color: var(--muted); }
.note-standard strong { color: var(--text); }

/* ---------- Wartości (O nas) ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value { border-top: 2px solid var(--gold); padding-top: 20px; }
.value h3 { font-size: 1.2rem; margin-bottom: 8px; }
.value p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-info { display: grid; gap: 22px; }
.contact-item { border: 1px solid var(--line-soft); padding: 22px 24px; }
.contact-item .ci-label { font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.contact-item .ci-value { font-size: 1.15rem; margin-top: 6px; }
.contact-item a:hover { color: var(--gold); }

.form { display: grid; gap: 18px; }
.form-field { display: grid; gap: 8px; }
.form label { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.form input, .form textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--text);
  padding: 14px 16px; font-family: inherit; font-size: 1rem; border-radius: 0; transition: border-color .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold); }
.form textarea { min-height: 150px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.alert { padding: 16px 20px; border: 1px solid var(--gold); background: rgba(199,164,105,0.08); color: var(--text); margin-bottom: 22px; }
.alert-error { border-color: #b5544a; background: rgba(181,84,74,0.1); }

/* ---------- CTA banner ---------- */
.cta-band { border: 1px solid var(--line); background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); padding: clamp(40px, 6vw, 72px); text-align: center; }
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.cta-band p { color: var(--muted); max-width: 56ch; margin: 0 auto 12px; }

/* ---------- Stopka ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: #0c0e12; margin-top: clamp(60px, 8vw, 110px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 48px; padding-top: clamp(52px, 7vw, 84px); padding-bottom: 48px; }
.footer-logo { width: 260px; max-width: 100%; height: auto; }
.footer-tagline { color: var(--muted); margin-top: 18px; max-width: 34ch; }
.footer-h { font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-contact li { display: grid; margin-bottom: 14px; }
.fc-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.footer-contact a:hover { color: var(--gold); }
.footer-socials { display: flex; gap: 16px; margin-top: 20px; }
.social-link { font-size: 0.82rem; color: var(--muted); border-bottom: 1px solid transparent; }
.social-link:hover { color: var(--gold); border-color: var(--gold); }
.footer-legal { border-top: 1px solid var(--line-soft); padding: 22px 0; }
.footer-legal-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--muted-2); font-size: 0.85rem; }
.legal-ids { display: flex; gap: 20px; flex-wrap: wrap; margin: 0; }

/* ---------- Wąska treść ---------- */
.page-hero { padding: clamp(60px, 8vw, 110px) 0 clamp(30px, 4vw, 50px); }
.prose { max-width: 68ch; }
.prose p { color: var(--muted); }

/* ---------- Responsywność ---------- */
@media (max-width: 980px) {
  .features, .tiles, .projects-grid, .levels, .values { grid-template-columns: 1fr 1fr; }
  .options { grid-template-columns: 1fr 1fr; }
  .feature { border-right: none; border-bottom: 1px solid var(--line-soft); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: rgba(12,14,18,0.98);
    border-bottom: 1px solid var(--line); transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s; max-height: calc(100vh - var(--header-h)); overflow: auto;
  }
  .primary-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .primary-nav ul { flex-direction: column; padding: 12px var(--gutter) 24px; }
  .primary-nav a { padding: 15px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.95rem; }
  .primary-nav a::after { display: none; }
  .media-row, .contact-grid { grid-template-columns: 1fr; }
  .media-row.reverse .media-row-text, .media-row.reverse .media-row-media { order: 0; }
  .features, .tiles, .projects-grid, .levels, .values, .options { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .brand-name { font-size: 1.1rem; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
