/* ============================================
   OPUS LABS — Dark Techy Theme
   ============================================ */

:root {
  /* Colors */
  --bg-primary: #07070a;
  --bg-secondary: #0d0d12;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #5c5c70;
  
  --accent: #3b7cf5;
  --accent-hover: #5a94ff;
  --accent-glow: rgba(59, 124, 245, 0.4);
  
  --border: #1e1e2a;
  --border-hover: #2a2a3a;
  
  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Sizing */
  --max-width: 900px;
  --header-height: 72px;
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 1000;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ============================================
   Header
   ============================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  background: rgba(7, 7, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  transition: opacity 0.2s ease;
}

.logo:hover {
  color: var(--text-primary);
  opacity: 0.8;
}

nav {
  display: flex;
  gap: var(--space-md);
}

nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--text-primary);
}

/* ============================================
   Main Content
   ============================================ */

main {
  padding-top: var(--header-height);
}

section {
  padding: var(--space-2xl) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: visible;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-bottom: var(--space-2xl);
  overflow: visible;
}

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

.studio-label {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-family: var(--font-body);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: 650px;
}

.rotating-phrase {
  color: var(--accent);
  display: inline;
  transition: opacity 0.4s ease;
}

.rotating-phrase.fade-out {
  opacity: 0;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   Products Section
   ============================================ */

.products {
  padding-top: var(--space-xl);
}

.product-grid {
  display: grid;
  gap: var(--space-md);
}

.product-card {
  position: relative;
  padding: 2px;
  border-radius: 16px;
  background: var(--border);
  transition: all 0.4s ease;
  color: var(--text-primary);
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    #8b5cf6 25%,
    #ec4899 50%,
    #8b5cf6 75%,
    var(--accent) 100%
  );
  background-size: 300% 300%;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-card:hover::before {
  opacity: 1;
  animation: gradient-border 3s ease infinite;
}

@keyframes gradient-border {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.product-card-inner {
  background: var(--bg-card);
  border-radius: 14px;
  padding: var(--space-lg);
  transition: background 0.3s ease;
}

.product-card:hover .product-card-inner {
  background: var(--bg-elevated);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(59, 124, 245, 0.15);
}

.product-card:hover .arrow {
  transform: translateX(4px);
}

.product-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.product-logo-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.product-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.logo-glow {
  position: absolute;
  inset: -4px;
  background: var(--accent);
  border-radius: 16px;
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.product-card:hover .logo-glow {
  opacity: 0.4;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.05); }
}

.product-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-title h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
}

.product-status {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(59, 124, 245, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.product-tagline {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.product-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.product-link {
  font-size: 0.9rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.more-coming {
  margin-top: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* ============================================
   Contact Section
   ============================================ */

.contact {
  padding-bottom: var(--space-2xl);
}

.email {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 4px;
  transition: all 0.2s ease;
}

.email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.made-in {
  margin-top: var(--space-2xl);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================
   Footer
   ============================================ */

footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: var(--space-md);
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-nav a:hover {
  color: var(--text-primary);
}

/* ============================================
   Legal Pages (Privacy, Terms)
   ============================================ */

.legal-page {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
}

.legal-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.legal-content h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin-bottom: var(--space-sm);
}

.last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
}

.legal-content section {
  padding: 0;
  margin-bottom: var(--space-xl);
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.legal-content ul {
  color: var(--text-secondary);
  margin-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

.legal-content li {
  margin-bottom: var(--space-xs);
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
  :root {
    --space-lg: 1.5rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }
  
  header {
    padding: 0 var(--space-sm);
  }
  
  .logo {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
  }
  
  nav a {
    font-size: 0.85rem;
  }
  
  .product-card {
    flex-direction: column;
    padding: var(--space-md);
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: fadeIn 0.8s ease-out;
}

.product-card {
  animation: fadeIn 0.6s ease-out;
  animation-fill-mode: both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
