/* ============================================================
   BIM BÜRO — design system
   Accent: #000d80 (deep navy)  |  Neutrals: #ebebeb, #d5d5d5
   Font: Montserrat 400/600/700
   ============================================================ */

:root {
  --navy: #000d80;
  --navy-strong: #000a5c;
  --navy-soft: #1a2a9e;
  --white: #ffffff;
  --light: #ebebeb;
  --mid: #d5d5d5;
  --ink: #1a1a2e;
  --muted: #4a4a5e;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(0, 13, 128, 0.10);
  --shadow-lg: 0 14px 40px rgba(0, 13, 128, 0.16);

  --container: 1120px;
  --gutter: 24px;

  --header-h: 76px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.05rem, 4.6vw, 3.05rem); }
h2 { font-size: clamp(1.55rem, 3.1vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.hidden { display: none !important; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: #fff; padding: 10px 16px;
  z-index: 200; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid #7fb3ff; outline-offset: 2px; }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-strong); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.75); }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid rgba(0, 13, 128, 0.08);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 42px; width: auto; }
.brand-word {
  font-weight: 700; color: var(--navy);
  font-size: 1.15rem; letter-spacing: 0.12em;
  text-transform: uppercase; line-height: 1;
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
  padding: 9px 14px; border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover { background: var(--light); text-decoration: none; color: var(--navy); }
.nav a[aria-current="page"] { color: var(--navy); background: var(--light); }

.header-phone {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; color: var(--navy); font-size: 0.95rem;
  white-space: nowrap;
}
.header-phone svg { flex: none; }
.header-phone:hover { text-decoration: none; color: var(--navy-strong); }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer; padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--light); }
.nav-toggle:focus-visible { outline: 3px solid #7fb3ff; outline-offset: 2px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--navy);
  margin: 5px 0; transition: transform 0.2s ease, opacity 0.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 {
  position: relative;
  color: #fff;
  background: var(--navy);
  padding: clamp(90px, 14vw, 160px) 0;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url("../assets/hero-bg.jpg");
  background-size: cover; background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,10,92,0.86) 0%, rgba(0,13,128,0.82) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero-tagline {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  color: #fff; margin: 0 0 18px;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  max-width: 720px; margin: 0 auto 30px; color: rgba(255,255,255,0.92);
  font-weight: 400;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-rule {
  width: 64px; height: 4px; background: #fff; border-radius: 2px;
  margin: 0 auto 26px;
}

/* ---------- Page hero (interior) ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--navy-strong), var(--navy));
  color: #fff; text-align: center; padding: 72px 0 64px;
}
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.9); max-width: 640px; margin: 0 auto; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section--light { background: var(--light); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section--navy .section-head p { color: rgba(255,255,255,0.85); }
.section-head .lead { font-size: 1.15rem; color: var(--navy); font-weight: 600; }
.section--navy .section-head .lead { color: #fff; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow);
  border: 1px solid rgba(0, 13, 128, 0.06);
}
.card--light { background: var(--light); box-shadow: none; border-color: transparent; }
.card--mid { background: var(--mid); box-shadow: none; border-color: transparent; }
.card--navy { background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); }
.card--navy h3, .card--navy h4 { color: #fff; }

.card .icon { margin-bottom: 16px; color: var(--navy); }
.card--navy .icon { color: #fff; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }
.card--navy p { color: rgba(255,255,255,0.88); }
.card--light p, .card--mid p { color: var(--muted); }

.card--link { display: block; transition: transform 0.16s ease, box-shadow 0.16s ease; }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }

/* Highlighted / differentiator card */
.card--feature {
  border: 2px solid var(--navy);
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #f4f5ff 100%);
}
.card--feature .badge {
  display: inline-block; background: var(--navy); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Lists ---------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 9px 0; color: var(--ink);
}
.check-list li svg { flex: none; color: var(--navy); margin-top: 3px; }

/* ---------- Sectors ---------- */
.sector-card { text-align: center; }
.sector-card .icon { display: inline-flex; margin-bottom: 12px; }
.sector-card h3 { margin-bottom: 2px; }

/* ---------- Stage (process) ---------- */
.stage { text-align: center; }
.stage .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700;
  margin-bottom: 14px;
}
.stage h3 { margin-bottom: 6px; }

/* ---------- LOD boxes ---------- */
.lod { text-align: left; }
.lod ul { list-style: none; margin: 0; padding: 0; }
.lod ul li { padding: 8px 0; color: var(--navy); font-weight: 600; border-bottom: 1px solid rgba(0,13,128,0.12); }
.lod ul li:last-child { border-bottom: 0; }

/* ---------- 3D/4D/5D ---------- */
.detail-band {
  position: relative; color: #fff; padding: 88px 0;
  background: var(--navy);
}
.detail-band .band-bg {
  position: absolute; inset: 0;
  background-image: url("../assets/details-bg.jpg");
  background-size: cover; background-position: center;
}
.detail-band .band-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,10,92,0.9), rgba(0,13,128,0.9));
}
.detail-band .container { position: relative; z-index: 2; }
.detail-band h2 { color: #fff; }
.detail-band .section-head p { color: rgba(255,255,255,0.85); }

.dim-item { text-align: center; }
.dim-num {
  font-size: 3rem; font-weight: 700; color: var(--mid);
  letter-spacing: 0.02em; line-height: 1; margin-bottom: 10px;
}
.dim-item p { color: rgba(255,255,255,0.9); margin: 0; }
.dim-item p strong { color: #fff; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy); color: #fff; text-align: center;
  padding: 72px 0;
}
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.88); max-width: 560px; margin: 0 auto 26px; }
.cta-band .cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-strong); color: rgba(255,255,255,0.85);
  padding: 64px 0 0;
}
.site-footer h2 { color: #fff; font-size: 1.3rem; margin-bottom: 8px; }
.site-footer .foot-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  padding-bottom: 44px;
}
.site-footer .foot-grid > div > p:first-of-type { color: rgba(255,255,255,0.7); }
.foot-label {
  font-weight: 700; color: #fff; text-transform: uppercase;
  font-size: 0.8rem; letter-spacing: 0.08em; margin-bottom: 10px;
}
.site-footer a { color: rgba(255,255,255,0.9); }
.site-footer a:hover { color: #fff; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.foot-contact svg { flex: none; color: #fff; margin-top: 3px; }
.foot-logo { height: 46px; width: auto; margin-bottom: 14px; }
.foot-logo-chip {
  background: #fff; display: inline-block;
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px;
}
.foot-logo-chip img { height: 40px; width: auto; }

.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.16);
  padding: 22px 0; text-align: center;
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
}
.foot-bottom a { color: rgba(255,255,255,0.75); }

