/* ═══════════════════════════════════════════════════════════
   Al-Rouby Customs Services — Production Stylesheet
   Built by: Alrouby Digital Studio
   
   TABLE OF CONTENTS:
   1.  Design Tokens (CSS Variables)
   2.  Reset & Base
   3.  Typography
   4.  Utility & Layout
   5.  Buttons
   6.  Preloader
   7.  Navigation
   8.  Hero Section
   9.  Problem / Solution Cards
   10. Services Grid
   11. Process Steps
   12. Metrics
   13. Testimonials
   14. Contact / Form
   15. Portfolio Meta
   16. Footer
   17. Back to Top
   18. Scroll Reveal Animations
   19. Responsive Breakpoints
   ═══════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   All colors, spacing, and effects in one place.
   ───────────────────────────────────────────────────────── */
:root {
  /* Surface palette — dark navy base */
  --bg:            #0a0f1a;
  --bg-alt:        #0e1425;
  --card:          #111a2e;
  --card-hover:    #152036;

  /* Text hierarchy */
  --text-primary:  #f0f4ff;
  --text-body:     #a3b1cf;
  --text-muted:    #5e6e8a;

  /* Brand accent — warm amber/orange */
  --accent:        #f59e0b;
  --accent-hover:  #d97706;
  --accent-glow:   rgba(245, 158, 11, 0.15);
  --accent-subtle: rgba(245, 158, 11, 0.06);

  /* Semantic colors */
  --danger:        #ef4444;
  --danger-bg:     rgba(239, 68, 68, 0.08);
  --success:       #22c55e;
  --success-bg:    rgba(34, 197, 94, 0.08);

  /* Borders & shadows */
  --border:        rgba(255, 255, 255, 0.06);
  --border-accent: rgba(245, 158, 11, 0.2);
  --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md:     0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-glow:   0 0 40px var(--accent-glow);

  /* Radii */
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-full:   999px;

  /* Layout */
  --container:     1200px;
  --section-pad:   100px;

  /* Typography */
  --font-display:  'Outfit', sans-serif;
  --font-body:     'DM Sans', sans-serif;

  /* Transitions */
  --ease:          cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --speed:         0.35s;
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Selection color */
::selection {
  background: var(--accent);
  color: var(--bg);
}

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

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

ul {
  list-style: none;
}


/* ─────────────────────────────────────────────────────────
   3. TYPOGRAPHY
   ───────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 0.6em; }
h3 { font-size: 1.3rem; margin-bottom: 0.5em; }
h4 { font-size: 1.1rem; margin-bottom: 0.4em; }

p {
  color: var(--text-body);
  margin-bottom: 1.2rem;
}

small { font-size: 0.8rem; color: var(--text-muted); }


/* ─────────────────────────────────────────────────────────
   4. UTILITY & LAYOUT
   ───────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section--contrast {
  background: var(--bg-alt);
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header p {
  max-width: 520px;
  margin: 0 auto;
}

.section-header__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.required { color: var(--danger); }

/* 2-column grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}


/* ─────────────────────────────────────────────────────────
   5. BUTTONS
   ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

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

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

.btn--ghost:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn--nav {
  padding: 10px 24px;
  font-size: 0.85rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-full);
}

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

.btn--full {
  width: 100%;
  justify-content: center;
}

/* Loading state for submit button */
.btn--loading .btn__label { visibility: hidden; }
.btn--loading .fa-paper-plane { visibility: hidden; }

.btn__loader {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--bg);
  border-radius: 50%;
  display: none;
  animation: spin 0.6s linear infinite;
}

.btn--loading .btn__loader { display: block; }

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ─────────────────────────────────────────────────────────
   6. PRELOADER
   ───────────────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.preloader__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}


