/* ==========================================================================
   HEMFRY - Page: Asfaltiranje  (loaded after hemfry.css)
   01 Hero · 02 Type grid · 03 Process spec · 04 Cross-section (signature)
   05 Asphalt table · 06 References · 07 FAQ panel · 08 Prose
   ========================================================================== */

/* 01 - HERO --------------------------------------------------------------- */
/* Long service words ("Asfaltiranje") must fit 5 columns on one line */
.asf-hero__title {
  font-size: clamp(2.5rem, 1.15rem + 3.55vw, 4.75rem);
}
.asf-hero__media {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
/* Show the 960 px source uncropped at 16:9 instead of stretching it to full column height */
.asf-hero .page-hero__media .media {
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 10;
}
.asf-hero__figures .num {
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 3.25rem);
}
.asf-hero__figures .mono {
  color: var(--fg-muted);
}
@media (max-width: 699px) {
  .asf-hero .page-hero__actions .btn {
    width: 100%;
  }
  .asf-hero__figures > div {
    padding-right: 10px;
  }
  .asf-hero__figures > div + div {
    padding-left: 12px;
  }
  .asf-hero__figures .mono {
    font-size: 0.625rem;
    letter-spacing: 0.08em;
  }
}
@media (max-width: 1099px) {
  .asf-hero__media {
    margin-top: 24px;
  }
}

/* 02 - TYPE GRID (Šta asfaltiramo) --------------------------------------- */
.asf-type {
  min-height: clamp(188px, 11rem + 7vw, 320px);
}
.asf-type__mix {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-faint);
}
.asf-type__mix::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex: none;
}
.type-card--photo .asf-type__mix {
  color: rgba(245, 245, 242, 0.78);
}
.asf-type img {
  object-position: var(--pos, 50% 50%);
}
.asf-type.type-card--photo::after {
  background: linear-gradient(
    0deg,
    rgba(12, 12, 11, 0.92) 0%,
    rgba(12, 12, 11, 0.55) 38%,
    rgba(12, 12, 11, 0.08) 68%,
    rgba(12, 12, 11, 0.3) 100%
  );
}
.asf-type:not(.type-card--photo) .type-card__title {
  font-size: clamp(1.25rem, 0.8rem + 1.35vw, 2.125rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.type-card:not(.type-card--photo).asf-type {
  border: 1px solid transparent;
  transition: border-color var(--t) var(--ease);
}
.type-card:not(.type-card--photo).asf-type:hover {
  border-color: var(--line-strong);
}
@media (max-width: 699px) {
  .asf-type {
    padding: 16px;
    gap: 20px;
  }
  .asf-type .type-card__title {
    font-size: 1.1875rem;
  }
  .asf-type .type-card__text {
    font-size: 0.8125rem;
    line-height: 1.45;
  }
  .asf-type__mix {
    font-size: 0.625rem;
    letter-spacing: 0.08em;
  }
}

/* 03 - PROCESS: technical spec under each step ---------------------------- */
.asf-process .step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.step__spec {
  margin-top: auto;
  padding-top: 16px;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.step__spec::before {
  content: "";
  width: 12px;
  height: 1px;
  background: var(--fg-faint);
}
.asf-process .step__num {
  z-index: 2;
}

/* 04 - CROSS-SECTION (signature) ----------------------------------------- */
.asf-claim {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: end;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.asf-claim__num {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 740;
  font-size: clamp(4rem, 2.6rem + 4.6vw, 7.5rem);
  letter-spacing: -0.05em;
  line-height: 0.8;
  display: flex;
  align-items: baseline;
}
.asf-claim__num span {
  font-size: 0.36em;
  font-weight: 640;
  letter-spacing: -0.02em;
  margin-left: 0.1em;
}
.asf-claim__text {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 620;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  letter-spacing: -0.012em;
  line-height: 1.25;
  max-width: 22ch;
  padding-bottom: 2px;
  text-wrap: balance;
}
@media (max-width: 1099px) {
  .asf-xsec__copy {
    margin-bottom: 40px;
  }
}

.xsec {
  margin: 0;
}
.js .xsec[data-reveal] {
  opacity: 1;
  transform: none;
} /* children animate instead */
.xsec__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(196px, 33%, 276px);
}
.xsec__draw {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 540fr) minmax(0, 60fr);
}
.xsec__leaders {
  width: 100%;
  height: auto;
  overflow: visible;
}
.xsec__leaders path,
.x-stubs {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.xsec__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* SVG styling */
.xsec__svg text {
  fill: var(--ink);
}
.x-mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.x-faint {
  fill: #6f6e68 !important;
}
.x-num {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 680;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.x-num--q {
  font-size: 22px;
}
.x-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.x-edge {
  stroke: var(--ink);
  stroke-width: 1.3;
}
.x-surface {
  stroke: var(--ink);
  stroke-width: 2.5;
  fill: none;
}
.x-thin {
  stroke: var(--ink);
  stroke-width: 1;
  fill: none;
}
.x-dims path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.x-dims path.x-thin {
  stroke-width: 0.8;
}
.x-tire {
  fill: #dcdad2;
  stroke: var(--ink);
  stroke-width: 1.5;
}
.x-tread {
  stroke: var(--ink);
  stroke-width: 0.8;
  opacity: 0.45;
  fill: none;
}
.x-load {
  stroke: var(--ink);
  stroke-width: 2.4;
  fill: none;
}
.x-load--head {
  stroke-linejoin: miter;
}
.x-level {
  fill: var(--accent);
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.x-cone__fill {
  fill: var(--accent);
  opacity: 0.12;
}
.x-cone__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.6;
  stroke-dasharray: 8 6;
}
.x-arrows path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-linejoin: miter;
}
.x-arrows .x-base {
  stroke: var(--accent);
  stroke-width: 4;
}
.x-tag rect {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.2;
}
.x-tag text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  letter-spacing: 0.02em;
}

/* Labels (HTML) - aligned to leader ends on ≥700 px */
.xsec__labels {
  position: relative;
}
.xsec__labels li {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--y);
  transform: translateY(-9px);
  padding-left: 38px;
}
.xsec__labels li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8.5px;
  width: 30px;
  height: 1.2px;
  background: var(--ink);
}
.xsec__labels li::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 6px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}
.xsec__k {
  display: flex;
  gap: 8px;
  color: var(--fg-faint);
  line-height: 17px;
}
.xsec__k b {
  font-weight: 600;
  color: var(--ink);
}
.xsec__n {
  margin-top: 4px;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 650;
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.xsec__m {
  margin-top: 3px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--fg-muted);
}

