/* ===========================================================
   Metalvisi Sagl — single page site
   Palette drawn from the company logo:
   deep architectural blue #1B2A57, logo blue #2850B9,
   logo cyan #02ADFE, logo red #CB161A (used once, as the CTA)
   anthracite (matches the aluminium frames in the site photos) #14171C
   =========================================================== */

:root {
  --ink: #14171C;
  --ink-soft: #1E222A;
  --blue-deep: #17224A;
  --blue: #2850B9;
  --cyan: #02ADFE;
  --red: #C21A1E;
  --paper: #F6F5F2;
  --paper-dim: #EAE8E2;
  --line: rgba(20, 23, 28, 0.12);
  --line-on-dark: rgba(255, 255, 255, 0.14);
  --white: #FDFDFC;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  padding-bottom: 0.9rem;
  position: relative;
}
.section-eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.4rem;
  height: 3px;
  background: var(--cyan);
  border-radius: 2px;
}
.section-eyebrow--light { color: var(--cyan); }

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* subtle grain texture over whole page, very low opacity, purely decorative */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(20, 23, 28, 0.0);
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.is-scrolled {
  background: rgba(20, 23, 28, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-on-dark);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand-logo {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--white);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.main-nav a:hover { opacity: 1; }
.main-nav .nav-cta {
  background: var(--cyan);
  color: var(--ink);
  padding: 0.55rem 1.1rem;
  border-radius: 3px;
  font-weight: 600;
  opacity: 1;
}
.main-nav .nav-cta:hover { background: #33bcfe; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 62%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(15,17,20,0.88) 0%, rgba(15,17,20,0.45) 42%, rgba(15,17,20,0.18) 65%, rgba(20,25,35,0.35) 100%);
}

/* Decorative sliding-door frame animation echoing the product itself */
.hero-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.frame-track {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 4px;
  background: rgba(255,255,255,0.5);
  transform: translateX(-50%);
  animation: track-in 1.4s cubic-bezier(.65,0,.35,1) 0.1s both;
}
.frame-pane {
  position: absolute;
  top: 0; bottom: 0;
  width: 51%;
  border: 3px solid rgba(255,255,255,0.55);
  box-sizing: border-box;
}
.frame-pane--left {
  left: 0;
  border-right: none;
  animation: pane-left 1.4s cubic-bezier(.65,0,.35,1) both;
}
.frame-pane--right {
  right: 0;
  border-left: none;
  animation: pane-right 1.4s cubic-bezier(.65,0,.35,1) both;
}
@keyframes pane-left {
  from { transform: translateX(0); opacity: 0.9; }
  to   { transform: translateX(-100%); opacity: 0; }
}
@keyframes pane-right {
  from { transform: translateX(0); opacity: 0.9; }
  to   { transform: translateX(100%); opacity: 0; }
}
@keyframes track-in {
  from { opacity: 0; }
  to   { opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem 6.5rem;
  width: 100%;
  color: var(--white);
}
.hero-kicker {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cyan);
  margin: 0 0 1rem;
  opacity: 0;
  animation: rise 0.7s ease 1.5s both;
}
.hero-logo {
  display: block;
  height: 58px;
  width: auto;
  margin: 0 0 1.6rem;
  opacity: 0;
  animation: rise 0.7s ease 1.5s both;
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  font-weight: 800;
  line-height: 0.98;
  margin: 0 0 1.6rem;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line span,
.hero-title .line {
  opacity: 0;
}
.hero-title .line-1 { animation: rise 0.75s cubic-bezier(.2,.7,.2,1) 1.55s both; }
.hero-title .line-2 { animation: rise 0.75s cubic-bezier(.2,.7,.2,1) 1.68s both; color: var(--cyan); }
.hero-title .line-3 { animation: rise 0.75s cubic-bezier(.2,.7,.2,1) 1.81s both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-lead {
  max-width: 34rem;
  font-size: 1.08rem;
  color: rgba(255,255,255,0.86);
  margin: 0 0 2.2rem;
  opacity: 0;
  animation: rise 0.8s ease 1.95s both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: rise 0.8s ease 2.1s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 3px;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: #a91317; transform: translateY(-2px); }
.btn-ghost {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 26px; height: 42px;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: 20px;
  opacity: 0;
  animation: rise 0.8s ease 2.3s both;
}
.scroll-cue span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: cue-move 1.8s ease-in-out infinite;
}
@keyframes cue-move {
  0% { top: 7px; opacity: 1; }
  70% { top: 22px; opacity: 0; }
  71% { top: 7px; opacity: 0; }
  100% { top: 7px; opacity: 1; }
}

/* ---------------- Intro ---------------- */
.intro {
  padding: 6.5rem 1.5rem;
  background: var(--paper);
}
.intro-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.intro-text {
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 3.5rem;
  font-weight: 400;
}
.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2.4rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.stat-figure {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue);
}
.stat-label {
  font-size: 0.88rem;
  color: #4A4E57;
}

/* ---------------- Services ---------------- */
.services {
  background: var(--ink);
  color: var(--white);
  padding: 6.5rem 1.5rem;
}
.services-head {
  max-width: var(--container);
  margin: 0 auto 3.2rem;
}
.services-head h2 {
  color: var(--white);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  max-width: 30rem;
  margin-top: 0.6rem;
}
.services-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-on-dark);
  border: 1px solid var(--line-on-dark);
}
.service-card {
  background: var(--ink);
  padding: 2.4rem 2rem;
  transition: background 0.3s ease;
}
.service-card:hover { background: var(--ink-soft); }
.service-card--highlight {
  background: var(--blue-deep);
}
.service-card--highlight:hover { background: #1c2c5e; }
.service-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 1.1rem;
}
.service-card h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.7rem;
}
.service-card p {
  font-size: 0.94rem;
  color: rgba(255,255,255,0.72);
  margin: 0;
}

