/* =========================================================
   TARGET LANDING PAGE
   Styles are grouped by page section, then responsive rules.
   ========================================================= */

/* 1. Design tokens and browser defaults */
:root {
  --orange: #f07819;
  --ink: #222;
  --gray: #f1f1f1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font: 14px Inter, Arial, sans-serif;
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

/* Shared width wrapper keeps content aligned across sections. */
.wrap {
  width: min(1440px, calc(100% - 9vw));
  margin: 0 auto;
}

/* 2. Hero and navigation */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  color: #fff;
  background:
    linear-gradient(to bottom, transparent 100%, #fff 100%),
    linear-gradient(#16161677, #16161688),
    url("/assets/src/project-bvlgari-1.png") center / cover;
}

.hero-slideshow {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-slide-zoom 48s linear infinite;
}

.hero-slideshow img:nth-child(2) { animation-delay: 8s; }
.hero-slideshow img:nth-child(3) { animation-delay: 16s; }
.hero-slideshow img:nth-child(4) { animation-delay: 24s; }
.hero-slideshow img:nth-child(5) { animation-delay: 32s; }
.hero-slideshow img:nth-child(6) { animation-delay: 40s; }

.hero-slideshow::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 82%, #fff 100%),
    linear-gradient(#16161677, #16161688);
  content: "";
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 30px;
  height: 86px;
}

.logo {
  display: flex;
  align-items: center;
  width: auto;
  height: 48px;
  margin-right: auto;
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.navlinks,
.social {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 46px);
}

.navlinks a {
  font-size: 10px;
  letter-spacing: 0.06em;
}

.navlinks a:hover {
  color: #ffb875;
}

.social {
  gap: 7px;
}

.social a {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #fff;
  border-radius: 3px;
  font-size: 11px;
}

/* Mobile navigation button is hidden on wide screens. */
.menu {
  display: none;
}

/* Hero content is vertically centered over the background image. */
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0 90px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 24px;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 4.3vw, 62px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hero-desc {
  max-width: 660px;
  margin: 18px auto 30px;
  font-size: 13px;
  line-height: 1.6;
}

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.project > span {
  font-size: 12px;
}

.project-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  width: min(100%, 430px);
}

.project-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-brand small {
  font-size: 16px;
}

.project-brand strong,
.project-title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.12;
  text-align: left;
}

.project-title {
  margin: 0;
}

.project-divider {
  display: block;
  height: 84px;
  border-left: 1px solid #fff;
}

.outline {
  margin-top: 8px;
  padding: 9px 24px;
  border: 1px solid #fff;
  border-radius: 4px;
  font-size: 12px;
}

.outline:hover {
  color: #222;
  background: #fff;
}

/* 3. Shared section spacing and service cards */
.section {
  padding-block: 65px;
}

