/* DigitalFarm Agency — static site styles */
:root {
  --red: #c10023;
  --red-header: #c31431;
  --blue: #0052a3;
  --text: #666;
  --heading: #333;
  --header-h: 80px;
  --header-h-small: 56px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0; }

h1, h3, h4 {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--heading);
  margin: 0;
}

.container { width: 80%; max-width: 1080px; margin: 0 auto; }

/* Anchor targets sit below the fixed header */
section[id] { scroll-margin-top: var(--header-h-small); }
#home { scroll-margin-top: var(--header-h); }

/* ---------- Icons (Font Awesome Free SVGs used as masks so they take currentColor) ---------- */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}
.i-share    { --src: url(../icons/share-alt.svg); }
.i-ad       { --src: url(../icons/ad.svg); }
.i-laptop   { --src: url(../icons/laptop-code.svg); }
.i-envelope { --src: url(../icons/envelope.svg); }
.i-users    { --src: url(../icons/users.svg); }
.i-code     { --src: url(../icons/code.svg); }
.i-tasks    { --src: url(../icons/tasks.svg); }
.i-people   { --src: url(../icons/people-arrows.svg); }
.i-briefcase{ --src: url(../icons/briefcase.svg); }
.i-building { --src: url(../icons/building.svg); }
.i-marker   { --src: url(../icons/map-marker-alt.svg); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--red-header);
  box-shadow: 0 1px 0 rgba(0,0,0,.1);
  transition: box-shadow .4s;
}
.site-header.is-scrolled { box-shadow: 0 0 7px rgba(0,0,0,.1); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  transition: height .4s ease-in-out;
}
.site-header.is-scrolled .container { height: var(--header-h-small); }
.logo img { height: 50px; width: auto; transition: height .4s ease-in-out; }
.site-header.is-scrolled .logo img { height: 36px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: opacity .4s ease-in-out;
}
.main-nav a:hover { opacity: .7; }

.menu-toggle {
  display: none;
  background: #fff;
  color: var(--blue);
  border: 0;
  padding: 5px 6px 3px;
  cursor: pointer;
  line-height: 0;
}
.menu-toggle span { display: block; width: 22px; height: 3px; background: currentColor; margin: 0 0 4px; }

@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--red-header);
    border-top: 3px solid var(--blue);
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 5% ; }
  .main-nav a { display: block; padding: 10px 5%; border-bottom: 1px solid rgba(0,0,0,.03); }
  .main-nav a:hover { background: rgba(0,82,163,.03); opacity: 1; }
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 30px; }
.section-title h1 { font-size: 32px; line-height: 38px; }
.divider { margin: 10px auto 0; }

/* Hero */
.hero {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 200px 0;
  text-align: center;
  color: #fff;
  background-color: rgba(0,0,0,.5);
  background-image: url(../img/marvin-meyer-SYTO3xs06fU-unsplash-scaled.jpg);
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  margin-top: var(--header-h);
}
.hero-title { font-size: 50px; line-height: 2em; margin-bottom: 10px; }
.hero-sub { font-size: 25px; line-height: 1.3; letter-spacing: 1px; max-width: 75%; margin: 0 auto; }

/* Welcome */
.welcome p { font-size: 20px; line-height: 24px; padding-top: 15px; text-align: center; }
.welcome .container > img { width: 100%; }

