/* KAG Asphalt & Beton – landing page
   Palette: asphalt black, concrete grey, white and the logo's road-sign yellow. */

:root {
  --gutter: clamp(20px, 4.2vw, 72px);
  --header-top: calc(14px + env(safe-area-inset-top, 0px));
  --header-h: 64px;

  --asphalt: #151618;
  --asphalt-2: #1f2124;
  --asphalt-3: #2b2e32;
  --concrete: #eceae5;
  --concrete-2: #e2dfd8;
  --white: #ffffff;
  --ink: #18191b;
  --ink-2: #55585e;
  --line: #d6d3cb;
  --on-dark: #f6f5f1;
  --on-dark-2: #b9bbbf;
  --yellow: #f7d917;
  --yellow-hover: #ffe54a;
  --focus: #1d4ed8;
  --focus-dark: #f7d917;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(.19, .72, .14, 1);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-top) + var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--asphalt);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.section--dark :focus-visible,
.hero :focus-visible,
.site-header :focus-visible,
.mobile-menu :focus-visible,
.contact :focus-visible,
.footer :focus-visible { outline-color: var(--focus-dark); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--yellow); color: var(--asphalt);
  font-weight: 700; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.shell {
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 4px; background: var(--yellow); border-radius: 2px; }
.eyebrow--light { color: var(--on-dark-2); }

.h2 {
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  line-height: 1.05; font-weight: 800; letter-spacing: -.025em;
  max-width: 18ch;
}
.h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 44ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px;
  font: 600 16px/1.2 var(--font); text-decoration: none;
  border-radius: 999px; border: 2px solid transparent;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 120ms ease;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--yellow); color: var(--asphalt); }
.btn--primary:hover { background: var(--yellow-hover); }
.btn--ghost { color: var(--on-dark); border-color: rgb(255 255 255 / .45); }
.btn--ghost:hover { border-color: var(--on-dark); background: rgb(255 255 255 / .08); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 4px; text-decoration-color: var(--yellow);
}
.link-arrow span { transition: transform 220ms var(--ease-out); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  --w: 1420px;
  position: fixed; z-index: 60;
  top: var(--header-top); left: 50%; translate: -50% 0;
  width: min(var(--w), calc(100% - 2 * max(16px, env(safe-area-inset-left, 0px))));
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: 14px 10px;
  color: var(--on-dark);
  background: rgb(21 22 24 / .92);
  border: 1px solid rgb(255 255 255 / .08);
  border-radius: 18px;
  transition: width 480ms var(--ease-out), height 320ms var(--ease-out), background-color 240ms ease;
  animation: header-in 380ms var(--ease-out) both;
}
@supports (backdrop-filter: blur(14px)) {
  .site-header { background: rgb(21 22 24 / .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .site-header.is-compact { background: rgb(21 22 24 / .9); }
}
.site-header.is-compact { --w: 1100px; --header-h: 58px; }
@keyframes header-in { from { opacity: 0; transform: translateY(-8px); } }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand__logo { width: auto; height: 38px; }
.brand__name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }

.nav__list { display: flex; gap: clamp(14px, 1.8vw, 26px); }
.nav__link {
  position: relative; display: inline-block; padding: 8px 0;
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--on-dark-2);
  transition: color 180ms ease;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current="true"] { color: var(--on-dark); }
.nav__link:hover::after, .nav__link[aria-current="true"]::after { transform: scaleX(1); }

.header__cta svg { flex-shrink: 0; }

.menu-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: rgb(255 255 255 / .08); color: var(--on-dark);
  cursor: pointer; position: relative;
}
.menu-toggle__bar {
  position: absolute; left: 12px; right: 12px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 240ms var(--ease-out);
}
.menu-toggle__bar:first-child { top: 17px; }
.menu-toggle__bar:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; z-index: 55;
  top: calc(var(--header-top) + 64px + 8px);
  left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  max-height: calc(100svh - var(--header-top) - 88px); overflow-y: auto;
  padding: 12px 20px 20px;
  background: var(--asphalt-2); color: var(--on-dark);
  border: 1px solid rgb(255 255 255 / .08); border-radius: 18px;
  box-shadow: 0 24px 48px rgb(0 0 0 / .35);
  opacity: 0; transform: translateY(-10px);
  transition: opacity 240ms ease, transform 280ms var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu ul { margin-bottom: 16px; }