.xsec__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--fg-muted);
}
.xsec__key {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.xsec__key--load::before {
  content: "";
  width: 28px;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0 8px,
    transparent 8px 13px
  );
}
.xsec__key--level::before {
  content: "";
  width: 12px;
  height: 10px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.xsec__legend .faint {
  margin-left: auto;
}

@media (max-width: 699px) {
  /* Leaders hide; numbered tags in the drawing map to the list below */
  .xsec__draw {
    grid-template-columns: 1fr;
  }
  .xsec__leaders,
  .x-stubs {
    display: none;
  }
  .xsec__stage {
    grid-template-columns: 1fr;
  }
  .xsec__labels {
    margin-top: 20px;
    border-top: 1px solid var(--ink);
  }
  .xsec__labels li {
    position: static;
    transform: none;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    align-items: baseline;
  }
  .xsec__labels li::before,
  .xsec__labels li::after {
    display: none;
  }
  .xsec__k {
    grid-column: 1 / -1;
  }
  .xsec__n {
    font-size: 1.0625rem;
  }
  .xsec__m {
    text-align: right;
    max-width: 20ch;
  }
  .xsec__legend .faint {
    margin-left: 0;
  }
}

/* Cross-section motion - layers stack bottom → top, then lines draw, then load path */
.js .xsec .x-layer {
  opacity: 0;
  transform: translateY(-34px);
  transition:
    opacity 0.7s var(--ease),
    transform 1.1s var(--ease);
  transition-delay: calc(var(--i) * 150ms);
}
.js .xsec .x-fade {
  opacity: 0;
  transition: opacity 0.7s var(--ease);
  transition-delay: calc(900ms + var(--i, 0) * 110ms);
}
.js .xsec .x-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1s var(--ease-io);
  transition-delay: calc(850ms + var(--i, 0) * 90ms);
}
.js .xsec .x-wheel {
  opacity: 0;
  transform: translateY(-40px);
  transition:
    opacity 0.6s var(--ease),
    transform 1s var(--ease);
  transition-delay: 900ms;
}
.js .xsec .x-cone {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: 50% 0;
  transition: transform 1.3s var(--ease-io);
  transition-delay: 1500ms;
}
.js .xsec .x-arrows {
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: 2400ms;
}
.js .xsec .xsec__labels li {
  opacity: 0;
  translate: -10px 0;
  transition:
    opacity 0.7s var(--ease),
    translate 0.9s var(--ease);
  transition-delay: calc(1300ms + var(--i) * 110ms);
}
.js .xsec.is-in .x-layer,
.js .xsec.is-in .x-wheel,
.js .xsec.is-in .x-arrows {
  opacity: 1;
  transform: none;
}
.js .xsec.is-in .x-fade {
  opacity: 1;
}
.js .xsec.is-in .x-draw {
  stroke-dashoffset: 0;
}
.js .xsec.is-in .x-cone {
  transform: none;
}
.js .xsec.is-in .xsec__labels li {
  opacity: 1;
  translate: 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .js .xsec .x-layer,
  .js .xsec .x-fade,
  .js .xsec .x-wheel,
  .js .xsec .x-arrows,
  .js .xsec .xsec__labels li {
    opacity: 1;
    transform: none;
    translate: none;
  }
  .js .xsec .x-draw {
    stroke-dashoffset: 0;
  }
  .js .xsec .x-cone {
    transform: none;
  }
}

