/*
 * ============================================================
 *  YACHT CARBON / NUOVA MAP — Custom Styles
 *  Tailwind CSS handles utilities; this file adds custom rules.
 * ============================================================
 */

/* ----------------------------------------------------------
 *  LOCAL FONTS — no external dependency
 * ---------------------------------------------------------- */
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/inter-400.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/inter-500.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/inter-600.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/montserrat-700.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-style: normal; font-display: swap; src: url('fonts/montserrat-800.ttf') format('truetype'); }

/* ----------------------------------------------------------
 *  CSS VARIABLES — edit here to change the whole theme
 * ---------------------------------------------------------- */
:root {
  --color-bg:          #0a0a0a;
  --color-bg-alt:      #111111;
  --color-bg-card:     #1a1a1a;
  --color-bg-card-hover: #222222;
  --color-text:        #f0f0f0;
  --color-text-muted:  #999999;
  --color-accent:      #c0392b;
  --color-accent-hover:#e74c3c;
  --color-silver:      #c0c0c0;
  --color-border:      #2a2a2a;
  --font-heading:      'Montserrat', sans-serif;
  --font-body:         'Inter', sans-serif;
  --header-height:     84px;
}

/* ----------------------------------------------------------
 *  BASE
 * ---------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a { color: var(--color-accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--color-accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ----------------------------------------------------------
 *  HEADER
 * ---------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  height: 58px;
  width: auto;
}

.header-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-logo .logo-text span {
  color: var(--color-accent);
}

/* — Nav — */
.header-nav { display: flex; align-items: center; gap: 0; }

.header-nav > a,
.nav-dropdown > .nav-trigger {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.3s;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.header-nav > a:hover,
.nav-dropdown:hover > .nav-trigger {
  color: var(--color-text);
}

/* — Dropdown — */
.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav-dropdown-menu a:hover {
  color: var(--color-text);
  background: rgba(255,255,255,0.04);
}

/* — Mobile toggle — */
.mobile-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ----------------------------------------------------------
 *  HERO SECTIONS
 * ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: var(--header-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-small {
  min-height: 50vh;
}

/* ----------------------------------------------------------
 *  BUTTONS
 * ---------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192,57,43,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-text);
  color: var(--color-text);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
 *  SECTIONS
 * ---------------------------------------------------------- */
.section {
  padding: 6rem 2rem;
}

.section-dark {
  background: var(--color-bg-alt);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.accent-line {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 1rem auto;
}

/* ----------------------------------------------------------
 *  CARDS
 * ---------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 2rem;
}

.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-body p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* ----------------------------------------------------------
 *  STATS / ICON CARDS
 * ---------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: border-color 0.3s;
}

.stat-item:hover { border-color: var(--color-accent); }

.stat-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.stat-item h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

/* ----------------------------------------------------------
 *  PROCESS STEPS
 * ---------------------------------------------------------- */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  align-items: start;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}

.step-content h3 {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.step-content p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ----------------------------------------------------------
 *  PRODUCT DETAIL PAGE
 * ---------------------------------------------------------- */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.product-gallery {
  display: grid;
  gap: 1rem;
}

.product-gallery img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.product-info h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.product-info .subtitle {
  color: var(--color-accent);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-info .intro {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.spec-item {
  padding: 1rem;
  background: var(--color-bg-alt);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.spec-item .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.spec-item .value {
  font-weight: 600;
  font-size: 0.95rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* ----------------------------------------------------------
 *  COMPARISON TABLE
 * ---------------------------------------------------------- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.comparison-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.comparison-table tr:first-child td {
  color: var(--color-accent);
  font-weight: 600;
}

/* ----------------------------------------------------------
 *  CONTACT FORM
 * ---------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea { resize: vertical; min-height: 140px; }

/* ----------------------------------------------------------
 *  FOOTER
 * ---------------------------------------------------------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

.footer-brand .logo-text span { color: var(--color-accent); }

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.footer-brand img {
  margin-left: 0;
}

.footer-brand .footer-tagline {
  margin-bottom: 0.2rem;
}

.footer-brand .footer-address {
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Contact blocks in footer */
.footer-contact-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 1.2rem;
}

.footer-contact-block strong {
  color: var(--color-text);
  font-size: 0.9rem;
  margin-bottom: 0.1rem;
}

.footer-contact-block a {
  display: inline;
  padding: 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

.footer-col a {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  padding: 0.3rem 0;
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--color-text); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ----------------------------------------------------------
 *  SOCIAL ICONS
 * ---------------------------------------------------------- */
.social-icons {
  display: flex;
  gap: 0.8rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all 0.3s;
}

.social-icon:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
  background: rgba(192, 57, 43, 0.15);
}

/* ----------------------------------------------------------
 *  BACK TO TOP
 * ---------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.5);
}

/* ----------------------------------------------------------
 *  ANIMATIONS (scroll reveal)
 * ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------------------------
 *  RESPONSIVE
 * ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .product-hero   { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid   { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 66px; }

  .header-logo img { height: 46px; }

  .mobile-toggle { display: block; }

  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0; bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
  }

  .header-nav.open { transform: translateX(0); }

  .header-nav > a,
  .nav-dropdown > .nav-trigger {
    padding: 1rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 1rem;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu { display: block; }

  .hero { min-height: 70vh; }
  .hero-small { min-height: 40vh; }
  .section { padding: 4rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .stat-grid { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 60px 1fr; gap: 1rem; }
}

/* ----------------------------------------------------------
 *  COOKIE CONSENT BANNER
 * ---------------------------------------------------------- */
#cookieBanner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: #111; border-top: 1px solid var(--color-border);
  padding: 1.2rem 1.5rem;
  animation: cbSlideUp 0.4s ease;
}
#cookieBanner.cb-hide {
  animation: cbSlideDown 0.4s ease forwards;
}
.cb-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap;
}
.cb-inner p {
  color: var(--color-text-muted); font-size: 0.88rem; line-height: 1.6; margin: 0; flex: 1;
}
.cb-buttons { display: flex; gap: 0.6rem; flex-shrink: 0; }
.cb-btn {
  padding: 0.5rem 1.4rem; border: none; border-radius: 4px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: opacity 0.2s;
}
.cb-btn:hover { opacity: 0.85; }
.cb-accept { background: var(--color-accent); color: #fff; }
.cb-refuse { background: #333; color: #ccc; }
@keyframes cbSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes cbSlideDown { from { transform: translateY(0); } to { transform: translateY(100%); } }
@media (max-width: 600px) {
  .cb-inner { flex-direction: column; text-align: center; }
  .cb-buttons { justify-content: center; }
}

/* ----------------------------------------------------------
 *  BREADCRUMBS (SEO)
 * ---------------------------------------------------------- */
.breadcrumbs {
  padding: 0.8rem 2rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}
.breadcrumbs .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumbs a:hover {
  color: var(--color-accent);
}
.breadcrumbs .bc-sep {
  opacity: 0.4;
  margin: 0 0.15rem;
}
.breadcrumbs [aria-current="page"] {
  color: var(--color-text);
}