.mobile-menu li + li { border-top: 1px solid rgb(255 255 255 / .08); }
.mobile-menu ul a {
  display: flex; align-items: center; min-height: 52px;
  font-size: 18px; font-weight: 600; text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  display: grid; min-height: 100vh; min-height: 100svh;
  color: var(--on-dark); background: var(--asphalt);
  overflow: hidden;
}
.hero__media, .hero__veil { position: absolute; inset: 0; }
.hero__media { z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero__veil {
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(10 11 12 / .55) 0%, rgb(10 11 12 / 0) 22%),
    linear-gradient(180deg, rgb(10 11 12 / 0) 30%, rgb(10 11 12 / .62) 58%, rgb(10 11 12 / .92) 100%);
}
.hero__content {
  align-self: end;
  padding-top: calc(var(--header-top) + 64px + 40px);
  padding-bottom: clamp(64px, 11vh, 120px);
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end; gap: clamp(24px, 4.5vw, 64px);
}
.hero__title {
  font-size: clamp(2.625rem, 6.2vw, 5.875rem);
  line-height: 1; font-weight: 800; letter-spacing: -.035em;
  max-width: 13ch;
  text-wrap: balance;
}
.hero__lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: #e2e3e5; max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 36px;
  font-size: 14px; font-weight: 500; color: var(--on-dark-2);
}
.hero__meta a { text-decoration: none; }
.hero__meta a:hover { color: var(--on-dark); text-decoration: underline; }

/* ---------- Content sheet ---------- */
.sheet {
  position: relative; z-index: 3;
  margin-top: -28px;
  background: var(--concrete);
  border-radius: 28px 28px 0 0;
}
.section { padding-block: clamp(64px, 10vh, 128px); }
.section--tint { background: var(--concrete-2); }
.section--dark { background: var(--asphalt); color: var(--on-dark); }
.section--dark .lede { color: var(--on-dark-2); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end; gap: 24px clamp(24px, 4.5vw, 72px);
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head .lede { justify-self: end; }

/* About */
.about {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 88px); align-items: center;
}
.about__text > p:not(.eyebrow):not(.lede) { margin-top: 16px; max-width: 62ch; color: #3a3d42; }
.about__text .lede { margin-top: 24px; color: var(--ink); max-width: 46ch; }
.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 40px; border-top: 1px solid var(--line);
}
.fact { padding: 20px 16px 4px 0; }
.fact + .fact { padding-left: 20px; border-left: 1px solid var(--line); }
.fact dt { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.fact dd { margin-top: 6px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; line-height: 1.25; }

.about__media { position: relative; }
.about__media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -30px rgb(21 22 24 / .45);
}
.about__media figcaption,
.gallery__item figcaption {
  position: absolute; left: 14px; bottom: 14px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--on-dark);
  background: rgb(21 22 24 / .78);
}

