/* =========================================================
   WELD FACTORY — style.css
   ========================================================= */

/* ---------------------------------------------------------
   CSS Custom Properties
   --------------------------------------------------------- */
:root {
  --bg:          #0f0f0f;
  --surface:     #1a1a1a;
  --surface-up:  #222222;
  --accent:      #e07b00;
  --accent-h:    #f58f00;
  --text:        #f0f0f0;
  --text-muted:  #888888;
  --border:      #2e2e2e;

  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;

  --nav-h:   64px;
  --radius:  6px;
  --trans:   0.2s ease;
}

/* ---------------------------------------------------------
   Reset & Base
   --------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

/* ---------------------------------------------------------
   Utility
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--trans), color var(--trans), transform var(--trans);
  border: none;
  text-align: center;
}

.btn--primary {
  background-color: var(--accent);
  color: #0f0f0f;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--accent-h);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

.section {
  padding: 5rem 0;
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text);
  padding-bottom: 0.6rem;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
}

.about .section__title::after,
.contact .section__title::after {
  margin-top: 0.5rem;
}

.section__header .section__title::after {
  margin: 0.5rem auto 0;
}

.section__sub {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------------
   NAV
   --------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--trans), border-color var(--trans), backdrop-filter var(--trans);
}

.nav.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.5);
  border-bottom-color: var(--accent);
  backdrop-filter: blur(8px);
}

.nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text);
}

.nav__logo-weld   { color: var(--text); }
.nav__logo-factory { color: var(--accent); }

.nav__spark {
  width: 1.4em;   /* sized up from the wordmark's font-size: the spark shape is thin
                     and spiky, so its bounding box needs to run bigger than the text
                     for the visible "ink" to read at the same visual weight */
  height: 1.4em;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.nav__logo:hover .nav__spark {
  transform: rotate(20deg) scale(1.15);
}

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--trans);
  position: relative;
}

.nav__link::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--accent);
  width: 0;
  transition: width var(--trans);
  position: absolute;
  bottom: -3px;
  left: 0;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  width: 100%;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  z-index: 1001;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--trans), opacity var(--trans);
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
  background-color: var(--bg);
  /* Welded aluminium corner close-up as texture, plus subtle diagonal grid + amber glow on top */
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.012) 0px,
      rgba(255,255,255,0.012) 1px,
      transparent 1px,
      transparent 48px
    ),
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(224,123,0,0.08) 0%, transparent 70%),
    url("assets/images/hero-candidate-zavar-tekstura.jpeg");
  background-repeat: repeat, no-repeat, no-repeat;
  background-position: 0 0, center, center;
  background-size: auto, auto, cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(15,15,15,0.96) 0%,
    rgba(15,15,15,0.7) 55%,
    rgba(15,15,15,0.3) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 660px;
  padding: 2rem 1.25rem;
  margin-left: max(1.25rem, calc((100vw - 1160px) / 2 + 1.25rem));
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero__headline {
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero__sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-hint span {
  display: block;
  width: 20px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 10px;
  position: relative;
}

.hero__scroll-hint span::before {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollHint 1.8s ease infinite;
}

@keyframes scrollHint {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ---------------------------------------------------------
   SERVICES
   --------------------------------------------------------- */
.services {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--surface-up);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.card__icon {
  margin-bottom: 1.25rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.card__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---------------------------------------------------------
   ABOUT
   --------------------------------------------------------- */
.about {
  background-color: var(--bg);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__lead {
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.about__list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.about__list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
}

.about__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.about__image-wrap {
  height: 100%;
  min-height: 360px;
}

.about__image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.about__image {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
}

/* ---------------------------------------------------------
   GALLERY
   --------------------------------------------------------- */
.gallery {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery__item {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  background: none;
  padding: 0;
  position: relative;
}

.gallery__item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
  display: block;
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(224,123,0,0.12);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery__item:hover::after,
.gallery__item:focus-visible::after {
  opacity: 1;
}

.gallery__item:hover img,
.gallery__item:focus-visible img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* ---------------------------------------------------------
   LIGHTBOX
   --------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.lightbox[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(15,15,15,0.7);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--trans), border-color var(--trans);
  line-height: 1;
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
  font-size: 1.75rem;
  padding: 0.2rem 0.65rem 0.25rem;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  padding: 0.5rem 0.8rem 0.6rem;
}

.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f0f0f;
}

/* ---------------------------------------------------------
   CONTACT
   --------------------------------------------------------- */
.contact {
  background-color: var(--bg);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form__label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.required {
  color: var(--accent);
}

.form__optional {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}

.form__input,
.form__textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  transition: border-color var(--trans), box-shadow var(--trans);
  width: 100%;
  outline: none;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224,123,0,0.15);
}

.form__input:invalid:not(:placeholder-shown),
.form__textarea:invalid:not(:placeholder-shown) {
  border-color: #c0392b;
}

.form__textarea {
  resize: vertical;
  min-height: 130px;
}

.form__submit {
  align-self: flex-start;
}

.form__status {
  font-size: 0.875rem;
  min-height: 1.2em;
  color: var(--text-muted);
}

.form__status.success { color: #27ae60; }
.form__status.error   { color: #c0392b; }

/* Info column */
.contact__info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__info-block {}

.contact__info-title {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.contact__link {
  color: var(--text-muted);
  transition: color var(--trans);
  font-size: 0.9375rem;
}

.contact__link:hover {
  color: var(--accent);
}

.contact__address,
.contact__hours {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.contact__map-placeholder {
  width: 100%;
  height: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */
.footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer__logo {
  flex-shrink: 0;
  border-radius: 50%;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans);
}

.footer__social-link:hover {
  color: var(--accent);
}

/* ---------------------------------------------------------
   RESPONSIVE — Tablet (≤ 1024px)
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__grid {
    gap: 2.5rem;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .contact__info {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .contact__map-placeholder {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------
   RESPONSIVE — Mobile (≤ 768px)
   --------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
  }

  /* Nav */
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav__links.open {
    max-height: 280px;
  }

  .nav__link {
    display: block;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    letter-spacing: 0.04em;
  }

  .nav__link::after {
    display: none;
  }

  /* Hero */
  .hero__content {
    margin-left: 0;
    padding: 2rem 1.25rem;
    max-width: 100%;
  }

  .hero__headline {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .hero__sub br {
    display: none;
  }

  /* Services */
  .services__grid {
    grid-template-columns: 1fr;
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__image-wrap {
    min-height: 260px;
    order: -1;
  }

  .about__image-placeholder {
    min-height: 260px;
  }

  /* Gallery */
  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .gallery__item img {
    height: 240px;
  }

  /* Lightbox arrows */
  .lightbox__prev,
  .lightbox__next {
    font-size: 1.5rem;
    padding: 0.4rem 0.6rem;
  }

  /* Contact */
  .contact__info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .form__submit {
    width: 100%;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ---------------------------------------------------------
   RESPONSIVE — Tablet mid (769px – 1024px) gallery 2-col
   --------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------------------------------------------------
   Focus-visible global
   --------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
