/* ==========================================================================
   بيت الزجاج العالمية — Global Glass House
   Stylesheet — vanilla CSS, no frameworks
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --color-navy: #0F3557;
  --color-navy-soft: #163f63;
  --color-blue: #1B6FA8;
  --color-text: #0B1F2E;
  --color-text-secondary: #55697A;
  --color-text-muted: #8A97A2;
  --color-white: #FFFFFF;
  --color-cool-white: #F6F9FB;
  --color-glass-light: #EAF3F9;
  --color-border: #E3EAEF;
  --color-border-soft: #EEF2F5;

  /* Typography */
  --font-heading: 'Alexandria', 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;

  /* Layout */
  --container-width: 1280px;
  --header-height: 84px;

  /* Spacing scale */
  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs: 12px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 100px;
  --space-3xl: 140px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 53, 87, 0.07);
  --shadow-md: 0 12px 34px rgba(15, 53, 87, 0.12);
  --shadow-header: 0 1px 0 rgba(15, 53, 87, 0.06);

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --transition-fast: 0.2s var(--ease);
  --transition-base: 0.45s var(--ease);
  --transition-slow: 0.9s var(--ease);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; color: var(--color-text); }
p { margin: 0; }
button { font: inherit; background: none; border: none; cursor: pointer; }
svg { display: block; }

section[id] { scroll-margin-top: var(--header-height); }

.skip-link {
  position: absolute;
  right: -999px;
  top: auto;
  background: var(--color-navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 999;
}
.skip-link:focus {
  right: var(--space-md);
  top: var(--space-md);
}

:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

.section-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-blue);
  margin: 0 0 var(--space-sm);
  letter-spacing: 0.2px;
}
.eyebrow-light { color: #8FC1E3; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 30px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-navy);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-blue); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 11px 22px; font-size: 14px; }
.btn-lg { padding: 18px 38px; font-size: 16px; }
.btn-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--color-blue);
  padding: 0;
}
.btn-text:hover { color: var(--color-navy); }
.btn-text span { transition: transform var(--transition-fast); display: inline-block; }
.btn-text:hover span { transform: translateX(-4px); }
.btn-whatsapp {
  background: transparent;
  color: var(--color-navy);
  border: 1.5px solid var(--color-navy);
}
.btn-whatsapp:hover { background: var(--color-navy); color: #fff; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: none;
  border-bottom-color: var(--color-border-soft);
  box-shadow: var(--shadow-header);
}
.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-text);
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  right: 0; left: 0; bottom: -6px;
  height: 1.5px;
  background: var(--color-blue);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}
.main-nav a:hover { color: var(--color-text); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--color-text); }
.main-nav a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 18px; }

