/* ============================================================
   TM Metals AG — modern redesign
   Palette: graphite / molten orange (from the company logo)
   ============================================================ */

:root {
  --bg: #101216;
  --bg-alt: #16191f;
  --surface: #1d2129;
  --text: #e8eaee;
  --muted: #9aa1ad;
  --accent: #f5831f;
  --accent-hover: #ff9a3d;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Oswald", "Inter", system-ui, sans-serif;
  --container: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header.is-scrolled {
  background: rgba(16, 18, 22, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}
.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.brand__name {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 1.05rem;
}
.nav { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav__link:hover { color: var(--text); }
.nav__link--cta {
  color: #141414;
  background: var(--accent);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
}
.nav__link--cta:hover { background: var(--accent-hover); color: #141414; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  width: 26px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    /* bottom fade into page background */
    linear-gradient(180deg, rgba(16,18,22,0.35) 0%, rgba(16,18,22,0) 30%, rgba(16,18,22,0.55) 75%, var(--bg) 100%),
    /* left-to-right scrim: keeps the text zone dark, reveals the furnace */
    linear-gradient(100deg, rgba(16,18,22,0.92) 0%, rgba(16,18,22,0.78) 30%, rgba(16,18,22,0.35) 60%, rgba(16,18,22,0.05) 100%),
    url("../img/hero-industry.png") center right / cover no-repeat;
}
.hero__content { position: relative; padding-block: 8rem 5rem; }
.hero__eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.hero__title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 1.4rem;
  overflow-wrap: break-word;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}
.accent { color: var(--accent); }
.hero__lead {
  max-width: 34rem;
  color: #c9ced6;
  font-size: 1.08rem;
  margin-bottom: 2.2rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  color: var(--muted);
  text-decoration: none;
  font-size: 1.4rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: #141414; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border: 1px solid rgba(255,255,255,0.35); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Stats ---------- */
.stats {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-block: 3rem;
  text-align: center;
}
.stat__value {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--accent);
}
.stat__label {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section--dark { background: var(--bg-alt); }
.section__head { margin-bottom: 3rem; max-width: 46rem; }
.section__tag {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.8rem;
}
.section__title {
  font-family: var(--font-head);
  font-size: clamp(1.55rem, 5.5vw, 2.8rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}
.about__text p + p { margin-top: 1.1rem; }
.about__text strong { color: var(--accent); }
.about__geo {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  gap: 0.9rem;
}
.about__geo li {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
}
.about__geo-title {
  display: block;
  color: var(--text);
  font-weight: 600;
}
.about__media { position: relative; }
.about__photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__photo--main { aspect-ratio: 3 / 3.6; }
.about__photo--main figcaption {
  position: absolute;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.about__photo--small {
  position: absolute;
  width: 42%;
  right: -1.2rem;
  bottom: -2.2rem;
  border: 5px solid var(--bg);
  aspect-ratio: 3 / 4;
}
.about__photo--small img { height: 100%; }

/* ---------- Products ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 131, 31, 0.5);
  box-shadow: var(--shadow);
}
.card__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(245,131,31,0.25), rgba(245,131,31,0.08));
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 1.3rem;
}
.card__title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.card__text { color: var(--muted); font-size: 0.95rem; }

/* ---------- Quality ---------- */
.quality {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  counter-reset: q;
}
.quality__item {
  display: flex;
  gap: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  color: var(--muted);
}
.quality__num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}
.quality__note {
  margin-top: 2.5rem;
  font-size: 1.1rem;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 1.2rem;
  max-width: 42rem;
}

/* ---------- Contacts ---------- */
.contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.contacts__address {
  font-style: normal;
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 1.4rem;
}
.contacts__address strong { color: var(--text); }
.contacts__links { display: grid; gap: 1.2rem; }
.contact-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover {
  border-color: rgba(245, 131, 31, 0.55);
  transform: translateX(6px);
}
.contact-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.contact-card__value {
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 1.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__top { color: var(--muted); text-decoration: none; }
.footer__top:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about,
  .contacts { grid-template-columns: 1fr; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .about__photo--small { right: 0; bottom: -1.5rem; }
}

@media (max-width: 640px) {
  .hero__bg {
    background:
      linear-gradient(180deg, rgba(16,18,22,0.35) 0%, rgba(16,18,22,0) 30%, rgba(16,18,22,0.55) 75%, var(--bg) 100%),
      linear-gradient(rgba(16,18,22,0.72), rgba(16,18,22,0.72)),
      url("../img/hero-industry.png") 65% center / cover no-repeat;
  }
  .burger { display: flex; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    background: rgba(16, 18, 22, 0.97);
    backdrop-filter: blur(10px);
    gap: 2.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav.is-open { opacity: 1; pointer-events: auto; }
  .nav__link { font-size: 1.3rem; color: var(--text); }
  .products,
  .quality { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .quality__item { flex-direction: column; gap: 0.6rem; }
  .about__photo--small { display: none; }
}
