/* ============================================================
   SUNSTAR REAL ESTATE — GLOBAL CSS
   global.css
   ============================================================
   TABLE OF CONTENTS
   01. Google Fonts Import
   02. CSS Custom Properties (Design Tokens)
   03. CSS Reset & Normalize
   04. Base Styles (html, body, headings, links)
   05. Utility Classes
   06. Animations & Keyframes
   ============================================================ */


/* ============================================================
   01. GOOGLE FONTS IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&display=swap');


/* ============================================================
   02. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* --- Color Palette (Updated from Logo) --- */
  --color-bg-primary:     #062C4B;   /* Deep logo blue — main page background */
  --color-bg-secondary:   #0A395F;   /* Slightly lighter logo blue — sections */
  --color-bg-surface:     #0E4E83;   /* Bright logo blue — card / surface */
  --color-bg-elevated:    #16609C;   /* Elevated cards, dropdowns */

  --color-accent:         #F6A200;   /* Vibrant yellow — primary accent */
  --color-accent-light:   #FFC34D;   /* Light yellow — hover state */
  --color-accent-dark:    #CC8600;   /* Dark yellow — pressed state */
  --color-accent-muted:   rgba(246, 162, 0, 0.15); /* Translucent yellow */

  --color-text-primary:   #FFFFFF;
  --color-text-secondary: #233f57;   /* Soft blue-grey for secondary text */
  --color-text-muted:     #84A9CC;
  --color-text-inverse:   #062C4B;

  --color-border:         rgba(246, 162, 0, 0.20);
  --color-border-subtle:  rgba(255, 255, 255, 0.12);
  --color-overlay:        rgba(6, 44, 75, 0.80);
  --color-overlay-dark:   rgba(6, 44, 75, 0.92);

  --color-success:        #2DD4A0;
  --color-warning:        #F59E0B;
  --color-error:          #EF4444;

  /* --- Typography --- */
  --font-family:          'Sora', ui-sans-serif, system-ui, sans-serif;
  --font-size-xs:         0.75rem;    /* 12px */
  --font-size-sm:         0.875rem;   /* 14px */
  --font-size-base:       1rem;       /* 16px */
  --font-size-md:         1.125rem;   /* 18px */
  --font-size-lg:         1.25rem;    /* 20px */
  --font-size-xl:         1.5rem;     /* 24px */
  --font-size-2xl:        1.875rem;   /* 30px */
  --font-size-3xl:        2.25rem;    /* 36px */
  --font-size-4xl:        3rem;       /* 48px */
  --font-size-5xl:        3.75rem;    /* 60px */
  --font-size-6xl:        4.5rem;     /* 72px */

  --font-weight-light:    300;
  --font-weight-regular:  400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;
  --font-weight-extrabold:800;

  --line-height-tight:    1.2;
  --line-height-snug:     1.375;
  --line-height-normal:   1.5;
  --line-height-relaxed:  1.75;

  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide:  0.05em;
  --letter-spacing-wider: 0.1em;

  /* --- Spacing Scale --- */
  --space-1:   0.25rem;   /* 4px  */
  --space-2:   0.5rem;    /* 8px  */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */
  --space-32:  8rem;      /* 128px */

  /* --- Layout --- */
  --container-max:        1280px;
  --container-padding:    1.5rem;
  --section-padding-y:    var(--space-20);

  /* --- Border Radius --- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md:   0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg:   0 8px 40px rgba(0, 0, 0, 0.45);
  --shadow-xl:   0 16px 60px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 4px 24px rgba(201, 168, 76, 0.30);

  /* --- Transitions --- */
  --transition-fast:    150ms ease;
  --transition-base:    250ms ease;
  --transition-slow:    400ms ease;
  --transition-bounce:  350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Z-index Scale --- */
  --z-below:   -1;
  --z-base:     0;
  --z-above:    10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    300;
  --z-toast:    400;
}


/* ============================================================
   03. CSS RESET & NORMALIZE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

table {
  border-collapse: collapse;
}

/* Remove default fieldset styles */
fieldset {
  border: none;
}


/* ============================================================
   04. BASE STYLES
   ============================================================ */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, var(--font-size-6xl)); }
