/* ============================================
   Minoru Tech — Layout
   Grid systems, sections, containers, responsive
   ============================================ */

/* ── Container ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.container-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ── Main Content ── */
main {
  padding-top: var(--header-height);
}

/* ── Sections ── */
.section {
  padding: var(--sp-24) 0;
}

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

.section-dark {
  background: var(--bg-hero);
  color: var(--text-on-hero);
}

.section-dark .section-label {
  color: var(--crimson-light);
}

.section-dark .section-title {
  color: #fff;
}

.section-dark .section-description {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-hero);
  padding: var(--sp-16) var(--sp-6);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--crimson-light);
  margin-bottom: var(--sp-6);
}

.hero-label .dot {
  width: 6px;
  height: 6px;
  background: var(--crimson);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.hero-title {
  color: #fff;
  margin-bottom: var(--sp-6);
}

.hero-title .accent {
  color: var(--crimson-light);
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--sp-8);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-xs);
  animation: float 2s ease-in-out infinite;
}

/* ── Grid Systems ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

/* ── Page Header (for inner pages) ── */
.page-header {
  background: var(--bg-hero);
  padding: var(--sp-6) var(--sp-6) var(--sp-6);
  text-align: center;
}

.page-header .section-label {
  color: var(--crimson-light);
}

.page-header .page-title {
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-4);
}

.page-header .page-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-lg);
  max-width: 640px;
  margin: 0 auto;
}

/* ── Two Column Layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.two-col-reverse {
  direction: rtl;
}

.two-col-reverse > * {
  direction: ltr;
}

/* ── Case Study Grid ── */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--sp-8);
}

/* ── CTA Section ── */
.cta-section {
  text-align: center;
  padding: var(--sp-24) var(--sp-6);
  background: var(--bg-hero);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--crimson-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section .section-title {
  color: #fff;
  position: relative;
}

.cta-section .section-description {
  color: rgba(255, 255, 255, 0.7);
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* ── Animations ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  from { width: 0; }
  to { width: 48px; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-8);
    z-index: 999;
  }

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

  .nav-link {
    font-size: var(--fs-xl);
  }

  .mobile-toggle {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-stats {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .two-col-reverse {
    direction: ltr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--sp-4);
    text-align: center;
  }

  .section {
    padding: var(--sp-16) 0;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .quote-block {
    padding: var(--sp-6);
    font-size: var(--fs-lg);
  }
}

@media (max-width: 480px) {
  :root {
    --sp-6: 1.25rem;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--sp-12)) var(--sp-4) var(--sp-12);
  }

  .btn-lg {
    padding: var(--sp-3) var(--sp-8);
    width: 100%;
  }
}
