html { scroll-behavior: smooth; }

/* Base layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #05060a;
  color: #f5f5f7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background atmosphere */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -5;
}

.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.6;
}

.bg-noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.26'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.bg-radial {
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 215, 128, 0.35), transparent 55%),
    radial-gradient(circle at 90% 20%, rgba(90, 178, 255, 0.35), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(255, 77, 109, 0.35), transparent 55%);
}

.bg-scanline {
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 3px;
  mix-blend-mode: soft-light;
  opacity: 0.3;
}

/* Marquee */
.marquee {
  position: relative;
  z-index: 20;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(to right, #0b0b12, #0e0f18);
  border-bottom: 1px solid rgba(255, 215, 128, 0.2);
}

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 232, 179, 0.85);
  padding: 0.5rem 0;
}

.marquee span {
  padding-right: 3rem;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: radial-gradient(circle at top left, rgba(255, 215, 128, 0.24), transparent 55%),
              rgba(4, 5, 9, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(255, 215, 128, 0.4));
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-title {
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff7e0;
}

.nav-subtitle {
  font-size: 0.72rem;
  opacity: 0.7;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 0.75rem;
}

.nav-link {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: rgba(245, 245, 247, 0.8);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover {
  background: rgba(255, 215, 128, 0.08);
  border-color: rgba(255, 215, 128, 0.6);
  color: #fffaf0;
  transform: translateY(-1px);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-line {
  width: 20px;
  height: 2px;
  background: #f5f5f7;
  border-radius: 999px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-parallax {
  position: absolute;
  inset: -10%;
  background-position: center;
  background-size: cover;
  mix-blend-mode: screen;
  opacity: 0.22;
}

.hero-parallax-back {
  background-image:
    radial-gradient(circle at 10% 10%, rgba(255, 215, 128, 0.4), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(90, 180, 255, 0.35), transparent 55%);
}

.hero-parallax-mid {
  background-image:
    linear-gradient(135deg, rgba(255, 77, 109, 0.34), transparent 40%),
    linear-gradient(225deg, rgba(90, 180, 255, 0.3), transparent 40%);
}

.hero-parallax-front {
  background-image:
    linear-gradient(to right, rgba(5, 8, 14, 0.8), rgba(5, 6, 10, 0.3)),
    radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.9), transparent 55%);
  mix-blend-mode: normal;
  opacity: 0.85;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom, rgba(0, 0, 0, 0.9), transparent 55%);
}

.hero-content {
  position: relative;
  max-width: 900px;
  text-align: left;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  color: rgba(255, 232, 179, 0.85);
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  margin: 0 0 0.75rem;
  text-shadow: 0 0 30px rgba(255, 215, 128, 0.4);
}

.hero-lede {
  max-width: 42rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(245, 245, 247, 0.88);
  margin-bottom: 1.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease;
}

.btn-primary {
  background: radial-gradient(circle at top left, #ffd780, #ffb347);
  color: #120b06;
  box-shadow: 0 0 24px rgba(255, 184, 92, 0.6);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 34px rgba(255, 184, 92, 0.8);
}

.btn-ghost {
  background: rgba(8, 11, 20, 0.7);
  border-color: rgba(255, 215, 128, 0.4);
  color: #fff2d2;
}

.btn-ghost:hover {
  background: rgba(18, 22, 36, 0.95);
}

/* Hero meta */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-pill {
  display: inline-flex;
  flex-direction: column;
  padding: 0.5rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 215, 128, 0.4);
  background: radial-gradient(circle at top left, rgba(255, 215, 128, 0.22), rgba(10, 12, 18, 0.9));
  font-size: 0.73rem;
}

.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.7;
}

.meta-value {
  margin-top: 0.1rem;
}

/* Sections */
.section {
  position: relative;
  padding: 4rem 1.5rem;
}

.section-alt {
  background: radial-gradient(circle at center, rgba(12, 16, 28, 0.95), rgba(5, 6, 10, 0.98));
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: rgba(255, 232, 179, 0.9);
  margin-bottom: 0.3rem;
}

