/* ============================================
   Layout: Container, Grid, Sections, Responsive
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---- Sections ---- */
.section {
  padding: var(--sp-24) 0;
  position: relative;
  overflow: hidden;
}
.section-alt { background: var(--color-bg-alt); }
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--sp-16);
}
.section-title {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  margin-bottom: var(--sp-4);
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ---- Grids ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  max-width: 900px;
  margin: 0 auto;
}
.corporate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

/* ---- Hero Layout ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-h);
}
.hero-content {
  position: relative;
  z-index: var(--z-base);
  text-align: center;
  padding: var(--sp-8) 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-bg);
  overflow: hidden;
}

/* ---- Header Layout ---- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: var(--z-nav);
  background: rgba(6, 11, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}
.header.scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(6, 11, 20, 0.95);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* ---- Footer Layout ---- */
.footer {
  padding: var(--sp-12) 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-6);
}

/* ---- Page Hero (subpages) ---- */
.page-hero {
  padding: calc(var(--header-h) + var(--sp-16)) 0 var(--sp-16);
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(16,185,129,.06), transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(6,182,212,.04), transparent 60%);
}
.page-hero .section-title { position: relative; z-index: 1; }
.page-hero .section-subtitle { position: relative; z-index: 1; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .corporate-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --fs-4xl: 2.2rem;
    --fs-5xl: 2.8rem;
    --sp-24: 4rem;
    --sp-16: 3rem;
  }
  .services-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; max-width: 400px; }
  .corporate-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .section-header { margin-bottom: var(--sp-10); }
}

@media (max-width: 480px) {
  :root {
    --fs-4xl: 1.8rem;
    --fs-5xl: 2.2rem;
    --container-pad: 1rem;
  }
  .about-grid { grid-template-columns: 1fr; }
}
