/* Trias Scientific Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;500;700&display=swap');

:root {
  /* Colors */
  --bg-color: #050510;
  --surface-color: #0f1020;
  --surface-hover: #161830;
  --primary-color: #F59E0B;
  /* Amber-500 */
  --primary-glow: rgba(245, 158, 11, 0.5);
  --accent-color: #D97706;
  /* Amber-600 */
  --accent-glow: rgba(217, 119, 6, 0.5);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --border-color: #27272a;

  /* Gradients */
  --gradient-title: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  --gradient-primary: linear-gradient(to right, #F59E0B, #FBBF24);

  /* Spacing */
  --container-width: 1200px;
  --header-height: 80px;
}

/* Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  color: var(--primary-color);
  display: none;
  /* Hidden by default */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.scroll-top-btn:hover {
  background: var(--primary-color);
  color: white;
}

.scroll-top-btn.visible {
  display: flex;
}

/* Mobile check for scroll button (optional, but requested for mobile) */
@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    background: rgba(15, 16, 32, 0.8);
    /* Darker bg for visibility */
  }
}

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

html {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  touch-action: pan-y;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: var(--gradient-title);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  /* background-clip: text is non-standard, using webkit prefix only for best compatibility */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Hamburger default state (Desktop) */
.hamburger {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 0 20px var(--primary-glow);
  border: 1px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  background: rgba(59, 130, 246, 0.1);
}

/* Header */
.header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(5, 5, 16, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 40px;
  width: auto;
  border-radius: 4px;
  /* Soften the corners of the rect */
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

/* Hero Section */
.hero {
  padding-top: 160px;
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 99px;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title span {
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Background Effects */
.glow-effect {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(5, 5, 16, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.glow-top {
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}

/* Features/Technology */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 40px -10px rgba(245, 158, 11, 0.2);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--primary-color);
  font-size: 24px;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.card-text {
  color: var(--text-muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  background: #02020a;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
}

.footer-group h4 {
  margin-bottom: 24px;
  font-size: 1rem;
}

.footer-group ul li {
  margin-bottom: 12px;
}

.footer-group ul li a {
  color: var(--text-muted);
}

.footer-group ul li a:hover {
  color: var(--primary-color);
}

.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Mobile Navigation */
  .header .container {
    position: relative;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    top: 70px;
    right: 20px;
    /* Aligned to right with some padding */
    left: auto;
    /* Don't stretch to left */
    width: 200px;
    /* Fixed reasonable width for single words */
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px;
    /* Reduced padding */
    gap: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    /* Rounded corners for dropdown feel */
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 10px;
    display: block;
  }

  /* Hamburger Toggle */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
  }

  .hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
  }

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

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

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

  .header .btn-outline {
    display: none;
    /* Hide CTA on mobile header to save space, rely on Nav CTA */
  }
}

/* 3D Illustrations & New Layouts */

/* Hero Image Integration */
.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text {
  flex: 1;
  max-width: 600px;
  /* Adjust as appropriate */
}

/* Remove center alignment from hero-content previously */
.hero-container .hero-text {
  text-align: left;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.hero-img-3d {
  width: 100%;
  max-width: 500px;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.3));
  animation: float 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotateY(0deg);
  }

  50% {
    transform: translateY(-20px) rotateY(5deg);
  }

  100% {
    transform: translateY(0px) rotateY(0deg);
  }
}

/* Update hero description for left alignment */
.hero-description {
  margin-left: 0;
  margin-right: 0;
}

.hero-actions {
  justify-content: flex-start;
}

/* About Section Image Integration */
.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

.about-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.about-img-3d {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.5s ease;
}

.about-img-3d:hover {
  transform: scale(1.05) rotate(2deg);
}

.about-text {
  flex: 1;
}

.section-header-left {
  margin-bottom: 30px;
  text-align: left;
}

.section-subtitle-left {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 10px;
}

/* Mobile Responsiveness for New Layouts */
@media (max-width: 900px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-container .hero-text {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-img-3d {
    max-width: 300px;
    margin-bottom: 30px;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-image {
    justify-content: center;
    order: -1;
    /* Image on top on mobile */
    margin-bottom: 30px;
  }

  .section-header-left {
    text-align: center;
  }
}

/* Team & Profile Cards */
.team-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.team-card {
  text-align: center;
  padding: 40px 24px;
}

.profile-img-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
  background: #000;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-card:hover .profile-img {
  transform: scale(1.1);
}

.role {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

/* Legal Pages */
.legal-content h3 {
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.legal-content h4 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #fbbf24;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 15px;
  color: var(--text-muted);
}

.legal-content ul {
  padding-left: 20px;
  list-style-type: disc;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 16, 32, 0.95);
  border-top: 1px solid var(--primary-color);
  padding: 20px;
  z-index: 2000;
  display: none;
  /* Hidden by default */
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.cookie-banner.visible {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.cookie-content {
  max-width: var(--container-width);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  width: 100%;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

.cookie-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}

.cookie-text a {
  color: var(--primary-color);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 15px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}