/* ─────────────────────────────────────────────────────────
   7. NAVIGATION
   Glassmorphism sticky bar with animated hamburger.
   ───────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 15, 26, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  transition: background var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
}

.navbar--scrolled {
  background: rgba(10, 15, 26, 0.92);
  box-shadow: var(--shadow-sm);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  letter-spacing: -0.02em;
}

.logo__text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo__dot { color: var(--accent); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color var(--speed) var(--ease);
  position: relative;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--speed) var(--ease);
}

.nav-links a:not(.btn):hover {
  color: var(--text-primary);
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

/* Hamburger menu — CSS-only animated lines */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--speed) var(--ease);
  transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.active .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu slide-in */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 100px 32px 32px;
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--speed) var(--ease);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow-y: auto;
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a:not(.btn)::after { display: none; }

  .btn--nav {
    margin-top: 16px;
    text-align: center;
    display: block;
    border-bottom: none;
  }
}

/* Overlay behind mobile menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--speed) var(--ease);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}


/* ─────────────────────────────────────────────────────────
   8. HERO SECTION
   Atmospheric with gradient glow and grain texture.
   ───────────────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Background glow orb */
.hero__bg-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(245, 158, 11, 0.07) 0%,
    rgba(245, 158, 11, 0.02) 40%,
    transparent 70%
  );
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.15); }
}

/* Film-grain overlay for texture */
.hero__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 40px 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  margin-bottom: 28px;
}

.hero__title {
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__accent {
  color: var(--accent);
  position: relative;
}

/* Underline decoration on accent word */
.hero__accent::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--accent-glow);
  border-radius: 3px;
  z-index: -1;
}

.hero__sub {
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 580px;
  margin-bottom: 36px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero__scroll span {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50%      { opacity: 1;   transform: scaleY(1); }
}


/* ─────────────────────────────────────────────────────────
   9. PROBLEM / SOLUTION CARDS
   ───────────────────────────────────────────────────────── */
.ps-card {
  padding: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.ps-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.ps-card--problem {
  background: var(--danger-bg);
}
.ps-card--problem::before { background: var(--danger); }
.ps-card--problem .ps-card__icon { color: var(--danger); }
.ps-card--problem .ps-card__title { color: var(--danger); }

.ps-card--solution {
  background: var(--success-bg);
}
.ps-card--solution::before { background: var(--success); }
.ps-card--solution .ps-card__icon { color: var(--success); }
.ps-card--solution .ps-card__title { color: var(--success); }

.ps-card__icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.ps-card__title {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.ps-card__list li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: var(--text-body);
  font-size: 0.95rem;
}

.ps-card--problem .ps-card__list li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--danger);
  font-weight: 700;
  font-size: 0.75rem;
}

.ps-card--solution .ps-card__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}


/* ─────────────────────────────────────────────────────────
   10. SERVICES GRID
   ───────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.svc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  transition: all var(--speed) var(--ease);
}

.svc-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  background: var(--card-hover);
}

/* Hover glow at top */
.svc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
}

.svc-card:hover::before { opacity: 1; }

.svc-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 24px;
  transition: all var(--speed) var(--ease);
}

.svc-card:hover .svc-card__icon {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.05);
}

.svc-card h3 { font-size: 1.15rem; }

.svc-card p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Background number watermark */
.svc-card__number {
  position: absolute;
  bottom: -8px;
  right: 12px;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.02);
  line-height: 1;
  pointer-events: none;
  transition: color var(--speed) var(--ease);
}

.svc-card:hover .svc-card__number {
  color: rgba(245, 158, 11, 0.05);
}


/* ─────────────────────────────────────────────────────────
   11. PROCESS STEPS
   Horizontal timeline with connecting line.
   ───────────────────────────────────────────────────────── */
.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

/* Connecting line across steps */
.process-track__line {
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
  opacity: 0.3;
}

.step {
  text-align: center;
  position: relative;
}

.step__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border-accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  transition: all var(--speed) var(--ease);
}

