/* ==========================================================================
   PROHYGIENIC — Page-Specific Styles
   Overrides and unique layouts per page
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HOME PAGE — Additional hero variants
   -------------------------------------------------------------------------- */

/* Hero with video background */
.hero-video-slide {
  position: absolute;
  inset: 0;
}

.hero-video-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Hero with split layout (text left, image right inside hero) */
.hero-split .hero-content {
  justify-content: center;
}

.hero-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
  width: 100%;
}

.hero-split-grid .hero-text {
  /* normal hero text flow */
}

.hero-split-grid .hero-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-md);
  position: relative;
}

.hero-split-grid .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero with centered minimal layout */
.hero-centered .hero-content {
  text-align: center;
  align-items: center;
}

.hero-centered .hero-title {
  max-width: 900px;
}

.hero-centered .hero-subtitle {
  max-width: 560px;
}

.hero-centered .hero-actions {
  justify-content: center;
}

/* Trust bar beneath hero */
.trust-bar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  padding-block: var(--space-4);
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  white-space: nowrap;
}

.trust-item-icon {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   2. ABOUT PAGE
   -------------------------------------------------------------------------- */

/* Timeline */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-line);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-10);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 1px var(--color-primary);
  transform: translateX(-4px);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.timeline-title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.timeline-desc {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-mid);
  max-width: 600px;
}

/* Values section */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
  background: var(--color-line);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.value-item {
  background: var(--color-white);
  padding: var(--space-10) var(--space-8);
}

.value-item-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-5);
  display: block;
}

.value-item-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.value-item-desc {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--color-text-mid);
}

/* About — full image + text layout */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
  align-items: center;
}

.about-story.reverse .about-story-image {
  order: 2;
}

.about-story.reverse .about-story-text {
  order: 1;
}

.about-story-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-ice);
  border-radius: var(--radius-md);
  position: relative;
}

.about-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-story-image-caption {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(10, 20, 30, 0.6);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.about-story-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-6);
}

.about-story-text p {
  font-size: var(--text-base);
  line-height: 1.85;
}

/* Management / leadership */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-8);
}

.leader-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-5);
  align-items: start;
  padding: var(--space-6);
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
}

.leader-card-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-ice);
  flex-shrink: 0;
}

.leader-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-card-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.leader-card-role {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-3);
}

.leader-card-bio {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-mid);
}

/* --------------------------------------------------------------------------
   3. INDUSTRIES PAGE
   -------------------------------------------------------------------------- */

.industries-hero {
  padding-top: calc(80px + 4rem);
  padding-bottom: var(--section-padding-y);
  background: var(--color-text);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.industries-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(255, 255, 255, 0.04) 60px,
      rgba(255, 255, 255, 0.04) 61px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(255, 255, 255, 0.04) 60px,
      rgba(255, 255, 255, 0.04) 61px
    );
}

.industries-hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-white);
  max-width: 800px;
  line-height: 1.05;
}

.industries-hero-sub {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.6);
  max-width: 520px;
  margin-top: var(--space-6);
  line-height: 1.7;
}

/* Industry detail page */
.industry-page-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-16);
  align-items: start;
}

.industry-sidebar {
  position: sticky;
  top: calc(80px + var(--space-6));
  background: var(--color-off-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-8);
}

.industry-sidebar-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-line);
}

.industry-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.industry-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-line-light);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-mid);
  text-decoration: none;
  transition: color var(--transition), padding-left var(--transition);
}

.industry-sidebar-link:last-child {
  border-bottom: none;
}

.industry-sidebar-link:hover,
.industry-sidebar-link.active {
  color: var(--color-primary);
  padding-left: var(--space-2);
}

/* --------------------------------------------------------------------------
   4. TECHNOLOGY PAGE
   -------------------------------------------------------------------------- */

.technology-hero {
  padding-top: calc(80px + 5rem);
  padding-bottom: var(--section-padding-y);
  background: var(--color-off-white);
  border-bottom: 1px solid var(--color-line);
}

.technology-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.technology-hero-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.technology-hero-desc {
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--color-text-mid);
  margin-bottom: var(--space-8);
}

.technology-visual {
  aspect-ratio: 4 / 3;
  background: var(--color-ice);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.technology-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tech comparison table */
.tech-comparison {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--text-sm);
}

.tech-comparison thead {
  background: var(--color-text);
  color: var(--color-white);
}

.tech-comparison th {
  padding: var(--space-4) var(--space-6);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tech-comparison th:first-child {
  width: 40%;
}

.tech-comparison td {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-line-light);
  color: var(--color-text-mid);
  line-height: 1.5;
}

.tech-comparison td:first-child {
  font-weight: 600;
  color: var(--color-text);
}

.tech-comparison tr:last-child td {
  border-bottom: none;
}

.tech-comparison tr:nth-child(even) {
  background: var(--color-off-white);
}