/* Services */
.services { background: #f6f6f6; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.services .grid-3 { gap: 30px 3%; }
.service {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: #eee;
  transition: all 300ms ease-in;
}
.service:hover { background: #fff; box-shadow: 1px 2px 8px rgba(204,204,204,.6); }
.service .icon { flex: 0 0 64px; width: 64px; height: 60px; font-size: 60px; color: var(--red); }
.service .icon.blue { color: var(--blue); }
.service h4 { font-size: 18px; line-height: 28px; margin-bottom: 5px; }

/* Why choose us */
.feature {
  padding: 20px;
  background: #c31431;
  color: #fff;
  text-align: center;
  line-height: 24px;
  transition: background-color .3s;
}
.feature:hover { background: var(--blue); }
.feature img { box-shadow: 0 16px 16px -8px rgba(0,0,0,.5); margin-bottom: 25px; width: 100%; }
.feature h4 { color: #fff; font-size: 18px; line-height: 28px; margin-bottom: 5px; }

/* About / Geos split rows */
.split { background: #f5f5f5; }
.split-row { display: grid; grid-template-columns: 1fr 1fr; }
.split-img { background-size: cover; background-position: center; min-height: 300px; }
.split-img.people { background-image: url(../img/1000x500x1.jpg); }
.split-img.geos { background-image: url(../img/1000x500x2.jpg); }
.split-text { padding: 80px 40px; }
.split-text h3 { font-size: 22px; line-height: 32px; margin-bottom: 10px; }
.split-text .divider { margin: 0 0 10px; }
.split-text p { line-height: 24px; padding-bottom: 20px; }

/* Counters */
.counters {
  padding: 150px 0;
  background: url(../img/1500x1500.jpg) center / cover;
}
.counters .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3%; }
.counter {
  background: rgba(195,20,49,.5);
  padding: 20px;
  text-align: center;
  color: #fff;
}
.counter .icon { font-size: 60px; width: 75px; height: 60px; }
.counter-value {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-size: 52px;
  line-height: 62px;
  letter-spacing: 1px;
  margin: 10px 0 0;
}
.counter h4 { color: #fff; font-size: 18px; line-height: 28px; }

/* CTA */
.cta {
  padding: 200px 0;
  background: #333 url(../img/1500x700.jpg) center / cover;
  text-align: center;
}
.cta h1 { color: #fff; font-size: 32px; line-height: 42px; }

/* Contacts */
.contacts { background: var(--red); color: #f2f2f2; }
.contacts-row { display: grid; grid-template-columns: 3fr 2fr; gap: 3%; }
.contacts .footer-logo { width: 80%; margin-bottom: 20px; }
.contacts h4 { color: #f2f2f2; font-size: 18px; line-height: 28px; margin-bottom: 30px; }
.contact-list { list-style: none; margin: 0; padding: 0; letter-spacing: 1px; }
.contact-list li { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.contact-list .icon { flex: 0 0 32px; font-size: 24px; color: #fff; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* Bottom bar */
.bottom-bar {
  background: var(--blue);
  color: #fff;
  padding: 10px 0;
  letter-spacing: 1px;
  line-height: 24px;
  text-align: center;
}
.bottom-bar a { color: #fff; text-decoration: underline; }

/* ---------- Privacy policy page ---------- */
.page-content { padding: calc(var(--header-h) + 58px) 0 50px; }
.page-content h1 { font-size: 30px; padding-bottom: 10px; }
.page-content .meta { padding-bottom: 20px; margin-bottom: 30px; border-bottom: 1px solid #e2e2e2; }
.page-content h2 {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 26px;
  color: var(--heading);
  margin: 20px 0 10px;
}
.page-content p { padding-bottom: 1em; }

/* ---------- Cookie consent ---------- */
.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 25px;
  background: #fff;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 -1px 10px rgba(172,171,171,.3);
}
.cookie-bar[hidden], .cookie-modal[hidden] { display: none; }
.cookie-actions { display: flex; gap: 5px; flex-shrink: 0; }
.btn {
  border: 0;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  border-radius: 0;
}
.btn-settings { background: #dedfe0; color: #333; }
.btn-accept { background: #61a229; color: #fff; }
.btn-save { background: #61a229; color: #fff; padding: 10px 20px; }

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.5);
}
.cookie-dialog {
  position: relative;
  background: #fff;
  color: #000;
  width: 100%;
  max-width: 645px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  border-radius: 3px;
  box-shadow: 0 10px 20px 0 rgba(0,0,0,.17);
  font-size: 14px;
  line-height: 1.4;
}
.cookie-body { overflow-y: auto; padding: 0 20px 0 20px; margin-top: 30px; }
.cookie-body h4 {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  color: #000;
  margin-bottom: 15px;
}
.cookie-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; padding: 3px;
  background: none; border: 0; cursor: pointer; color: #000;
}
.cookie-close svg { fill: currentColor; display: block; }
.overview-text { margin-bottom: 10px; }
.overview.collapsed .overview-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.readmore {
  background: none; border: 0; padding: 0; margin-bottom: 15px;
  font: inherit; font-size: 12px; color: #000;
  text-decoration: underline; cursor: pointer;
}
.cookie-cat { margin-bottom: 5px; }
.cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px 0 0;
  background: #f2f2f2;
  border-radius: 4px;
}
.cat-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0 13px 15px;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; color: #000; text-align: left;
}
.cat-toggle::before {
  content: "";
  width: 7px; height: 7px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  transform: rotate(-45deg);
  transition: transform .2s ease-in-out;
  flex-shrink: 0;
}
.cat-toggle[aria-expanded="true"]::before { transform: rotate(45deg); margin-top: -4px; }
.cat-state, .always { font-size: 12px; color: #000; }
.cat-body { padding: 15px 20px; font-size: 14px; }
.cookie-cat table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 12px; line-height: 1.3; }
.cookie-cat th { background: #333d47; color: #fff; font-weight: 400; padding: 15px 10px; text-align: left; }
.cookie-cat td { padding: 15px 10px; border-bottom: 1px solid #f1f1f1; text-align: left; vertical-align: middle; }
.cookie-cat tbody tr { background: #fafafa; }
.switch { position: relative; display: inline-block; flex-shrink: 0; width: 38px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #e3e1e8; border-radius: 20px; transition: .3s; }
.switch .slider::before {
  content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .3s;
}
.switch input:checked + .slider { background: #61a229; }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--blue); }
.cookie-footer { padding: 15px 20px 20px; text-align: right; }
.btn-save { font-size: 14px; padding: 8px 16px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: 1fr; }
  .counters .grid-4 { grid-template-columns: 1fr 1fr; gap: 30px; }
  .split-row { grid-template-columns: 1fr; }
  .split-img { min-height: 600px; }
  .split-row.people .split-img { margin-top: 80px; }
  .split-row.geos .split-img { order: 2; margin-bottom: 80px; }
  .split-text { padding: 30px 40px 50px; }
  .contacts-row { grid-template-columns: 1fr; gap: 40px; }
  .hero-sub { max-width: 100%; }
}

@media (max-width: 767px) {
  .hero-title { font-size: 36px; line-height: 1.4; }
  .hero-sub { font-size: 20px; }
  .section-title h1 { font-size: 28px; }
  .counter-value { font-size: 42px; line-height: 52px; }
  .cta h1 { font-size: 28px; line-height: 38px; }
  .cookie-bar { flex-direction: column; align-items: flex-start; }
  .split-img { min-height: 300px; }
}

@media (max-width: 479px) {
  .container { width: auto; margin: 0 16px; }
  .counters .grid-4 { grid-template-columns: 1fr; }
  .service { flex-direction: column; }
  .logo img { height: 36px; }
}
