/* ============================================
   Iron Peak Labs — Design System & Styles
   ============================================ */

:root {
  --charcoal: #1C1C1E;
  --charcoal-deep: #141416;
  --slate: #2C2C2E;
  --coral: #FF6B6B;
  --coral-hover: #FF5252;
  --ice: #E8F4F8;
  --white: #FFFFFF;
  --text: #F5F5F7;
  --text-dark: #1C1C1E;
  --muted: #98989D;
  --muted-dark: #6E6E73;
  --border: #3A3A3C;
  --border-light: #D1D1D6;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.3);
  --max-w: 1200px;
  --transition: 0.25s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--coral); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--coral-hover); }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; border: none; outline: none; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: 'Space Grotesk', 'DM Sans', sans-serif; font-weight: 700; line-height: 1.15; color: var(--white); }
h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); letter-spacing: -1px; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); letter-spacing: -0.5px; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { color: var(--muted); line-height: 1.7; }
.ip-mono { font-family: 'Space Mono', 'Courier New', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2.5px; color: var(--coral); font-weight: 700; }

/* ---- Layout ---- */
.ip-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.ip-section { padding: 100px 0; }
.ip-section--light { background: var(--ice); }
.ip-section--light h2, .ip-section--light h3, .ip-section--light h4 { color: var(--text-dark); }
.ip-section--light p { color: var(--muted-dark); }
.ip-section-header { text-align: center; margin-bottom: 60px; }
.ip-section-header h2 { margin-bottom: 16px; }
.ip-section-header p { max-width: 520px; margin: 0 auto; }

/* ---- Buttons ---- */
.ip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  letter-spacing: 0.3px;
}
.ip-btn--coral {
  background: var(--coral);
  color: var(--charcoal);
}
.ip-btn--coral:hover {
  background: var(--coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,107,0.35);
}
.ip-btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.25);
}
.ip-btn--outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}
.ip-btn--dark {
  background: var(--charcoal);
  color: var(--white);
}
.ip-btn--dark:hover {
  background: var(--charcoal-deep);
  transform: translateY(-2px);
}

/* ============================================
   HEADER
   ============================================ */
.ip-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--charcoal);
  transition: all var(--transition);
}
.ip-header--scrolled {
  background: var(--charcoal-deep);
  border-bottom: 1px solid var(--border);
}
.ip-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.ip-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}
.ip-logo-icon {
  width: 32px;
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ip-logo-icon::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 24px solid var(--coral);
}
.ip-nav { display: flex; align-items: center; gap: 28px; }
.ip-nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition);
}
.ip-nav a:hover, .ip-nav a.active { color: var(--white); }
.ip-nav a.active { border-bottom: 2px solid var(--coral); padding-bottom: 2px; }
.ip-header-cta { margin-left: 12px; }
.ip-nav-toggle {
  display: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.ip-nav-toggle span { width: 22px; height: 2px; background: var(--white); border-radius: 1px; transition: all var(--transition); }
.ip-nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.ip-nav-toggle.open span:nth-child(2) { opacity: 0; }
.ip-nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.ip-nav-mobile {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--charcoal-deep);
  padding: 24px;
  flex-direction: column;
  gap: 16px;
  z-index: 99;
  border-top: 1px solid var(--border);
}
.ip-nav-mobile.open { display: flex; }
.ip-nav-mobile a { color: var(--muted); font-size: 1rem; font-weight: 500; padding: 8px 0; }
.ip-nav-mobile a:hover { color: var(--white); }

/* ============================================
   HERO
   ============================================ */
.ip-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}
.ip-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.ip-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 24px 48px;
  max-width: 820px;
  margin: 0 auto;
}
.ip-hero h1 { margin-bottom: 24px; }
.ip-hero h1 span { color: var(--coral); }
.ip-hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.8;
}
.ip-hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.ip-hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: auto;
  padding: 36px 24px;
  border-top: 1px solid var(--border);
}
.ip-stat { text-align: center; }
.ip-stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -1px;
}
.ip-stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; letter-spacing: 0.5px; }

/* ============================================
   SERVICES / CAPABILITIES
   ============================================ */
.ip-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.ip-service-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
}
.ip-service-card:hover {
  border-color: var(--coral);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(255,107,107,0.08);
}
.ip-service-icon {
  width: 48px;
  height: 48px;
  background: var(--slate);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  border-left: 3px solid var(--coral);
}
.ip-service-card h3 { margin-bottom: 12px; color: var(--white); }
.ip-service-card p { font-size: 0.9rem; margin-bottom: 16px; color: var(--muted); }
.ip-service-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--coral);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ip-service-link:hover { gap: 8px; }

/* ============================================
   PORTFOLIO
   ============================================ */
