@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff; color: #111111; line-height: 1.6; overflow-x: hidden;
  word-wrap: break-word; overflow-wrap: break-word;
}
a { color: #111; text-decoration: none; }

/* ===== GLOBAL IMAGE RULES (rounded corners + mobile-safe) ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 2rem;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
nav .logo { font-size: 1.3rem; font-weight: 700; letter-spacing: 5px; text-transform: uppercase; color: #000; flex-shrink: 0; }
nav .logo span { font-weight: 300; opacity: 0.5; }

/* Desktop menu - always visible */
nav ul { list-style: none; display: flex; gap: 1.2rem; align-items: center; margin-left: auto; }
nav ul li a { font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.5; transition: opacity 0.3s; white-space: nowrap; }
nav ul li a:hover { opacity: 1; }

/* Hamburger button - HIDDEN on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #000;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
/* Hamburger animation when open */
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ===== HERO ===== */
.hero { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; background: url('img/hero-wave.jpg') center/cover no-repeat; filter: brightness(1.2) grayscale(1); opacity: 0.15; border-radius: 0; }
.hero-content { position: relative; z-index: 1; padding: 0 1rem; }
.hero h1 { font-size: clamp(2.5rem, 8vw, 7rem); font-weight: 200; letter-spacing: 12px; text-transform: uppercase; margin-bottom: 1rem; color: #000; }
.hero h1 strong { font-weight: 700; }
.hero p { font-size: 1.1rem; letter-spacing: 4px; text-transform: uppercase; opacity: 0.5; margin-bottom: 3rem; color: #333; }
.hero .cta-group { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn { display: inline-block; padding: 1rem 2.5rem; font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase; border: 1px solid #000; transition: all 0.3s; cursor: pointer; background: transparent; color: #000; border-radius: 6px; }
.btn:hover { background: #000; color: #fff; }
.btn-filled { background: #000; color: #fff; }
.btn-filled:hover { background: transparent; color: #000; }

/* ===== SECTIONS & TYPOGRAPHY ===== */
section { padding: 6rem 2rem; }
.section-label { font-size: 0.7rem; letter-spacing: 5px; text-transform: uppercase; opacity: 0.4; margin-bottom: 1rem; color: #000; text-align: center; }
.section-title { font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 200; letter-spacing: 2px; margin-bottom: 2rem; color: #000; line-height: 1.2; text-align: center; }
.section-title strong { font-weight: 700; }

.text-block { max-width: 800px; margin: 0 auto 4rem; text-align: left; }
.text-block h3 { font-size: 1.4rem; font-weight: 400; letter-spacing: 1px; margin-bottom: 1.5rem; color: #000; }
.text-block p { font-size: 1.05rem; line-height: 1.9; opacity: 0.75; margin-bottom: 1.5rem; }
.text-block strong { color: #000; font-weight: 600; }

.two-col-text { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin: 4rem auto; max-width: 1200px; }
.two-col-text h4 { font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 1rem; opacity: 0.5; }
.two-col-text p { font-size: 0.95rem; line-height: 1.8; opacity: 0.7; }

/* ===== PRODUCT CARDS (HOME) ===== */
.products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 4rem; width: 100%; max-width: 1400px; margin-left: auto; margin-right: auto; }
.product-card { border: 1px solid rgba(0,0,0,0.08); overflow: hidden; transition: border-color 0.3s, transform 0.3s; background: #fff; border-radius: 12px; }
.product-card:hover { border-color: rgba(0,0,0,0.2); transform: translateY(-4px); }
.product-card img { width: 100%; height: 350px; object-fit: cover; border-radius: 12px 12px 0 0; }
.product-card .card-body { padding: 2.5rem; }
.product-card h3 { font-size: 1.8rem; font-weight: 300; letter-spacing: 4px; margin-bottom: 0.5rem; color: #000; }
.product-card .tag { font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase; opacity: 0.4; margin-bottom: 1.5rem; display: block; color: #000; }
.product-card p { opacity: 0.6; font-size: 0.95rem; margin-bottom: 2rem; color: #333; }

/* ===== PRODUCT PAGE HERO ===== */
.product-hero { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 8rem 4rem 4rem; gap: 4rem; max-width: 1600px; margin: 0 auto; }
.product-hero .product-image img { width: 100%; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; }
.product-hero .product-info h1 { font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 200; letter-spacing: 8px; margin-bottom: 0.5rem; color: #000; }
.product-hero .product-info .subtitle { font-size: 0.75rem; letter-spacing: 4px; text-transform: uppercase; opacity: 0.4; margin-bottom: 2rem; color: #000; }
.product-hero .product-info p { opacity: 0.7; font-size: 1.05rem; max-width: 500px; margin-bottom: 2rem; color: #333; }

/* ===== FEATURES GRID ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; width: 100%; }
.feature-item { padding: 2rem; border: 1px solid rgba(0,0,0,0.06); background: #fafafa; border-radius: 12px; }
.feature-item h4 { font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 1rem; opacity: 0.5; color: #000; }
.feature-item p { font-size: 0.9rem; opacity: 0.7; color: #333; word-break: break-word; }

/* ===== SPECS TABLE ===== */
.specs-table { width: 100%; margin-top: 2rem; border-collapse: collapse; border-radius: 12px; overflow: hidden; }
.specs-table tr { border-bottom: 1px solid rgba(0,0,0,0.06); }
.specs-table td { padding: 1rem; font-size: 0.9rem; color: #333; }
.specs-table td:first-child { opacity: 0.5; letter-spacing: 2px; text-transform: uppercase; font-size: 0.7rem; width: 30%; color: #000; }

/* ===== CONTACT FORM ===== */
.contact-section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 8rem 2rem; }
.contact-form { max-width: 600px; width: 100%; margin-top: 3rem; text-align: left; }
.form-group { margin-bottom: 2rem; }
.form-group label { display: block; font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase; opacity: 0.5; margin-bottom: 0.5rem; color: #000; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 1rem; background: #fff; border: 1px solid rgba(0,0,0,0.15); color: #000; font-family: inherit; font-size: 1rem; outline: none; transition: border-color 0.3s; border-radius: 8px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #000; }
.form-group textarea { min-height: 150px; resize: vertical; border-radius: 8px; }

/* ===== FOOTER ===== */
footer { padding: 3rem 4rem; border-top: 1px solid rgba(0,0,0,0.06); display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; opacity: 0.4; letter-spacing: 2px; color: #000; }
.divider { width: 60px; height: 1px; background: rgba(0,0,0,0.2); margin: 2rem 0; }

/* ===== ECOSYSTEM SPECIFICS ===== */
.flow-step-text { border-left: 2px solid #000; padding-left: 2rem; margin: 2rem 0; }
.flow-step-text p { margin-bottom: 0.5rem; font-size: 1rem; }
.flow-arrow { opacity: 0.2; margin: 0.5rem 0; font-size: 1.2rem; }
.macro-step { display: flex; gap: 1.5rem; margin-bottom: 2rem; align-items: flex-start; }
.macro-num { font-size: 2rem; font-weight: 200; opacity: 0.2; line-height: 1; min-width: 40px; }

/* ===== IMAGE CONTAINERS ===== */
.img-container { max-width: 1000px; margin: 0 auto 4rem; text-align: center; }
.img-container img { max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; }

/* ===== SHOWCASE GRIDS ===== */
.showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 1200px; margin: 4rem auto; }
.showcase-grid > div { text-align: center; position: relative; }
.showcase-grid img { max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; }

/* ===== WOOD FINISH SECTION ===== */
.wood-finish-section { padding: 6rem 2rem; background: #fafafa; text-align: center; }
.wood-finish-wrapper { max-width: 1200px; margin: 0 auto; }
.wood-finish-text { font-size: 1rem; opacity: 0.7; max-width: 600px; margin: 0 auto 4rem; line-height: 1.6; text-align: center; }

/* ===== INTERACTIVE FINISH TOGGLE ===== */
.finish-showcase { position: relative; max-width: 800px; margin: 0 auto 4rem; min-height: 400px; overflow: visible; }
.finish-showcase .finish-img { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; z-index: 1; border-radius: 12px; }
.finish-showcase .finish-img.alu.front { position: relative; opacity: 1; pointer-events: auto; z-index: 2; }
.finish-showcase.noir .finish-img.alu.front { opacity: 0; position: absolute; z-index: 1; }
.finish-showcase.noir .finish-img.noir.front { opacity: 1; position: relative; pointer-events: auto; z-index: 2; }
.finish-showcase.side .finish-img.alu.front { opacity: 0; position: absolute; z-index: 1; }
.finish-showcase.side .finish-img.alu.side { opacity: 1; position: relative; pointer-events: auto; z-index: 2; }
.finish-showcase.noir.side .finish-img.noir.front { opacity: 0; position: absolute; z-index: 1; }
.finish-showcase.noir.side .finish-img.noir.side { opacity: 1; position: relative; pointer-events: auto; z-index: 2; }

/* ===== IMAGE VIEWER ===== */
.img-viewer { position: relative; max-width: 800px; margin: 0 auto 4rem; min-height: 400px; overflow: visible; }
.img-viewer .view-img { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; z-index: 1; border-radius: 12px; }
.img-viewer .view-img.active { position: relative; opacity: 1; pointer-events: auto; z-index: 2; }

/* ===== TOGGLE BUTTONS ===== */
.finish-toggle, .view-toggle { position: absolute; top: 20px; right: 20px; z-index: 100; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); border-radius: 30px; padding: 6px; display: flex; gap: 4px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.15); }
.finish-toggle + .finish-toggle { top: 75px; }
.finish-toggle button, .view-toggle button { border: none; background: transparent; padding: 10px 18px; font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; border-radius: 25px; transition: all 0.3s; font-weight: 600; color: rgba(255, 255, 255, 0.9); font-family: inherit; white-space: nowrap; }
.finish-toggle button.active, .view-toggle button.active { background: rgba(255, 255, 255, 0.95); color: #000; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.finish-toggle button:hover:not(.active), .view-toggle button:hover:not(.active) { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* ===== LIGHTBOX ===== */
.lightbox-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 10, 12, 0.95); z-index: 9999; justify-content: center; align-items: center; cursor: zoom-out; opacity: 0; transition: opacity 0.3s ease; }
.lightbox-overlay.active { display: flex; opacity: 1; }
.lightbox-overlay img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 12px; box-shadow: 0 0 40px rgba(0,0,0,0.8); transform: scale(0.95); transition: transform 0.3s ease; }
.lightbox-overlay.active img { transform: scale(1); }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 2.5rem; cursor: pointer; font-family: sans-serif; opacity: 0.6; transition: opacity 0.3s; line-height: 1; }
.lightbox-close:hover { opacity: 1; }
.lightbox { cursor: zoom-in; }

/* ===== MASTERLINK CONNECTIVITY SECTION ===== */
.masterlink-intro { max-width: 800px; margin: 0 auto 4rem; text-align: center; }
.masterlink-intro h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: 1px; margin: 3rem 0 1rem; color: #000; }
.masterlink-intro p { font-size: 1rem; line-height: 1.8; opacity: 0.75; margin-bottom: 1.5rem; }
.masterlink-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin: 3rem 0; text-align: left; }
.masterlink-benefits div h5 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: #000; }
.masterlink-benefits div p { font-size: 0.9rem; opacity: 0.7; line-height: 1.6; margin: 0; }
.adapter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 4rem; text-align: left; }
.adapter-category h4 { font-size: 0.85rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1.5rem; color: #000; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 0.75rem; }
.adapter-item { margin-bottom: 1.5rem; }
.adapter-item strong { font-size: 0.85rem; font-weight: 600; color: #000; display: block; margin-bottom: 0.25rem; }
.adapter-item span { font-size: 0.85rem; opacity: 0.7; line-height: 1.5; display: block; }

/* ===== RESPONSIVE / MOBILE STYLES ===== */
@media (max-width: 768px) {
  /* Mobile Navigation */
  .hamburger { display: flex; }
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    margin: 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  }
  nav ul.open { display: flex; }
  nav ul li { width: 100%; text-align: center; }
  nav ul li a {
    display: block;
    padding: 1rem 2rem;
    font-size: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.7;
  }
  nav ul li a:hover { opacity: 1; background: rgba(0,0,0,0.03); }

  /* General mobile layout */
  nav { padding: 1rem 1.5rem; }
  section { padding: 4rem 1.5rem; }

  /* Product hero - stack vertically, image fits screen */
  .product-hero { grid-template-columns: 1fr; padding: 6rem 1.5rem 2rem; gap: 2rem; min-height: auto; }
  .product-hero .product-image img { max-height: 60vh; width: 100%; object-fit: contain; margin: 0 auto; border-radius: 12px; }

  /* Product cards - full width, proportional images */
  .products-grid { grid-template-columns: 1fr; padding: 0 1.5rem; gap: 2rem; }
  .product-card img { height: auto; max-height: 400px; width: 100%; object-fit: cover; border-radius: 12px 12px 0 0; }
  .product-card .card-body { padding: 1.5rem; }

  /* 09App hero card - stack vertically on mobile */
  .product-card.app-hero-card > div:first-child { grid-template-columns: 1fr !important; text-align: center; padding: 2rem 1.5rem; }
  .product-card.app-hero-card > div:first-child > div:last-child { justify-content: center; margin-top: 1.5rem; }
  .product-card.app-hero-card > div:last-child { padding: 0 1.5rem 2rem; }

  /* Showcase grids - single column, images fit */
  .showcase-grid { grid-template-columns: 1fr; gap: 2rem; }
  .showcase-grid img { max-width: 100%; height: auto; border-radius: 12px; }

  /* Two-column text - stack */
  .two-col-text { grid-template-columns: 1fr; gap: 2rem; padding: 0 1.5rem; }

  /* Adapter grid */
  .adapter-grid { grid-template-columns: 1fr; }

  /* Footer */
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; font-size: 0.7rem; }

  /* Finish toggles - smaller on mobile */
  .finish-toggle, .view-toggle { top: 10px; right: 10px; padding: 3px; background: rgba(0, 0, 0, 0.6); }
  .finish-toggle + .finish-toggle { top: 55px; }
  .finish-toggle button, .view-toggle button { padding: 6px 10px; font-size: 0.55rem; letter-spacing: 0.5px; }
  .finish-showcase, .img-viewer { min-height: 280px; }
  .finish-showcase .finish-img, .img-viewer .view-img { border-radius: 12px; }

  /* Lightbox images on mobile - fit screen */
  .lightbox-overlay img { max-width: 95vw; max-height: 80vh; border-radius: 12px; }

  /* Hero split on mobile */
  .hero-split { grid-template-columns: 1fr; text-align: center; }
  .hero-split img { max-width: 100%; height: auto; border-radius: 12px; margin: 2rem auto 0; }

  /* Inline images (common pattern on product pages) */
  section img[style*="max-width"],
  section img[style*="width"] {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
  }

  /* Features grid on mobile */
  .features-grid { grid-template-columns: 1fr; }

  /* Badge row on mobile */
  .badge-row { gap: 0.75rem; }
  .badge { font-size: 0.75rem; padding: 0.6rem 1rem; }
}

/* ===== TABLET BREAKPOINT ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .product-card img { height: 280px; }
  .adapter-grid { grid-template-columns: repeat(2, 1fr); }
}