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

:root {
  --navy: #0a1f3f;
  --navy-light: #122d54;
  --red: #DA291C;
  --red-hover: #b8221a;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-mid: #e0e0e0;
  --gray-text: #6b7280;
  --gray-dark: #374151;
  --font-heading: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--gray-dark);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 1s ease-out, transform 1s ease-out;
  will-change: opacity, transform;
}

.fade-up.visible {
  opacity: 1;
  transform: scale(1);
}

.stagger .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger .fade-up:nth-child(2) { transition-delay: 0.15s; }
.stagger .fade-up:nth-child(3) { transition-delay: 0.3s; }
.stagger .fade-up:nth-child(4) { transition-delay: 0.45s; }

/* ===== HEADER ===== */
.header {
  position: relative;
  width: 100%;
  z-index: 1000;
  background: var(--navy);
  padding-top: env(safe-area-inset-top, 0px);
  transition: box-shadow 0.5s ease;
}

.header.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  user-select: none;
}

.logo-maxwell { color: var(--white); }
.logo-graphics { color: var(--red); font-weight: 600; }

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

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
  padding: 8px 0;
}

.nav-links a:hover { color: var(--white); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-hover); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  min-height: 48px;
  min-width: 48px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 90vh;
  min-height: 90dvh;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/hero-bg.png') center/cover no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 31, 63, 0.92) 0%, rgba(10, 31, 63, 0.78) 50%, rgba(10, 31, 63, 0.88) 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-badge {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--red); }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== SECTION TITLES ===== */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-text);
  max-width: 520px;
  line-height: 1.6;
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ===== SERVICES ===== */
.services-home {
  padding: 80px 0;
  background: var(--gray-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px 24px;
  border: 1px solid var(--gray-mid);
  transition: box-shadow var(--transition);
}

.service-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.service-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}


.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--gray-text);
  line-height: 1.6;
}

/* ===== FEATURED WORK ===== */
.featured-work {
  padding: 80px 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.work-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}


.work-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.work-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 31, 63, 0.85) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.work-card:hover .work-overlay { opacity: 1; }

.work-overlay h4 {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.work-overlay span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== ABOUT ===== */
.about {
  padding: 80px 0;
  background: var(--gray-light);
}

.about-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
}

.about-photo {
  aspect-ratio: 3 / 4;
  background: #0a0a0a;
  border-radius: 12px;
  overflow: hidden;
}

.about-photo img {
  object-position: center 15%;
}

.about-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.about-text p {
  color: var(--gray-text);
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.about-text p strong { color: var(--navy); }

/* ===== CTA BANNER ===== */
.cta-banner {
  padding: 64px 0;
  background: var(--red);
  text-align: center;
}

.cta-banner h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== CONTACT ===== */
.contact-section {
  padding: 80px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  margin-top: 40px;
}

.contact-form-wrap {
  background: var(--gray-light);
  border-radius: 12px;
  padding: 32px;
}

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

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-mid);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--gray-dark);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10, 31, 63, 0.08);
}

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

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}

.contact-card {
  padding: 24px;
  background: var(--navy);
  border-radius: 12px;
  color: var(--white);
}

.contact-card h3 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.5);
}

.contact-card p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.contact-phone,
.contact-email {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  padding: 8px 0;
  transition: color var(--transition);
  min-height: 48px;
}

.contact-phone:hover,
.contact-email:hover { color: var(--red); }

.contact-phone svg,
.contact-email svg {
  flex-shrink: 0;
  stroke: rgba(255,255,255,0.5);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 32px 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 32px;
}

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

.footer-brand p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.4;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-contact a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}

.footer-contact a:hover { color: var(--white); }

.footer-bottom {
  padding: 12px 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  text-align: center;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:active {
  transform: scale(0.9);
}

.back-to-top svg {
  stroke: var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 0 20px;
    gap: 0;
    box-shadow: 0 16px 32px rgba(0,0,0,0.3);
    z-index: 999;
    border-top: 1px solid rgba(255,255,255,0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
    pointer-events: none;
  }

  .nav-links.open {
    max-height: 300px;
    opacity: 1;
    padding: 8px 20px 16px;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white);
    min-height: 52px;
    transition: color 0.2s ease;
  }

  .nav-links a:last-child { border-bottom: none; }

  .nav-links a:active { color: var(--red); }

  .nav .btn { display: none; }

  .header {
    position: sticky;
    top: 0;
  }

  .header-inner {
    height: 56px;
  }

  .logo {
    font-size: 1.15rem;
    gap: 5px;
  }

  .hero { min-height: calc(100dvh - 56px); }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-sub { font-size: 1rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; text-align: center; }

  .services-home,
  .featured-work,
  .about,
  .contact-section { padding: 60px 0; }

  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .work-grid { grid-template-columns: 1fr; gap: 12px; }

  .about-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .about-photo {
    max-width: 200px;
    margin: 0 auto;
  }

  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-buttons .btn { width: 100%; max-width: 320px; text-align: center; }

  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-form-wrap { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }

  .footer { padding: 20px 0 0; }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    align-items: center;
    padding-bottom: 14px;
  }

  .footer-brand .logo { margin-bottom: 4px; }
  .footer-brand p { font-size: 0.75rem; line-height: 1.3; }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .footer-links a { font-size: 0.8rem; }

  .footer-contact {
    align-items: center;
    gap: 2px;
  }

  .footer-contact a { font-size: 0.8rem; }

  .footer-bottom { padding: 10px 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); font-size: 0.65rem; }
}

@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.8rem; }
  .service-card { padding: 24px 20px; }
}
