/*
 * Frontier Intelligent - Modern, Advanced, Responsive CSS
 * Cleaned, consolidated, and enhanced for complex animations and mobile support
 */
:root {
  --bg: #0b1020;
  --panel: #10182a;
  --muted: #9aa4b2;
  --accent-1: #7c5cff;
  --accent-2: #00e0b8;
  --accent-3: #1c91ff;
  --glass: rgba(255,255,255,0.07);
  --radius: 18px;
  --container: 1200px;
  --shadow: 0 10px 40px rgba(2,6,23,0.7);
  --brand-font: 'Poppins', 'Inter', 'Montserrat', 'Figtree', 'DM Sans', system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --ui-font: 'Inter', 'Montserrat', 'Figtree', 'DM Sans', system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --ripple: rgba(255,255,255,0.12);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--ui-font);
  font-feature-settings: "ss01" on, "cv01" on;
  letter-spacing: 0.01em;
  font-size: 1.08rem;
  color: #e6eef8;
  background: linear-gradient(180deg, var(--bg) 0%, #071127 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Navigation */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo { width: 44px; height: 44px; filter: drop-shadow(0 2px 12px var(--accent-1)); transition: filter .4s; }
.logo:hover { filter: drop-shadow(0 4px 24px var(--accent-2)); }
.brand-text { font-weight: 700; letter-spacing: 0.2px; font-size: 1.25rem; }

.nav-links { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; position: relative; padding: 6px 2px; }
.nav-links a:after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); bottom: -6px; opacity: 0; transform: scaleX(0); transform-origin: left; transition: transform .28s, opacity .28s; }
.nav-links a:hover:after { opacity: 1; transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; }
.hamburger { width: 22px; height: 2px; background: var(--muted); display: block; position: relative; }
.hamburger:after, .hamburger:before { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--muted); }
.hamburger:before { top: -7px; }
.hamburger:after { bottom: -7px; }

/* Brand font for headings */
h1, h2, h3, h4 { font-family: var(--brand-font); }

/* Animated background overlay */
body:before {
  content: '';
  position: fixed;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(124,92,255,0.13) 0%, transparent 70%),
    radial-gradient(ellipse at 80% 60%, rgba(0,224,184,0.10) 0%, transparent 70%),
    linear-gradient(120deg, rgba(124,92,255,0.08), rgba(0,224,184,0.06), rgba(28,145,255,0.04));
  filter: blur(70px);
  opacity: 0.95;
  transform: translate3d(0,0,0);
  animation: bg-move 18s linear infinite;
}
@keyframes bg-move { 0% { transform: translateX(-10%); } 50% { transform: translateX(10%); } 100% { transform: translateX(-10%); } }

/* Hero Section */
.hero { position: relative; overflow: hidden; padding: 100px 0 140px; min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
#bg-canvas { width: 100%; height: 100%; display: block; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,16,30,0.12), rgba(4,8,20,0.08)); mix-blend-mode: soft-light; }
.hero-inner { display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; position: relative; z-index: 1; box-shadow: 0 8px 40px rgba(124,92,255,0.08); border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(12px); padding: 48px 32px; }
.headline { font-size: 2.2rem; margin: 0; font-weight: 700; color: #dbe9ff; letter-spacing: 0.2px; line-height: 1.1; text-shadow: 0 8px 32px rgba(124,92,255,0.10); transition: filter .6s ease, text-shadow .6s; }
.headline.glow { filter: drop-shadow(0 10px 40px rgba(124,92,255,0.12)); }
.typed { font-size: 2.5rem; margin: 12px 0 18px; font-weight: 800; background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 0.5px; position: relative; }
.typed:after { content: ''; position: absolute; right: -6px; top: 6px; width: 8px; height: 28px; background: var(--accent-2); border-radius: 2px; opacity: 0.95; transform-origin: center; animation: typing-cursor .9s steps(2,end) infinite; }
@keyframes typing-cursor { 0% { opacity: 1; } 50% { opacity: 0.2; } 100% { opacity: 1; } }
.tagline { color: var(--muted); max-width: 46ch; }
.cta-row { display: flex; gap: 12px; margin-top: 18px; }

/* Buttons */
.btn { padding: 12px 18px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; display: inline-block; position: relative; overflow: hidden; transition: transform .22s cubic-bezier(.2,.9,.2,1), box-shadow .22s, filter .22s; }
.btn.primary { background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); box-shadow: 0 8px 30px rgba(124,92,255,0.18); color: #061427; font-weight: 700; }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,0.06); color: var(--muted); }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: var(--ripple); opacity: 0.9; pointer-events: none; }
.btn.primary:hover { transform: translateY(-6px) scale(1.04); filter: brightness(1.06); box-shadow: 0 8px 32px rgba(124,92,255,0.18); }
.btn.primary:active { transform: translateY(-2px) scale(0.99); }
.btn.ghost:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(2,6,23,0.55); }
.btn:focus { outline: 2px solid rgba(124,92,255,0.18); outline-offset: 3px; }

/* Hero Cards */
.hero-cards { display: grid; gap: 24px; grid-template-columns: 1fr; }
.card {
  background: linear-gradient(120deg, rgba(124,92,255,0.08), rgba(0,224,184,0.06), rgba(255,255,255,0.01));
  padding: 28px 22px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(124,92,255,0.10);
  transition: transform .36s cubic-bezier(.2,.9,.2,1), box-shadow .36s;
  position: relative;
  overflow: hidden;
  transform-origin: center;
  animation: float 7s ease-in-out infinite;
  will-change: transform, box-shadow;
}
.card h3 { margin: 0 0 10px; font-size: 1.2rem; letter-spacing: 0.1px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 24px 60px rgba(2,6,23,0.8); }
.card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg,rgba(124,92,255,0.08),rgba(0,224,184,0.06)); opacity: 0.7; z-index: 0; transition: opacity .4s; }
.card:hover::before { opacity: 1; }
@keyframes float {
  0% { transform: translateY(0); }
  30% { transform: translateY(-8px) scale(1.01); }
  50% { transform: translateY(-12px) scale(1.02); }
  70% { transform: translateY(-8px) scale(1.01); }
  100% { transform: translateY(0); }
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98) rotateX(8deg);
  filter: blur(2px);
  transition: opacity .9s cubic-bezier(.2,.9,.2,1), transform .8s cubic-bezier(.2,.9,.2,1), filter .7s;
  will-change: opacity, transform, filter;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(0);
  filter: blur(0);
}