.step:hover .step__marker {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.step__body h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step__body p {
  font-size: 0.88rem;
  margin-bottom: 0;
}


/* ─────────────────────────────────────────────────────────
   12. METRICS
   Big numbers with suffix and label.
   ───────────────────────────────────────────────────────── */
.metrics-section {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.metric {
  padding: 32px 16px;
}

.metric__value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.metric__suffix {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.7;
  margin-left: 4px;
}

.metric__label {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 0;
}


/* ─────────────────────────────────────────────────────────
   13. TESTIMONIALS
   ───────────────────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.testi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px;
  transition: all var(--speed) var(--ease);
  display: flex;
  flex-direction: column;
}

.testi-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.testi-card__stars {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: flex;
  gap: 3px;
}

.testi-card p {
  font-size: 1rem;
  font-style: italic;
  line-height: 1.8;
  color: var(--text-primary);
  flex: 1;
}

.testi-card__author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.testi-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  flex-shrink: 0;
}

.testi-card__author strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.testi-card__author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* ─────────────────────────────────────────────────────────
   14. CONTACT / FORM
   ───────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 12px; }
.contact-info > p { max-width: 380px; }

.contact-list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-list__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-list a {
  color: var(--text-primary);
  transition: color var(--speed) var(--ease);
}

.contact-list a:hover { color: var(--accent); }

.contact-list span { color: var(--text-body); }

/* Form */
.contact-form {
  background: var(--card);
  padding: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

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

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Validation states */
.form-group--error input,
.form-group--error select,
.form-group--error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-group__error {
  display: block;
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 6px;
  min-height: 1.2em;
}

/* Select arrow */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e6e8a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group textarea { resize: vertical; min-height: 100px; }


/* ─────────────────────────────────────────────────────────
   15. PORTFOLIO META
   Credits & tech stack tag cloud.
   ───────────────────────────────────────────────────────── */
.portfolio-meta {
  background: #060a14;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.portfolio-meta__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.portfolio-meta__head {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.portfolio-meta__head i { color: var(--accent); }

.portfolio-meta__head h5 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.portfolio-meta__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portfolio-meta__tags li {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  transition: all var(--speed) var(--ease);
}

.portfolio-meta__tags li:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-subtle);
}


/* ─────────────────────────────────────────────────────────
   16. FOOTER
   ───────────────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-top: 60px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer__brand p {
  margin-top: 12px;
  font-size: 0.9rem;
}

.footer__links,
.footer__social { display: flex; flex-direction: column; gap: 12px; }

.footer__links h6,
.footer__social h6 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--text-body);
  transition: color var(--speed) var(--ease);
}

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

.footer__social-icons {
  display: flex;
  gap: 12px;
}

.footer__social-icons a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  font-size: 1rem;
  transition: all var(--speed) var(--ease);
}

.footer__social-icons a:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer__bottom p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0; }

.footer__credit strong {
  color: var(--accent);
  font-weight: 600;
}


/* ─────────────────────────────────────────────────────────
   17. BACK-TO-TOP BUTTON
   ───────────────────────────────────────────────────────── */
.btt {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-accent);
  background: var(--card);
  color: var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--speed) var(--ease);
  box-shadow: var(--shadow-sm);
}

.btt:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

.btt.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


/* ─────────────────────────────────────────────────────────
   18. SCROLL REVEAL ANIMATIONS
   Elements start hidden and animate in when visible.
   ───────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay classes */
.reveal[data-delay="1"],
.reveal-up[data-delay="1"] { transition-delay: 0.1s; }

.reveal[data-delay="2"],
.reveal-up[data-delay="2"] { transition-delay: 0.2s; }

.reveal[data-delay="3"],
.reveal-up[data-delay="3"] { transition-delay: 0.3s; }

.reveal[data-delay="4"],
.reveal-up[data-delay="4"] { transition-delay: 0.4s; }

.reveal[data-delay="5"],
.reveal-up[data-delay="5"] { transition-delay: 0.5s; }


/* ─────────────────────────────────────────────────────────
   19. RESPONSIVE BREAKPOINTS
   ───────────────────────────────────────────────────────── */

/* Tablets & small desktops */
@media (max-width: 1024px) {
  :root { --section-pad: 80px; }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablets */
@media (max-width: 768px) {
  :root { --section-pad: 64px; }

  .grid-2,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .process-track {
    grid-template-columns: 1fr 1fr;
  }

  .process-track__line { display: none; }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .hero__scroll { display: none; }
}

/* Mobile */
@media (max-width: 480px) {
  :root { --section-pad: 48px; }

  .container { padding: 0 16px; }

  .hero__title br { display: none; }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn { width: 100%; justify-content: center; }

  .process-track {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact-form { padding: 24px; }
}