.section h2 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.section-lede {
  max-width: 38rem;
  font-size: 0.95rem;
  color: rgba(235, 235, 245, 0.84);
}

/* Grid and layout */
.layout-two-column,
.layout-three-column {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.layout-two-column {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  align-items: flex-start;
}

.layout-three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.layout-stacked {
  margin-top: 2.5rem;
}

.column {
  min-width: 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

/* Cards */
.card {
  position: relative;
  border-radius: 1rem;
  padding: 1.25rem 1.3rem;
  background: radial-gradient(circle at top left, rgba(255, 215, 128, 0.12), rgba(10, 11, 20, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.card-elevated::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 120deg, rgba(255, 215, 128, 0.5), rgba(90, 180, 255, 0.35), rgba(255, 77, 109, 0.45), rgba(255, 215, 128, 0.5));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -2;
}

.card-elevated::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 55%);
  mix-blend-mode: soft-light;
  opacity: 0.2;
  pointer-events: none;
}

.card-elevated {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  transform: translateY(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-elevated:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 215, 128, 0.8);
}

.card-elevated:hover::before {
  opacity: 0.7;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

/* Badges and tags */
.card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 215, 128, 0.6);
  color: rgba(255, 232, 179, 0.95);
  background: rgba(13, 10, 5, 0.9);
}

.card-tag-fire {
  border-color: rgba(255, 87, 87, 0.8);
  color: #ffd6d6;
  background: rgba(28, 4, 4, 0.96);
}

.card-tag-ems {
  border-color: rgba(86, 215, 255, 0.8);
  color: #d7f5ff;
  background: rgba(4, 18, 28, 0.96);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.8rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
  background: rgba(8, 9, 15, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.8);
}

