@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Libre+Franklin:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --white: #ffffff;
  --off-white: #f7f7f8;
  --light-gray: #e8e8ea;
  --mid-gray: #999;
  --dark-gray: #333;
  --near-black: #111;
  --black: #000;
  --accent-teal: #1bb5a0;
  --accent-coral: #e85d4a;
  --accent-navy: #1a2744;
  --font-heading: 'Libre Franklin', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

a { text-decoration: none; color: inherit; }

/* =========================================
   HEADER / NAV
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
  transition: background 0.3s ease;
}

header.dark-mode {
  background: var(--near-black);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--near-black);
}

header.dark-mode .logo {
  color: var(--white);
}

.logo-img {
  width: 32px;
  height: auto;
  object-fit: contain;
}

.hamburger {
  width: 32px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--near-black);
  transition: all 0.3s ease;
}

header.dark-mode .hamburger span {
  background: var(--white);
}

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

/* =========================================
   FULLSCREEN NAV OVERLAY
   ========================================= */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.nav-overlay nav {
  text-align: center;
}

.nav-overlay nav a {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  color: var(--dark-gray);
  padding: 12px 0;
  transition: color 0.2s ease;
}

.nav-overlay nav a:hover {
  color: var(--near-black);
}

.nav-overlay .close-btn {
  position: absolute;
  top: 28px;
  right: 48px;
  font-size: 36px;
  cursor: pointer;
  color: var(--dark-gray);
  background: none;
  border: none;
  font-weight: 300;
  line-height: 1;
}

/* =========================================
   PORTFOLIO SUMMARY
   ========================================= */
.portfolio-summary {
  max-width: 1440px;
  margin: 0 auto;
  padding: 140px 48px 0;
}

.portfolio-summary p {
  max-width: 900px;
  font-size: 18px;
  line-height: 1.8;
  color: var(--dark-gray);
  font-weight: 400;
}

/* =========================================
   PORTFOLIO PAGE
   ========================================= */
.portfolio-grid {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 48px 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.portfolio-item {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  padding: 0;
  overflow: hidden;
}

.portfolio-item:hover {
  background: var(--off-white);
  border-color: var(--light-gray);
}

.portfolio-item img {
  width: 100%;
  height: calc(100% - 60px);
  object-fit: contain;
  padding: 8%;
  padding-bottom: 0;
  margin-top: 8px;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.portfolio-item:hover img {
  filter: grayscale(0%);
}

.portfolio-item .acquired-tag {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--mid-gray);
  font-style: italic;
  background: rgba(255,255,255,0.85);
  padding: 2px 10px;
  border-radius: 3px;
}

.portfolio-tagline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--mid-gray);
  text-align: center;
  white-space: normal;
  letter-spacing: 0.3px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  padding: 8px 10px;
  background: var(--white);
}

/* =========================================
   COMPANY DETAIL MODAL
   ========================================= */
.company-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.97);
  z-index: 2000;
  display: none;
  overflow-y: auto;
}

.company-modal.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.company-modal-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 48px 80px;
}

.company-modal .close-modal {
  position: fixed;
  top: 28px;
  right: 48px;
  font-size: 36px;
  cursor: pointer;
  color: var(--dark-gray);
  background: none;
  border: none;
  font-weight: 300;
  z-index: 2001;
  line-height: 1;
  transition: color 0.2s ease;
}

.company-modal .close-modal:hover {
  color: var(--near-black);
}

.company-category {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 12px;
}

.company-name {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  color: var(--near-black);
  margin-bottom: 28px;
  line-height: 1.15;
}

.company-description {
  font-size: 17px;
  line-height: 1.75;
  color: var(--dark-gray);
  margin-bottom: 48px;
}

.company-description p {
  margin-bottom: 16px;
}

.company-description p:last-child {
  margin-bottom: 0;
}

.company-meta h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--near-black);
  margin-bottom: 8px;
}

.company-meta p, .company-meta a {
  font-size: 15px;
  color: var(--dark-gray);
  margin-bottom: 32px;
}

.company-meta a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.company-meta a:hover {
  color: var(--near-black);
}

/* =========================================
   TEAM PAGE
   ========================================= */
.team-section {
  background: var(--near-black);
  min-height: 100vh;
  padding: 120px 48px 80px;
}

.team-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 48px;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.team-grid {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.team-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.team-card .team-photo {
  width: 100%;
  aspect-ratio: 1;
  background: var(--near-black);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.team-card .team-photo .initials {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: rgba(255,255,255,0.08);
  transition: color 0.3s ease;
}

.team-card:hover .team-photo .initials {
  color: rgba(255,255,255,0.15);
}

.team-card .team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.team-card:hover .team-photo img {
  opacity: 1;
}

.team-info {
  padding: 16px 0;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
}

.team-card:hover .team-info {
  opacity: 1;
  transform: translateY(0);
}

.team-info h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2px;
}

.team-info p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* =========================================
   PERSON DETAIL MODAL
   ========================================= */
.person-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--near-black);
  z-index: 2000;
  display: none;
  overflow-y: auto;
}

