/* ============================================================
   Divideyou — hi-fi site system
   Structure modeled on corporate real-estate editorial layouts
   (full-bleed imagery, restrained palette, serif display).
   Original identity & palette — foundation colors, not CBRE brand.
   ============================================================ */

:root {
  /* paleta marki — MIDNIGHT (jedyna paleta) */
  --brand:      #112A40;
  --brand-600:  #1E466A;
  --brand-300:  #7794AE;
  --brand-tint: #E8ECF1;
  --accent:     #2B6FB0;

  --ink:    #16201C;
  --ink-2:  #46524C;
  --ink-3:  #7E877F;
  --line:   #E4E2D8;
  --bg:     #FBFAF5;
  --bg-2:   #F3F1E9;
  --white:  #ffffff;

  /* pillar accents — from the rainbow logo */
  --c-senior: #9C2F63;
  --c-house:  #2B6FB0;
  --c-energy: #C9821A;
  --c-food:   #2E9E54;

  --font-head: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --maxw: 1280px;
  --pad-x: clamp(20px, 5vw, 76px);
  --sec-y: clamp(56px, 7vw, 104px);
}

.skip { position: absolute; left: -999px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
.display { font-size: clamp(38px, 5.2vw, 72px); line-height: 1.04; letter-spacing: -0.02em; }
.h-xl { font-size: clamp(32px, 4.4vw, 56px); }
.h-lg { font-size: clamp(26px, 3vw, 40px); }
.h-md { font-size: clamp(21px, 2.1vw, 28px); }
.serif-i { font-style: italic; }
.eyebrow {
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand-600);
}
.eyebrow.on-dark { color: var(--brand-300); }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.tiny { font-size: 13px; color: var(--ink-3); }

