/* EigenSoft Website Styles - Modernized "Cool" Theme */

/* CSS Variables (Design Tokens) */
:root {
  --bg: #0b0b0b;             /* Deep black base */
  --bg-elev: #111319;        /* Elevated black */
  --text: #ffffff;           /* Crisp white */
  --muted: #b9bdc7;          /* Muted gray */
  --brand: #D4AF37;          /* Primary gold */
  --brand-2: #B88A2E;        /* Hover gold */
  --accent: #D4AF37;         /* Gold accent */
  --ring: #D4AF37;           /* Gold focus ring */
  --card: rgba(255,255,255,0.04);
  --glass: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.14);
  --shadow: 0 10px 30px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.35);
  --radius: 14px;
  --easing: cubic-bezier(.2,.8,.2,1);
  --blur: 12px;
}

/* Global Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: radial-gradient(1200px 800px at 10% -10%, rgba(17,19,25,0.3), transparent 60%),
              radial-gradient(1000px 700px at 100% 0%, rgba(212,175,55,0.08), transparent 60%),
              conic-gradient(from 220deg at 50% 50%, rgba(212,175,55,0.05), transparent 55%, rgba(212,175,55,0.03)),
              var(--bg);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin-bottom: 1rem;
  color: #fff;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
p { color: var(--muted); }

/* Layout */
.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

section { padding: 5rem 0; }

.section {
  position: relative;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.9rem 1.4rem;
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: .02em;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid transparent;
  transition: transform .2s var(--easing), box-shadow .2s var(--easing), background-position .35s var(--easing), filter .2s var(--easing);
  /* Gold gradient background */
  background-image: linear-gradient(45deg, var(--brand) 0%, var(--brand-2) 100%);
  background-size: 150% 150%;
  background-position: 10% 50%;
  box-shadow: 0 8px 24px rgba(212,175,55,.25);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-1px);
  background-position: 90% 50%;
  filter: saturate(1.05);
  /* Light gold sheen */
  background-image: linear-gradient(45deg, var(--brand) 0%, var(--brand-2) 50%, var(--brand) 100%);
}
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}
.btn.ghost:hover {
  border-color: var(--ring);
  background: rgba(212,175,55,0.05);
  box-shadow: 0 0 0 4px rgba(212,175,55,.15) inset;
}

/* Focus ring for accessibility */
:where(a, button, .btn, input, textarea):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Ensure reduced motion is respected */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn:hover { transform: none; background-position: 10% 50%; }
  .card:hover, .product-item:hover { transform: none; }
  .navbar .nav-links a[aria-current="page"] { border-bottom: none; }
}

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(var(--blur));
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
  transition: all .3s var(--easing);
}
.navbar .container {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 0;
}
.navbar .logo { height: 44px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.navbar .nav-links { display: flex; list-style: none; gap: 1.25rem; }
.navbar .nav-links a {
  text-decoration: none; color: var(--text); font-weight: 600;
  transition: color .2s var(--easing), opacity .2s var(--easing), border-bottom .2s var(--easing);
  opacity: .9;
  position: relative;
}
.navbar .nav-links a:hover { color: #fff; opacity: 1; }
.navbar .nav-links a[aria-current="page"] {
  color: #fff;
  border-bottom: 2px solid var(--ring);
}

/* Navbar compressed state */
.navbar.is-scrolled {
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-bottom: 1px solid rgba(212,175,55,0.2);
  padding-block: 0.15rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.navbar.is-scrolled .logo { height: 38px; transition: height .25s var(--easing); }

/* Hero */
.hero {
  position: relative;
  padding: 8rem 0 5rem;
  text-align: center;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute; inset: -20% -10% -10% -10%;
  background:
    radial-gradient(800px 500px at 20% 10%, rgba(17,19,25,0.2), transparent 60%),
    radial-gradient(900px 600px at 80% 0%, rgba(212,175,55,0.08), transparent 60%),
    conic-gradient(from 220deg at 50% 50%, rgba(212,175,55,0.05), transparent 55%, rgba(212,175,55,0.03));
  filter: blur(40px);
  z-index: -1;
  animation: heroGlow 12s linear infinite;
}
@keyframes heroGlow {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}
.hero h1 { margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; max-width: 760px; margin: 0.5rem auto 0; }
.hero .cta { margin-top: 2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Cards and grids */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  transition: transform .2s var(--easing), box-shadow .2s var(--easing), border-color .2s var(--easing);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  border-color: rgba(212,175,55,0.3);
}
.card .title { font-weight: 700; margin-bottom: .35rem; color: #fff; }
.card .muted { color: var(--muted); font-size: .95rem; }

/* Product detail page upgrades */
.product-detail {
  padding: 4rem 0;
  background: linear-gradient(180deg, rgba(124,58,237,.06), transparent 35%), var(--bg);
}
.product-detail .container {
  display: grid;
  gap: 2rem;
}
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.25rem);
  width: 100%;
}
.product-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform .2s var(--easing), box-shadow .2s var(--easing), border-color .2s var(--easing);
  /* Equal-height cards with CTA aligned at bottom */
  display: flex;
  flex-direction: column;
}
.product-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  border-color: rgba(212,175,55,0.3);
}
.product-item img {
  max-height: 48px; margin-bottom: 1rem; filter: drop-shadow(0 3px 8px rgba(0,0,0,.4));
  align-self: center;
}
.product-item h3 { font-size: 1.25rem; margin-bottom: .5rem; text-align: center; }
.product-item p { margin-bottom: 1rem; }
.product-item ul { margin-bottom: 1rem; }
.product-item .btn { margin-top: auto; align-self: center; }

/* Careers */
.careers { text-align: center; background: var(--bg-elev); }
.careers h2 { margin-bottom: .5rem; }
.values-marquee {
  display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem;
}
.pill {
  border: 1px solid var(--border); color: #fff; padding: .5rem .75rem; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  font-weight: 600; font-size: .9rem;
}
.job-listings {
  margin-top: 2rem;
  text-align: left;
  max-width: 900px;
  margin-left: auto; margin-right: auto;
  display: grid; gap: 1rem;
}
.job-listing {
  background: var(--card);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.job-listing h3 { color: #fff; margin-bottom: .35rem; }
.job-listing .btn { margin-top: 1rem; }

/* Contact */
.contact { text-align: center; background: var(--bg-elev); }
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-form {
  max-width: 640px; margin: 0 auto; text-align: left; padding: 1.25rem;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; margin-bottom: 0.35rem; font-weight: 700; color: #fff;
}
.form-group input, .form-group textarea {
  width: 100%; padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: rgba(255,255,255,0.04);
  color: #fff;
  transition: border-color .2s var(--easing), box-shadow .2s var(--easing);
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 4px rgba(212,175,55,.15);
}
.form-group textarea { height: 150px; }
.form-success { margin-top: .75rem; color: #22d3ee; font-weight: 600; display: none; }

/* Footer */
.footer {
  background: var(--bg);
  color: white;
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid rgba(212,175,55,0.2);
}
.footer .container {
  display: flex; flex-direction: column; align-items: center;
}
.footer-links {
  display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.footer-links a {
  color: white; text-decoration: none; transition: color .2s var(--easing);
}
.footer-links a:hover { color: var(--brand); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--easing), transform .6s var(--easing); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .navbar .container { flex-direction: column; gap: .5rem; padding: .6rem 0; }
  .navbar .nav-links { margin-top: .25rem; }
  .hero { padding: 6rem 0 3.5rem; }
  .hero h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
}