/* Services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: clamp(22px, 2.2vw, 30px);
  border: 1px solid rgb(21 22 24 / .06);
}
.service { display: flex; flex-direction: column; gap: 12px; }
.service p { color: var(--ink-2); font-size: 16px; }
.service__icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 10px;
  border-radius: 14px; background: var(--asphalt); color: var(--yellow);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.chips li {
  padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--concrete); border: 1px solid var(--line);
}

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.project {
  display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgb(21 22 24 / .06);
}
.project__media { overflow: hidden; aspect-ratio: 5 / 4; background: var(--asphalt); }
.project__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%;
  transition: transform 700ms var(--ease-out);
}
.project:hover .project__media img { transform: scale(1.04); }
.project__body { display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 2.2vw, 30px); flex: 1; }
.project__body p:not(.tag) { color: var(--ink-2); font-size: 16px; }
.project__body .link-arrow { margin-top: auto; padding-top: 8px; }
.tag {
  align-self: flex-start;
  padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--yellow); color: var(--asphalt);
}
.project--text { background: var(--asphalt); color: var(--on-dark); justify-content: flex-end; min-height: 100%; }
.project--text .project__body { justify-content: flex-end; }
.project--text .project__body p:not(.tag) { color: var(--on-dark-2); }
.project--text .h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.gallery__item { position: relative; grid-column: span 4; border-radius: var(--radius-md); overflow: hidden; background: var(--asphalt-2); }
.gallery__item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 700ms var(--ease-out); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item--wide { grid-column: span 8; }
.gallery__item--wide img { aspect-ratio: 16 / 10; }
.gallery__item--tall { grid-column: span 4; }
.gallery__item--tall img { aspect-ratio: auto; }
.photo-note { margin-top: 20px; font-size: 14px; color: var(--on-dark-2); }

/* Contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "intro list" "map map";
  gap: clamp(32px, 4vw, 56px) clamp(32px, 5vw, 80px);
  padding: clamp(28px, 5vw, 72px);
  background: var(--asphalt); color: var(--on-dark);
  border-radius: 28px;
}
.contact__intro { grid-area: intro; }
.contact__intro .lede { color: var(--on-dark-2); margin-top: 20px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.contact__list { grid-area: list; display: grid; align-content: start; }
.contact__list li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 0; border-bottom: 1px solid rgb(255 255 255 / .1);
  font-size: 18px; font-weight: 600;
}
.contact__list li:first-child { padding-top: 0; }
.contact__list a:not(.link-arrow) { text-decoration: none; }
.contact__list a:not(.link-arrow):hover { color: var(--yellow); }
.contact__list .link-arrow { font-size: 15px; margin-top: 4px; }
.contact__label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); }
.contact__map { grid-area: map; border-radius: var(--radius-md); overflow: hidden; background: var(--asphalt-2); }
.contact__map iframe { display: block; width: 100%; height: clamp(280px, 34vw, 420px); border: 0; filter: grayscale(.35) contrast(1.05); }

/* Footer */
.footer { background: var(--asphalt); color: var(--on-dark-2); padding-top: clamp(56px, 8vh, 96px); font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand img { height: 56px; width: auto; }
.footer__brand p { margin-top: 16px; line-height: 1.5; }
.footer__title { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark); }
.footer ul li + li { margin-top: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--yellow); }
.footer__bottom {
  margin-top: 48px; padding-top: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgb(255 255 255 / .08); font-size: 13px;
}

/* ---------- Motion ---------- */
.reveal-load { animation: rise 520ms var(--ease-out) 80ms both; }
.reveal-load--late { animation-duration: 420ms; animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 480ms ease, transform 520ms var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .brand__name { display: none; }
}
@media (max-width: 1080px) {
  .nav, .header__cta { display: none; }
  .menu-toggle { display: inline-block; }
  .brand__name { display: inline; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project--text { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .lede { justify-self: start; }
  .contact { grid-template-columns: 1fr; grid-template-areas: "intro" "list" "map"; }
  .gallery__item--wide { grid-column: 1 / -1; }
  .gallery__item--tall { grid-column: span 6; }
  .gallery__item--tall img { aspect-ratio: 4 / 5; }
  .gallery__item { grid-column: span 6; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; gap: 20px; }
  .hero__media img { object-position: 40% 50%; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-header { --header-h: 60px; padding-inline: 12px 8px; }
  .brand__logo { height: 32px; }
  .brand__name { font-size: 15px; }
  .services, .projects { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .fact { padding: 14px 0; }
  .gallery { gap: 12px; }
  .gallery__item, .gallery__item--tall { grid-column: 1 / -1; }
  .gallery__item--tall img { aspect-ratio: 4 / 3; object-position: 50% 60%; }
  .hero__actions .btn { flex: 1 1 auto; }
  .contact { border-radius: 22px; }
  .contact__actions .btn { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .brand__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