.badge-gold { border-color: rgba(255, 215, 128, 0.9); color: #ffeab3; }
.badge-blue { border-color: rgba(90, 180, 255, 0.9); color: #d5ecff; }
.badge-amber { border-color: rgba(255, 184, 92, 0.9); color: #ffebc4; }
.badge-red { border-color: rgba(255, 87, 87, 0.9); color: #ffd6d6; }
.badge-ems { border-color: rgba(126, 237, 255, 0.9); color: #def8ff; }
.badge-silver { border-color: rgba(204, 204, 214, 0.9); color: #f4f4f8; }
.badge-cyan { border-color: rgba(92, 238, 255, 0.9); color: #daffff; }
.badge-pink { border-color: rgba(255, 145, 210, 0.9); color: #ffe3f4; }

/* Lore, culture, scripts, departments */
.lore-card p,
.culture-card p,
.card-script p,
.dept-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(238, 238, 246, 0.9);
}

/* Founder panel */
.founder-panel {
  max-width: 1150px;
  margin: 0 auto;
  position: relative;
  border-radius: 1.4rem;
  padding: 1px;
  background: conic-gradient(from 160deg, rgba(255, 215, 128, 0.6), rgba(90, 180, 255, 0.6), rgba(255, 77, 109, 0.7), rgba(255, 215, 128, 0.6));
}

.founder-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top left, rgba(255, 215, 128, 0.55), transparent 55%);
  opacity: 0.3;
  pointer-events: none;
}

.founder-content {
  position: relative;
  border-radius: 1.3rem;
  padding: 2rem 2rem 2.2rem;
  background: radial-gradient(circle at top, rgba(19, 18, 26, 0.96), rgba(6, 7, 12, 0.98));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.9);
}

.founder-content h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.founder-content p {
  font-size: 0.93rem;
  line-height: 1.8;
  color: rgba(238, 238, 246, 0.92);
  margin-bottom: 1.4rem;
}

.founder-grid {
  margin-bottom: 1rem;
}

.founder-grid h4 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.founder-grid ul {
  padding-left: 1.1rem;
  margin: 0;
  font-size: 0.87rem;
  color: rgba(230, 230, 240, 0.92);
}

/* Accordion */
.accordion-wrap {
  max-width: 1150px;
  margin: 2.5rem auto 0;
}

.accordion-title {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.accordion {
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at top, rgba(19, 18, 26, 0.96), rgba(6, 7, 12, 0.98));
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 0.8rem 1rem;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(244, 244, 250, 0.95);
  cursor: pointer;
}

.accordion-icon {
  font-size: 1.2rem;
  opacity: 0.7;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  transition: max-height 0.26s ease, padding 0.26s ease;
}

.accordion-body p {
  margin: 0.1rem 0 0.9rem;
  font-size: 0.87rem;
  color: rgba(234, 234, 244, 0.9);
}

.accordion.open .accordion-body {
  max-height: 240px;
  padding-bottom: 0.8rem;
}

.accordion.open .accordion-icon {
  transform: rotate(45deg);
}

/* Departments */
.dept-grid {
  max-width: 1150px;
  margin: 0 auto;
}

.dept-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Scripts grid */
.script-grid {
  max-width: 1150px;
  margin: 0 auto;
}

/* Media cards */
.media-grid {
  max-width: 1150px;
  margin: 0 auto;
}

.media-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 0.9rem;
}

.media-thumb {
  border-radius: 0.9rem;
  background: radial-gradient(circle at top, rgba(255, 215, 128, 0.4), rgba(5, 6, 10, 0.95));
  position: relative;
  overflow: hidden;
}

.media-thumb::after {
  content: "▶";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.7rem;
  color: rgba(0, 0, 0, 0.85);
  background: rgba(255, 255, 255, 0.88);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-thumb-1 {
  background-image: linear-gradient(135deg, rgba(255, 125, 92, 0.7), rgba(19, 10, 3, 0.95));
}

.media-thumb-2 {
  background-image: linear-gradient(135deg, rgba(90, 180, 255, 0.7), rgba(4, 8, 19, 0.95));
}

.media-body h3 {
  margin: 0 0 0.25rem;
}

.media-body p {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: rgba(236, 236, 246, 0.9);
}

.media-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(199, 209, 255, 0.9);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Footer */
.footer {
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at top, rgba(10, 10, 16, 0.98), rgba(2, 2, 6, 1));
}

.footer-inner {
  max-width: 1150px;
  margin: 0 auto;
  font-size: 0.8rem;
  color: rgba(220, 220, 236, 0.8);
}

/* Responsive */
@media (max-width: 960px) {
  .layout-two-column {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout-three-column {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .media-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(4, 5, 9, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    padding: 0.6rem 1.2rem 0.8rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav-links.nav-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-toggle {
    display: flex;
  }
}

/* Small screens */
@media (max-width: 600px) {
  .hero {
    padding-top: 4rem;
    min-height: 70vh;
  }
  .hero-content {
    text-align: left;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* Equal-height agency cards in world grid */
.world-grid {
  align-items: stretch;
}

.card-agency {
  display: flex;
  flex-direction: column;
  height: 100%;
}


/* Balanced atmospheric hero image overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: -5%;
  background-image: url("assets/collective2.png");
  background-size: cover;
  background-position: center;
  opacity: 0.25; /* Balanced visibility */
  filter: blur(6px);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 2;
}


/* Gallery */
.section-gallery {
  position: relative;
}

.gallery-grid {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at top, rgba(102, 178, 255, 0.25), rgba(7, 10, 20, 0.96));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
}

.gallery-image {
  position: relative;
  width: 100%;
  padding-bottom: 70%;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(140, 108, 255, 0.4), transparent 55%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from 160deg, rgba(102, 178, 255, 0.6), rgba(153, 102, 255, 0.6), rgba(255, 77, 166, 0.7), rgba(102, 178, 255, 0.6));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.gallery-item:hover::before {
  opacity: 0.8;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
  filter: saturate(1.1) contrast(1.06);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
