/* ===================================================================
   The Phoenix Survey — Design System & Styles
   =================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --primary:        hsl(215, 55%, 18%);
  --primary-light:  hsl(215, 45%, 28%);
  --primary-dark:   hsl(215, 60%, 12%);
  --accent:         hsl(38, 85%, 55%);
  --accent-light:   hsl(38, 90%, 65%);
  --accent-dark:    hsl(38, 80%, 42%);
  --bg:             hsl(210, 20%, 98%);
  --bg-alt:         hsl(210, 15%, 94%);
  --foreground:     hsl(215, 55%, 12%);
  --text:           hsl(215, 20%, 25%);
  --text-muted:     hsl(215, 12%, 50%);
  --white:          #ffffff;
  --success:        hsl(152, 60%, 42%);
  --error:          hsl(0, 65%, 55%);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', 'Segoe UI', sans-serif;

  /* Sizing */
  --radius:       0.5rem;
  --radius-lg:    1rem;
  --radius-full:  9999px;
  --container:    1200px;
  --nav-height:   72px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow:     0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:  0 12px 36px rgba(0,0,0,0.14);
  --shadow-xl:  0 24px 48px rgba(0,0,0,0.18);

  /* Transitions */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --duration:   0.35s;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-header .overline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--duration) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(218, 165, 32, 0.35);
}

.btn-outline {
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline-dark {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===================================================================
   NAVBAR
   =================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(15, 30, 56, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--duration) var(--ease);
}

.navbar.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.25);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
}

.nav-logo svg,
.nav-logo i {
  color: var(--accent);
  width: 24px;
  height: 24px;
}

.nav-logo .accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  transition: color var(--duration) var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--duration) var(--ease);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  margin-left: 1rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  background: var(--primary-dark);
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 2px solid var(--accent);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  padding: 0.5rem 0;
  font-weight: 500;
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--primary-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 42, 0.82) 0%,
    rgba(10, 22, 42, 0.65) 50%,
    rgba(10, 22, 42, 0.88) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem 1.5rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(218, 165, 32, 0.15);
  border: 1px solid rgba(218, 165, 32, 0.35);
  color: var(--accent);
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero h1 .gold-text {
  background: linear-gradient(135deg, var(--accent-light), var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: rgba(255,255,255,0.72);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-stat .label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeInUp 1s 2.5s both;
}

.scroll-indicator span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
}

.scroll-indicator .chevron {
  width: 24px;
  height: 24px;
  color: rgba(255,255,255,0.4);
  animation: bounce 2s infinite;
}

/* ===================================================================
   SERVICES
   =================================================================== */
.services {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid hsl(210, 15%, 90%);
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(218,165,32,0.12), rgba(218,165,32,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.service-icon i {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ===================================================================
   ABOUT
   =================================================================== */
.about {
  background: var(--bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrap {
  position: relative;
}

.about-image-wrap img {
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-lg);
}

.about-image-wrap .deco-block-1 {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  background: var(--accent);
  opacity: 0.2;
  top: -20px;
  left: -20px;
  z-index: 1;
}

.about-image-wrap .deco-block-2 {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  background: var(--primary);
  opacity: 0.15;
  bottom: -20px;
  right: -20px;
  z-index: 1;
}

.about-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.about-content > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.02rem;
}

.highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.highlight-item .check-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.highlight-item .check-icon svg {
  width: 13px;
  height: 13px;
  color: var(--white);
}

.highlight-item span {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

/* ===================================================================
   PROJECTS
   =================================================================== */
.projects {
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.project-card {
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform var(--duration) var(--ease);
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-number {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-size: 7rem;
  font-weight: 800;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  pointer-events: none;
}

.project-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  background: rgba(218, 165, 32, 0.08);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.project-card p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--duration) var(--ease);
}

.project-link:hover {
  gap: 0.85rem;
}

.project-link i {
  width: 16px;
  height: 16px;
}

/* ===================================================================
   CONTACT
   =================================================================== */
.contact {
  background: var(--bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(218,165,32,0.12), rgba(218,165,32,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-detail-icon i {
  width: 20px;
  height: 20px;
}

.contact-detail-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.15rem;
}

.contact-detail-text span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid hsl(210, 15%, 88%);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.12);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  padding: 0.95rem;
  font-size: 1rem;
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(52, 168, 83, 0.1);
  color: var(--success);
  border: 1px solid rgba(52, 168, 83, 0.25);
}

.form-message.error {
  display: block;
  background: rgba(200, 50, 50, 0.1);
  color: var(--error);
  border: 1px solid rgba(200, 50, 50, 0.25);
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
  background: var(--foreground);
  padding: 2.5rem 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.footer-logo .accent {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ===================================================================
   ANIMATIONS
   =================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(8px);
  }
  60% {
    transform: translateY(4px);
  }
}

/* Scroll-triggered fade-up */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero staggered delays */
.hero-anim-1 { animation: fadeInUp 0.8s 0.2s both; }
.hero-anim-2 { animation: fadeInUp 0.8s 0.5s both; }
.hero-anim-3 { animation: fadeInUp 0.8s 0.8s both; }
.hero-anim-4 { animation: fadeInUp 0.8s 1.1s both; }
.hero-anim-5 { animation: fadeInUp 0.8s 1.4s both; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
  .services-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image-wrap {
    max-width: 480px;
    margin: 0 auto;
  }

  .highlights {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section-padding {
    padding: 4rem 0;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    gap: 1.25rem;
  }
}