/* 05 - ASPHALT TABLE ------------------------------------------------------ */
.asf-table {
  border-top-color: var(--fg);
}
.asf-table .table {
  min-width: 880px;
}
.asf-table .table tbody th {
  padding: 26px 16px 26px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.875rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-transform: none;
  color: var(--fg);
  white-space: nowrap;
}
.asf-table .table td {
  padding-block: 28px;
}
.asf-table .table thead th:nth-child(1) {
  width: 17%;
}
.asf-table .table thead th:nth-child(2) {
  width: 12%;
}
.asf-table .table thead th:nth-child(3) {
  width: 15%;
}
.asf-table .table thead th:nth-child(6) {
  width: 10%;
  text-align: right;
  padding-right: 0;
}
.asf-table__dim {
  font-family: var(--font-mono);
  font-size: 0.875rem !important;
  color: var(--fg) !important;
  text-align: right;
  white-space: nowrap;
}
.asf-table .table td.asf-table__dim {
  padding-right: 0;
  transition: padding-right var(--t) var(--ease);
}
.asf-table .table tbody tr:hover td.asf-table__dim {
  padding-right: 16px;
}
.asf-table__new {
  display: flex;
  width: max-content;
  margin-top: 12px;
  font-stretch: 100%;
  letter-spacing: 0.1em;
}
.asf-table .tag {
  white-space: nowrap;
}
.asf-grain {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--fg);
  white-space: nowrap;
}
.asf-grain i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  position: relative;
}
.asf-grain i::before {
  content: "";
  width: calc(var(--g) * 1px);
  height: calc(var(--g) * 1px);
  background: var(--accent);
  transform: rotate(8deg);
  border-radius: 1px;
}
.asf-table .table tbody tr:hover {
  background: rgba(245, 245, 242, 0.035);
}

@media (max-width: 699px) {
  .asf-table {
    overflow: visible;
  }
  .asf-table .table {
    min-width: 0;
  }
  .asf-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .asf-table tbody,
  .asf-table tr,
  .asf-table tbody th,
  .asf-table td {
    display: block;
  }
  .asf-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    padding: 26px 0 28px;
    border-bottom: 1px solid var(--line);
  }
  .asf-table .table tbody th,
  .asf-table .table td {
    padding: 0 !important;
    border: 0;
  }
  .asf-table .table tbody th {
    grid-column: 1 / -1;
    font-size: 1.75rem;
  }
  .asf-table .table td[data-label="Namena"],
  .asf-table .table td[data-label="Primena"] {
    grid-column: 1 / -1;
  }
  .asf-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-faint);
  }
  .asf-table__dim {
    text-align: left;
  }
  .asf-table .table td[data-label="Zrno"] {
    order: 1;
  }
  .asf-table .table td[data-label="Debljina"] {
    order: 2;
  }
  .asf-table .table td[data-label="Sloj"] {
    order: 3;
    grid-column: 1 / -1;
  }
  .asf-table .table td[data-label="Namena"] {
    order: 4;
  }
  .asf-table .table td[data-label="Primena"] {
    order: 5;
  }
  .asf-table .table tbody tr:hover {
    background: none;
  }
}

/* 06 - REFERENCES --------------------------------------------------------- */
@media (max-width: 1099px) {
  .asf-refs {
    row-gap: 48px;
  }
}
@media (max-width: 699px) {
  .asf-refs .project-card:not(.project-card--lg) .media {
    aspect-ratio: 4 / 3;
  }
}

/* 07 - FAQ + CTA PANEL ---------------------------------------------------- */
.asf-faq-aside {
  margin-top: 0;
}
@media (max-width: 1099px) {
  .asf-faq-aside {
    margin-top: 56px;
  }
}
@media (min-width: 1100px) {
  .asf-faq-aside {
    margin-top: 8px;
  }
}
.asf-faq-aside .cta-panel {
  padding-top: clamp(36px, 3.4vw, 52px);
}
.asf-faq-aside .h3 {
  max-width: 18ch;
}
.asf-faq-aside .small {
  margin-top: 12px;
}
@media (max-width: 699px) {
  #pitanja .acc-panel__body {
    padding-right: 0;
  }
}
.asf-panel-list {
  border-top: 1px solid var(--line);
}
.asf-panel-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.asf-panel-list .mono {
  color: var(--accent);
}
.asf-panel-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  min-height: 44px;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 620;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.asf-panel-phone svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.asf-panel-phone:hover {
  color: var(--accent);
}

/* 08 - PROSE (SEO) -------------------------------------------------------- */
.asf-prose__lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--fg);
}
.asf-prose__fig {
  margin: 0;
}
@media (min-width: 1100px) {
  .asf-prose__fig {
    margin-top: 120px;
  }
}
@media (max-width: 1099px) {
  .asf-prose__fig {
    margin-top: 56px;
    max-width: 520px;
  }
  .asf-prose__fig .media {
    aspect-ratio: 4 / 3;
    --pos: 50% 70% !important;
  }
}
