/* ============================================
   HAN INTERACTIVE — Layout
   Container, Grid, Sections, Responsive
   ============================================ */

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* ---- Main content offset for fixed nav ---- */
main {
  padding-top: var(--nav-height);
}

/* ---- Sections ---- */
.section {
  padding: var(--space-section) 0;
  position: relative;
}

.section--bordered {
  border-bottom: 1px solid var(--border);
}

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

.section--gradient {
  background: var(--gradient-section);
}

/* ---- Hero ---- */
.hero {
  padding: var(--space-5xl) 0;
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero__bg-glow {
  display: none !important;
}

.hero__bg-glow--right {
  display: none !important;
}

.hero__grid-lines {
  display: block;
  opacity: 0.15;
}

.hero__grid-line {
  position: absolute;
  background: var(--border);
  opacity: 0.2;
}

.hero__grid-line--v {
  width: 1px;
  top: 0;
  bottom: 0;
}

.hero__grid-line--h {
  height: 1px;
  left: 0;
  right: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: var(--space-xl);
  filter: brightness(0.9);
  animation: fadeIn 0.8s var(--ease-out) 0.1s forwards;
  opacity: 0;
}

.hero__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hero__label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.hero__title {
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: 0.92;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
}

.hero__title span {
  display: block;
  color: var(--accent);
}

.hero__slogan {
  font-size: var(--text-lg);
  font-weight: var(--weight-light);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  letter-spacing: var(--tracking-wide);
}

.hero__founder {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-2xl);
}

.hero__intro {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 50ch;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-2xl);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
}

.hero__status {
  max-width: 340px;
}

/* ---- Grids ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

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

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

/* ---- About Page Layout ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
}

.about-intro {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 60ch;
}

.about-section {
  margin-bottom: var(--space-section);
}

.about-section__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

/* ---- Contact Page Layout ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-section);
}

.contact-form-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-form-info {
  padding-top: var(--space-md);
}

.contact-form-info__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-xl);
}

/* ---- Devlog Filter Row ---- */
.filter-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
}

/* ---- CTA Section ---- */
.cta {
  text-align: center;
  padding: var(--space-5xl) 0;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(199, 169, 74, 0.04), transparent 70%);
  pointer-events: none;
}

.cta__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: var(--tracking-tight);
}

.cta__subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 45ch;
  margin-left: auto;
  margin-right: auto;
}

.cta__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ---- Showcase Layout ---- */
.showcase__layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-3xl);
  align-items: center;
}

.showcase__layout--reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

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

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card--featured {
    grid-template-columns: 1fr;
  }

  .project-card--featured .project-card__image {
    height: 280px;
    min-height: auto;
  }

  .project-card--featured .project-card__image::after {
    background: linear-gradient(to top, var(--bg-card), transparent);
    height: 50%;
    width: 100%;
    left: 0;
    right: auto;
    bottom: 0;
    top: auto;
  }

  .project-card--featured .project-card__content {
    padding: var(--space-2xl);
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

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

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

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

  .showcase__layout,
  .showcase__layout--reverse {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__status {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    min-height: 75vh;
    padding: var(--space-3xl) 0;
  }

  .hero__title {
    font-size: clamp(2.2rem, 1.5rem + 4vw, 4rem);
  }

  .hero__logo {
    width: 48px;
    height: 48px;
  }

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

  .footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer__social-links {
    flex-wrap: wrap;
    justify-content: center;
  }

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

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

  .section {
    padding: var(--space-3xl) 0;
  }

  .page-header {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  .page-header__title {
    font-size: var(--text-2xl);
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

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

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

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

  .hero__status {
    max-width: 100%;
    width: 100%;
  }

  .filter-row {
    gap: 6px;
  }

  .article__hero-image {
    height: 220px;
  }
}

/* ---- Small mobile ---- */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero__title {
    font-size: clamp(1.8rem, 1.2rem + 3.5vw, 3rem);
  }

  .project-card__content {
    padding: var(--space-lg);
  }
}
