/* ============================================================
   AL RAYEES SDN BHD — Reset & Base
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* ── Neon Page Frame ──────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-neon-frame);
  pointer-events: none;
  border: 3px solid var(--neon);
  box-shadow:
    0 0 10px rgba(var(--neon-rgb), 0.85),
    0 0 26px rgba(var(--neon-rgb), 0.5),
    0 0 54px rgba(var(--neon-rgb), 0.25),
    inset 0 0 10px rgba(var(--neon-rgb), 0.85),
    inset 0 0 26px rgba(var(--neon-rgb), 0.45),
    inset 0 0 64px rgba(var(--neon-rgb), 0.2);
  animation: neonFramePulse 3.4s ease-in-out infinite;
}
@keyframes neonFramePulse {
  0%, 100% { opacity: 0.82; }
  50%      { opacity: 1;    }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

/* ── Page Loader ── */
#page-loader {
  position: fixed;
  inset: 0;
  /* Premium deep forest gradient */
  background: linear-gradient(160deg,
    #0a2619 0%,
    #0d3b2a 30%,
    #0f4e3c 60%,
    #124e4a 80%,
    #0a2619 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  border-bottom: 4px solid var(--gold-500);
  overflow: hidden;
}
/* Subtle ambient sheen across the loader */
#page-loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255,255,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 40%, rgba(232,163,23,0.08) 0%, transparent 65%);
  pointer-events: none;
}
#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-logo {
  width: min(180px, 48vw);
  margin-bottom: var(--space-8);
  position: relative;
  z-index: 1;
}
.loader-bar-track {
  width: min(260px, 70vw);
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300), var(--gold-500));
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  animation: barFlow 0.4s var(--ease-out) forwards;
}
@keyframes barFlow {
  from { background-position: 0% 0; width: 0; }
  to { background-position: 100% 0; width: 100%; }
}
.loader-text {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  color: var(--gold-300);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  text-align: center;
  padding-inline: var(--space-4);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  color: var(--color-primary);
  letter-spacing: var(--tracking-tight);
}
h1 { font-size: clamp(1.85rem, 5.5vw, var(--text-7xl)); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.8vw, var(--text-5xl)); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 2.8vw, var(--text-4xl)); font-weight: 600; }
h4 { font-size: clamp(1.125rem, 2vw, var(--text-2xl)); font-weight: 500; }
h5 { font-size: var(--text-lg); font-weight: 500; }
h6 { font-size: var(--text-base); font-weight: 500; }

p { line-height: var(--leading-relaxed); color: var(--color-text-muted); }

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

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

ul, ol { list-style: none; }

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

svg { display: block; }

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--sm  { max-width: var(--container-sm);  }
.container--md  { max-width: var(--container-md);  }
.container--lg  { max-width: var(--container-lg);  }
.container--xl  { max-width: var(--container-xl);  }

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

/* ── Flex & Grid helpers ── */
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.gap-4          { gap: var(--space-4); }
.gap-6          { gap: var(--space-6); }
.gap-8          { gap: var(--space-8); }
.gap-12         { gap: var(--space-12); }
.grid           { display: grid; }

/* ── Text Utilities ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-gold   { color: var(--color-accent); }
.text-navy   { color: var(--color-primary); }
.text-white  { color: var(--white); }
.text-muted  { color: var(--color-text-muted); }
.uppercase   { text-transform: uppercase; }
.tracking-widest { letter-spacing: var(--tracking-widest); }

/* ── Visibility ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── Section Label ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--grad-gold);
  border-radius: var(--radius-full);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--duration-fast) ease;
}
.btn:hover::after { background: rgba(255,255,255,0.06); }

.btn-primary {
  background: var(--grad-gold);
  color: var(--navy-900);
  border-color: transparent;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232,163,23,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(232,163,23,0.6);
}
.btn-outline:hover {
  background: rgba(232,163,23,0.1);
  border-color: var(--gold-400);
  transform: translateY(-2px);
}
.btn-navy {
  background: var(--grad-navy);
  color: var(--white);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}
.btn-navy:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-lg { padding: 1rem 2.5rem; font-size: var(--text-base); }
.btn-sm { padding: 0.5rem 1.25rem; font-size: var(--text-xs); }
@media (max-width: 480px) {
  .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }
  .btn-lg { padding: 0.85rem 1.5rem; font-size: 0.9375rem; }
}

/* ── Cards ── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
  border: 1px solid var(--color-border);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* ── Glass Panel ── */
.glass {
  background: var(--grad-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
}
.glass-dark {
  background: rgba(10,36,25,0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(232,163,23,0.2);
  border-radius: var(--radius-xl);
}

/* ── Gold Divider ── */
.divider-gold {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block: var(--space-6);
}
.divider-gold::before, .divider-gold::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}
.divider-gold span {
  color: var(--gold-500);
  font-size: var(--text-sm);
}

/* ── Scroll-reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-left.visible,
.reveal-right.visible { opacity: 1; transform: none; }

/* ── Focus styles ── */
:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Selection ── */
::selection {
  background: rgba(232,163,23,0.25);
  color: var(--navy-800);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #dfe0e1; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b0b2b4, #8a8c8e);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-500); }
