/* ===== PHIQ.IO Elegant Design System 2025 ===== */

:root {
  /* Elegant Minimal Palette */
  --phi-gold: #C7A850;
  --phi-gold-light: #D4B84A;
  --phi-gold-dark: #A98A30;
  --text-primary: #222222;
  --text-secondary: #666666;
  --text-muted: #999999;
  --background-primary: #F8F6F2;
  --background-secondary: #FFFFFF;
  --border-light: #E7E6E5;
  --border-subtle: #CCCCCC;
  
  /* Elegant Typography */
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Typography sizes */
  --fs-900: clamp(3rem, 6vw + 1rem, 5rem);
  --fs-700: 2.25rem;
  --fs-600: 1.5rem;
  --fs-500: 1.25rem;
  --fs-400: 1rem;
  --fs-300: .875rem;
  --fs-200: .75rem;

  /* Spacing scale ϕ-modular */
  --space-1: .5rem;
  --space-2: calc(var(--space-1)*1.6);
  --space-3: calc(var(--space-2)*1.6);
  --space-4: calc(var(--space-3)*1.6);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background-primary);
    overflow-x: hidden;
  min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: normal;
  line-height: 1.2;
  margin-block: 0 0.8em;
  color: var(--text-primary);
}

h1 { 
  font-size: var(--fs-900); 
  font-weight: 300;
}
h2 { 
  font-size: var(--fs-700); 
  font-weight: 300;
}
h3 { 
  font-size: var(--fs-600); 
  font-weight: normal;
}
h4 { font-size: var(--fs-500); }

p {
  margin-bottom: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Elegant Golden Accent */
.gradient {
  color: var(--phi-gold);
  font-weight: normal;
}

/* ===== LAYOUT ===== */
.container {
  width: min(1200px, 90%);
  margin-inline: auto;
  padding: 0 var(--space-2);
}

section {
  padding: var(--space-4) 0;
}

/* ===== HEADER & NAVIGATION ===== */
#header {
    position: fixed;
    top: 0;
  left: 0;
  right: 0;
  background: var(--background-primary);
  border-bottom: 1px solid var(--border-light);
    z-index: 1000;
  transition: all 0.3s ease;
}

#header.scrolled {
  background: var(--background-secondary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: normal;
  font-size: 1.25rem;
}

.logo svg {
  width: 48px;
  height: 48px;
  margin-right: 0.8rem;
  transition: all 0.3s ease;
}

.logo:hover svg {
  transform: scale(1.02);
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 2.2rem;
  color: var(--phi-gold);
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 400;
  transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover {
  color: var(--phi-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
  width: 0;
  height: 1px;
  background: var(--phi-gold);
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  border-radius: 3px;
  font-weight: 400;
  transition: all 0.2s ease;
  font-size: var(--fs-400);
  text-align: center;
}

.btn-primary {
  background: none;
  border: 1.5px solid var(--phi-gold);
  color: var(--phi-gold);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--phi-gold);
  color: var(--background-secondary);
}

.btn-outline {
  border: 1.5px solid var(--phi-gold);
  color: var(--phi-gold);
  background: transparent;
}

.btn-outline:hover {
  background: var(--phi-gold);
  color: var(--background-secondary);
}

.btn-large {
  padding: 1.2rem 2.5rem;
  font-size: var(--fs-500);
  background: none;
  border: 1.5px solid var(--phi-gold);
  color: var(--phi-gold);
  border-radius: 3px;
  text-decoration: none;
  display: inline-block;
  font-weight: 400;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.btn-large:hover {
  background: var(--phi-gold);
  color: var(--background-secondary);
}

.btn-submit {
  background: var(--phi-gold);
  color: var(--graphite-100);
  width: 100%;
  padding: 1rem;
  font-size: var(--fs-500);
}

/* ===== HERO SECTION ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
  background: var(--background-primary);
  position: relative;
  overflow: hidden;
  padding-top: 120px; /* Account for fixed header */
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="fibGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23CCCCCC" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23fibGrid)"/></svg>');
  opacity: 0.5;
}

#hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.badge {
    display: inline-block;
  background: rgba(199, 168, 80, 0.1);
  color: var(--phi-gold);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: var(--fs-300);
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(199, 168, 80, 0.2);
}