.intro,
.gallery-caption {
  max-width: 750px;
  margin: 0 auto 28px;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.service-card {
  position: relative;
  height: clamp(360px, 30vw, 390px);
  overflow: hidden;
  color: #fff;
  background: #ddd;
}

/* Gradient overlay keeps category names readable over photos. */
.service-card::after {
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(transparent, #000c);
  content: "";
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s;
}

.service-card:hover img {
  transform: scale(1.05);
}

.service-card span {
  position: absolute;
  z-index: 1;
  right: 8px;
  bottom: 20px;
  left: 8px;
  font-size: 13px;
  text-align: center;
}

.service-card small {
  display: block;
  margin-top: 4px;
  font-size: 9px;
}

/* 4. Project gallery / carousel */
.gallery {
  overflow: hidden;
  padding-block: 25px 50px;
}

.gallery-frame {
  position: relative;
  width: min(1450px, 100%);
  margin: 0 auto;
}

/* JavaScript toggles .active so only one slide is displayed. */
.slide {
  display: none;
  margin: 0;
}

.slide.active {
  display: block;
  animation: fade 0.35s;
}

.slide img {
  display: block;
  width: 100%;
  height: clamp(280px, 44vw, 570px);
  object-fit: cover;
}

.slide figcaption {
  padding: 12px 18px;
  color: #fff;
  background: #222;
  font-size: 12px;
}

.arrow {
  position: absolute;
  z-index: 2;
  top: 45%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 12px #0002;
  font-size: 24px;
  cursor: pointer;
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

.gallery-caption {
  margin: 25px auto 0;
  font-size: 11px;
}

@keyframes hero-slide-zoom {
  0% {
    opacity: 0;
    transform: scale(1);
  }

  3% {
    opacity: 1;
  }

  15% {
    opacity: 1;
    transform: scale(1.08);
  }

  20% {
    opacity: 0;
    transform: scale(1.1);
  }

  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

@keyframes fade {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* 5. Client logo panel (wordmarks are placeholders for now). */
.client-panel {
  padding: 38px 6%;
  border-radius: 28px;
  background: var(--gray);
  text-align: center;
}

.client-panel h2 {
  margin: 0 0 34px;
  color: #777;
  font-size: 15px;
}

.client-logos {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 8px 4px;
}

.client-logos img {
  display: block;
  width: min(100%, 190px);
  height: 64px;
  object-fit: contain;
}

.client-logo-bvlgari {
  grid-column: auto;
  width: min(100%, 160px) !important;
  height: 70px !important;
}

.client-logos img:nth-child(13) {
  grid-column: 3 / 5;
}

@media (max-width: 700px) {
  .client-logos img {
    width: min(100%, 155px);
    height: 90px;
  }

  .client-logo-bvlgari {
    width: min(100%, 160px) !important;
    height: 60px !important;
  }

  .client-logos img:nth-child(13) {
    grid-column: 2;
  }
}

.client-panel > p {
  margin: 35px 0 0;
  color: #888;
  font-weight: 700;
}

/* 6. Technology banner and production machine rows */
.tech-banner {
  display: flex;
  align-items: center;
  height: 360px;
  color: #fff;
  background:
    linear-gradient(90deg, #111b, #1112),
    url("https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=2000&q=85")
      center / cover;
}

.tech-banner h2 {
  margin: 0 0 15px;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.15;
}

.tech-banner p {
  max-width: 480px;
  font-size: 12px;
  line-height: 1.7;
}

.machines {
  padding-block: 45px 70px;
}

.machine {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: 7%;
  min-height: 210px;
  padding: 25px 0;
}

.machine-product {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 8%;
}

.machine-product img {
  width: 100%;
  height: 130px;
  object-fit: contain;
}

.machine-product strong {
  color: #188182;
  font-size: 17px;
}

.machine-info {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  align-items: center;
  gap: 20px;
}

/* Video tiles currently open an explanatory dialog, not a real video. */
.video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  color: #fff;
  background: #050505;
  font-size: 20px;
  cursor: pointer;
}

.video:hover {
  background: #292929;
}

.machine-info h3 {
  margin: 0 0 7px;
  font-size: 11px;
}

.machine-info p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.instagram {
  padding: 28px 15px 45px;
  color: var(--orange);
  font-size: 11px;
  text-align: center;
}

.instagram a {
  font-weight: 600;
}

/* 7. Footer, contact form, and company information */
footer {
  padding: 50px 0 18px;
  background: var(--gray);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
  max-width: 1150px;
}

.footer-main h2 {
  margin: 0 0 24px;
  color: var(--orange);
  font-size: 19px;
}

.contact {
  padding-right: 9%;
  border-right: 1px solid #aaa;
}

.contact form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact label {
  margin: 0 0 5px;
  color: #777;
  font-size: 10px;
}

.contact input,
.contact textarea {
  width: min(100%, 420px);
  margin-bottom: 14px;
  padding: 9px;
  border: 0;
  border-bottom: 1px solid #bbb;
  background: #fff;
  outline-color: var(--orange);
}

.contact input {
  height: 34px;
}

.contact button {
  padding: 9px 22px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
}

.contact #feedback {
  color: #286d43;
  font-size: 11px;
}

.map {
  width: min(100%, 330px);
  height: 105px;
  overflow: hidden;
  background: transparent;
}

.map img {
  display: block;
  width: auto;
  height: 100%;
  object-fit: fill;
}

.find h3 {
  margin: 16px 0 8px;
  font-size: 10px;
}

.find p {
  color: #666;
  font-size: 10px;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  grid-template-columns: 0.7fr 1.2fr 1.2fr;
  gap: 35px;
  margin-top: 45px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.footer-links h3 {
  margin: 0 0 12px;
  font-size: 11px;
}

.footer-links a,
.footer-links p {
  display: block;
  margin: 5px 0;
  color: #666;
  font-size: 10px;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #ccc;
  color: #777;
  font-size: 9px;
}

.footer-bottom div {
  display: flex;
  gap: 20px;
}

/* 8. Floating actions and the temporary video dialog */
.floating {
  position: fixed;
  z-index: 4;
  right: 22px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floating button,
.floating a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px #0002;
  font-size: 23px;
  cursor: pointer;
}

.floating .wa {
  border: 0;
  color: #fff;
  background: #18c765;
}

#video-dialog {
  width: calc(100% - 30px);
  max-width: 460px;
  padding: 45px 30px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 20px 80px #0005;
  text-align: center;
}

#video-dialog::backdrop {
  background: #0009;
}

#video-dialog .close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 28px;
  cursor: pointer;
}

#video-dialog p {
  color: #666;
  font-size: 12px;
  line-height: 1.6;
}

/* 9. Tablet layout: collapse the nav and reduce columns. */
@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .nav {
    height: 75px;
  }

  .menu {
    display: block;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
  }

  /* JS adds .open when the mobile menu button is pressed. */
  .navlinks {
    position: absolute;
    top: 65px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 22px;
    background: #222;
  }

  .navlinks.open {
    display: flex;
  }

  .social {
    display: none;
  }

  .service-card {
    height: 300px;
  }

  .client-logos {
    grid-template-columns: repeat(4, 1fr);
  }

  .machine {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 25px;
  }

  .machine-info {
    grid-template-columns: 1fr;
  }

  .machine-product {
    padding-left: 0;
  }

  .machine-product img {
    height: 100px;
  }
}

