/**
 * FIANCO LUXURY ARCHITECTURAL SYSTEM - COMPONENTS
 * Guided by: design-taste-frontend, emil-design-eng, animate, mobile-native
 * Cold Architectural Luxury: Pure Alabaster, Basalt, Patina Bronze & Saint-Gobain Cobalt
 */

/* ==========================================================================
   HERO EDITORIAL & CINEMATIC SHOWCASE (taste: fits in 100svh, capped pt-20)
   ========================================================================== */
.hero-editorial {
  position: relative;
  min-height: 100svh;
  height: 100svh;
  display: flex;
  align-items: center;
  padding-top: clamp(4.25rem, 5vw, 5.5rem);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-medium);
  background-color: var(--color-bg-base);
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: grayscale(20%) contrast(105%);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 65% 40%, transparent 15%, var(--color-bg-base) 75%),
              linear-gradient(180deg, oklch(0.978 0.005 85 / 0.85) 0%, transparent 45%, var(--color-bg-base) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.hero-title {
  font-size: var(--text-display);
  font-weight: 300;
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
  margin-block: var(--space-2xs) var(--space-sm);
}

.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent-bronze);
  padding-bottom: 0.08em;
  display: inline-block;
}

.hero-subtitle {
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 640px;
  margin-bottom: var(--space-md);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ==========================================================================
   CLIENT LEDGER & TRUST ROSTER (Dedicated Section below Hero)
   ========================================================================== */
.section-client-marquee {
  background-color: var(--color-bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: var(--space-md);
  position: relative;
  z-index: var(--z-base);
}

.client-ledger-header {
  font-size: 0.68rem;
  letter-spacing: var(--tracking-monumental);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  display: block;
}

.ledger-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(1.2rem, 2.5vw, 2.8rem);
}

.ledger-item {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.25rem);
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  font-weight: 500;
  opacity: 0.82;
  transition: opacity var(--duration-fast) ease, color var(--duration-fast) ease, transform var(--duration-fast) ease;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .ledger-item:hover {
    opacity: 1;
    color: var(--color-accent-bronze);
    transform: translateY(-1px);
  }
}

/* ==========================================================================
   DUAL DISCIPLINE SHOWCASE (SIGNAGE & SAINT-GOBAIN)
   ========================================================================== */
.disciplines-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.discipline-card {
  position: relative;
  background: var(--color-bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .discipline-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-monolith);
    transform: translateY(-3px);
  }
  .discipline-card-sg:hover {
    border-color: var(--border-sg);
  }
}

.discipline-card:active {
  transform: scale(0.99);
}

.discipline-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg-elevated);
}

.discipline-media img,
.discipline-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-deliberate) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .discipline-card:hover .discipline-media img,
  .discipline-card:hover .discipline-media video {
    transform: scale(1.04);
  }
}

.discipline-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  background: oklch(0.998 0.001 85 / 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-accent);
  color: var(--color-accent-bronze);
  box-shadow: var(--shadow-subtle);
}

.discipline-badge-sg {
  border-color: var(--border-sg);
  color: var(--color-sg-blue);
}

.discipline-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.discipline-title {
  font-size: var(--text-2xl);
  font-weight: 400;
  margin-bottom: var(--space-xs);
  color: var(--color-text-primary);
}

.discipline-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.discipline-specs-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding-block: var(--space-sm);
  margin-bottom: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.discipline-spec-item {
  font-size: var(--text-xs);
  display: flex;
  flex-direction: column;
}

.discipline-spec-label {
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-size: 0.68rem;
}

.discipline-spec-val {
  color: var(--color-text-primary);
  font-weight: 600;
  font-family: var(--font-sans);
  margin-top: 0.15rem;
}

/* ==========================================================================
   SAINT-GOBAIN PERFORMANCE MATRIX & COMPARATOR
   ========================================================================== */
.specs-matrix-box {
  background: var(--color-bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-lg);
  margin-block: var(--space-xl);
  position: relative;
}

.specs-matrix-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--color-sg-blue);
}

.matrix-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.specs-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--text-sm);
}

.specs-table th {
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--border-medium);
  background: var(--color-bg-elevated);
}

.specs-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .specs-table tr:hover td {
    background: oklch(0.96 0.005 85);
    color: var(--color-text-primary);
  }
}

.film-highlight {
  color: var(--color-accent-bronze);
  font-weight: 700;
}

.film-highlight-sg {
  color: var(--color-sg-blue);
  font-weight: 700;
}

/* ==========================================================================
   ENERGY & HVAC SAVINGS CALCULATOR (mobile-native: 16px inputs)
   ========================================================================== */
