/* ============================================================
   GLOBAL.CSS — Results Real Estate Inc.
   Shared variables, reset, typography, utilities
   Used by: ALL pages
   ============================================================ */

/* ── Google Fonts are loaded via functions.php ── */

:root {
  /* Brand Colors */
  --primary:         #0c3348;
  --primary-dark:    #071f2e;
  --primary-mid:     #0e2d42;
  --primary-light:   #154963;
  --accent:          #00d4ff;
  --accent-dark:     #00b8e0;
  --accent-dim:      rgba(0, 212, 255, 0.12);
  --accent-glow:     rgba(0, 212, 255, 0.35);
  --white:           #ffffff;
  --off-white:       #f5f8fb;
  --light-bg:        #eef3f8;
  --text:            #1a2e3b;
  --text-muted:      #5a7a8e;
  --text-light:      #8aa4b4;
  --border:          rgba(12, 51, 72, 0.1);
  --border-light:    rgba(12, 51, 72, 0.06);

  /* Sidebar */
  --sidebar-w:       260px;

  /* Typography */
  --font-heading:    'Playfair Display', Georgia, serif;
  --font-body:       'Open Sans', sans-serif;

  /* Shadows */
  --shadow-xs:       0 1px 4px rgba(12,51,72,0.06);
  --shadow-sm:       0 2px 12px rgba(12,51,72,0.08);
  --shadow-md:       0 6px 24px rgba(12,51,72,0.12);
  --shadow-lg:       0 16px 48px rgba(12,51,72,0.16);
  --shadow-xl:       0 24px 72px rgba(12,51,72,0.22);
  --shadow-accent:   0 6px 30px rgba(0,212,255,0.35);
  --shadow-sidebar:  4px 0 40px rgba(7,31,46,0.5);

  /* Radii */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   26px;
  --r-pill: 999px;

  /* Transitions */
  --tr:        0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-fast:   0.16s ease;
  --tr-slow:   0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-bounce: 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ══════════════════════════════════════════
   RESET
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
img  { max-width: 100%; height: auto; display: block; object-fit: cover; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }
address { font-style: normal; }

/* ══════════════════════════════════════════
   LAYOUT — Page wrapper pushed right by sidebar
══════════════════════════════════════════ */
#page-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--tr);
}
#page-wrap > main { flex: 1; }

/* ── Container ── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}
.container--narrow { max-width: 860px; }
.container--wide   { max-width: 1400px; }

/* ══════════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--primary);
}
h1 { font-size: clamp(32px, 5vw, 60px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.5vw, 44px); font-weight: 700; }
h3 { font-size: clamp(18px, 2.5vw, 26px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 600; }
h5 { font-size: 15px; font-weight: 600; }
p  { line-height: 1.8; color: var(--text-muted); }

/* ── Section labels ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-label::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-label--white { color: rgba(255,255,255,0.75); }
.section-label--white::before { background: var(--accent); }

.section-h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-h2--white { color: var(--white); }

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 580px;
}
.section-sub--white { color: rgba(255,255,255,0.72); }

.section-header       { margin-bottom: 52px; }
.section-header--center { text-align: center; }
.section-header--center .section-label   { justify-content: center; }
.section-header--center .section-sub     { margin: 0 auto; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--r-pill);
  padding: 13px 28px;
  cursor: pointer;
  transition: transform var(--tr), box-shadow var(--tr), background var(--tr-fast), color var(--tr-fast);
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn svg { transition: transform var(--tr); flex-shrink: 0; }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(12,51,72,0.22);
}
.btn--primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(12,51,72,0.3);
}

.btn--accent {
  background: var(--accent);
  color: var(--primary);
  box-shadow: var(--shadow-accent);
}
.btn--accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0,212,255,0.5);
}
.btn--accent.pulsing {
  animation: btnGlow 2.5s ease-in-out infinite;
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.45);
}
.btn--outline-white:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn--sm { padding: 9px 20px; font-size: 13px; }
.btn--lg { padding: 16px 36px; font-size: 15px; }
.btn--full { width: 100%; }

/* ── Text link CTA ── */
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: gap var(--tr), color var(--tr-fast);
}
.link-cta:hover { gap: 10px; color: var(--accent-dark); }
.link-cta svg { transition: transform var(--tr); }
.link-cta:hover svg { transform: translateX(4px); }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform var(--tr), box-shadow var(--tr);
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* ══════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1), transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* ══════════════════════════════════════════
   INNER HERO (shared across all inner pages)
