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

:root {
  --black: #000000;
  --black-light: #111111;
  --black-card: #1a1a1a;
  --red: #CC2222;
  --red-hover: #a81c1c;
  --cream: #f0ebe0;
  --cream-dim: rgba(240, 235, 224, 0.6);
  --cream-faint: rgba(240, 235, 224, 0.35);
  --white: #ffffff;
  --gray-light: #0d0d0d;
  --gray-mid: #2a2a2a;
  --gray-text: rgba(240, 235, 224, 0.55);
  --gray-dark: #e8e2d6;
  --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(--cream);
  line-height: 1.6;
  background: var(--black);
  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 ===== */
.anim {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

/* Faster animations as you scroll deeper */
.services-home .anim,
.services-home .fade-up { transition-duration: 0.7s; }
.featured-work .anim,
.featured-work .fade-up { transition-duration: 0.6s; }
.about .anim { transition-duration: 0.5s; }
.cta-banner .anim { transition-duration: 0.4s; }
.contact-section .anim,
.contact-section .fade-up { transition-duration: 0.4s; }

.anim.fade-up { transform: translateY(30px); }
.anim.fade-in { transform: scale(0.96); }
.anim.slide-left { transform: translateX(-40px); }
.anim.slide-right { transform: translateX(40px); }
.anim.zoom-in { transform: scale(0.85); }

.anim.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Legacy support */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

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

.stagger .fade-up:nth-child(1),
.stagger .anim:nth-child(1) { transition-delay: 0s; }
.stagger .fade-up:nth-child(2),
.stagger .anim:nth-child(2) { transition-delay: 0.12s; }
.stagger .fade-up:nth-child(3),
.stagger .anim:nth-child(3) { transition-delay: 0.24s; }
.stagger .fade-up:nth-child(4),
.stagger .anim:nth-child(4) { transition-delay: 0.36s; }

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

@keyframes headerFadeIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  flex-shrink: 0;
  vertical-align: middle;
}

.logo img {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.12em;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.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: var(--cream-dim);
  transition: color var(--transition);
  padding: 8px 0;
  letter-spacing: 0.03em;
}

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

.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(--cream); }
.btn-red:hover { background: var(--red-hover); }

.btn-dark { background: var(--black-card); color: var(--cream); border: 1px solid var(--gray-mid); }
.btn-dark:hover { background: var(--gray-mid); }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--cream-faint);
}

.btn-outline:hover {
  background: var(--cream);
  color: var(--black);
  border-color: var(--cream);
}

.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(--cream);
  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(--black);
  overflow: hidden;
}

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

.hero-carousel {
  position: absolute;
  right: -5%;
  top: 0;
  bottom: 0;
  width: 65%;
  max-width: 800px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.hero-carousel img {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 3s ease-in-out;
}

.hero-carousel .hero-slide-logo {
  opacity: 0;
  filter: brightness(0.35);
}

.hero-carousel .hero-slide-logo.active {
  opacity: 0.15;
}

.hero-carousel .hero-slide-printer {
  opacity: 0;
  object-fit: cover;
  width: 120%;
  right: -10%;
}

.hero-carousel .hero-slide-printer.active {
  opacity: 0.3;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.80) 50%, rgba(0, 0, 0, 0.90) 100%);
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  animation: heroFadeIn 1.5s ease-out both;
}

@keyframes heroFadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-badge { animation: heroFadeIn 1s ease-out 0.2s both; }
.hero h1 { animation: heroFadeIn 1s ease-out 0.4s both; }
.hero-sub { animation: heroFadeIn 1s ease-out 0.6s both; }
.hero-buttons { animation: heroFadeIn 1s ease-out 0.8s both; }

.hero-logo {
  width: 120px;
  margin-bottom: 24px;
}

.hero-badge {
  color: var(--cream-faint);
  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(--cream);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

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

.hero-sub {
  font-size: 1.1rem;
  color: var(--cream-dim);
  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(--cream);
  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(--black-light);
}

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

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

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

.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(--cream);
  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;
  background: var(--black);
}

.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(0, 0, 0, 0.9) 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(--cream);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.work-overlay span {
  color: var(--cream-dim);
  font-size: 0.85rem;
  font-weight: 500;
}

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

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

.about-photo {
  aspect-ratio: 3 / 4;
  background: var(--black);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-mid);
}

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

.about-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--cream);
  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(--cream); }

/* ===== 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(--cream);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.cta-banner p {
  color: rgba(240, 235, 224, 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;
  background: var(--black);
}

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

.contact-form-wrap {
  background: var(--black-card);
  border-radius: 12px;
  padding: 32px;
  border: 1px solid var(--gray-mid);
}

.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(--cream);
  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(--cream);
  background: var(--black-light);
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--cream-faint);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(204, 34, 34, 0.15);
}

.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(--black-card);
  border-radius: 12px;
  color: var(--cream);
  border: 1px solid var(--gray-mid);
}

.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: var(--red);
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--cream-dim);
  line-height: 1.6;
}

.contact-phone,
.contact-email {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--cream);
  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: var(--cream-faint);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  color: var(--cream);
  padding: 32px 0 0;
  border-top: 1px solid var(--gray-mid);
}

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

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

.footer-brand p {
  font-size: 0.8rem;
  color: var(--cream-faint);
  line-height: 1.4;
}

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

.footer-links a {
  font-size: 0.85rem;
  color: var(--cream-faint);
  transition: color var(--transition);
}

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

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

.footer-contact a {
  font-size: 0.85rem;
  color: var(--cream-faint);
  transition: color var(--transition);
}

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

.footer-bottom {
  padding: 12px 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  font-size: 0.7rem;
  color: rgba(240, 235, 224, 0.15);
  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(--red);
  color: var(--cream);
  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(204, 34, 34, 0.3);
  -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(--cream);
}

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

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    padding: 0 20px;
    gap: 0;
    box-shadow: 0 16px 32px rgba(0,0,0,0.5);
    z-index: 999;
    border-top: 1px solid var(--gray-mid);
    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(240, 235, 224, 0.06);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cream);
    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-inner {
    height: 56px;
  }

  .logo img { height: 28px; }
  .logo-maxwell, .logo-graphics { font-size: 1rem; }

  .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; }
  .hero-logo { width: 80px; }

  .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 .logo img { height: 28px; }
  .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; }
}
