/* ==========================================================================
   FORT INSTAL — Design system
   Brand: technical & infrastructure management / HVAC
   Palette drawn from the logo: deep navy + bright blue + graphite grey
   ========================================================================== */

:root {
  /* Brand colours */
  --navy:       #0e2f4a;   /* deep blue — headers, primary */
  --navy-dark:  #0a2439;
  --blue:       #1d8fc9;   /* bright accent blue from the logo icon */
  --blue-dark:  #0f6c9e;
  --blue-soft:  #e8f3fa;

  /* Neutrals */
  --ink:        #1f2a33;   /* body text */
  --gray:       #5b6a78;   /* muted text */
  --line:       #e3e9ef;   /* borders */
  --light:      #f4f7fa;   /* section background */
  --white:      #ffffff;

  /* Aliases kept for existing markup */
  --primary:    var(--navy);
  --secondary:  var(--blue);
  --accent:     var(--light);
  --text:       var(--ink);

  /* Design tokens */
  --radius:     14px;
  --radius-sm:  8px;
  --shadow-sm:  0 4px 16px rgba(14, 47, 74, 0.06);
  --shadow-md:  0 12px 34px rgba(14, 47, 74, 0.10);
  --container:  1160px;
  --header-h:   76px;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue-dark); text-decoration: none; }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; font-weight: 800; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 84px 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: 640px; margin: 0 auto 52px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--gray); font-size: 1.05rem; }
.section--navy .section-head p { color: rgba(255,255,255,0.72); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 10px 22px rgba(29, 143, 201, 0.32); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.82);
  font-size: 0.86rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  flex-wrap: wrap;
}
.topbar a { color: #fff; }
.topbar-contact { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-contact span, .topbar-contact a { display: inline-flex; align-items: center; gap: 7px; }
.topbar .ico { width: 15px; height: 15px; stroke: var(--blue); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 22px rgba(14, 47, 74, 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 42px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}
.site-nav a:not(.btn):hover { color: var(--blue); }
.site-nav a.active:not(.btn) { color: var(--blue); }
.site-nav .nav-cta { margin-left: 8px; color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 3px; width: 26px;
  background: var(--navy); border-radius: 3px;
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(115deg, rgba(10,36,57,0.94) 0%, rgba(14,47,74,0.86) 45%, rgba(15,108,158,0.72) 100%),
    var(--navy);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    url("slike/Fort_ante.png");
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 92px 0;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.hero h1 .accent { color: var(--blue); }
.hero-lead { font-size: 1.18rem; color: rgba(255,255,255,0.85); max-width: 520px; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 40px; }
.hero-badge { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.9); font-weight: 600; font-size: 0.95rem; }
.hero-badge .ico { width: 22px; height: 22px; stroke: var(--blue); flex-shrink: 0; }

.hero-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(4px);
}
.hero-card h3 { color: #fff; font-size: 1.25rem; margin-bottom: 18px; }
.hero-card ul { list-style: none; display: grid; gap: 14px; }
.hero-card li { display: flex; align-items: flex-start; gap: 12px; color: rgba(255,255,255,0.9); }
.hero-card li .ico { width: 20px; height: 20px; stroke: var(--blue); flex-shrink: 0; margin-top: 3px; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--navy) 0%, var(--blue-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 70px 24px;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 2.9rem); margin: 12px 0; }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto; font-size: 1.08rem; }

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--blue); line-height: 1; }
.stat-label { color: var(--gray); font-size: 0.95rem; margin-top: 8px; }
.section--navy .stat-label { color: rgba(255,255,255,0.72); }

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue);
}
.service-icon {
  width: 58px; height: 58px;
  border-radius: 14px;
  background: var(--blue-soft);
  display: grid; place-items: center;
  margin-bottom: 20px;
}
.service-icon .ico { width: 30px; height: 30px; stroke: var(--blue); }
.service-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.service-card p { color: var(--gray); font-size: 0.97rem; }

/* ---------- Feature / why-us list ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 30px; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .ico { width: 26px; height: 26px; stroke: var(--blue); flex-shrink: 0; margin-top: 4px; }
.feature h3 { font-size: 1.08rem; margin-bottom: 6px; }
.feature p { color: var(--gray); font-size: 0.96rem; }

/* ---------- About split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; }
.split-body h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
.split-body p { color: var(--gray); margin-bottom: 16px; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.team-member {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.team-member:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.team-photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
}
/* Initial-based placeholder avatar */
.avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  font-size: 2.2rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  box-shadow: 0 8px 20px rgba(14,47,74,0.18);
}
.team-name { font-size: 1.22rem; color: var(--navy); margin-bottom: 4px; }
.team-role { color: var(--blue); font-weight: 600; font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.contact-list { display: grid; gap: 22px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .ico-wrap {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255,255,255,0.1); display: grid; place-items: center; flex-shrink: 0;
}
.contact-item .ico { width: 22px; height: 22px; stroke: var(--blue); }
.contact-item strong { display: block; color: #fff; margin-bottom: 2px; }
.contact-item span, .contact-item a { color: rgba(255,255,255,0.75); }

/* Direct-email panel (replaces the old contact form) */
.email-card { background: var(--white); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-md); }
.email-card h3 { margin-bottom: 10px; }
.email-card-lead { color: var(--gray); font-size: 0.97rem; margin-bottom: 24px; }

.email-list { list-style: none; display: grid; gap: 10px; margin-bottom: 26px; }
.email-list a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--light);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.email-list a:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  transform: translateY(-2px);
}
.email-addr { display: block; font-weight: 700; color: var(--navy); word-break: break-all; }
.email-note { display: block; font-size: 0.87rem; color: var(--gray); margin-top: 2px; }

.email-card-cta { width: 100%; justify-content: center; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,0.75); max-width: 520px; margin: 0 auto 30px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.72); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-brand-logo { height: 40px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: rgba(255,255,255,0.72); }
.footer-col a:hover { color: var(--blue); }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 10px; }
.footer-contact .ico { width: 17px; height: 17px; stroke: var(--blue); flex-shrink: 0; margin-top: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 22px 0;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Reveal on scroll ---------- */
/* Only hidden when JS is active, so content is always visible as a fallback */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 68px 0; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split-media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 24px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-140%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: 14px 10px; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { margin: 14px 0 0; justify-content: center; border-bottom: none; }
  .topbar-contact { gap: 14px; font-size: 0.8rem; }
  .topbar .container { justify-content: center; }
}

@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-ctas .btn { flex: 1; justify-content: center; }
}