.calculator-panel {
  background: var(--color-bg-elevated);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-subtle);
  padding: clamp(1.5rem, 3vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 3vw, 3.5rem);
  margin-block: var(--space-xl);
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  display: flex;
  justify-content: space-between;
}

.input-val-display {
  color: var(--color-accent-bronze);
  font-family: var(--font-mono);
  font-weight: 700;
}

.range-slider {
  width: 100%;
  accent-color: var(--color-accent-bronze);
  height: 8px;
  background: var(--color-bg-surface);
  border: 1px solid var(--border-medium);
  outline: none;
  border-radius: 4px;
  cursor: pointer;
  touch-action: manipulation;
}

/* mobile-native: 16px minimum font size eliminates iOS Safari zoom */
.calc-select {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: border-color var(--duration-fast) ease;
}

.calc-select:focus {
  border-color: var(--color-accent-bronze);
}

.calc-results {
  background: var(--color-bg-surface);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-block: var(--space-md);
}

.result-card {
  display: flex;
  flex-direction: column;
}

.result-metric {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 2.5vw, 2.75rem);
  color: var(--color-accent-bronze);
  font-weight: 500;
  line-height: 1;
}

.result-metric-sg {
  color: var(--color-sg-blue);
}

.result-metric-green {
  color: var(--color-emerald);
}

.result-label {
  font-size: 0.72rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

/* ==========================================================================
   VIDEO PROOF LABORATORY
   ========================================================================== */
.video-proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.proof-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.proof-video-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}

.proof-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proof-details {
  padding: var(--space-md);
}

.proof-title {
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: 0.35rem;
  color: var(--color-text-primary);
}

.proof-meta {
  font-size: var(--text-xs);
  color: var(--color-accent-bronze);
  margin-bottom: 0.75rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: 600;
}

/* ==========================================================================
   PROJECT PORTFOLIO & FILTERABLE ARCHIVE
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-medium);
  padding-bottom: var(--space-sm);
}

.filter-btn {
  background: var(--color-bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 0.55rem 1.15rem;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
}

@media (hover: hover) and (pointer: fine) {
  .filter-btn:hover {
    color: var(--color-text-primary);
    border-color: var(--border-medium);
  }
}

.filter-btn.active {
  color: #ffffff;
  background: var(--color-accent-bronze);
  border-color: var(--color-accent-bronze);
  box-shadow: var(--shadow-accent);
}

.projects-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-md);
}

.project-item {
  position: relative;
  background: var(--color-bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
  display: flex;
  flex-direction: column;
}

@media (hover: hover) and (pointer: fine) {
  .project-item:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-monolith);
    transform: translateY(-3px);
  }
}

.project-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-elevated);
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-deliberate) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .project-item:hover .project-thumbnail img {
    transform: scale(1.04);
  }
}

.project-info {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-client {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.project-category {
  font-size: 0.72rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent-bronze);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-sm);
  flex-grow: 1;
}

.project-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.project-tag {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   ACCORDION & ENTERPRISE FAQ
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 900px;
  margin-inline: auto;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-subtle);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

@media (hover: hover) and (pointer: fine) {
  .faq-item:hover {
    border-color: var(--border-accent);
  }
}

.faq-item.is-open {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-monolith);
}

.faq-question {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  gap: 1rem;
  touch-action: manipulation;
  user-select: none;
}

.faq-question:active {
  background-color: var(--color-bg-elevated);
}

.faq-icon {
  width: 18px;
  height: 18px;
  position: relative;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out);
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-accent-bronze);
  transform: translate(-50%, -50%);
}

.faq-icon::before {
  width: 14px;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 14px;
  transition: opacity var(--duration-fast) ease;
}

.faq-item.is-open .faq-icon {
  transform: rotate(90deg);
}

.faq-item.is-open .faq-icon::after {
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-normal) var(--ease-out);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.5rem;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

/* ==========================================================================
   ARCHITECTURAL RFQ SPECIFIER FORM (mobile-native: 16px min inputs)
   ========================================================================== */
.specifier-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--border-accent);
  padding: clamp(1.75rem, 3.5vw, 3.5rem);
  box-shadow: var(--shadow-monolith);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* mobile-native: font-size 16px prevents iOS Safari auto-zoom on tap */
.form-input,
.form-textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1.15rem;
  background: var(--color-bg-base);
  border: 1px solid var(--border-medium);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  outline: none;
  box-shadow: var(--shadow-subtle);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-accent-bronze);
  box-shadow: var(--shadow-accent);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .disciplines-grid,
  .video-proof-grid,
  .calculator-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-editorial {
    min-height: auto;
    height: auto;
    padding-top: clamp(4rem, 6vw, 5rem);
    padding-bottom: var(--space-xl);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .projects-masonry {
    grid-template-columns: 1fr;
  }
}
