/* ------------------------------------------------------------------
   Ideja na kvadrat d.o.o. — static site
   Brand: #aa0000 (logo red), black & white photography,
   diagonal cut motif, Didact Gothic display / Source Sans 3 text.
   ------------------------------------------------------------------ */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Didact Gothic';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/didactgothic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Didact Gothic';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/didactgothic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/sourcesans3-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/sourcesans3-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(../fonts/sourcesans3-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(../fonts/sourcesans3-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --red: #aa0000;
  --red-dark: #870000;
  --red-tint: #f7ecec;
  --ink: #1d1b1b;
  --body: #3d3a3a;
  --muted: #6d6867;
  --surface: #ffffff;
  --surface-2: #f5f3f2;
  --charcoal: #282828;
  --line: #e3dedc;

  --display: 'Didact Gothic', 'Century Gothic', 'URW Gothic', Futura, sans-serif;
  --text: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --wrap: 1120px;
  --narrow: 720px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);

  /* the diagonal cut under every hero: 243 / 1900 of the width, as in the
     original banner artwork, flattened out on very wide screens */
  --cut: clamp(2.5rem, 12.8vw, 11.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--body);
  font-family: var(--text);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.5rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red-dark); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: .75rem 1.25rem; text-decoration: none;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.wrap--narrow { max-width: var(--narrow); }
.section { padding-block: var(--section); }
.section--tint { background: var(--surface-2); }

/* short red rule, from the original separator graphic */
.rule {
  width: 60px; height: 3px; background: var(--red);
  border: 0; margin: 0 0 1.5rem;
}
.rule--center { margin-inline: auto; }
.rule--white { background: #fff; }

.lead { font-size: 1.15em; color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 74px;
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad);
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 34px; height: 34px; flex: none;
  background: var(--red);
  color: #fff; font-family: var(--display); font-size: 1.2rem;
  line-height: 34px; text-align: center; white-space: nowrap;
}
.brand__mark sup { font-size: .6em; vertical-align: super; line-height: 0; }
.brand__name {
  font-family: var(--display); color: var(--ink);
  font-size: 1.05rem; letter-spacing: .01em; line-height: 1.1;
}
.brand:hover .brand__name { color: var(--red); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  padding: .55rem .8rem; font: inherit; font-family: var(--display);
  color: var(--ink); cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: var(--red); color: #fff; border-color: var(--red); }

.nav ul { display: flex; flex-wrap: wrap; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--display);
  color: var(--ink); text-decoration: none;
  font-size: .95rem; padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--red); border-bottom-color: var(--red); }
.nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .5rem var(--pad) 1.25rem;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav a { display: block; padding: .85rem 0; border-bottom: 0; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: var(--charcoal) center / cover no-repeat;
  color: #fff;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.3) 45%, rgba(0,0,0,.5) 100%);
}
/* the diagonal cut: a triangle of page colour taken out of the bottom-left */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: var(--cut);
  background: var(--surface);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin-inline: auto;
  padding: clamp(4rem, 12vw, 8rem) var(--pad) calc(var(--cut) + clamp(2rem, 4vw, 3.5rem));
  min-height: 46vh;
  display: flex; flex-direction: column; justify-content: center;
}
.hero h1 { color: #fff; margin-bottom: 0; max-width: 20ch; }
.hero--center { text-align: center; }
.hero--center .hero__inner { align-items: center; }
.hero--center h1 { max-width: none; }
.hero__kicker {
  font-family: var(--display); text-transform: uppercase;
  letter-spacing: .18em; font-size: .8rem; color: rgba(255,255,255,.82);
  margin: 0 0 1rem;
}

/* red panel — the logo square, used as a content block */
.panel-red {
  background: var(--red); color: #fff;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 30rem;
}
.panel-red a { color: #fff; }
.panel-red a:hover { color: #fff; text-decoration-thickness: 2px; }
.hero .panel-red { margin-left: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--display); font-size: 1rem;
  padding: .8rem 2rem;
  text-decoration: none;
  border: 2px solid var(--red);
  background: var(--red); color: #fff;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--red); }
.btn--outline:hover { background: var(--red); color: #fff; }
.btn--on-red { border-color: #fff; background: transparent; color: #fff; }
.btn--on-red:hover { background: #fff; color: var(--red); border-color: #fff; }

/* ---------- service grid ---------- */
.cards {
  display: grid; gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  list-style: none; margin: 0; padding: 0;
}
/* four services read better as a tidy 2x2 than as 3 + a gap */
@media (min-width: 760px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 880px; margin-inline: auto;
  }
}
.card { text-align: center; }
.card__img {
  width: 160px; height: 160px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 1.25rem;
  filter: grayscale(1);
  transition: transform .2s ease;
}
.card a:hover .card__img { transform: scale(1.04); }
.card h3 { margin-bottom: .5rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--red); }
.card .rule { margin-inline: auto; margin-bottom: 1.1rem; width: 48px; }
.card p { color: var(--muted); font-size: .97rem; }

/* ---------- CTA strip ---------- */
.cta {
  background: var(--red); color: #fff;
  text-align: center;
  padding-block: clamp(2.75rem, 6vw, 4rem);
}
.cta p {
  font-family: var(--display);
  font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem);
  margin: 0 0 1.5rem;
}

/* ---------- prose ---------- */
.prose { max-width: var(--narrow); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.25em; }
.prose h2 + p { margin-top: 0; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 1.6em; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 10px; height: 3px; background: var(--red);
}
.prose ol li::marker { color: var(--red); font-weight: 600; }
.prose blockquote {
  margin: 2em 0; padding-left: 1.5em;
  border-left: 3px solid var(--red);
  font-size: 1.1em; color: var(--ink);
}
.prose strong { color: var(--ink); font-weight: 600; }
.closing {
  margin-top: 2.5rem; padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-family: var(--display); font-size: 1.2em; color: var(--ink);
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}
.contact-grid .panel-red { max-width: none; }
.deflist { margin: 0; }
.deflist dt {
  font-family: var(--display); color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em; font-size: .78rem;
  margin-top: 1.25rem;
}
.deflist dt:first-child { margin-top: 0; }
.deflist dd { margin: .15rem 0 0; color: var(--ink); }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { margin-bottom: .5rem; }

/* the footer wedge is drawn on top of the preceding block */
main > :last-child { padding-bottom: calc(var(--cut) + clamp(1.5rem, 3vw, 2.5rem)); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  background: var(--charcoal); color: #b9b3b1;
  margin-top: 0;
  padding-block: clamp(3rem, 7vw, 4.5rem) 2.5rem;
  font-size: .93rem;
}
/* mirrored diagonal on the top edge, echoing the original footer graphic */
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 1px;
  height: var(--cut);
  background: inherit;
  transform: translateY(-100%);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration-thickness: 2px; }
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.site-footer h4 {
  font-family: var(--display); color: #fff;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .16em;
  margin: 0 0 1rem; font-weight: 400;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer .brand__name { color: #fff; }
.footer-legal {
  margin-top: 2.75rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .85rem; color: #8f8886;
}
.footer-legal p { margin-bottom: .35rem; }

/* ---------- hero photography (recovered from the original banners) ---------- */
.hero--home { background-image: url(../img/hero-home-900.jpg); }
.hero--ai { background-image: url(../img/hero-ai-900.jpg); }
.hero--arhitektura { background-image: url(../img/hero-arhitektura-900.jpg); }
.hero--baze { background-image: url(../img/hero-baze-900.jpg); }
.hero--nabava { background-image: url(../img/hero-nabava-900.jpg); }
.hero--clanci { background-image: url(../img/hero-clanci-900.jpg); }
.hero--kontakt { background-image: url(../img/hero-kontakt-900.jpg); }

@media (min-width: 860px), (min-resolution: 1.5dppx) {
  .hero--home { background-image: url(../img/hero-home-1600.jpg); }
  .hero--ai { background-image: url(../img/hero-ai-1600.jpg); }
  .hero--arhitektura { background-image: url(../img/hero-arhitektura-1600.jpg); }
  .hero--baze { background-image: url(../img/hero-baze-1600.jpg); }
  .hero--nabava { background-image: url(../img/hero-nabava-1600.jpg); }
  .hero--clanci { background-image: url(../img/hero-clanci-1600.jpg); }
  .hero--kontakt { background-image: url(../img/hero-kontakt-1600.jpg); }
}