/* ---------- Contact page ---------- */
.contact-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: start; }

.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: 0.92rem; color: var(--navy); }
.field .req { color: #d33; }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--mid); border-radius: var(--radius-sm);
  background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,13,128,0.12);
}
.field textarea { min-height: 150px; resize: vertical; }

.form-note { font-size: 0.85rem; color: var(--muted); }

.contact-aside .card { margin-bottom: 0; }
.contact-aside h3 { margin-bottom: 4px; }
.contact-aside .check-list li { padding: 7px 0; }

/* ---------- Success / 404 ---------- */
.center-card {
  max-width: 620px; margin: 90px auto; text-align: center;
  padding: 56px 40px; box-shadow: var(--shadow); border-radius: var(--radius);
}
.center-card .big-icon { color: var(--navy); margin-bottom: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .site-footer .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 12px 20px 20px; gap: 4px;
    border-bottom: 1px solid rgba(0,13,128,0.1);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; }
  .header-phone { margin-left: auto; }
  .header-phone .phone-label { display: none; }
}

@media (max-width: 560px) {
  .grid-3, .grid-2, .form-row { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .site-footer .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding: 80px 0; }
}

/* ============================================================
   Micro-interactions & motion
   ============================================================ */

/* -- Header scroll state -- */
.site-header { transition: box-shadow 0.2s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(0, 13, 128, 0.10); }