/* Section Styles */
.features { padding: 38px 0; }
.section-title { font-size: 22px; margin-bottom: 18px; }
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.feature {
  background: var(--panel);
  padding: 28px 20px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(28,145,255,0.08);
  transition: transform .32s, box-shadow .32s;
  position: relative;
  overflow: hidden;
}
.feature .icon { font-size: 2.1rem; filter: drop-shadow(0 2px 8px var(--accent-2)); }
.feature h3 { margin: 10px 0 8px; font-size: 1.1rem; }
.feature p { color: var(--muted); font-size: 15px; }
.feature:hover { transform: translateY(-10px) scale(1.04) rotateX(2deg); box-shadow: 0 24px 60px rgba(0,224,184,0.18); z-index: 2; }

.about { padding: 48px 0; }
.about-inner { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: center; }
.mock-device { width: 340px; height: 230px; border-radius: 18px; background: linear-gradient(135deg,rgba(255,255,255,0.05),transparent); box-shadow: inset 0 0 40px rgba(0,0,0,0.5),0 24px 60px rgba(2,6,23,0.7); position: relative; overflow: hidden; }
.mock-device .screen { height: 100%; border-radius: 14px; background: linear-gradient(180deg,#05203a, #07223f); position: relative; }
.mock-device .advanced-visual::after { content: ''; position: absolute; inset: 0; border-radius: 14px; background: repeating-linear-gradient(135deg,rgba(124,92,255,0.08) 0 2px,transparent 2px 8px),radial-gradient(ellipse at 60% 40%,rgba(0,224,184,0.10) 0%,transparent 70%); opacity: 0.7; pointer-events: none; animation: screen-anim 8s linear infinite; }
@keyframes screen-anim { 0% { opacity: 0.7; } 50% { opacity: 1; } 100% { opacity: 0.7; } }

.team { padding: 48px 0; }
.team-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.member {
  background: var(--panel);
  padding: 22px 12px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(124,92,255,0.08);
  transition: transform .32s, box-shadow .32s;
}
.member h4 { margin: 12px 0 8px; font-size: 1.1rem; }
.member p { color: var(--muted); margin: 0; font-size: 15px; }
.member:hover { transform: translateY(-10px) scale(1.04) rotateX(2deg); box-shadow: 0 24px 60px rgba(124,92,255,0.18); z-index: 2; }
.member .avatar { margin-bottom: 8px; width: 100%; height: 140px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 28px; color: #061427; background: linear-gradient(135deg,var(--accent-1),var(--accent-2)); box-shadow: 0 12px 30px rgba(0,0,0,0.45); transition: transform .4s, box-shadow .4s; }
.member:hover .avatar { transform: translateY(-6px) rotate(-3deg); box-shadow: 0 22px 50px rgba(0,0,0,0.6); }

.contact { padding: 48px 0; }
.contact-form {
  background: linear-gradient(120deg, rgba(124,92,255,0.06), rgba(0,224,184,0.04), rgba(255,255,255,0.01));
  padding: 28px 18px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(28,145,255,0.08);
}
.contact-form .row { display: flex; gap: 16px; }
.contact-form input, .contact-form textarea {
  flex: 1;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.01);
  color: inherit;
  font-size: 1rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent-1); background: rgba(124,92,255,0.04); }

.site-footer { border-top: 1px solid rgba(255,255,255,0.03); padding: 22px 0; margin-top: 40px; background: var(--glass); backdrop-filter: blur(6px); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.foot-links a { color: var(--muted); margin-left: 16px; transition: color .2s; }
.foot-links a:hover { color: var(--accent-1); }

/* Responsive Design */
@media (max-width: 1100px) {
  .container { padding: 0 10px; }
  .hero-inner { padding: 32px 8px; }
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .features-grid { grid-template-columns: 1fr; gap: 18px; }
  .team-grid { grid-template-columns: 1fr; gap: 18px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .mock-device { width: 100%; max-width: 340px; }
}
@media (max-width: 600px) {
  .hero { padding: 40px 0; }
  .hero-inner { padding: 18px 2px; }
  .headline { font-size: 1.3rem; }
  .typed { font-size: 1.5rem; }
  .mock-device { height: 140px; }
}

/* Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .typed:after { display: none; }
  .reveal, .reveal.visible { filter: none !important; transform: none !important; }
}