.person-modal.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.person-modal-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 48px 80px;
}

.person-modal .close-modal {
  position: fixed;
  top: 28px;
  right: 48px;
  font-size: 36px;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  background: none;
  border: none;
  font-weight: 300;
  z-index: 2001;
  line-height: 1;
  transition: color 0.2s ease;
}

.person-modal .close-modal:hover {
  color: var(--white);
}

.person-role-tag {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}

.person-name {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 32px;
  line-height: 1.15;
}

.person-bio {
  font-size: 17px;
  line-height: 1.85;
  color: rgba(255,255,255,0.7);
}

.person-bio p {
  margin-bottom: 20px;
}

.person-bio p:last-child {
  margin-bottom: 0;
}

/* =========================================
   MANIFESTO PAGE
   ========================================= */
.manifesto-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 160px 48px 120px;
}

.manifesto-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 60vh;
  min-height: 400px;
  background: var(--near-black);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -100px;
  margin-bottom: 80px;
  overflow: hidden;
}

.manifesto-hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27,181,160,0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.manifesto-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 900;
  color: var(--white);
  text-align: center;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}

.manifesto-content h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--near-black);
  margin-bottom: 24px;
  margin-top: 56px;
}

.manifesto-content p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--dark-gray);
  margin-bottom: 20px;
}

.manifesto-content .lead {
  font-size: 22px;
  line-height: 1.7;
  color: var(--near-black);
  font-weight: 500;
  margin-bottom: 40px;
}

.manifesto-content blockquote {
  border-left: 3px solid var(--accent-teal);
  padding: 16px 0 16px 32px;
  margin: 40px 0;
  font-size: 20px;
  font-style: italic;
  line-height: 1.7;
  color: var(--near-black);
}

/* =========================================
   CONTACT PAGE
   ========================================= */
.contact-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 48px;
}

.contact-inner {
  max-width: 640px;
  width: 100%;
}

.contact-inner h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  color: var(--near-black);
  margin-bottom: 16px;
}

.contact-inner .subtitle {
  font-size: 17px;
  color: var(--mid-gray);
  margin-bottom: 48px;
  line-height: 1.6;
}

.contact-form label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid var(--light-gray);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--near-black);
  background: transparent;
  margin-bottom: 32px;
  outline: none;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--near-black);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--near-black);
  color: var(--white);
  border: none;
  padding: 16px 48px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form button:hover {
  background: var(--dark-gray);
}

.contact-details {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--light-gray);
}

.contact-details h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: 12px;
}

.contact-details p {
  font-size: 16px;
  color: var(--dark-gray);
  line-height: 1.7;
  margin-bottom: 24px;
}

.contact-details a {
  color: var(--dark-gray);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  padding: 48px;
  border-top: 1px solid var(--light-gray);
  text-align: center;
}

footer.dark {
  background: var(--black);
  border-top-color: rgba(255,255,255,0.06);
}

footer p {
  font-size: 13px;
  color: var(--mid-gray);
  letter-spacing: 0.5px;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.fade-in {
  animation: fadeIn 0.6s ease both;
}

.slide-up {
  animation: slideUp 0.6s ease both;
}

/* Staggered portfolio items */
.portfolio-item {
  opacity: 0;
  animation: slideUp 0.5s ease both;
}

.portfolio-item:nth-child(1) { animation-delay: 0.05s; }
.portfolio-item:nth-child(2) { animation-delay: 0.1s; }
.portfolio-item:nth-child(3) { animation-delay: 0.15s; }
.portfolio-item:nth-child(4) { animation-delay: 0.2s; }
.portfolio-item:nth-child(5) { animation-delay: 0.25s; }
.portfolio-item:nth-child(6) { animation-delay: 0.3s; }
.portfolio-item:nth-child(7) { animation-delay: 0.35s; }
.portfolio-item:nth-child(8) { animation-delay: 0.4s; }
.portfolio-item:nth-child(9) { animation-delay: 0.45s; }
.portfolio-item:nth-child(10) { animation-delay: 0.5s; }

/* Staggered team cards */
.team-card {
  opacity: 0;
  animation: slideUp 0.5s ease both;
}

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

@media (max-width: 768px) {
  .header-inner {
    padding: 16px 24px;
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 100px 24px 60px;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-section {
    padding: 100px 24px 60px;
  }
  .manifesto-page {
    padding: 120px 24px 80px;
  }
  .contact-page {
    padding: 100px 24px;
  }
  .company-modal-inner,
  .person-modal-inner {
    padding: 100px 24px 60px;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
