/* =============================================
   GAUTOMATION — styles.css
   Palette: gunmetal bg · silver text · teal/gold/red accents
============================================= */

/* ===========================
   CSS VARIABLES
=========================== */
:root {
  /* Backgrounds */
  --bg-primary:   #0a0a0d;
  --bg-secondary: #111116;
  --bg-card:      #15151c;

  /* Text */
  --text-primary:   #c8cdd3;
  --text-secondary: #6e7378;

  /* Accents */
  --accent-teal: #2bb3a3;
  --accent-gold: #e0a52e;
  --accent-red:  #c23b3b;

  /* Borders */
  --border:       rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --section-pad:   clamp(80px, 10vw, 130px);
  --radius:        8px;
  --radius-lg:     14px;

  /* Transitions */
  --t: 0.25s ease;
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-primary);
}

a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color var(--t);
}

a:hover { color: #40d4c4; }

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

:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ===========================
   ACCESSIBILITY — REDUCED MOTION
=========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===========================
   CONTAINER
=========================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* ===========================
   SCROLL REVEAL
=========================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.925rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t), color var(--t), border-color var(--t),
              transform var(--t), box-shadow var(--t);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-teal);
  color: #08100f;
}

.btn-primary:hover {
  background: #33cdbf;
  color: #08100f;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 20px;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* ===========================
   SECTION LABELS & HEADINGS
=========================== */
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.section-heading {
  font-size: clamp(1.7rem, 3.5vw, 2.65rem);
  margin-bottom: 28px;
  max-width: 680px;
  letter-spacing: -0.01em;
}

/* ===========================
   LOGO (shared between header & footer)
=========================== */
.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Shown only when logo image fails to load */
.logo-fallback {
  display: none;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-gold) 100%);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #0a0a0d;
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* ===========================
   HEADER / NAV
=========================== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t), padding var(--t),
              backdrop-filter var(--t);
}

#site-header.scrolled {
  background: rgba(10, 10, 13, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius);
  transition: color var(--t), background var(--t);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--accent-teal);
  background: rgba(43, 179, 163, 0.08);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   HERO
=========================== */
#hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh; /* fallback */
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Subtle noise texture overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, black 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, black 0%, transparent 100%);
}

/* Subtle depth glow */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.hero-glow--teal {
  width: 480px;
  height: 320px;
  background: var(--accent-teal);
  top: 20%;
  right: 5%;
  opacity: 0.055;
}

.hero-glow--gold {
  display: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: var(--section-pad) 0;
  max-width: 860px;
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.hero-headline {
  font-size: clamp(2.8rem, 7.5vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 20px;
  color: #f0f2f4;
}

.hero-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
  font-style: italic;
  letter-spacing: 0.01em;
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.175rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 44px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
}

/* ===========================
   SERVICES
=========================== */
#services {
  background: var(--bg-secondary);
  padding: var(--section-pad) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: transform var(--t), border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
  width: 46px;
  height: 46px;
  color: var(--text-secondary);
  margin-bottom: 22px;
  transition: color var(--t);
}

.service-card:hover .service-icon {
  color: var(--accent-teal);
}

.service-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.75;
}

/* ===========================
   ABOUT
=========================== */
#about {
  padding: var(--section-pad) 0;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 0.975rem;
}

.about-text .btn {
  margin-top: 12px;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  transition: border-color var(--t), transform var(--t);
}

.stat-card:hover {
  border-color: var(--border-hover);
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: #f0f2f4;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===========================
   CONTACT
=========================== */
#contact {
  background: var(--bg-secondary);
  padding: var(--section-pad) 0;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 72px;
  align-items: start;
}

.contact-sub {
  color: var(--text-secondary);
  line-height: 1.78;
  margin-bottom: 36px;
  font-size: 0.975rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--t);
}

.contact-detail-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-teal);
}

.contact-detail-link:hover {
  color: var(--accent-teal);
}

/* --- Form --- */
.form-wrapper {
  transition: opacity 0.3s ease;
}

.form-wrapper.hidden {
  display: none;
}

.form-group {
  margin-bottom: 18px;
}

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

label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.label-optional {
  font-weight: 400;
  font-style: italic;
  opacity: 0.7;
}

input,
textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 15px;
  outline: none;
  resize: vertical;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.45;
}

input:focus,
textarea:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(43, 179, 163, 0.12);
}

.form-error {
  color: var(--accent-red);
  font-size: 0.85rem;
  min-height: 18px;
  margin-bottom: 14px;
}

/* --- Success state --- */
.form-success {
  display: none;
  text-align: center;
  padding: 56px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  animation: fadeUp 0.5s ease forwards;
}

.form-success.visible {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 22px;
}

.form-success h3 {
  font-size: 1.45rem;
  color: var(--accent-teal);
  margin-bottom: 10px;
}

.form-success p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===========================
   FOOTER
=========================== */
#site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 44px 0 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 36px;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 6px;
  font-style: italic;
  opacity: 0.7;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--t);
}

.footer-nav a:hover {
  color: var(--accent-teal);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  opacity: 0.6;
}

/* ===========================
   RESPONSIVE — TABLET (≤1024px)
=========================== */
@media (max-width: 1024px) {
  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1;
    min-width: 180px;
  }

  .stat-card:hover {
    transform: translateY(-3px);
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ===========================
   RESPONSIVE — MOBILE (≤640px)
=========================== */
@media (max-width: 640px) {
  /* Tighter section spacing on mobile */
  :root {
    --section-pad: 56px;
  }

  /* ── Mobile nav drawer ── */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 80vw);
    background: rgba(13, 13, 18, 0.99);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 28px;
    gap: 0;
    transform: translateX(110%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
    z-index: 150;
  }

  body.nav-open .main-nav {
    transform: translateX(0);
  }

  /* Dark backdrop behind drawer */
  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 140;
    animation: overlayIn 0.25s ease forwards;
  }

  @keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .nav-link {
    font-size: 1.05rem;
    font-weight: 500;
    padding: 14px 0;
    width: 100%;
    background: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .main-nav .btn {
    margin-top: 24px;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Larger tap target */
  .hamburger {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  /* ── Hero ── */
  .hero-inner {
    max-width: 100%;
  }

  .hero-headline {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  /* Stack buttons full-width on mobile */
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-scroll {
    display: none;
  }

  /* Shrink glow blobs so they don't overflow */
  .hero-glow--teal {
    width: 260px;
    height: 200px;
    right: -40px;
  }

  .hero-glow--gold {
    width: 160px;
    height: 160px;
    left: -30px;
  }

  /* ── Services ── */
  .services-grid {
    grid-template-columns: 1fr;
    margin-top: 32px;
    gap: 14px;
  }

  .service-card {
    padding: 26px 22px;
  }

  /* ── About ── */
  .about-stats {
    flex-direction: column;
  }

  /* ── Contact ── */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Prevent iOS auto-zoom on input focus (requires ≥16px) */
  input,
  textarea {
    font-size: 1rem;
  }

  /* ── Footer ── */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .footer-copy {
    text-align: left;
  }
}