══════════════════════════════════════════ */
.inner-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  overflow: hidden;
}
.inner-hero__img {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.inner-hero__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.28) saturate(0.6);
}
.inner-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7,31,46,0.92) 0%, rgba(12,51,72,0.7) 100%);
  z-index: 1;
}
.inner-hero__content {
  position: relative;
  z-index: 2;
  color: var(--white);
}
.inner-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,212,255,0.14);
  border: 1px solid rgba(0,212,255,0.32);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  margin-bottom: 18px;
}
.badge-pulse {
  width: 7px; height: 7px; background: var(--accent);
  border-radius: 50%; flex-shrink: 0;
  animation: pulse 1.6s ease-in-out infinite;
}
.inner-hero__h1 { color: var(--white); margin-bottom: 14px; }
.inner-hero__sub { font-size: 17px; color: rgba(255,255,255,0.72); max-width: 560px; line-height: 1.65; }

/* ══════════════════════════════════════════
   FORMS (shared)
══════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--primary); }
.form-group .req  { color: #e53e3e; }

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  outline: none;
  width: 100%;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast), background var(--tr-fast);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-light); }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a7a8e' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-success {
  display: flex; align-items: flex-start; gap: 14px;
  background: #f0fdf4; border: 1.5px solid #86efac;
  border-radius: var(--r-md); padding: 18px 20px; color: #166534;
}
.form-success svg { color: #16a34a; flex-shrink: 0; margin-top: 2px; }
.form-success strong { display: block; font-size: 15px; margin-bottom: 3px; }
.form-success span { font-size: 13px; opacity: 0.85; }
.form-error-msg {
  background: #fff5f5; border: 1.5px solid #fc8181;
  border-radius: var(--r-md); padding: 14px 18px;
  font-size: 13.5px; color: #c53030;
}

/* ══════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════ */
.text-accent   { color: var(--accent); }
.text-primary  { color: var(--primary); }
.text-muted    { color: var(--text-muted); }
.text-white    { color: var(--white); }
.text-center   { text-align: center; }
.text-italic   { font-style: italic; }
.fw-bold       { font-weight: 700; }

.bg-white    { background: var(--white); }
.bg-light    { background: var(--off-white); }
.bg-primary  { background: var(--primary); }
.bg-dark     { background: var(--primary-dark); }

.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4  { margin-bottom: 16px; }
.mb-8  { margin-bottom: 32px; }

.section-pad    { padding: 88px 0; }
.section-pad-sm { padding: 60px 0; }

/* ══════════════════════════════════════════
   KEYFRAMES
══════════════════════════════════════════ */
@keyframes pulse       { 0%,100%{opacity:1} 50%{opacity:0.35} }
@keyframes fadeInUp    { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn      { from{opacity:0} to{opacity:1} }
@keyframes slideInLeft { from{transform:translateX(-100%)} to{transform:translateX(0)} }
@keyframes btnGlow     { 0%,100%{box-shadow:0 6px 28px rgba(0,212,255,0.35)} 50%{box-shadow:0 6px 42px rgba(0,212,255,0.7)} }
@keyframes floatY      { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-18px)} }
@keyframes spinSlow    { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════ */
@media (max-width: 992px) {
  #page-wrap { margin-left: 0; }
  .form-row  { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .section-pad    { padding: 60px 0; }
  .section-pad-sm { padding: 44px 0; }
  .btn--lg { padding: 14px 28px; }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