.ip-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ip-project-card {
  background: var(--slate);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.ip-project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.ip-project-bar {
  height: 4px;
  width: 100%;
}
.ip-project-card:nth-child(1) .ip-project-bar { background: var(--coral); }
.ip-project-card:nth-child(2) .ip-project-bar { background: #4ECDC4; }
.ip-project-card:nth-child(3) .ip-project-bar { background: #95E77E; }
.ip-project-body {
  padding: 32px 28px;
}
.ip-project-body h3 { font-size: 1.4rem; margin-bottom: 12px; }
.ip-project-body p { font-size: 0.9rem; margin-bottom: 20px; }
.ip-project-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  font-family: 'Space Mono', monospace;
}

/* ============================================
   ABOUT / TEAM
   ============================================ */
.ip-about-text {
  max-width: 700px;
  margin: 0 auto 56px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.8;
}
.ip-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.ip-team-card { text-align: center; }
.ip-team-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  margin: 0 auto 20px;
  position: relative;
}
.ip-team-card:nth-child(1) .ip-team-avatar { background: linear-gradient(135deg, var(--coral), #FF8E8E); }
.ip-team-card:nth-child(2) .ip-team-avatar { background: linear-gradient(135deg, #4ECDC4, #7FDBDA); }
.ip-team-card:nth-child(3) .ip-team-avatar { background: linear-gradient(135deg, #95E77E, #B8F0A8); }
.ip-team-card h3 { margin-bottom: 4px; font-size: 1.1rem; color: var(--text-dark); }
.ip-team-card p { font-size: 0.88rem; }

/* ============================================
   TESTIMONIALS
   ============================================ */
.ip-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ip-testimonial-card {
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.ip-testimonial-quote {
  font-size: 2.5rem;
  color: var(--coral);
  margin-bottom: 8px;
  line-height: 1;
  font-family: 'Space Grotesk', serif;
}
.ip-testimonial-card p {
  color: rgba(255,255,255,0.8);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 24px;
}
.ip-testimonial-author { display: flex; align-items: center; gap: 12px; }
.ip-testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--border);
}
.ip-testimonial-name { font-weight: 600; color: var(--white); font-size: 0.88rem; }
.ip-testimonial-role { font-size: 0.78rem; color: var(--muted); }

/* ============================================
   CONTACT
   ============================================ */
.ip-contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}
.ip-form-group { margin-bottom: 20px; }
.ip-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.ip-form-input,
.ip-form-select,
.ip-form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-dark);
  transition: border-color var(--transition);
}
.ip-form-input:focus,
.ip-form-select:focus,
.ip-form-textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}
.ip-form-textarea { min-height: 120px; resize: vertical; }
.ip-form-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2398989D' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.ip-form-success {
  display: none;
  background: #D1FAE5;
  color: #065F46;
  padding: 16px;
  border-radius: var(--radius);
  font-weight: 500;
  margin-top: 16px;
}
.ip-form-success.show { display: block; }
.ip-contact-info { padding-top: 8px; }
.ip-contact-item { display: flex; gap: 16px; margin-bottom: 28px; }
.ip-contact-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,107,107,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.ip-contact-item h4 { font-size: 0.88rem; margin-bottom: 2px; color: var(--text-dark); }
.ip-contact-item p { font-size: 0.88rem; }
.ip-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #D1FAE5;
  color: #065F46;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 12px;
}
.ip-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  animation: ipPulse 2s infinite;
}
@keyframes ipPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================
   FOOTER
   ============================================ */
.ip-footer { background: var(--charcoal-deep); padding: 64px 0 0; }
.ip-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.ip-footer-brand p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 12px;
  max-width: 280px;
}
.ip-footer h4 {
  color: var(--white);
  font-size: 0.82rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Space Grotesk', sans-serif;
}
.ip-footer-links a {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color var(--transition);
}
.ip-footer-links a:hover { color: var(--coral); }
.ip-footer-social { display: flex; gap: 10px; margin-top: 8px; }
.ip-footer-social a {
  width: 34px;
  height: 34px;
  background: var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.ip-footer-social a:hover { background: var(--coral); color: var(--charcoal); }
.ip-footer-bottom {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.ip-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.ip-revealed { opacity: 1; transform: translateY(0); }
.ip-reveal { animation: ipFallback 0s 1.5s forwards; }
.ip-revealed { animation: none; }
@keyframes ipFallback { to { opacity: 1; transform: translateY(0); } }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .ip-portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .ip-portfolio-grid .ip-project-card:last-child { grid-column: span 2; }
  .ip-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ip-nav, .ip-header-cta { display: none; }
  .ip-nav-toggle { display: flex; }
  .ip-hero-inner { padding: 48px 24px 32px; }
  .ip-hero-stats { gap: 24px; flex-wrap: wrap; }
  .ip-stat-num { font-size: 1.75rem; }
  .ip-services-grid { grid-template-columns: 1fr; }
  .ip-portfolio-grid { grid-template-columns: 1fr; }
  .ip-portfolio-grid .ip-project-card:last-child { grid-column: auto; }
  .ip-team-grid { grid-template-columns: 1fr; max-width: 280px; margin: 0 auto; }
  .ip-testimonials-grid { grid-template-columns: 1fr; }
  .ip-contact-grid { grid-template-columns: 1fr; }
  .ip-footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .ip-section { padding: 64px 0; }
  .ip-section-header { margin-bottom: 40px; }
}
