/* ========================================
   Farosoft — Aurora/Cosmic Theme
   ======================================== */

/* --- Variables --- */
:root {
  --bg: #030712;
  --surface: rgba(15, 23, 42, 0.6);
  --border: rgba(148, 163, 184, 0.1);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --teal: #14b8a6;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --gradient: linear-gradient(135deg, var(--teal), var(--purple), var(--pink));
  --radius: 12px;
  --header-h: 72px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: 'Sora', sans-serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-muted); }

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

/* --- Aurora Background --- */
.aurora {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}
.aurora-blob:nth-child(1) {
  width: 600px; height: 600px;
  top: -10%; left: -10%;
  background: radial-gradient(circle, var(--teal), transparent 70%);
  animation: float1 20s ease-in-out infinite;
}
.aurora-blob:nth-child(2) {
  width: 500px; height: 500px;
  top: 40%; right: -10%;
  background: radial-gradient(circle, var(--purple), transparent 70%);
  animation: float2 25s ease-in-out infinite;
}
.aurora-blob:nth-child(3) {
  width: 550px; height: 550px;
  bottom: -10%; left: 30%;
  background: radial-gradient(circle, var(--pink), transparent 70%);
  animation: float3 22s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(60px, 40px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-50px, -30px); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -50px); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* --- Layout --- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.page-content { position: relative; z-index: 1; }
section { padding: 5rem 0; }

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 100;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.header-logo img { height: 32px; }
.header-logo span {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
}
.header-nav { display: flex; align-items: center; gap: 2rem; }
.header-nav a { font-size: 0.95rem; color: var(--text-muted); transition: color 0.2s; }
.header-nav a:hover { color: var(--text); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > button {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-dropdown > button:hover { color: var(--text); }
.nav-dropdown > button svg { width: 12px; height: 12px; transition: transform 0.2s; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0;
  z-index: 10;
}
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.dropdown-menu a:hover { color: var(--text); background: rgba(148, 163, 184, 0.05); }
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.nav-dropdown:hover > button svg,
.nav-dropdown:focus-within > button svg { transform: rotate(180deg); }

/* Mobile nav */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1rem;
  }
  .header-nav.open { display: flex; }
  .dropdown-menu {
    position: static;
    background: transparent;
    backdrop-filter: none;
    border: none;
    padding-left: 1rem;
  }
  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:focus-within .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
}

/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.75rem; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem; }
.footer-col a { display: block; font-size: 0.9rem; color: var(--text-muted); padding: 0.25rem 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-social a {
  display: inline-flex;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--text); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* --- Glass Card --- */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.08);
}

/* --- Hero --- */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}
.hero-content { text-align: center; max-width: 720px; margin: 0 auto; }
.hero-content h1 { margin-bottom: 1.25rem; }
.hero-content p { font-size: 1.15rem; margin-bottom: 2rem; max-width: 540px; margin-left: auto; margin-right: auto; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gradient {
  background: var(--gradient);
  color: #fff;
}
.btn-gradient:hover { box-shadow: 0 4px 24px rgba(139, 92, 246, 0.3); }

/* --- Hero Image --- */
.hero-image {
  position: relative;
  margin-top: 3rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-image img { width: 100%; display: block; }
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 40%);
}

/* --- Product Cards Grid --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.product-card { text-align: center; }
.product-card img { height: 48px; margin: 0 auto 1rem; }
.product-card h3 { margin-bottom: 0.5rem; }
.product-card p { font-size: 0.95rem; margin-bottom: 1.25rem; }

/* --- Feature Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.feature-card { padding: 1.75rem; }
.feature-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.feature-card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.feature-card p { font-size: 0.9rem; }

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}
.team-member { text-align: center; }
.team-photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  padding: 3px;
  background: var(--gradient);
}
.team-photo img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
}
.team-member h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.team-member .role { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.team-member .social-link {
  display: inline-flex;
  color: var(--text-muted);
  transition: color 0.2s;
}
.team-member .social-link:hover { color: var(--pink); }

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
  vertical-align: middle;
}

/* --- Contact --- */
.contact-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
}
.contact-section p { max-width: 480px; margin: 1rem auto 2rem; font-size: 1.05rem; }

/* --- 404 --- */
.error-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-h);
}
.error-section img { max-width: 360px; margin: 0 auto 2rem; border-radius: var(--radius); }
.error-section h1 { margin-bottom: 1rem; }
.error-section p { margin-bottom: 2rem; }

/* --- Scroll Reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Section Header --- */
.section-header { text-align: center; margin-bottom: 1rem; }
.section-header p { max-width: 540px; margin: 1rem auto 0; }

/* --- Responsive --- */
@media (max-width: 480px) {
  section { padding: 3rem 0; }
  .hero { min-height: 70vh; }
  .feature-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .products-grid { grid-template-columns: 1fr; }
}