/* ---------- buttons — consistent, clearly-clickable system ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: .01em;
  padding: 13px 24px; border-radius: 2px; border: 1.5px solid transparent;
  cursor: pointer; transition: all .18s ease; background: none; white-space: nowrap; text-decoration: none;
}
.btn .ar { transition: transform .18s ease; }
.btn:hover .ar { transform: translateX(4px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }

/* primary — filled, raised */
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -8px rgba(8,20,30,.55); }
.btn-primary:hover { background: var(--brand-600); box-shadow: 0 12px 26px -10px rgba(8,20,30,.6); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* secondary — strong brand outline, fills on hover */
.btn-ghost { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-ghost:hover { background: var(--brand); color: #fff; transform: translateY(-1px); }
.btn-ghost.on-dark { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.08); }
.btn-ghost.on-dark:hover { background: #fff; color: var(--brand); border-color: #fff; }

/* inline action — compact pill so every "Czytaj / Zobacz →" reads as clickable */
.btn-text {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 2px;
  background: #fff; color: var(--brand-600); border: 1.5px solid var(--brand-300);
  box-shadow: 0 2px 7px -4px rgba(8,20,30,.3);
  font-weight: 700; font-size: 14px; letter-spacing: .01em;
  cursor: pointer; transition: all .18s ease; text-decoration: none; white-space: nowrap;
}
.btn-text .ar { transition: transform .18s ease; }
.btn-text:hover { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 9px 20px -9px rgba(8,20,30,.45); transform: translateY(-1px); }
.btn-text:hover .ar { transform: translateX(4px); }
.btn-text:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- media placeholders (stand in for photography) ---------- */
.media {
  position: relative; overflow: hidden; background: var(--brand);
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px),
    linear-gradient(160deg, var(--brand-600), var(--brand));
  display: grid; place-items: center;
}
.media .cap {
  font-family: 'Spline Sans Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .02em;
  color: rgba(255,255,255,.82); background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.28); border-radius: 3px; padding: 6px 12px;
}
.media.tint { background: var(--brand-tint);
  background-image: repeating-linear-gradient(135deg, rgba(14,58,51,.06) 0 2px, transparent 2px 22px); }
.media.tint .cap { color: var(--brand-600); background: rgba(255,255,255,.7); border-color: rgba(14,58,51,.25); }
.media .corner { position:absolute; width:14px; height:14px; border:2px solid rgba(255,255,255,.5); }
.media .corner.tl{ top:14px; left:14px; border-right:0; border-bottom:0; }
.media .corner.br{ bottom:14px; right:14px; border-left:0; border-top:0; }

/* ---------- header ---------- */
.util { background: var(--brand); color: rgba(255,255,255,.82); font-size: 13px; }
.util .wrap { display: flex; align-items: center; gap: 22px; height: 40px; }
.util a { color: rgba(255,255,255,.82); }
.util a:hover { color:#fff; }
.util .sp { flex: 1; }

header.site {
  position: sticky; top: 0; z-index: 40; background: rgba(251,250,245,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 30px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; }
.brand .name { font-family: var(--font-head); font-size: 22px; letter-spacing: -.01em; color: var(--brand); white-space: nowrap; }
header.site nav { display: flex; gap: 26px; margin-left: 8px; }
header.site nav a { font-size: 15px; font-weight: 500; color: var(--ink); padding: 6px 0; position: relative; white-space: nowrap; }
header.site nav a:hover { color: var(--brand-600); }
header.site nav a::after { content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px; background:var(--accent); transform:scaleX(0); transition:transform .18s; }
header.site nav a:hover::after { transform: scaleX(1); }
header.site .sp { flex: 1; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.icon-btn:hover { background: var(--bg-2); }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero .stage { position: relative; min-height: clamp(520px, 72vh, 760px); }
.hero .media { position: absolute; inset: 0; place-items: start end; padding: 22px 26px; }
.hero .scrim { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,28,24,.82) 0%, rgba(8,28,24,.5) 42%, rgba(8,28,24,.12) 78%); }
.hero .inner { position: relative; min-height: clamp(520px, 72vh, 760px); display: flex; align-items: center; padding-bottom: 92px; }
.hero .copy { max-width: 720px; color: #fff; }
.hero h1 { color: #fff; margin: 16px 0 0; }
.hero .lead { color: rgba(255,255,255,.9); margin-top: 22px; max-width: 600px; }
.hero .esg-note { margin-top: 18px; font-size: 14px; color: rgba(255,255,255,.72); max-width: 560px; border-left: 2px solid var(--brand-300); padding-left: 14px; }
.hero .cta-row { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

/* segment selector bar overlapping hero bottom */
.segbar { position: relative; margin-top: -54px; z-index: 5; }
.segbar .card {
  background: var(--white); border: 1px solid var(--line); box-shadow: 0 24px 50px -28px rgba(14,40,36,.45);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.segbar .seg {
  padding: 22px 24px 20px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 9px; cursor: pointer; transition: background .15s; position: relative;
}
.segbar .seg:last-child { border-right: 0; }
.segbar .seg:hover { background: var(--bg-2); }
.segbar .seg .k { display:flex; align-items:center; gap:9px; }
.segbar .seg .k .eyebrow { white-space: nowrap; }
.segbar .seg .dot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.segbar .seg h3 { font-size: 19px; margin-top: 2px; }
.segbar .seg .go { font-size: 13px; font-weight: 700; color: var(--brand-600); display:flex; align-items:center; gap:6px; margin-top: 2px; }
.segbar .seg .ar { transition: transform .18s; }
.segbar .seg:hover .ar { transform: translateX(4px); }

/* ---------- section scaffolding ---------- */
section.band { padding-block: var(--sec-y); }
.band.alt { background: var(--bg-2); }
.band.tint { background: var(--brand-tint); }
/* hairline separators so adjacent same-bg sections stay distinct */
section.band + section.band,
section.band + section[id="wiedza"],
section[id="wiedza"] + section.band { border-top: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; margin-bottom: 48px; }
.sec-head .t { max-width: 720px; }
.sec-head h2 { margin-top: 14px; }
.sec-head .intro { margin-top: 16px; }

/* statement */
.statement { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.statement .big { font-family: var(--font-head); font-size: clamp(26px, 3vw, 40px); line-height: 1.16; letter-spacing: -.01em; }
.statement .big em { color: var(--brand-600); font-style: italic; }

/* ---------- segment cards (services) ---------- */
.grid { display: grid; gap: 28px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

.svc { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.svc:hover { box-shadow: 0 30px 60px -34px rgba(14,40,36,.5); transform: translateY(-3px); }
.svc .media { height: 200px; }
.svc .body { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.svc .badge { display:flex; align-items:center; gap:9px; font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--ink-3); }
.svc .badge .dot { width:9px;height:9px;border-radius:2px; }
.svc h3 { font-size: 26px; }
.svc ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.svc ul li { position: relative; padding-left: 20px; font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.svc ul li::before { content:""; position:absolute; left:0; top:9px; width:8px; height:2px; background: var(--brand-600); }
.svc .foot { margin-top: auto; padding-top: 6px; }

/* ---------- pillars (areas) ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar { background: var(--white); padding: 0; display:flex; flex-direction:column; }
.pillar .media { height: 168px; border-bottom: 3px solid var(--accent); }
.pillar .pp { padding: 24px 24px 28px; display:flex; flex-direction:column; gap:12px; flex:1; }
.pillar .num { font-family: var(--font-head); font-size: 15px; color: var(--ink-3); }
.pillar h3 { font-size: 23px; }
.pillar p { margin:0; font-size: 14.5px; color: var(--ink-2); line-height:1.45; }
.pillar .lk { margin-top:auto; font-size:14px; font-weight:700; color:var(--brand-600); display:flex; align-items:center; gap:7px; }
.pillar .ar { transition: transform .18s; } .pillar:hover .ar { transform: translateX(4px); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; counter-reset: st; }
.step { position: relative; padding-top: 52px; border-top: 2px solid var(--line); }
.step::before { counter-increment: st; content: "0" counter(st); position:absolute; top:14px; left:0; line-height:1;
  font-family: var(--font-head); font-size: 30px; color: var(--brand); }
.step.active-line { border-top-color: var(--brand); }
.step h4 { font-size: 19px; margin-top: 0; }
.step p { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; line-height:1.45; }

/* ---------- consortia ---------- */
.consortium { display:flex; flex-direction:column; background: var(--white); border:1px solid var(--line); }
.consortium .top { padding: 26px 26px 0; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.consortium .logo { height: 56px; display:flex; align-items:center; }
.consortium .logo img { height: 56px; width: auto; max-width: 200px; object-fit: contain; display:block; }
.consortium .logo.txt { min-width: 120px; border: 1px dashed var(--brand-300); border-radius:4px;
  display:grid; place-items:center; font-family:'Spline Sans Mono',monospace; font-size:11px; color:var(--brand-600); padding: 0 14px; }
.consortium .chip { font-size:11.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:5px 10px; border-radius:20px; color:#fff; }
.consortium .cb { padding: 18px 26px 26px; display:flex; flex-direction:column; gap:14px; flex:1; }
.consortium h3 { font-size: 24px; }
.consortium p { margin:0; font-size:15px; color:var(--ink-2); }
.consortium .ext { margin-top:auto; font-size:14px; font-weight:700; color:var(--brand-600); display:flex; align-items:center; gap:8px; }

/* ---------- materials ---------- */
.mat { background: var(--white); border:1px solid var(--line); padding: 24px; display:flex; flex-direction:column; gap:14px; transition: border-color .18s; }
.mat:hover { border-color: var(--brand-300); }
.mat .tagrow { display:flex; align-items:center; justify-content:space-between; }
.mat .gated { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-3); border:1px solid var(--line); border-radius:3px; padding:4px 8px; }
.mat .fmt { font-family:'Spline Sans Mono',monospace; font-size:11.5px; color:var(--ink-3); }
.mat h3 { font-size: 19px; line-height:1.2; }
.mat .dl { margin-top:auto; }

/* ---------- knowledge strip ---------- */
.know { display:grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border-block:1px solid var(--line); }
.know a { background: var(--bg); padding: 30px var(--pad-x); display:flex; flex-direction:column; gap:10px; transition: background .15s; }
.know a:hover { background: var(--white); }
.know .k-cat { font-size:12.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--brand-600); }
.know h4 { font-size: 21px; }

/* ---------- CTA band ---------- */
.ctaband { background: var(--brand); color:#fff; }
.ctaband .inner { display:grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items:center; padding-block: clamp(48px,6vw,84px); }
.ctaband h2 { color:#fff; }
.ctaband p { color: rgba(255,255,255,.82); margin-top:16px; max-width: 520px; }
.ctaband .actions { display:flex; flex-direction:column; gap:14px; align-items:flex-start; }
.ctaband .actions .btn { width: 100%; justify-content: space-between; }

/* ---------- footer ---------- */
footer.site { background: #0B201C; color: rgba(255,255,255,.72); padding-block: 64px 36px; }
footer.site { background:#0B1B29; }
footer.site .cols { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.14); }
footer.site .name { font-family:var(--font-head); font-size: 26px; color:#fff; display:flex; align-items:center; gap:12px; }
footer.site .name img { height: 40px; }
footer.site h5 { font-family:var(--font-body); font-size:12.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:rgba(255,255,255,.55); margin:0 0 16px; }
footer.site ul { list-style:none; margin:0; padding:0; display:grid; gap:11px; }
footer.site ul a { font-size:15px; color:rgba(255,255,255,.78); }
footer.site ul a:hover { color:#fff; }
footer.site .legal { display:flex; gap:24px; flex-wrap:wrap; padding-top:24px; font-size:13px; color:rgba(255,255,255,.5); }
footer.site .legal .sp { flex:1; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  header.site .wrap { gap: 20px; }
  header.site nav { gap: 16px; }
  header.site nav a { font-size: 14px; }
  .brand .name { font-size: 19px; }
}
@media (max-width: 980px) {
  header.site nav { display: none; }
}
@media (max-width: 1080px) {
  .segbar .card { grid-template-columns: repeat(2,1fr); }
  .segbar .seg:nth-child(2){ border-right:0; }
  .segbar .seg:nth-child(1), .segbar .seg:nth-child(2){ border-bottom:1px solid var(--line); }
  .grid.c4, .pillars, .know { grid-template-columns: repeat(2,1fr); }
  .grid.c3 { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: repeat(3,1fr); row-gap: 36px; }
  .statement { grid-template-columns: 1fr; gap: 20px; }
  .ctaband .inner { grid-template-columns: 1fr; gap: 28px; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  header.site nav, .util .wrap a:not(.last) { display: none; }
  .segbar { margin-top: -28px; }
  .segbar .card { grid-template-columns: 1fr; }
  .segbar .seg { border-right:0; border-bottom:1px solid var(--line); }
  .grid.c4, .grid.c3, .grid.c2, .pillars, .know, .steps { grid-template-columns: 1fr; }
  .sec-head { grid-template-columns: 1fr; }
  footer.site .cols { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- pasek górny: nie rozpychaj / ucinaj tekst ---------- */
.util .wrap span:not(.sp) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.util .wrap a { white-space: nowrap; flex: none; }

/* ---------- hamburger + menu mobilne ---------- */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 11px; border: 0; background: transparent; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--brand); border-radius: 2px; transition: transform .22s, opacity .22s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { position: fixed; inset: 0; z-index: 70; background: rgba(8,20,30,.5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav-inner {
  position: absolute; top: 0; right: 0; height: 100%; width: min(330px, 84vw);
  background: #fff; box-shadow: -14px 0 44px rgba(0,0,0,.20);
  transform: translateX(100%); transition: transform .28s ease;
  display: flex; flex-direction: column; padding: 76px 24px 28px; overflow-y: auto;
}
.mobile-nav.open .mobile-nav-inner { transform: translateX(0); }
.mobile-nav-inner nav { display: flex; flex-direction: column; }
.mobile-nav-inner a { font-size: 17px; font-weight: 500; color: var(--ink); padding: 15px 4px; border-bottom: 1px solid var(--line); }
.mobile-nav-inner a:hover { color: var(--brand-600); }
.mobile-nav-inner a.btn { margin-top: 20px; border-bottom: 0; justify-content: center; color: #fff; }
.mobile-nav-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 30px; line-height: 1; color: var(--brand); cursor: pointer; }

@media (max-width: 980px) {
  .nav-toggle { display: flex; }
}
@media (max-width: 600px) {
  header.site .wrap > .btn-primary { display: none; } /* kontakt jest w menu mobilnym */
  .brand .name { font-size: 18px; }
}
