/* ==========================================
   THE643 GCC | BASE STYLES & RESET
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@1,700;1,800;1,900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600&family=Syne:wght@500;600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
}

html {
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto; /* Managed by Lenis */
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
  cursor: default;
}

main {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

::selection {
  background: var(--gold-primary);
  color: var(--bg-primary);
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.word-nowrap {
  white-space: nowrap;
  display: inline-block;
}

h1 {
  font-size: clamp(2rem, 5vw + 0.5rem, 5rem);
}

h2 {
  font-size: clamp(1.8rem, 3.8vw + 0.3rem, 3.8rem);
}

h3 {
  font-size: clamp(1.5rem, 2.5vw + 0.2rem, 2.5rem);
}

h4 {
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
}

p {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1vw + 0.2rem, 1.15rem);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-luxury);
}

ul, ol {
  list-style: none;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  background: none;
  color: inherit;
  outline: none;
}

/* Arabic Text Support */
.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  letter-spacing: normal;
}

/* Global Container & Layout Grid */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
}

.section-padding {
  padding: clamp(3.5rem, 6vw, 7rem) 0;
}

/* Background Atmosphere & Ambient Lighting */
.ambient-glow-gold {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--gold-glow) 0%, rgba(0,0,0,0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.ambient-glow-emerald {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--emerald-glow) 0%, rgba(0,0,0,0) 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.ambient-glow-terracotta {
  position: absolute;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, var(--terracotta-glow) 0%, rgba(0,0,0,0) 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

@media (max-width: 768px) {
  .ambient-glow-gold,
  .ambient-glow-emerald,
  .ambient-glow-terracotta {
    width: 320px !important;
    height: 320px !important;
    filter: blur(50px) !important;
  }
}

.stipple-pattern-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  background-image: radial-gradient(var(--terracotta-primary) 0.75px, transparent 0.75px), radial-gradient(var(--gold-primary) 0.75px, transparent 0.75px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}

.terracotta-gradient-text {
  background: linear-gradient(135deg, #FFB88C 0%, #E06D53 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Sophisticated Dark Utility Classes */
.luxury-gold {
  color: var(--gold-primary);
}

.border-glass {
  border-color: rgba(255, 255, 255, 0.08);
}

.glow-gold {
  box-shadow: 0 0 80px rgba(212, 175, 55, 0.1);
}

.vertical-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.title-stroke {
  -webkit-text-stroke: 1px rgba(247, 246, 242, 0.2);
  color: transparent;
}

/* Vertical Grid Overlay Lines */
.vertical-grid-lines {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 3rem;
  pointer-events: none;
  z-index: 0;
}

.vertical-grid-lines .grid-line {
  height: 100%;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Architectural Grid lines background */
.architectural-grid {
  position: absolute;
  inset: 0;
  background-size: 80px 80px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
}

/* Tag / Eyebrow pill */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--gold-subtle);
  border: 1px solid var(--border-active);
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.tag-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
}

.tag-emerald {
  background: var(--emerald-subtle);
  border-color: rgba(0, 108, 103, 0.4);
  color: #38bdf8;
}

.tag-emerald .dot {
  background-color: var(--emerald-primary);
  box-shadow: 0 0 8px var(--emerald-primary);
}

/* ------------------------------------------
   GLOBAL RESPONSIVE GRID & HEADER UTILITIES
   ------------------------------------------ */
.grid-2-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.grid-5-col {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .grid-5-col {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4-col {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-5-col,
  .grid-4-col,
  .grid-3-col,
  .grid-2-col {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
  }

  /* Prevent Safari zoom on form focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Fluid SVG diagrams, images & canvas */
  svg, img, canvas, iframe {
    max-width: 100%;
    height: auto;
  }

  /* Universal text overflow safeguards */
  h1, h2, h3, h4, h5, h6, p, a, span, button, input, select, textarea, label {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* Global overflow-wrap safety */
h1, h2, h3, h4, h5, h6, p, .tag-pill, .btn-primary, .btn-secondary {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