/* 10. Phone layout: stack content and use tighter spacing. */
@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .hero {
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    background-position: 55% center;
  }

  .hero-slideshow img {
    object-position: 55% center;
  }

  .hero-content {
    padding: 50px 0 85px;
  }

  .eyebrow {
    font-size: 9px;
  }

  .hero h1 {
    font-size: clamp(29px, 8vw, 42px);
  }

  .hero-desc {
    font-size: 12px;
  }

  .project-name {
    gap: 8px;
  }

  .project-brand small {
    font-size: 12px;
  }

  .project-brand strong,
  .project-title {
    font-size: clamp(17px, 5.4vw, 25px);
  }

  .project-divider {
    height: 62px;
  }

  .scroll {
    width: 80%;
    height: 60px;
    font-size: 10px;
  }

  .section {
    padding-block: 42px;
  }

  .intro {
    font-size: 11px;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .service-card {
    height: clamp(190px, 58vw, 270px);
  }

  .service-card span {
    bottom: 14px;
    font-size: 12px;
  }

  .service-card small {
    font-size: 8px;
  }

  .gallery {
    padding-block: 10px 35px;
  }

  .slide img {
    height: 300px;
  }

  .arrow {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .prev {
    left: 8px;
  }

  .next {
    right: 8px;
  }

  .client-panel {
    padding: 28px 15px;
    border-radius: 20px;
  }

  .client-logos {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 3px;
  }

  .client-logos img {
    width: min(100%, 140px);
    height: 48px;
  }

  .client-logo-bvlgari {
    width: min(100%, 210px) !important;
    height: 76px !important;
  }

  .tech-banner {
    height: 280px;
  }

  .tech-banner h2 {
    font-size: 24px;
  }

  .machines {
    padding-block: 20px 40px;
  }

  .machine {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid #ddd;
  }

  .machine-product {
    align-items: center;
  }

  .machine-product img {
    height: 100px;
  }

  .machine-info {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .machine-info h3 {
    font-size: 10px;
  }

  .machine-info p {
    font-size: 9px;
  }

  footer {
    padding-top: 35px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .contact {
    padding: 0 0 28px;
    border-right: 0;
    border-bottom: 1px solid #ccc;
  }

  .contact input,
  .contact textarea {
    width: 100%;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 35px;
  }

  .footer-links > div:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    font-size: 9px;
  }

  .footer-bottom div {
    flex-wrap: wrap;
    gap: 14px;
  }

  .floating {
    right: 12px;
    bottom: 12px;
  }

  .floating button,
  .floating a {
    width: 38px;
    height: 38px;
  }
}

/* Respect visitors who request less motion in their system settings. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}