/* ============================================
   Blindfault AI — Bedrock aesthetic
   ============================================ */

:root {
  --bg: #0A0A0A;
  --bg-light: #111111;
  --text: #E0E0E0;
  --text-muted: #777777;
  --accent: #CC4400;
  --accent-glow: #FF5500;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Static background handled by background.js canvas */

/* Canvas overlay for fracture effect */
#fractures {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

/* Layout */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 8rem 0;
  position: relative;
  z-index: 1;
}

footer {
  position: relative;
  z-index: 1;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.brand {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text);
}

.divider {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 2rem 0;
  box-shadow: 0 0 8px var(--accent);
}

.tagline {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2rem;
}

.hero-sub p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

/* Sections */
.lead {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.accent {
  color: var(--text);
  font-weight: 500;
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
  margin: 2rem 0;
}

/* Section separators — more defined */
.problem,
.different,
.findings,
.deliverable {
  border-top: 1px solid #1a1a1a;
  position: relative;
  overflow: hidden;
}

.problem::before,
.different::before,
.findings::before,
.deliverable::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* Embossed neural network patterns between sections */
.problem::after,
.different::after,
.findings::after,
.deliverable::after {
  content: '';
  position: absolute;
  top: 0;
  right: -5%;
  width: 45%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Ccircle cx='50' cy='50' r='3' fill='%23888'/%3E%3Ccircle cx='150' cy='80' r='2.5' fill='%23888'/%3E%3Ccircle cx='250' cy='40' r='3' fill='%23888'/%3E%3Ccircle cx='350' cy='90' r='2' fill='%23888'/%3E%3Ccircle cx='100' cy='180' r='3' fill='%23888'/%3E%3Ccircle cx='200' cy='150' r='2.5' fill='%23888'/%3E%3Ccircle cx='300' cy='200' r='3' fill='%23888'/%3E%3Ccircle cx='80' cy='300' r='2' fill='%23888'/%3E%3Ccircle cx='180' cy='280' r='3' fill='%23888'/%3E%3Ccircle cx='320' cy='320' r='2.5' fill='%23888'/%3E%3Ccircle cx='220' cy='360' r='2' fill='%23888'/%3E%3Ccircle cx='370' cy='250' r='3' fill='%23888'/%3E%3Cline x1='50' y1='50' x2='150' y2='80' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='150' y1='80' x2='250' y2='40' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='250' y1='40' x2='350' y2='90' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='50' y1='50' x2='100' y2='180' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='150' y1='80' x2='200' y2='150' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='250' y1='40' x2='300' y2='200' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='100' y1='180' x2='200' y2='150' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='200' y1='150' x2='300' y2='200' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='300' y1='200' x2='370' y2='250' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='100' y1='180' x2='80' y2='300' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='200' y1='150' x2='180' y2='280' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='300' y1='200' x2='320' y2='320' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='80' y1='300' x2='180' y2='280' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='180' y1='280' x2='320' y2='320' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='320' y1='320' x2='370' y2='250' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='180' y1='280' x2='220' y2='360' stroke='%23888' stroke-width='0.5'/%3E%3Cline x1='350' y1='90' x2='370' y2='250' stroke='%23888' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  background-repeat: repeat;
}

/* Vary pattern position per section */
.different::after {
  right: auto;
  left: -5%;
}

.deliverable::after {
  right: auto;
  left: -10%;
  opacity: 0.06;
}

.problem .lead {
  color: var(--text);
}

.findings h2 {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.card {
  padding: 1.5rem;
  border-left: 2px solid transparent;
  transition: border-color 0.4s ease, transform 0.3s ease;
}

.card:hover {
  border-left-color: var(--accent);
  transform: translateX(4px);
}

.card h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
  transition: color 0.3s ease;
}

.card:hover p {
  color: var(--text);
}

/* Deliverable */
.deliverable {
  border-top: 1px solid #1a1a1a;
}

.deliverable h2 {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.deliverable .lead {
  color: var(--text);
}

.deliverable-list {
  margin-top: 2rem;
}

.item {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-start;
  padding: 1rem 0;
  transition: transform 0.3s ease;
}

.item:hover {
  transform: translateX(6px);
}

.arrow {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
  transition: transform 0.3s ease;
}

.item:hover .arrow {
  transform: translateX(4px);
}

.item strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.3rem;
}

.item p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Contact */
.contact {
  border-top: 1px solid #1a1a1a;
  text-align: center;
  padding: 10rem 0;
}

.contact .lead {
  color: var(--text);
}

.contact p {
  color: var(--text-muted);
}

.cta {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.8rem 2rem;
  border: 1px solid var(--accent);
  transition: all 0.3s ease;
}

.cta:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(204, 68, 0, 0.3);
}

/* Footer */
footer {
  padding: 3rem 0;
  border-top: 1px solid #1a1a1a;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-small {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.location {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
  section {
    padding: 5rem 0;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero {
    min-height: 80vh;
  }

  footer .container {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Fade-in on scroll — staggered children */
.problem,
.different,
.findings,
.deliverable,
.contact {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.problem.visible,
.different.visible,
.findings.visible,
.deliverable.visible,
.contact.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside sections */
.visible .lead,
.visible .accent,
.visible h2,
.visible .grid,
.visible .deliverable-list,
.visible .cta {
  animation: slideUp 0.6s ease forwards;
  opacity: 0;
}

.visible .lead { animation-delay: 0.1s; }
.visible h2 { animation-delay: 0.15s; }
.visible .accent { animation-delay: 0.3s; }
.visible .grid { animation-delay: 0.3s; }
.visible .deliverable-list { animation-delay: 0.25s; }
.visible .cta { animation-delay: 0.4s; }

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