h2 { font-size: clamp(1.875rem, 3.5vw, var(--font-size-4xl)); }
h3 { font-size: clamp(1.5rem, 2.5vw, var(--font-size-3xl)); }
h4 { font-size: clamp(1.25rem, 2vw, var(--font-size-2xl)); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

/* Paragraphs */
p {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* Links */
a {
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection {
  background-color: var(--color-accent-muted);
  color: var(--color-text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}


/* ============================================================
   05. UTILITY CLASSES
   ============================================================ */

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* --- Section wrapper --- */
.section {
  padding-block: var(--section-padding-y);
}

.section--sm {
  padding-block: var(--space-12);
}

.section--lg {
  padding-block: var(--space-32);
}

/* --- Section alternate backgrounds --- */
.section--dark {
  background-color: var(--color-bg-primary);
}

.section--surface {
  background-color: var(--color-bg-secondary);
}

.section--card {
  background-color: var(--color-bg-surface);
}

/* --- Text alignment --- */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

/* --- Text colors --- */
.text-primary   { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }
.text-accent    { color: var(--color-accent); }

/* --- Font weights --- */
.fw-light    { font-weight: var(--font-weight-light); }
.fw-regular  { font-weight: var(--font-weight-regular); }
.fw-medium   { font-weight: var(--font-weight-medium); }
.fw-semibold { font-weight: var(--font-weight-semibold); }
.fw-bold     { font-weight: var(--font-weight-bold); }

/* --- Display helpers --- */
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-block   { display: block; }
.d-none    { display: none; }

.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-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* --- Spacing helpers --- */
.mt-auto { margin-top: auto; }
.mb-4    { margin-bottom: var(--space-4); }
.mb-6    { margin-bottom: var(--space-6); }
.mb-8    { margin-bottom: var(--space-8); }
.mb-12   { margin-bottom: var(--space-12); }

/* --- Width helpers --- */
.w-full  { width: 100%; }
.h-full  { height: 100%; }

/* --- Overflow --- */
.overflow-hidden { overflow: hidden; }

/* --- Position --- */
.relative { position: relative; }
.absolute { position: absolute; }

/* --- Accent bar — decorative line before section headings --- */
.accent-bar {
  display: inline-block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

/* --- Eyebrow label above headings --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

/* --- Section heading group --- */
.section-heading {
  margin-bottom: var(--space-12);
}

.section-heading h2 {
  margin-bottom: var(--space-4);
}

.section-heading p {
  font-size: var(--font-size-md);
  max-width: 600px;
}

.section-heading.text-center p {
  margin-inline: auto;
}

/* --- Gradient text --- */
.gradient-text {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin-block: var(--space-8);
}

/* --- Responsive image --- */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- Aspect ratios --- */
.aspect-16-9  { aspect-ratio: 16 / 9; }
.aspect-4-3   { aspect-ratio: 4 / 3; }
.aspect-3-2   { aspect-ratio: 3 / 2; }
.aspect-1-1   { aspect-ratio: 1 / 1; }
.aspect-hero  { aspect-ratio: 16 / 7; }

/* --- Overlay --- */
.overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

.overlay--dark {
  background: var(--color-overlay-dark);
}

/* --- Visually hidden (accessibility) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Grid helpers --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@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; }
}


/* ============================================================
   06. ANIMATIONS & KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* Utility animation classes */
.animate-fadeInUp    { animation: fadeInUp 0.6s ease forwards; }
.animate-fadeIn      { animation: fadeIn 0.6s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.6s ease forwards; }
.animate-scaleIn     { animation: scaleIn 0.5s ease forwards; }
.animate-float       { animation: float 4s ease-in-out infinite; }

/* Staggered delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Initial hidden state for scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Global Mobile Resets --- */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  :root {
    --space-20: 3rem; /* Shrink huge desktop padding */
    --space-24: 4rem; 
    --section-padding-y: var(--space-12);
  }
}
/* ============================================================
   WHATSAPP FLOATER
   ============================================================ */
.wa-floater {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25D366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: var(--z-modal);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.wa-floater svg {
  width: 32px;
  height: 32px;
}

.wa-floater:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

@media (max-width: 768px) {
  .wa-floater {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
  }
  .wa-floater svg {
    width: 28px;
    height: 28px;
  }
}
