@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Montserrat:wght@300;400;600;800&family=Inter:wght@300;400;600&display=swap');

:root {
  --bg: transparent;
  --brand: #ec6608;
  --brand-2: #ff7a1f;
  --dark: #0e0f12;
  --muted: #6f6f6f;
  --text-gray: #3f3f3e;
  --glass: rgba(255,255,255,0.08);
  --glass-stroke: rgba(255,255,255,0.18);
  --container: 1200px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  padding-top: 72px;
  color: #3f3f3e;
  background: #ffffff;
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
.container { width: min(92%, var(--container)); margin-inline: auto; }
.anchor-spacer { position: relative; top: -80px; height: 0; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 4000;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--brand); text-decoration: none; }
.logo { 
  height: 50px; 
  width: auto; 
  display: block;
  background: #000000;
  padding: 8px 12px;
  border-radius: 6px;
}
.brand-text { font-weight: 700; letter-spacing: 1px; font-family: 'Poppins', 'Montserrat', sans-serif; text-transform: uppercase; }
.header-nav {
  display: none;
  gap: 30px;
  align-items: center;
}
.header-nav a {
  color: var(--text-gray);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}
.header-nav a:hover {
  color: var(--brand);
}
@media (min-width: 1024px) {
  .header-nav {
    display: flex;
  }
}

.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 22px; }
.primary-nav a, .dropdown-toggle {
  color: var(--text-gray); text-decoration: none; font-weight: 500;
  padding: 8px 10px; border-radius: 8px; transition: 0.25s ease;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.primary-nav a:hover, .dropdown-toggle:hover { color: var(--brand); background: rgba(236,102,8,0.05); }

.has-dropdown { position: relative; }
.dropdown-toggle { background: transparent; border: 1px solid var(--glass-stroke); border-radius: 10px; cursor: pointer; }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px; padding: 10px; margin: 0;
  display: none; flex-direction: column; gap: 6px;
  background: rgba(255,255,255,0.98); border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.has-dropdown.open .dropdown { display: flex; }
.dropdown a { display: block; padding: 10px 12px; border-radius: 8px; white-space: nowrap; }

/* Fullscreen Menu Panel - Forgia Style */
#menu-panel {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
body.show-menu #menu-panel {
  opacity: 1;
  visibility: visible;
}
.menu-panel-inn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
#navi {
  text-align: center;
}
.menu-navi-wrap .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-item {
  margin: 12px 0;
}
.menu-item > a {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 300;
  color: var(--text-gray);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: color 0.3s;
  display: inline-block;
}
.menu-item > a:hover {
  color: var(--brand);
}
.menu-item-has-children .sub-menu {
  list-style: none;
  padding: 10px 0 0 0;
  margin: 0;
}
.menu-item-has-children .sub-menu .menu-item {
  margin: 10px 0;
}
.menu-item-has-children .sub-menu a {
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 400;
  color: var(--muted);
}

/* Nav Toggle - Forgia Style */
.nav-toggle {
  display: block;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
  width: 120px;
  height: 40px;
  padding: 0;
}
.navi-trigger-text {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 600;
  color: var(--text-gray);
}
.navi-trigger-text-menu,
.navi-trigger-text-close {
  position: absolute;
  right: 0;
  transition: opacity 0.3s;
}
.navi-trigger-text-close {
  opacity: 0;
}
body.show-menu .navi-trigger-text-menu {
  opacity: 0;
}
body.show-menu .navi-trigger-text-close {
  opacity: 1;
}
.navi-trigger-inn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 20px;
}
.navi-trigger-hamberg-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--text-gray);
  transition: all 0.5s;
}
.navi-trigger-hamberg-line1 {
  top: 0;
}
.navi-trigger-hamberg-line2 {
  top: 9px;
}
.navi-trigger-hamberg-line3 {
  top: 18px;
}
body.show-menu .navi-trigger-hamberg-line1 {
  transform: translateY(9px) rotate(45deg);
}
body.show-menu .navi-trigger-hamberg-line2 {
  opacity: 0;
}
body.show-menu .navi-trigger-hamberg-line3 {
  transform: translateY(-9px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative; min-height: 92vh; overflow: hidden;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.3)); pointer-events: none; }
