/* ============================================
   TerraQuint - Global Styles
   Petroleum Engineering Consulting
   ============================================ */

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

body {
  background-color: #FFFFFF;
  color: #111111;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.4;
  scroll-behavior: smooth;
}

/* ---------- CSS VARIABLES ---------- */
:root {
  --black: #111111;
  --white: #FFFFFF;
  --gray-100: #F5F5F5;
  --gray-200: #E8E8E8;
  --gray-500: #888888;
  --gray-700: #333333;
  --accent: #0077B6;
  --accent-hover: #005f8c;
}

/* ---------- TYPOGRAPHY ---------- */
h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.section-subhead {
  font-size: 1rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- NAVIGATION ---------- */
.navbar {
  background-color: var(--black);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #2a2a2a;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  text-decoration: none;
  font-size: 1.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: baseline;
  z-index: 101;
}

.logo-terra {
  color: var(--white);
  font-weight: 600;
}

.logo-quint {
  color: var(--accent);
  font-weight: 800;
}

/* Desktop Navigation Links */
.nav-links {
  display: flex;
  gap: 2.2rem;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* ========= HAMBURGER MENU STYLES ========= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Styles */
@media (max-width: 800px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--black);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transition: right 0.3s ease;
    z-index: 100;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    width: 100%;
    text-align: center;
  }
  
  .nav-links .btn-outline {
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    padding: 0.6rem 1.5rem;
  }
  
  .nav-links .btn-outline:hover {
    background-color: var(--accent);
    color: var(--white);
  }
  
  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }
}

/* ---------- BUTTONS ---------- */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--white);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
  transition: 0.2s;
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--black);
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--black);
  color: var(--black);
  padding: 0.7rem 1.8rem;
  border-radius: 40px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: 0.2s;
}

.btn-secondary:hover {
  background: var(--black);
  color: white;
}

/* ---------- HERO SECTION (with 3D canvas) ---------- */
.hero {
  position: relative;
  background-color: var(--black);
  color: var(--white);
  padding: 5rem 0 6rem 0;
  border-bottom: 1px solid #222;
  overflow: hidden;
  min-height: 100vh;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  flex: 1.2;
}

.hero-stats {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero p {
  font-size: 1.1rem;
  color: #cccccc;
  max-width: 600px;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ---------- STAT CARDS ---------- */
.stat-row {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.stat-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(2px);
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--accent);
  flex: 1;
  min-width: 130px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--gray-500);
  letter-spacing: 1px;
}

/* ---------- PAGE HEADER (for subpages) ---------- */
.page-header {
  background-color: var(--black);
  color: var(--white);
  padding: 5rem 0 4rem 0;
  border-bottom: 1px solid #222;
}

.page-header p {
  color: #cccccc;
  max-width: 700px;
  margin-top: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

/* ---------- SERVICES CARDS (shared) ---------- */
.services-section {
  background-color: var(--gray-100);
  padding: 5rem 0;
  scroll-margin-top: 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  transition: all 0.25s ease;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border-color: var(--accent);
}

.card-inner {
  padding: 1.5rem;
  text-align: center;
}

/* Icon container - fully transparent */
.card-icon {
  margin-bottom: 1.25rem;
  height: 64px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
}

.card-icon svg {
  display: block;
  background: transparent !important;
}

/* Remove greyish background from all SVG icons */
.card-icon svg rect[fill="#F0F4F8"],
.card-icon svg rect[fill="#f0f4f8"],
.card-icon svg rect:first-child {
  fill: transparent !important;
  fill-opacity: 0 !important;
}

.card-icon-emoji {
  font-size: 2.5rem;
  background: transparent;
}

.service-card h3 {
  color: var(--black);
  margin-bottom: 0.75rem;
  text-align: center;
}

.short-desc {
  color: var(--gray-700);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  text-align: center;
}

.tech-badge {
  font-size: 0.7rem;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  color: var(--accent);
  border-top: 1px solid var(--gray-200);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  letter-spacing: 0.3px;
  display: inline-block;
  text-align: center;
}

/* Expand indicator (for services page only) */
.expand-indicator {
  text-align: center;
  margin-top: 0.75rem;
  color: var(--gray-500);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.expand-indicator svg {
  width: 14px;
  height: 14px;
  stroke: var(--gray-500);
  transition: transform 0.2s;
}

/* Drawer (expandable content for services page) */
.drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  background-color: var(--gray-100);
  border-top: none;
}

.drawer.active {
  max-height: 500px;
  border-top: 1px solid var(--gray-200);
}

.drawer-content {
  padding: 1.5rem;
  text-align: left;
}

.full-desc {
  color: var(--gray-700);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ---------- DATA SHOWCASE (shared) ---------- */
.data-showcase {
  padding: 5rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.split-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
}

.split-text {
  flex: 1;
}

.split-visual {
  flex: 1;
  background: var(--gray-100);
  border-radius: 24px;
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
}

.chart-title {
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.decline-canvas {
  background: white;
  border-radius: 12px;
  padding: 1rem;
}

.insight-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.insight-item {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.insight-number {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--black);
}

/* ---------- TAGLINE & ANIMATIONS ---------- */
.tagline {
  color: #cccccc;
  font-size: 1rem;
  margin-top: 0.5rem;
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

@keyframes softBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.blinking-text {
  animation: softBlink 2s ease-in-out infinite;
  display: inline-block;
}

/* ========= NEW FOOTER STYLES ========= */
.footer {
  background-color: var(--black);
  color: #aaa;
  padding: 3rem 0 1.5rem;
  font-size: 0.85rem;
  border-top: 1px solid #2a2a2a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-tagline {
  color: #888;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.footer-locations {
  color: #666;
  font-size: 0.8rem;
}

.footer-heading {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-social {
  margin-top: 0.5rem;
  color: #666;
}

.footer-social a {
  color: #888;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #2a2a2a;
  font-size: 0.75rem;
  color: #666;
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 1000px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.6rem; }
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
  .data-grid { grid-template-columns: 1fr; }
  .container { padding: 0 1.5rem; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-locations {
    text-align: center;
  }
}

@media (max-width: 800px) {
  .hero-grid { flex-direction: column; text-align: center; }
  .hero-stats { align-items: center; width: 100%; }
  .stat-row { justify-content: center; flex-wrap: wrap; }
  .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

@media (max-width: 550px) {
  .workflow-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
}