/* ============================================================
   HaggardTech Solutions — Main CSS
   Design Tokens, Reset, Typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;600;700;800&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colors */
  --color-navy:        #0B1F4B;
  --color-navy-dark:   #060F26;
  --color-navy-mid:    #0D1626;
  --color-royal:       #1A3A8F;
  --color-royal-light: #2250B5;
  --color-gold:        #C9A84C;
  --color-gold-light:  #E2C06E;
  --color-gold-dark:   #A07830;
  --color-silver:      #8A9BBE;
  --color-silver-light:#B8C7E0;
  --color-white:       #FFFFFF;
  --color-surface:     #F4F6FA;
  --color-surface-2:   #E8EDF5;
  --color-text:        #0B1F4B;
  --color-text-muted:  #5A6B8A;
  --color-success:     #2ECC71;
  --color-warning:     #F39C12;
  --color-danger:      #E74C3C;
  --color-info:        #3498DB;

  /* Gradients */
  --grad-hero:    linear-gradient(135deg, rgba(6,15,38,0.93) 0%, rgba(11,31,75,0.85) 50%, rgba(26,58,143,0.75) 100%);
  --grad-navy:    linear-gradient(135deg, #0B1F4B 0%, #1A3A8F 100%);
  --grad-gold:    linear-gradient(135deg, #C9A84C 0%, #E2C06E 100%);
  --grad-dark:    linear-gradient(180deg, #060F26 0%, #0D1626 100%);
  --grad-surface: linear-gradient(180deg, #F4F6FA 0%, #E8EDF5 100%);

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(11,31,75,0.10);
  --shadow-md:  0 4px 20px rgba(11,31,75,0.15);
  --shadow-lg:  0 8px 40px rgba(11,31,75,0.20);
  --shadow-xl:  0 16px 64px rgba(11,31,75,0.25);
  --shadow-gold:0 4px 24px rgba(201,168,76,0.30);

  /* Border Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full:9999px;

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;
  --space-3xl:  96px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.30s ease;
  --transition-slow:   0.50s ease;
  --transition-spring: 0.40s cubic-bezier(0.34,1.56,0.64,1);

  /* Font */
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Layout */
  --max-width: 1280px;
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }
h4 { font-size: 1.2rem; }

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

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section-padding {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.20));
  border: 1px solid rgba(201,168,76,0.40);
  color: var(--color-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-title span {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: var(--grad-gold);
  color: var(--color-navy-dark);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,168,76,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.50);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  transform: translateY(-2px);
}

.btn-navy {
  background: var(--grad-navy);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-navy:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
  margin-top: 10px;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  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);
}

/* ── Glassmorphism ── */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
}

.glass-navy {
  background: rgba(11,31,75,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.10);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-navy-dark); }
::-webkit-scrollbar-thumb { background: var(--color-royal); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .container { padding: 0 var(--space-lg); }
  :root { --space-3xl: 72px; }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
  :root { --space-3xl: 56px; --space-2xl: 48px; }
}

/* ── Pricing Styles ── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.pricing-card { background: white; border: 1px solid rgba(11,31,75,0.08); border-radius: var(--radius-lg); padding: 40px 32px; text-align: center; position: relative; transition: transform 0.3s; }
.pricing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.pricing-card.featured { border: 2px solid var(--color-gold); box-shadow: 0 8px 32px rgba(201,168,76,0.15); }
.pricing-badge { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); background: var(--color-gold); color: #000; padding: 4px 16px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; }
.price-val { font-family: var(--font-display); font-size: 3rem; color: var(--color-navy); font-weight: 800; margin: 16px 0; }
.price-val span { font-size: 1rem; color: var(--color-text-muted); font-weight: 400; }
.pricing-features { list-style: none; padding: 0; margin: 24px 0 32px; text-align: left; }
.pricing-features li { padding: 12px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; color: var(--color-text); display: flex; gap: 8px; align-items: center; }
.pricing-features li::before { content: '✓'; color: var(--color-gold); font-weight: bold; }

/* ── Blog Styles ── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.blog-card { background: white; border-radius: var(--radius-md); overflow: hidden; border: 1px solid rgba(11,31,75,0.08); }
.blog-img { width: 100%; height: 200px; background: #eee; display: flex; align-items: center; justify-content: center; color: #aaa; }
.blog-content { padding: 24px; }
.blog-date { font-size: 0.8rem; color: var(--color-gold); font-weight: 700; margin-bottom: 8px; }
.blog-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--color-navy); margin-bottom: 12px; }

/* ── Responsive overrides for Pricing & Blog grids ── */
@media (max-width: 900px) {
  .pricing-grid, .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .pricing-grid, .blog-grid { grid-template-columns: 1fr; }
}

/* ── Responsive: Contact Section ── */
@media (max-width: 900px) {
  #contact .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  #contact form div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Responsive: About & ISP grids ── */
@media (max-width: 768px) {
  #about .container > div[style*="grid-template-columns:1fr 1fr"],
  #isp .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  #about .container > div > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ── Input focus global ── */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-gold) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
