/* ============================================================
   GULFCAP SHARI'AH DIVISION — MAIN STYLESHEET
   main.css  |  Base styles, resets, typography, layout
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--leading-normal);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ----------------------------------------------------------
   2. TYPOGRAPHY SYSTEM
   ---------------------------------------------------------- */

/* Display headings — Chronicle Display */
.display-1,
.display-2,
.display-3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-cypress-darker);
}

.display-1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
}
.display-2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
}
.display-3 {
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
}

/* Section headings */
h1,
.h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--fw-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

h2,
.h2 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  font-weight: var(--fw-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

h3,
.h3 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-2xl));
  font-weight: var(--fw-semibold);
  line-height: var(--leading-snug);
}

h4,
.h4 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-md), 2vw, var(--text-xl));
  font-weight: var(--fw-semibold);
  line-height: var(--leading-normal);
}

h5,
.h5 {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  line-height: var(--leading-normal);
}

h6,
.h6 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-charcoal-mid);
  max-width: 72ch;
}

p.lead {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-charcoal);
}

/* Label / overline text */
.overline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold-brown);
}

/* Italic accent — Chronicle Display Light Italic */
.italic-accent {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  font-style: italic;
}

/* ----------------------------------------------------------
   3. LAYOUT — CONTAINER SYSTEM
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ----------------------------------------------------------
   4. SECTION SPACING
   ---------------------------------------------------------- */
.section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}

.section--sm {
  padding-block: clamp(var(--space-8), 4vw, var(--space-16));
}

.section--lg {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

/* ----------------------------------------------------------
   5. GRID UTILITIES
   ---------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-8);
}

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

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ----------------------------------------------------------
   6. FLEX UTILITIES
   ---------------------------------------------------------- */
.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.gap-2 {
  gap: var(--space-2);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.gap-8 {
  gap: var(--space-8);
}

/* ----------------------------------------------------------
   7. COLOUR UTILITY CLASSES
   ---------------------------------------------------------- */
.text-cypress {
  color: var(--color-cypress);
}
.text-gold {
  color: var(--color-gcib-gold);
}
.text-gold-brown {
  color: var(--color-gold-brown);
}
.text-white {
  color: var(--color-white);
}
.text-charcoal {
  color: var(--color-charcoal);
}
.text-grey {
  color: var(--color-grey);
}
.text-navy {
  color: var(--color-navy);
}

.bg-cypress {
  background-color: var(--color-cypress);
}
.bg-off-gold {
  background-color: var(--color-off-gold);
}
.bg-white {
  background-color: var(--color-white);
}
.bg-charcoal {
  background-color: var(--color-charcoal);
}
.bg-grey-subtle {
  background-color: var(--color-grey-subtle);
}

/* ----------------------------------------------------------
   8. DIVIDERS & DECORATIVE ELEMENTS
   ---------------------------------------------------------- */
.gold-rule {
  width: 60px;
  height: 3px;
  background: var(--gradient-gold);
  border: none;
  border-radius: var(--radius-pill);
  margin-block: var(--space-6);
}

.gold-rule--center {
  margin-inline: auto;
}

.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--gradient-gold);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   9. CARDS — BASE
   ---------------------------------------------------------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

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

.card--dark {
  background: var(--color-cypress-dark);
  border-color: var(--border-color-light);
  color: var(--color-white);
}

.card--gold {
  border-color: var(--border-color-gold);
  background: var(--color-off-gold);
}

/* ----------------------------------------------------------
  10. SKIP NAV (Accessibility)
   ---------------------------------------------------------- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-gcib-gold);
  color: var(--color-cypress-dark);
  font-weight: var(--fw-bold);
  padding: var(--space-3) var(--space-6);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: var(--z-toast);
  transition: top var(--duration-fast) var(--ease-out);
  font-size: var(--text-sm);
}

.skip-nav:focus {
  top: 0;
}

/* ----------------------------------------------------------
  11. FOCUS STATES (Accessibility)
   ---------------------------------------------------------- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------
  12. SCROLL PADDING (offset for sticky header)
   ---------------------------------------------------------- */
:target {
  scroll-margin-top: calc(
    var(--header-height) + var(--quicklinks-height) + var(--space-6)
  );
}

/* ----------------------------------------------------------
  13. SELECTION
   ---------------------------------------------------------- */
::selection {
  background-color: var(--color-gcib-gold);
  color: var(--color-cypress-darker);
}

/* ----------------------------------------------------------
  14. SCROLLBAR
   ---------------------------------------------------------- */
/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
  width: 0;
  background: transparent;
}

/* Hide scrollbar for IE, Edge and Firefox */
html,
body {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* ----------------------------------------------------------
  15. PAGE OFFSET FOR FIXED HEADER
   ---------------------------------------------------------- */
body {
  /* Inner pages: only offset by the header height (no quicklinks) */
  padding-top: var(--header-height);
}

/* Home page — hero is behind header, no padding offset needed */
body.page-home {
  padding-top: 0;
}

/* ----------------------------------------------------------
  16. RESPONSIVE BREAKPOINTS
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .section {
    padding-block: var(--space-12);
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 15px;
  }
}

/* ----------------------------------------------------------
  17. PRINT STYLES
   ---------------------------------------------------------- */
@media print {
  body {
    padding-top: 0;
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .site-header,
  .site-quicklinks,
  .site-footer,
  .breadcrumb-nav {
    display: none;
  }
}

/* --- CSS extracted from index.html --- */