.tech-comparison .check {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1rem;
}

.tech-comparison .cross {
  color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   5. SUSTAINABILITY PAGE
   -------------------------------------------------------------------------- */

.sustainability-hero {
  padding-top: calc(80px + 5rem);
  padding-bottom: var(--section-padding-y);
  background: var(--color-text);
  position: relative;
  overflow: hidden;
}

.sustainability-hero::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--color-white);
  clip-path: ellipse(55% 80px at 50% 80px);
}

.sustainability-hero-title {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-white);
  max-width: 820px;
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.sustainability-hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.6);
  max-width: 560px;
  line-height: 1.7;
}

/* SDG / pillars grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.pillar-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}

.pillar-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms ease;
}

.pillar-card:hover::before {
  transform: scaleX(1);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  background: var(--color-ice);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.pillar-title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.pillar-desc {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--color-text-mid);
  margin-bottom: var(--space-5);
}

.pillar-metric {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-light);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line-light);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pillar-metric strong {
  color: var(--color-primary);
  font-size: var(--text-sm);
}

/* Progress bars for sustainability metrics */
.sustainability-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.progress-item {}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.progress-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.progress-value {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

.progress-track {
  width: 100%;
  height: 3px;
  background: var(--color-line);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
  width: 0%;
  transition: width 1200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.animated {
  width: var(--progress-value, 0%);
}

/* --------------------------------------------------------------------------
   6. PRODUCTS LISTING PAGE
   -------------------------------------------------------------------------- */

.products-page-hero {
  background: var(--color-off-white);
  border-bottom: 1px solid var(--color-line);
  padding-top: calc(80px + var(--space-16));
  padding-bottom: var(--space-12);
}

.products-page-hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.products-page-hero-desc {
  font-size: var(--text-lg);
  color: var(--color-text-mid);
  max-width: 560px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   7. CONTACT PAGE
   -------------------------------------------------------------------------- */

.contact-page-hero {
  background: var(--color-text);
  color: var(--color-white);
  padding-top: calc(80px + 5rem);
  padding-bottom: var(--section-padding-y);
  text-align: center;
}

.contact-page-hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.contact-page-hero-desc {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.6);
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.7;
}

/* Map embed area */
.contact-map {
  height: 420px;
  background: var(--color-ice);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--color-line);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --------------------------------------------------------------------------
   8. 404 / ERROR PAGE
   -------------------------------------------------------------------------- */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--container-padding);
}

.error-code {
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--color-ice-dark);
  line-height: 1;
  display: block;
  margin-bottom: var(--space-4);
}

.error-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.error-desc {
  font-size: var(--text-base);
  color: var(--color-text-mid);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE OVERRIDES — PAGES
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .about-story {
    grid-template-columns: 1fr;
  }

  .about-story.reverse .about-story-image,
  .about-story.reverse .about-story-text {
    order: unset;
  }

  .technology-hero-grid {
    grid-template-columns: 1fr;
  }

  .industry-page-layout {
    grid-template-columns: 1fr;
  }

  .industry-sidebar {
    position: static;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-split-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .trust-bar-inner {
    gap: var(--space-5);
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .timeline {
    padding-left: 2rem;
  }

  .tech-comparison {
    font-size: var(--text-xs);
  }

  .tech-comparison th,
  .tech-comparison td {
    padding: var(--space-3) var(--space-4);
  }
}

/* --------------------------------------------------------------------------
   10. HOMEPAGE PRELOADER
   -------------------------------------------------------------------------- */

.preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #0c2135 0%, #050e18 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 950ms cubic-bezier(0.85, 0, 0.15, 1), visibility 950ms ease;
  transform: translateY(0);
  visibility: visible;
}

.preloader.fade-out {
  transform: translateY(-100vh);
  visibility: hidden;
}

.preloader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
  width: 100%;
  padding: var(--space-8);
  transition: opacity 350ms cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
}

.preloader.fade-out .preloader-content {
  opacity: 0;
}

.preloader-logo {
  font-family: var(--font-primary);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-white);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  opacity: 0;
  transform: translateY(20px);
  animation: preloader-fade-in 800ms cubic-bezier(0.16, 1, 0.3, 1) forwards 200ms;
}

.preloader-logo-img {
  height: 60px;
  max-height: 60px;
  width: auto;
  min-width: 60px; /* Safe dimension guard for SVG logos */
  display: block;
  margin: 0 auto;
  filter: brightness(0) invert(1);
}

.preloader-subtitle {
  font-family: var(--font-primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: var(--space-8);
  opacity: 0;
  transform: translateY(15px);
  animation: preloader-fade-in 800ms cubic-bezier(0.16, 1, 0.3, 1) forwards 400ms;
}

.preloader-progress {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  animation: preloader-fade-in 600ms ease forwards 500ms;
}

.preloader-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 10px;
  transition: width 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes preloader-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