body.nav-open { overflow: hidden; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 0 auto;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  max-height: 0;
  overflow: hidden;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-soft);
  transition: max-height var(--transition-base);
}
.mobile-nav.is-open { max-height: 480px; }
.mobile-nav ul { padding: var(--space-sm) var(--space-lg) var(--space-lg); display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a {
  display: block;
  padding: 14px 4px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-soft);
}
.mobile-nav a.is-active { color: var(--color-blue); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 66px) var(--space-lg) 90px;
  overflow: hidden;
  background: var(--color-white);
}
.hero-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
}
.hero-content { max-width: 600px; flex-shrink: 0; }
.hero-title {
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.32;
  color: var(--color-text);
  margin: var(--space-md) 0;
}
.hero-text {
  font-size: 17.5px;
  line-height: 1.95;
  color: var(--color-text-secondary);
  max-width: 520px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.hero-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.glass-composition { width: 100%; max-width: 480px; height: auto; overflow: visible; }
.gc-sweep { fill: var(--color-blue); opacity: 0.05; }
.gc-plane rect { fill: var(--color-navy); }
.gc-plane-1 rect { fill: var(--color-navy); fill-opacity: 0.94; }
.gc-plane-2 rect { fill: var(--color-blue); fill-opacity: 0.55; }
.gc-plane-3 rect { fill: var(--color-glass-light); fill-opacity: 0.96; stroke: var(--color-blue); stroke-width: 1.4; }
.gc-grid { stroke: var(--color-blue); stroke-opacity: 0.16; stroke-width: 1; }
.gc-reflection { stroke: #FFFFFF; stroke-opacity: 0.5; stroke-width: 6; }

.gc-plane-1, .gc-plane-2, .gc-plane-3 {
  transform-origin: center;
  animation: drift 9s ease-in-out infinite;
}
.gc-plane-2 { animation-duration: 11s; animation-delay: -2s; }
.gc-plane-3 { animation-duration: 7.5s; animation-delay: -4s; }
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  right: 50%;
  transform: translateX(50%);
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
}
.scroll-hint span {
  display: block;
  width: 3px;
  height: 7px;
  background: var(--color-blue);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { padding: var(--space-3xl) 0; }
.about-inner {
  display: flex;
  align-items: center;
  gap: 90px;
}
.about-text { max-width: 600px; flex-shrink: 0; }
.about-text h2 {
  font-weight: 600;
  font-size: 29px;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}
.about-text p {
  font-size: 16.5px;
  line-height: 2;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}
.about-highlight {
  color: var(--color-navy) !important;
  font-weight: 500;
}
.about-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.about-composition { width: 100%; max-width: 300px; height: auto; overflow: visible; }
.ac-pane { transform-origin: center; transform: rotate(5deg); }
.ac-pane rect { fill: var(--color-glass-light); stroke: var(--color-blue); stroke-opacity: 0.4; stroke-width: 1.4; }
.ac-reflection-strong { stroke: #fff; stroke-opacity: 0.6; stroke-width: 10; }
.ac-reflection-soft { stroke: #fff; stroke-opacity: 0.3; stroke-width: 4; }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services { padding: var(--space-3xl) 0; background: var(--color-cool-white); }
.services h2 {
  font-weight: 600;
  font-size: 32px;
  max-width: 640px;
  margin-bottom: 56px;
}
.service-row {
  display: flex;
  align-items: center;
  gap: 44px;
  padding: 42px 0;
  border-bottom: 1px solid var(--color-border);
  transition: padding var(--transition-base);
}
.service-list li:last-child { border-bottom: none; }
.service-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 88px;
  color: var(--color-navy);
  opacity: 0.08;
  width: 140px;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}
.service-icon { flex-shrink: 0; }
.service-copy h3 { font-weight: 600; font-size: 21px; margin-bottom: 8px; }
.service-copy p { font-size: 15px; line-height: 1.9; color: var(--color-text-secondary); max-width: 620px; }
.service-row:hover { padding-inline-start: 8px; }

/* ==========================================================================
   PRODUCTS
   ========================================================================== */
.products { padding: var(--space-3xl) 0; }
.products-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-lg);
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.products h2 { font-weight: 600; font-size: 32px; max-width: 640px; }
.products-note {
  font-size: 13px;
  color: var(--color-text-muted);
  max-width: 300px;
  line-height: 1.8;
  text-align: left;
}

.product-featured {
  display: flex;
  align-items: center;
  gap: 70px;
  margin-bottom: 80px;
}
.product-featured-media {
  flex: 1.15;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-cool-white);
}
.product-featured-media img { width: 100%; height: auto; transition: transform var(--transition-slow); }
.product-featured:hover .product-featured-media img { transform: scale(1.03); }
.product-featured-copy { flex: 1; }
.product-featured-copy h3 { font-weight: 600; font-size: 28px; margin: var(--space-2xs) 0 var(--space-sm); }
.product-featured-copy p { font-size: 15px; color: var(--color-text-secondary); line-height: 1.9; max-width: 400px; }

.product-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.product-item {
  margin: 0;
  padding: 0 var(--space-md);
  border-inline-start: 1px solid var(--color-border);
  text-align: center;
}
.product-item:first-child { border-inline-start: none; }
.product-item img {
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--color-cool-white);
  transition: transform var(--transition-base);
}
.product-item:hover img { transform: translateY(-4px); }
.product-item figcaption { margin-top: var(--space-sm); }
.product-item figcaption span {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
}
.product-item figcaption small {
  display: block;
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   WHY US
   ========================================================================== */
.why-us {
  position: relative;
  padding: var(--space-3xl) 0;
  background: var(--color-navy);
  overflow: hidden;
}
.why-bg {
  position: absolute;
  top: -160px;
  right: -160px;
  width: 640px;
  height: 640px;
  opacity: 0.07;
}
.wb-plane rect { fill: #fff; transform-origin: center; transform: rotate(-8deg); }
.wb-plane-2 rect { transform: rotate(-8deg) translate(20px, 30px); }
.why-us h2 {
  font-weight: 600;
  font-size: 32px;
  color: var(--color-white);
  margin-bottom: 60px;
  max-width: 680px;
  position: relative;
}
.why-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px 90px;
  max-width: 980px;
}
.why-item h3 { font-weight: 700; font-size: 19px; color: var(--color-white); margin-bottom: 10px; }
.why-item p { font-size: 15px; line-height: 1.95; color: #B9CBDA; }

/* ==========================================================================
   INDUSTRIES
   ========================================================================== */
.industries { padding: var(--space-3xl) 0; }
.industries h2 { font-weight: 600; font-size: 32px; margin-bottom: 50px; }
.industry-list { max-width: 820px; }
.industry-list li {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(19px, 2.4vw, 26px);
  transition: gap var(--transition-fast), color var(--transition-fast);
}
.industry-list li:last-child { border-bottom: none; }
.industry-list li:hover { gap: 30px; color: var(--color-blue); }
.industry-index {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 26px;
}

/* ==========================================================================
   CONTACT CTA
   ========================================================================== */
.contact-cta {
  position: relative;
  padding: var(--space-3xl) 0;
  background: var(--color-cool-white);
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 360px;
  height: 440px;
}
.cb-plane rect { fill: var(--color-blue); fill-opacity: 0.06; transform-origin: center; transform: rotate(6deg); }
.cb-plane-2 rect { fill-opacity: 0.1; transform: rotate(6deg) translate(24px, 24px); }
.cta-inner { position: relative; }
.cta-text h2 { font-weight: 600; font-size: 34px; margin-bottom: var(--space-sm); max-width: 640px; }
.cta-text > p { font-size: 16px; line-height: 2; color: var(--color-text-secondary); max-width: 560px; }

.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: var(--space-lg) 0;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-text);
  transition: color var(--transition-fast);
}
a.contact-link:hover { color: var(--color-blue); }
.contact-link svg { color: var(--color-blue); flex-shrink: 0; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 18px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--color-text); padding: var(--space-xl) 0 var(--space-lg); }
.footer-inner { color: #AAB8C2; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: var(--space-md); }
.footer-name { font-family: var(--font-heading); font-weight: 700; font-size: 16px; color: #fff; margin: 0; }
.footer-name-en { font-size: 12.5px; color: #7E8E9A; margin: 2px 0 0; }
.footer-blurb { font-size: 14px; line-height: 1.9; max-width: 520px; margin-bottom: var(--space-md); }
.footer-contact { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; margin-bottom: var(--space-lg); }
.footer-contact a:hover { color: #fff; }
.footer-copy { font-size: 12.5px; color: #63727C; border-top: 1px solid rgba(255,255,255,0.08); padding-top: var(--space-md); }

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
/* Content is visible by default (no-JS / JS-failure safe). The pre-reveal
   hidden state only applies once JS confirms it is ready to animate it back
   in — see the inline script in <head> and script.js. */
.reveal { opacity: 1; transform: none; }
.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js-reveal-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }
.service-row.reveal:nth-child(2) { transition-delay: 0.08s; }
.service-row.reveal:nth-child(3) { transition-delay: 0.16s; }
.product-strip .reveal:nth-child(2) { transition-delay: 0.06s; }
.product-strip .reveal:nth-child(3) { transition-delay: 0.12s; }
.product-strip .reveal:nth-child(4) { transition-delay: 0.18s; }
.why-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.why-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.why-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-reveal-ready .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  :root { --space-3xl: 100px; }
  .hero-inner { gap: 40px; }
  .hero-content { max-width: 480px; }
  .about-inner { gap: 50px; }
  .why-grid { gap: 40px 50px; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: block; }

  .hero-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .hero-content { max-width: none; margin: 0 auto; }
  .hero-text { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: var(--space-md); }
  .glass-composition { max-width: 340px; }

  .about-inner { flex-direction: column-reverse; text-align: center; }
  .about-text { max-width: none; margin: 0 auto; }
  .about-text p { margin-inline: auto; }
  .about-visual { margin-bottom: var(--space-md); }

  .service-row { gap: 24px; padding: 30px 0; }
  .service-num { font-size: 56px; width: 80px; }

  .product-featured { flex-direction: column; }
  .product-featured-copy { text-align: center; }
  .product-featured-copy p { margin-inline: auto; }

  .product-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg) 0; }
  .product-item { border-inline-start: none; padding: 0 var(--space-sm); }

  .products-head { flex-direction: column; align-items: flex-start; }
  .products-note { text-align: right; max-width: none; }

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

  .cta-inner { text-align: center; }
  .cta-text h2, .cta-text > p { margin-inline: auto; }
  .contact-details { justify-content: center; }
  .cta-actions { justify-content: center; }

  .footer-brand, .footer-contact { justify-content: center; text-align: center; }
  .footer-inner { text-align: center; }
  .footer-blurb { margin-inline: auto; }
}

@media (max-width: 560px) {
  .section-inner, .header-inner { padding: 0 var(--space-md); }
  :root { --space-3xl: 76px; --header-height: 72px; }
  .hero { padding-top: calc(var(--header-height) + 40px); }
  .hero-title { font-size: 30px; }
  .hero-text { font-size: 16px; }
  .btn-lg, .btn-primary { width: 100%; justify-content: center; }
  .hero-actions, .cta-actions { flex-direction: column; align-items: stretch; }
  .service-row { flex-wrap: wrap; }
  .service-num { display: none; }
  .product-strip { grid-template-columns: 1fr 1fr; }
  .industry-list li { font-size: 19px; }
  .contact-details { flex-direction: column; gap: 14px; align-items: center; }
}
