/* CSS Variables & Design Output */
:root {
  /* Colors */
  --clr-bg: #0a0f16;
  --clr-bg-light: #121b27;
  --clr-text: #f0f4f8;
  --clr-text-muted: #9baac6;
  --clr-primary: #6366f1; /* Indigo */
  --clr-primary-hover: #4f46e5;
  --clr-secondary: #0ea5e9; /* Sky */
  --clr-accent: #f43f5e; /* Rose */
  --clr-glass: rgba(255, 255, 255, 0.05);
  --clr-glass-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing & Sizes */
  --max-width: 1200px;
  --nav-height: 80px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Typographic Utility */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.text-gradient {
  background: linear-gradient(135deg, var(--clr-secondary), var(--clr-primary), var(--clr-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism */
.glass-card {
  background: var(--clr-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--clr-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: var(--font-body);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-hover));
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--clr-glass-border);
  color: var(--clr-text);
}

.btn-secondary:hover {
  background: var(--clr-glass);
  border-color: var(--clr-text-muted);
}

.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 15, 22, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-glass-border);
  transition: all 0.3s ease;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--clr-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--clr-primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--clr-text);
  border-radius: 3px;
  transition: all 0.3s;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.shape-1 {
  background: var(--clr-primary);
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation: float 10s ease-in-out infinite;
}

.shape-2 {
  background: var(--clr-secondary);
  width: 300px;
  height: 300px;
  bottom: 10%;
  left: -100px;
  animation: float 12s ease-in-out infinite reverse;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-image-wrapper {
  position: relative;
}

.image-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  transform: rotate(2deg);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-img {
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Sections */
.section {
  padding: 6rem 0;
}

.bg-light {
  background-color: var(--clr-bg-light);
  border-top: 1px solid var(--clr-glass-border);
  border-bottom: 1px solid var(--clr-glass-border);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-inline: auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--clr-text-muted);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.08);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
}

/* Blueprint Generator */
.blueprint-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.blueprint-form-card {
  padding: 2.5rem;
}

.blueprint-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.blueprint-form label {
  font-weight: 500;
  color: var(--clr-text);
  font-size: 0.95rem;
}

.blueprint-form input {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-glass-border);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.blueprint-form input:focus {
  outline: none;
  border-color: var(--clr-primary);
  background: rgba(255, 255, 255, 0.08);
}

.w-100 {
  width: 100%;
}

.mt-2 { margin-top: 1rem; }

.blueprint-result {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 350px;
}

.result-placeholder .placeholder-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.result-placeholder p {
  color: var(--clr-text-muted);
}

.hidden {
  display: none !important;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--clr-glass-border);
  border-top-color: var(--clr-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.generated-data {
  animation: fadeIn 0.8s ease;
}

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

.blueprint-image-wrapper {
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--clr-glass-border);
}

.generated-img {
  width: 100%;
  border-radius: var(--radius-md);
}

.blueprint-tips {
  list-style: none;
  text-align: left;
  background: rgba(0,0,0,0.2);
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.blueprint-tips li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--clr-text);
}

.dimension-overlay {
  position: absolute;
  background: rgba(99, 102, 241, 0.9);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  z-index: 10;
  backdrop-filter: blur(4px);
}

.top-dim {
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
}

.side-dim {
  top: 50%;
  left: -25px;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
}

.sqft-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(10, 15, 22, 0.95);
  border: 1px solid var(--clr-accent);
  color: var(--clr-text);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Split Content */
.split-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.split-text p {
  color: var(--clr-text-muted);
  margin-bottom: 2rem;
}

.initiative-list {
  list-style: none;
}

.initiative-list li {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  position: relative;
}

.initiative-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--clr-secondary);
  font-weight: bold;
}

.initiative-list strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.initiative-list span {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
}

.round-img {
  border-radius: var(--radius-md);
}

.mt-4 { margin-top: 2rem; }

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--clr-glass-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--clr-text-muted);
  margin-top: 1rem;
  max-width: 300px;
}

.footer-links h3 {
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--clr-text-muted);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--clr-primary);
}

.footer-bottom {
  text-align: center;
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--clr-glass-border);
  padding-top: 2rem;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in-right { opacity: 0; transform: translateX(40px); transition: opacity 0.8s ease, transform 0.8s ease; }

.visible {
  opacity: 1;
  transform: translate(0);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-container, .split-content, .blueprint-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .split-image {
    order: -1;
  }
  
  .initiative-list li {
    text-align: left;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: rgba(10, 15, 22, 0.98);
    flex-direction: column;
    padding: 2rem 0;
    display: flex;
    transform: translateY(-200%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: -1;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* Modal Styling */
.modal {
  display: none; 
  position: fixed; 
  z-index: 2000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.6); 
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal-content {
  margin: 5% auto; 
  padding: 2.5rem;
  width: 90%;
  max-width: 800px;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close-modal {
  color: var(--clr-text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: var(--clr-accent);
}

.modal-title {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--clr-primary);
}

.modal-body {
  color: var(--clr-text);
  font-size: 1rem;
  line-height: 1.6;
}

.modal-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--clr-secondary);
}

.modal-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.modal-body li {
  margin-bottom: 1rem;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.audit-table th, .audit-table td {
  border: 1px solid var(--clr-glass-border);
  padding: 0.8rem;
  text-align: left;
}

.audit-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--clr-primary);
}

.clickable-card {
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
  position: relative;
}

.clickable-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.clickable-card:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.clickable-card:hover::after {
  border-color: var(--clr-primary);
}