/* ---------------- Gallery ---------------- */
.gallery {
  padding: 6.5rem 1.5rem;
  background: var(--paper);
}
.gallery-head {
  max-width: var(--container);
  margin: 0 auto 3rem;
}
.gallery-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-top: 0.6rem;
  max-width: 34rem;
}
.gallery-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 1.1rem;
}
.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  grid-column: span 2;
  grid-row: span 1;
}
.gallery-item--tall { grid-row: span 2; }
.gallery-item--wide { grid-column: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1.1rem 0.9rem;
  font-size: 0.86rem;
  color: var(--white);
  background: linear-gradient(0deg, rgba(15,17,20,0.85), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }

/* ---------------- Advantages ---------------- */
.advantages {
  padding: 6.5rem 1.5rem;
  background: var(--paper-dim);
}
.advantages-head {
  max-width: var(--container);
  margin: 0 auto 3rem;
}
.advantages-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  max-width: 36rem;
  margin-top: 0.6rem;
}
.advantages-list {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2.6rem;
}
.advantage h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
  color: var(--blue);
}
.advantage p {
  font-size: 0.93rem;
  color: #4A4E57;
  margin: 0;
}

/* ---------------- Contact ---------------- */
.contact {
  background: var(--blue-deep);
  color: var(--white);
  padding: 6.5rem 1.5rem;
}
.contact-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
}
.contact-intro h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0.6rem 0 1.2rem;
  max-width: 22rem;
}
.contact-intro p {
  color: rgba(255,255,255,0.78);
  max-width: 28rem;
  font-size: 1.02rem;
}
.contact-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1.5rem;
  align-content: start;
}
.contact-block {
  border-top: 1px solid var(--line-on-dark);
  padding-top: 1.2rem;
}
.contact-block:first-child { grid-column: span 2; }
.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}
.contact-block p {
  margin: 0;
  font-size: 1rem;
  color: rgba(255,255,255,0.92);
  line-height: 1.6;
}
.contact-block a { transition: color 0.2s ease; }
.contact-block a:hover { color: var(--cyan); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--ink);
  padding: 2.2rem 1.5rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-logo {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.footer-inner p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin: 0;
}

/* ---------------- Reveal on scroll ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-stats { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-item--tall { grid-row: span 2; }
  .gallery-item--wide { grid-column: span 2; }
  .advantages-list { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .header-inner.nav-open .main-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(20,23,28,0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1.2rem;
  }

  .hero-content { padding-bottom: 4.5rem; }
  .hero-logo { height: 40px; margin-bottom: 1.2rem; }
  .hero-frame { display: none; }
  .intro { padding: 4.5rem 1.25rem; }
  .intro-text { font-size: 1.15rem; }
  .intro-stats { grid-template-columns: 1fr; gap: 1.6rem; }
  .services, .gallery, .advantages, .contact { padding: 4.5rem 1.25rem; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .gallery-item, .gallery-item--tall, .gallery-item--wide { grid-column: span 1; grid-row: span 1; }
  .advantages-list { grid-template-columns: 1fr; gap: 1.8rem; }
  .contact-details { grid-template-columns: 1fr; }
  .contact-block:first-child { grid-column: span 1; }
}