.hero-subtitle {
  font-size: var(--fs-500);
  margin-bottom: 2rem;
  color: rgba(248, 247, 243, 0.8);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat {
  text-align: center;
  padding: 1rem;
  background: rgba(43, 47, 51, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(199, 168, 80, 0.1);
}

.stat-value {
  font-size: var(--fs-600);
  font-weight: 700;
  color: var(--phi-gold);
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  font-size: var(--fs-300);
  color: rgba(248, 247, 243, 0.7);
  margin-top: 0.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-visual {
  position: relative;
  z-index: 2;
}

.fibonacci-animation {
  width: 400px;
  height: 400px;
  margin: 0 auto;
}

.fibonacci-animation svg {
  width: 100%;
  height: 100%;
}

.phi-pattern circle {
  animation: float 20s ease-in-out infinite;
}

.phi-pattern circle:nth-child(2) { animation-delay: -5s; }
.phi-pattern circle:nth-child(3) { animation-delay: -10s; }
.phi-pattern circle:nth-child(4) { animation-delay: -15s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ===== SECTIONS ===== */
.section-subtitle {
  text-align: center;
  color: rgba(248, 247, 243, 0.8);
  font-size: var(--fs-500);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* ===== TECHNOLOGY SECTION ===== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.tech-card {
  background: var(--graphite-90);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(199, 168, 80, 0.1);
  transition: all 0.3s ease;
  text-align: center;
}

.tech-card:hover {
  transform: translateY(-5px);
  border-color: var(--phi-gold);
  box-shadow: 0 10px 30px rgba(199, 168, 80, 0.1);
}

.tech-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.formula-display {
  background: var(--graphite-90);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(199, 168, 80, 0.2);
  margin: 2rem 0;
  text-align: center;
}

.formula-display code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--phi-gold);
  font-size: var(--fs-400);
}

/* ===== PERFORMANCE SECTION ===== */
.performance-comparison {
  background: var(--graphite-90);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(199, 168, 80, 0.1);
}

th {
    background: rgba(199, 168, 80, 0.1);
  color: var(--phi-gold);
  font-weight: 600;
}

.highlight {
  color: var(--phi-gold);
    font-weight: 600;
}

.improvement {
    color: #4CAF50;
  font-weight: 600;
}

.validation-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.badge-item {
    text-align: center;
  padding: 1rem;
  background: rgba(199, 168, 80, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(199, 168, 80, 0.2);
}

.badge-number {
    display: block;
  font-size: var(--fs-600);
    font-weight: 700;
  color: var(--phi-gold);
  font-family: 'JetBrains Mono', monospace;
}

.badge-text {
  font-size: var(--fs-300);
  color: rgba(248, 247, 243, 0.7);
}

/* ===== APPLICATIONS SECTION ===== */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  margin: 2rem 0;
}

.app-card {
  background: var(--graphite-90);
    padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(199, 168, 80, 0.1);
}

.app-card h3 {
  color: var(--phi-gold);
    margin-bottom: 1rem;
}

.app-card ul {
    list-style: none;
}

.app-card li {
    padding: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.app-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--phi-gold);
  font-weight: 600;
}

/* ===== PARTNERSHIP SECTION ===== */
.partnership-options {
    display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
  margin: 2rem 0;
}

.option-card {
  background: var(--graphite-90);
    padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(199, 168, 80, 0.1);
    text-align: center;
  transition: all 0.3s ease;
}

.option-card:hover {
  transform: translateY(-5px);
  border-color: var(--phi-gold);
}

.option-card h3 {
  color: var(--phi-gold);
    margin-bottom: 1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--phi-gold);
  border: 2px solid var(--phi-gold);
    margin-top: 1rem;
}

.btn-secondary:hover {
  background: var(--phi-gold);
  color: var(--graphite-100);
}

/* ===== CONTACT SECTION ===== */
.contact-subtitle {
    text-align: center;
  color: rgba(248, 247, 243, 0.8);
  font-size: var(--fs-500);
    margin-bottom: 3rem;
  line-height: 1.6;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

.contact-info h3 {
  color: var(--phi-gold);
    margin-bottom: 0.5rem;
}

.contact-links {
  margin: 1.5rem 0;
}

.contact-links a {
    display: block;
  color: var(--phi-gold);
    text-decoration: none;
  margin: 0.5rem 0;
  transition: color 0.3s ease;
}

.contact-links a:hover {
  color: #E6C95A;
}

.company-info {
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(199, 168, 80, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(199, 168, 80, 0.2);
}

.contact-form {
  display: flex;
  flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 1rem;
  border: 1px solid rgba(199, 168, 80, 0.2);
  border-radius: 8px;
  background: var(--graphite-90);
  color: var(--offwhite);
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--phi-gold);
}

.form-status {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  display: none;
}

.form-status.success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid #4CAF50;
  color: #4CAF50;
  display: block;
}

.form-status.error {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid #F44336;
  color: #F44336;
  display: block;
}

/* ===== FOOTER ===== */
footer {
  background: var(--graphite-90);
  border-top: 1px solid rgba(199, 168, 80, 0.1);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
  font-weight: 700;
  color: var(--phi-gold);
}

.footer-brand svg {
  width: 30px;
  height: 30px;
  margin-right: 0.5rem;
}

.footer-legal {
  text-align: right;
  font-size: var(--fs-300);
  color: rgba(248, 247, 243, 0.6);
}

.footer-legal a {
  color: var(--phi-gold);
    text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  #hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .hero-content {
    order: 1;
  }
  
  .hero-visual {
    order: 2;
  }
  
  .fibonacci-animation {
    width: 300px;
    height: 300px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-legal {
    text-align: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .performance-comparison {
    padding: 1rem;
  }
  
  table {
    font-size: var(--fs-300);
  }
  
  th, td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
  
  .tech-grid,
  .applications-grid,
  .partnership-options {
    grid-template-columns: 1fr;
  }
  
  .validation-badges {
    grid-template-columns: 1fr;
  }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