/* -- Link / brand micro-interactions -- */
.brand { transition: opacity 0.2s ease; }
.brand:hover { opacity: 0.85; }
.brand .brand-logo { transition: transform 0.2s ease; }
.brand:hover .brand-logo { transform: translateY(-1px); }

.nav a:not(.header-phone) { position: relative; }
.nav a:not(.header-phone)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px;
  height: 2px; border-radius: 1px; background: var(--navy);
  transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.nav a:not(.header-phone):hover::after,
.nav a:not(.header-phone)[aria-current="page"]::after { transform: scaleX(1); }

.btn:active { transform: translateY(0) scale(0.985); }

.card .icon { transition: transform 0.2s ease; }
.card:hover .icon { transform: translateY(-3px); }

.foot-logo-chip { transition: transform 0.2s ease; }
.foot-logo-chip:hover { transform: translateY(-2px); }

/* -- Scroll reveal (requires the .js class on <html>) -- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}
.js [data-reveal-delay="1"] { transition-delay: 0.08s; }
.js [data-reveal-delay="2"] { transition-delay: 0.16s; }
.js [data-reveal-delay="3"] { transition-delay: 0.24s; }
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

/* -- Success page icon draw-in -- */
.js .center-card .big-icon path,
.js .center-card .big-icon polyline,
.js .center-card .big-icon circle {
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: draw-in 0.65s ease-out 0.15s forwards;
}
@keyframes draw-in { to { stroke-dashoffset: 0; } }

/* -- Reduced motion: honor the user's preference -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .js .center-card .big-icon path,
  .js .center-card .big-icon polyline,
  .js .center-card .big-icon circle {
    stroke-dashoffset: 0;
    animation: none;
  }
}

/* ============================================================
   Cookie consent banner
   ============================================================ */
.cookie-banner {
  position: fixed; right: 16px; bottom: 16px; left: 16px;
  max-width: 400px; margin-left: auto; z-index: 150;
  background: #fff; color: var(--ink);
  border: 1px solid rgba(0, 13, 128, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  font-size: 0.9rem; line-height: 1.5;
}
.cookie-banner h3 { font-size: 1rem; margin-bottom: 6px; color: var(--navy); }
.cookie-banner p { margin: 0; color: var(--muted); }
.cookie-banner.is-hidden { display: none; }

.cb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cb-actions .btn { font-size: 0.82rem; padding: 9px 16px; }

.cookie-panel {
  margin-top: 14px; border-top: 1px solid var(--light);
  padding-top: 4px;
}
.cb-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--light);
}
.cb-cat:last-of-type { border-bottom: 0; }
.cb-cat label { font-weight: 600; color: var(--navy); font-size: 0.9rem; }
.cb-cat small { display: block; color: var(--muted); font-weight: 400; font-size: 0.8rem; }

.cb-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.cb-switch input { opacity: 0; width: 0; height: 0; }
.cb-slider {
  position: absolute; inset: 0; background: var(--mid);
  border-radius: 999px; cursor: pointer; transition: background 0.2s ease;
}
.cb-slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.cb-switch input:checked + .cb-slider { background: var(--navy); }
.cb-switch input:checked + .cb-slider::before { transform: translateX(20px); }
.cb-switch input:disabled + .cb-slider { cursor: default; opacity: 0.6; }
.cb-switch input:focus-visible + .cb-slider { outline: 3px solid #7fb3ff; outline-offset: 2px; }

.cookie-settings-link {
  background: none; border: 0; padding: 0; margin: 0 4px;
  font: inherit; font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75); cursor: pointer; text-decoration: underline;
}
.cookie-settings-link:hover { color: #fff; }

@media (max-width: 560px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; margin-left: 0; }
}
