/* ==========================================================================
   MIB Digital Technology - Global Styles
   ========================================================================== */

:root {
  --primary: #0b3d91;
  --primary-dark: #082b6b;
  --accent: #2e9bff;
  --accent-light: #6cc3ff;
  --dark: #0a1628;
  --text: #33415c;
  --text-light: #6b7a99;
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --border: #e3e9f2;
  --shadow-sm: 0 2px 10px rgba(11, 61, 145, 0.06);
  --shadow-md: 0 10px 30px rgba(11, 61, 145, 0.1);
  --radius: 14px;
  --container: 1180px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.logo-text {
  font-weight: 700;
  font-size: 17px;
  color: var(--dark);
  letter-spacing: 0.2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 45%, #1459c9 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
}

.hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 155, 255, 0.35), transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 128px 24px 140px;
  max-width: 860px;
  text-align: left;
}

.hero-tagline {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-light);
  border: 1px solid rgba(108, 195, 255, 0.4);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 24px;
  background: rgba(108, 195, 255, 0.08);
}

.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
  margin-bottom: 36px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  color: #06204a;
  box-shadow: 0 8px 24px rgba(46, 155, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(46, 155, 255, 0.45);
}

.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 96px 0;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head {
  text-align: center;
  margin-bottom: 52px;
}

.section-head h2,
.about-text h2,
.contact-info h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.4px;
  line-height: 1.2;
}

/* About */

.about {
  background: var(--bg);
}

.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.about-text p {
  margin: 18px 0 22px;
  font-size: 16.5px;
}

.about-points {
  margin-bottom: 26px;
}

.about-points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 15.5px;
  color: var(--text);
}

.about-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent) 4px, transparent 5px);
  border: 2px solid var(--accent);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, gap 0.2s ease;
}

.link-more:hover {
  border-bottom-color: var(--primary);
  gap: 10px;
}

.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* Advantages */

.advantages {
  background: var(--bg-soft);
}

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

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(46, 155, 255, 0.4);
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(11, 61, 145, 0.08), rgba(46, 155, 255, 0.14));
  margin-bottom: 20px;
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.card p {
  font-size: 15px;
  color: var(--text-light);
}

/* Stories */

.stories {
  background: var(--bg);
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.story-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.story-image {
  overflow: hidden;
  aspect-ratio: 16 / 9.5;
  background: var(--bg-soft);
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.story-card:hover .story-image img {
  transform: scale(1.05);
}

.story-body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.story-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
}

.story-body p {
  font-size: 15px;
  color: var(--text-light);
}

/* Contact */

.contact {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
}

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

.contact-info .section-label {
  color: var(--accent-light);
}

.contact-info h2 {
  color: #fff;
  margin-bottom: 16px;
}

.contact-info p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16.5px;
}

.contact-cards {
  display: grid;
  gap: 18px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: background 0.25s ease, transform 0.25s ease;
}

a.contact-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.contact-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 195, 255, 0.16);
  color: var(--accent-light);
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}

.contact-label {
  display: block;
  font-size: 12.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2px;
}

.contact-value {
  display: block;
  font-size: 16.5px;
  font-weight: 600;
  color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding: 72px 24px 48px;
}

.footer-brand .logo-mark {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 15px;
  max-width: 320px;
}

.footer-links h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.footer-links li {
  margin-bottom: 10px;
  font-size: 14.5px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 0;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Page Hero (sub pages)
   ========================================================================== */

.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 88px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

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

.page-hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.4px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto;
}

/* ==========================================================================
   Services page
   ========================================================================== */

.services-detail {
  background: var(--bg);
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.service-row:last-child {
  border-bottom: none;
}

.service-row:nth-child(even) .service-text {
  order: 2;
}

.service-row:nth-child(even) .service-image {
  order: 1;
}

.service-text h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.service-text p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tags span {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(11, 61, 145, 0.06);
  border: 1px solid rgba(11, 61, 145, 0.14);
  padding: 5px 12px;
  border-radius: 999px;
}

.service-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Our Story page
   ========================================================================== */

.story-about {
  background: var(--bg);
}

.story-about-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.story-about p {
  font-size: 17px;
  margin-bottom: 18px;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  margin-top: 20px;
  text-align: left;
}

.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  box-sizing: border-box;
}

.timeline-item h4 {
  font-size: 18px;
  color: var(--dark);
  margin-bottom: 6px;
}

.timeline-item .timeline-year {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.timeline-item p {
  font-size: 15.5px;
  color: var(--text-light);
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .about-inner,
  .contact-inner,
  .service-row {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .service-row:nth-child(even) .service-text,
  .service-row:nth-child(even) .service-image {
    order: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .hero-inner {
    padding: 84px 24px 96px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 12px 24px 20px;
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

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

  .nav-menu a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-menu a.active::after {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
