/*
Theme Name: Nije Greda
Theme URI: https://nijegreda.hr/
Author: Nije greda d.o.o.
Description: Lightweight one-page theme for Nije greda d.o.o. — structural design and construction supervision.
Version: 1.2.0
Requires at least: 6.5
Requires PHP: 8.4
License: GPL-2.0-or-later
Text Domain: nijegreda
*/

@font-face {
	font-family: "Oswald";
	src: url("assets/fonts/oswald-latin-ext.woff2") format("woff2");
	font-weight: 200 700;
	font-display: swap;
	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: "Oswald";
	src: url("assets/fonts/oswald-latin.woff2") format("woff2");
	font-weight: 200 700;
	font-display: swap;
	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;
}

:root {
	--red: #990000;
	--red-dark: #6f0000;
	--ink: #151515;
	--muted: #5d6168;
	--line: #dedede;
	--bg: #ffffff;
	--bg-soft: #ececec;
	--dark: #111111;
	--radius: 14px;
	--wrap: 1180px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--display: "Oswald", "Arial Narrow", Impact, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--bg); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { margin: 0 0 .45em; font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; padding: 8px 14px; background: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; letter-spacing: .08em; color: var(--red); font-size: 1.3rem; line-height: 1; }
.brand-name small { font-family: var(--font); font-weight: 600; letter-spacing: 0; color: var(--muted); font-size: .8rem; margin-left: 5px; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.site-nav a:hover { color: var(--red); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 30px; border-radius: 999px; background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border: 2px solid var(--red); }
.button:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Hero: rounded photo, offset brand block, overlapping card */
.hero { padding: 48px 0 88px; }
.hero-media { position: relative; margin-left: 12%; }
.hero-media::before { content: ""; position: absolute; left: -7%; bottom: -36px; width: 46%; height: 72%; border-radius: var(--radius); background: var(--red); }
.hero-slides { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 24px; background: #2a2a2a; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-controls { position: absolute; top: 18px; right: 18px; display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); }
.hero-controls[hidden] { display: none; }
.hero-dot, .hero-pause { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.hero-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: background .2s, transform .2s; }
.hero-dot.is-active::before { background: #fff; transform: scale(1.35); }
.hero-pause::before { content: ""; width: 8px; height: 10px; border-left: 3px solid #fff; border-right: 3px solid #fff; box-sizing: border-box; }
.hero-pause[aria-pressed="true"]::before { width: 0; height: 0; border: 0; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.hero-card { position: relative; width: min(600px, 100%); margin: -190px 0 0; padding: 44px 46px 40px; background: #fff; border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .14); }
.hero-card h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.hero-card h1 span { color: var(--red); }
.hero-card .lead { font-size: 1.1rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Sections */
.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--dark); color: #e9e9e9; }
.section-head { margin-bottom: 44px; }
.section-head h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.section-head p { color: var(--muted); max-width: 62ch; font-size: 1.08rem; }
.section-dark .section-head p { color: #b5b5b5; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--red); font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.section-dark .eyebrow { color: #ff5a4f; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; counter-reset: service; }
.service { position: relative; padding: 34px 28px 30px; background: #fff; border-radius: var(--radius); counter-increment: service; }
.service::before { content: counter(service, decimal-leading-zero); display: block; margin-bottom: 18px; font-family: var(--display); font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--red); }
.service h3 { font-size: 1.45rem; }
.service p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Black-and-white photo band with key facts */
.facts { position: relative; padding: 110px 0; color: #fff; background: #222 center / cover no-repeat; }
.facts::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.facts .wrap { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.fact strong { display: block; font-family: var(--display); font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; line-height: 1; }
.fact span { display: block; margin-top: 10px; font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #d6d6d6; }

/* References */
.ref-group + .ref-group { margin-top: 56px; }
.ref-group h3 { font-size: 1.7rem; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 26px; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; }
.ref-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.ref-card:hover, .ref-card:focus-visible { box-shadow: 0 14px 36px rgba(0, 0, 0, .12); transform: translateY(-3px); color: inherit; }
.ref-card img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; background: var(--bg-soft); }
.ref-body { padding: 18px 20px 20px; }
.ref-body h4 { margin: 0 0 6px; font-size: 1.05rem; }
.ref-meta { margin: 0; color: var(--muted); font-size: .9rem; }
.ref-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding: 0; list-style: none; font-size: .82rem; font-weight: 700; letter-spacing: .04em; }
.ref-facts li { color: var(--ink); }
.ref-photos { color: var(--red); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; }
.contact-card, .company-card { padding: 38px; border-radius: var(--radius); }
.contact-card { background: #fff; color: var(--ink); }
.contact-card h3, .company-card h3 { font-size: 1.8rem; margin-bottom: 4px; }
.contact-card .role { color: var(--muted); margin-bottom: 26px; }
.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.contact-list li { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: baseline; }
.contact-list span { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.contact-list a { font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.company-card { border: 1px solid #3a3a3a; color: #e9e9e9; }
.company-card h3 { color: #fff; margin-bottom: 18px; }
.company-card p { margin: 0 0 6px; }
.company-card a { color: #fff; font-weight: 700; }

/* Footer */
.site-footer { padding: 26px 0; background: #000; color: #9a9a9a; font-size: .85rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* Lightbox */
.lightbox { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(10, 12, 14, .96); color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(10, 12, 14, .9); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 20px; }
.lightbox-bar h2 { flex: 1; margin: 0; font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-count { color: #b9bec6; font-size: .9rem; font-variant-numeric: tabular-nums; }
.lightbox-close { min-width: 44px; min-height: 44px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lightbox-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; margin: 0; padding: 0 72px 24px; touch-action: pan-y; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; user-select: none; }
.lightbox-nav { position: absolute; top: 50%; translate: 0 -50%; width: 52px; height: 72px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }
.lightbox-nav:hover, .lightbox-close:hover { background: var(--red); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-nav[hidden] { display: none; }

.not-found { padding: 120px 0; text-align: center; }

@media (max-width: 900px) {
	.hero-media { margin-left: 0; }
	.hero-media::before { left: -12px; bottom: -18px; width: 55%; }
	.hero-card { margin: -70px auto 0; width: calc(100% - 24px); padding: 30px 26px 28px; }
	.facts .wrap { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
	.site-nav { gap: 16px; }
	.site-nav a { font-size: .72rem; letter-spacing: .12em; }
	.brand-name small { display: none; }
	.hero { padding: 24px 0 64px; }
	.hero-slides { aspect-ratio: 4 / 3; border-radius: 16px; }
	.hero-controls { top: 10px; right: 10px; padding: 4px 6px; }
	.hero-dot, .hero-pause { width: 20px; }
	.hero-card { margin-top: -44px; }
	.section { padding: 64px 0; }
	.facts { padding: 72px 0; }
	.contact-grid { grid-template-columns: 1fr; }
	.contact-card, .company-card { padding: 28px 24px; }
	.lightbox-stage { padding: 0 8px 80px; }
	.lightbox-nav { top: auto; bottom: 12px; translate: none; height: 56px; }
}

@media (max-width: 460px) {
	.brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.ref-card, .hero-slide { transition: none; }
}