.slider { position: relative; min-height: inherit; }
.slide { position: absolute; inset: 0; background-image: var(--bg); background-size: cover; background-position: center; opacity: 0; transform: translateZ(0) scale(1.03); will-change: opacity, transform, background-position; backface-visibility: hidden; }
.slide.is-active { opacity: 1; }
.slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.85), rgba(255,255,255,0.3)); pointer-events: none; }
.slide-inner { position: relative; z-index: 1; padding: 28vh 0 18vh; }
.headline { font-family: 'Poppins', 'Montserrat', sans-serif; font-size: clamp(42px, 6vw, 82px); line-height: 0.95; margin: 0 0 12px; letter-spacing: -0.02em; color: var(--text-gray); font-weight: 700; }
.headline span { display: block; font-size: clamp(16px, 2vw, 24px); color: var(--brand); font-weight: 300; letter-spacing: 0.04em; text-transform: uppercase; }
.subtitle { margin: 14px 0 26px; max-width: 700px; color: var(--muted); }
.cta-group { display: flex; gap: 14px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 12px 24px; border-radius: 4px; text-decoration: none; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; font-size: 13px; transition: all 0.3s ease; }
.btn-primary { background: var(--brand); color: #ffffff; box-shadow: 0 4px 12px rgba(236,102,8,0.3); }
.btn-primary:hover { background: var(--brand-2); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(236,102,8,0.4); }
.btn-ghost { color: var(--text-gray); border: 1px solid var(--text-gray); background: transparent; }
.btn-ghost:hover { background: var(--text-gray); color: #ffffff; }

.slider-ui { position: absolute; inset: auto 0 18px 0; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; z-index: 2; }
.slider-ui button { background: rgba(0,0,0,0.35); color: #fff; border: 1px solid var(--glass-stroke); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; backdrop-filter: blur(4px); }
.dots { display: flex; gap: 8px; align-items: center; justify-content: center; position: absolute; left: 50%; transform: translateX(-50%); bottom: 24px; }
.dots .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); transition: .25s; }
.dots .dot.is-active { background: #fff; transform: scale(1.4); }

/* Fullscreen wrap utility */
.fullscreen-wrap {
  height: 100vh;
  width: 100vw;
}

/* Page Loader - Forgia Style */
.page-loading {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  transition: all 0.4s;
}
.page-loading.hidden {
  opacity: 0;
  visibility: hidden;
}
.page-loading-inn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-loading-transform {
  animation: pulse 2s ease-in-out infinite;
}
.site-loading-logo img {
  max-width: 250px;
  height: auto;
  display: block;
  background: #000000;
  padding: 20px 30px;
  border-radius: 12px;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

/* Sections */
.section { padding: 96px 0; position: relative; }
.section-title { font-family: 'Poppins', 'Montserrat', sans-serif; font-size: clamp(28px, 4vw, 42px); margin: 0 0 14px; color: var(--text-gray); font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: start; }
.about-card { padding: 32px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.1); background: #f9f9f9; }
.about-card h4 { color: var(--brand); font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; margin-bottom: 16px; }
.about-card ul { list-style: none; padding: 0; }
.about-card li { padding: 8px 0; color: var(--text-gray); border-bottom: 1px solid rgba(0,0,0,0.05); }
.about-card li:last-child { border-bottom: none; }
.glass { background: #f9f9f9; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Product sections */
.product { min-height: 70vh; display: flex; align-items: center; }
.bg-cover { background-size: cover; background-position: center; position: relative; }
.bg-cover::before { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.92); }
.product .container { position: relative; z-index: 1; }
.product-content { max-width: 600px; margin-bottom: 28px; }
.product-content h3 { color: var(--text-gray); }
.product-content p { color: var(--muted); }

/* Citofoni full-viewport and viewer */
#citofoni { min-height: 100vh; display: grid; align-items: center; }
#citofoni .container { width: min(94%, var(--container)); }

/* Videocitofoni full-viewport like Citofoni */
#videocitofoni { min-height: 100vh; display: grid; align-items: center; }
#videocitofoni .container { width: min(94%, var(--container)); }

/* Freestanding full-viewport like Citofoni */
#freestanding { min-height: 100vh; display: grid; align-items: center; }
#freestanding .container { width: min(94%, var(--container)); }

/* Keep legacy grid definitions for backward compatibility, but viewer will override */
.citofoni-gallery { margin-top: 28px; }

/* Viewer styles (one-by-one smooth toggling) */
.citofoni-viewer {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--glass-stroke);
  background: rgba(255,255,255,0.03);
  min-height: clamp(320px, 60vh, 720px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.citofoni-viewer .citofoni-slide { position: absolute; inset: 0; opacity: 0; transform: translateZ(0) scale(1.02); will-change: opacity, transform; backface-visibility: hidden; }
.citofoni-viewer .citofoni-slide.is-active { opacity: 1; }
.citofoni-viewer img { width: 100%; height: 100%; object-fit: contain; padding: 18px; filter: saturate(1.05); }

.citofoni-controls { position: absolute; inset: auto 0 14px 0; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; z-index: 2; }
.citofoni-controls .c-prev, .citofoni-controls .c-next {
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: 1px solid var(--glass-stroke);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; backdrop-filter: blur(4px);
}
.c-dots { display: flex; gap: 8px; align-items: center; justify-content: center; position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px; }
.c-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); border: 0; cursor: pointer; }
.c-dot.is-active { background: #fff; transform: scale(1.4); }

/* Footer */
.site-footer { padding: 32px 0; text-align: center; border-top: 1px solid rgba(0,0,0,0.08); background: #f9f9f9; color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; text-align: center; }

/* Reveal animations base (will be animated via JS) */
.reveal { opacity: 0; transform: translateY(24px); }

/* Hover zoom effect - Forgia Style */
.grid-item-inside,
.brick-content {
  overflow: hidden;
  position: relative;
}
.ux-background-img,
.grid-item-inside img,
.brick-content img {
  transition: transform 0.5s ease;
  transform: scale(1);
}
.grid-item-inside:hover .ux-background-img,
.grid-item-inside:hover img,
.brick-content:hover img {
  transform: scale(1.05);
}

/* Products Grid - Forgia Style */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}
.product-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.product-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: #f9f9f9;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}
.product-card h3 {
  padding: 20px 20px 10px;
  margin: 0;
  color: var(--text-gray);
  font-size: 24px;
  font-weight: 600;
}
.product-card p {
  padding: 0 20px 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.product-card .btn {
  margin: 0 20px 20px;
  display: inline-block;
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 4500; display: none; }
.modal[aria-hidden="false"] { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,6,9,0.75); backdrop-filter: blur(6px); }
.modal-dialog { position: relative; z-index: 1; width: min(96%, 980px); margin: 5vh auto; border-radius: 16px; border: 1px solid var(--glass-stroke); background: linear-gradient(180deg, rgba(20,22,27,0.98), rgba(12,14,18,0.98)); box-shadow: 0 30px 80px rgba(0,0,0,0.6); padding: 16px 16px 48px; }
.modal-close { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--glass-stroke); background: rgba(0,0,0,0.35); color: #fff; cursor: pointer; }
.modal-header { padding: 8px 6px 12px 6px; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 12px; }
.modal-title { margin: 0; font-family: 'Montserrat', sans-serif; font-weight: 800; }
.modal-sub { color: #a8b3c2; font-weight: 700; letter-spacing: 0.08em; font-size: 12px; margin-top: 4px; text-transform: uppercase; }
.modal-body { position: relative; }
.modal-gallery { min-height: clamp(280px, 54vh, 640px); }

/* Modal extras: finishes + resources */
.modal-extras {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-top: 14px;
  align-items: start;
}
.modal-extras h5 { margin: 8px 0 8px; font-family: 'Montserrat', sans-serif; font-size: 16px; letter-spacing: .02em; }
.finishes { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.finish { display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--glass-stroke); background: rgba(255,255,255,0.03); }
.finish .swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--glass-stroke); overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.35) inset; }
.finish .swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.finish .label { font-size: 13px; color: #cdd5df; }
.resources { display: flex; flex-direction: column; gap: 10px; }
.resources a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--glass-stroke); background: rgba(255,255,255,0.04); color: #e8ebf0; text-decoration: none; font-weight: 600; }
.resources a:hover { background: rgba(255,255,255,0.08); }

@media (max-width: 800px) {
  .modal-extras { grid-template-columns: 1fr; }
}

/* Request form tweaks */
.form-row { margin-bottom: 12px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row label { display: block; }
.form-row label span { display: block; font-size: 12px; color: #aab3bf; margin-bottom: 6px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--glass-stroke); background: rgba(255,255,255,0.03); color: #e8ebf0; }
.form-actions { display: flex; justify-content: flex-end; }
@media (max-width: 700px) { .form-row.two { grid-template-columns: 1fr; } }

/* Allow body lock when modal is open */
body.modal-open { overflow: hidden; }

/* Ensure request modal is above other modals when stacked */
#request-modal { z-index: 4600; }

/* Intro overlay (door opening) */
body.intro-active { overflow: hidden; }
.site-intro {
  position: fixed; inset: 0; z-index: 5000;
  display: grid; place-items: center;
  background: radial-gradient(1200px 600px at 30% 20%, rgba(0,224,255,0.12), transparent 50%), #0a0c10;
}
.site-intro .intro-content { position: relative; text-align: center; z-index: 2; padding: 24px; }
.intro-title { font-family: 'Montserrat', sans-serif; font-weight: 800; margin: 0 0 6px; font-size: clamp(28px, 5vw, 54px); }
.intro-title span { color: var(--brand-2); }
.intro-sub { margin: 0 0 14px; color: #cdd5df; letter-spacing: .04em; font-weight: 600; }
.intro-skip { margin-top: 8px; }

.intro-doors { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; perspective: 1200px; z-index: 1; }
.door { background: linear-gradient(180deg, rgba(16,18,23,0.98), rgba(10,12,16,0.98)); border-right: 1px solid rgba(255,255,255,0.06); border-left: 1px solid rgba(255,255,255,0.06); box-shadow: inset 0 0 80px rgba(0,0,0,0.55); }
.door-left { transform-origin: left center; }
.door-right { transform-origin: right center; }

@media (prefers-reduced-motion: reduce) {
  .intro-doors, .door { transition: none !important; animation: none !important; }
}

/* Citofoni caption overlay + small button */
.citofoni-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-stroke);
  background: rgba(15,17,22,0.55);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  max-width: min(92%, 520px);
}
.citofoni-caption .cap-title { margin: 0 0 4px; font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: clamp(18px, 3vw, 24px); }
.citofoni-caption .cap-sub { color: #a8b3c2; font-weight: 700; letter-spacing: 0.08em; font-size: 12px; margin-bottom: 8px; text-transform: uppercase; }
.citofoni-caption .cap-desc { margin: 0 0 10px; color: #cdd5df; font-size: 14px; }

.btn-sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
