/* ============================================
   Raphael Services V3 - FULL CINEMATIC
   Homepage Master Skill - All Templates
   ============================================ */

:root {
  --color-bg: #0A0A0A;
  --color-bg-elevated: #111111;
  --color-bg-panel: #0D0D0D;
  --color-text: #F5F5F5;
  --color-text-muted: rgba(245, 245, 245, 0.6);
  --color-text-dim: rgba(245, 245, 245, 0.3);
  --color-accent: #E53935;
  --color-accent-muted: rgba(229, 57, 53, 0.1);
  --color-accent-glow: rgba(229, 57, 53, 0.4);
  --color-border: rgba(245, 245, 245, 0.08);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: auto;
}

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

/* Custom Cursor */
.cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-text-dim);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (pointer: coarse) {
  .cursor, .cursor-follower {
    display: none;
  }
  body {
    cursor: auto;
  }
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 5vw;
  border-bottom: 1px solid var(--color-border);
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px);
  transform: translateY(-100%);
  opacity: 0;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

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

.nav-cta {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}

.nav-cta:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-muted);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25vh 5vw 10vh;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-accent);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 3rem;
  opacity: 0;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  margin-bottom: 2rem;
}

.scramble-line {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  min-height: 1.2em;
}

.scramble-line:last-child {
  color: var(--color-accent);
}

.hero-desc {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto 3rem;
  line-height: 1.7;
  opacity: 0;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  box-shadow: 0 0 50px var(--color-accent-glow);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  border-color: var(--color-text);
}

.hero-visual {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0.3;
}

.gradient-orb {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(100px);
}

/* Stats Bar */
.stats-bar {
  padding: 5vh 5vw;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  gap: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Pinned Panels */
.pinned-sections {
  position: relative;
}

.panel {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  will-change: transform;
}

#panel-1 { background: var(--color-bg); z-index: 1; }
#panel-2 { background: var(--color-bg-panel); z-index: 2; }
#panel-3 { background: var(--color-bg-elevated); z-index: 3; }
#panel-4 { background: var(--color-bg); z-index: 4; }

.panel-inner {
  max-width: 900px;
  padding: 0 5vw;
  text-align: center;
}

.panel-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-accent);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 2rem;
}

.panel h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.panel p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Work Section - Horizontal Scroll */
.work-section {
  padding: 15vh 0;
  overflow: hidden;
}

.work-header {
  padding: 0 5vw 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--color-accent);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.work-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
}

.horizontal-container {
  position: relative;
}

.horizontal-track {
  display: flex;
  width: max-content;
  gap: 2rem;
  padding: 0 5vw;
}

/* PROJECT CARDS - FIXED CENTERING */
.project-card {
  width: 80vw;
  max-width: 700px;
  height: 80vh;
  flex-shrink: 0;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}

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

.project-visual {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(135deg, var(--color-accent-muted), transparent);
}

.project-content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  padding: 2rem;
  text-align: center;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-card p {
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 90%;
  margin: 0 auto;
}

/* Stack Section */
.stack-section {
  padding: 15vh 5vw;
  border-top: 1px solid var(--color-border);
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

.stack-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.stack-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.stack-column ul {
  list-style: none;
}

.stack-column li {
  padding: 0.75rem 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--color-border);
}

.stack-column li:last-child {
  border-bottom: none;
}

/* About Section */
.about-section {
  padding: 15vh 5vw;
  background: var(--color-bg-panel);
}

.about-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 2rem;
}

.about-content p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* Contact Section */
.contact-section {
  padding: 20vh 5vw;
  text-align: center;
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.contact-content p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--color-accent);
  display: block;
}

.contact-btn {
  display: inline-block !important;
  margin-top: 1.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  opacity: 1 !important;
  visibility: visible !important;
}

.contact-btn:hover {
  box-shadow: 0 0 50px var(--color-accent-glow);
}

.contact-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.contact-links {
  margin-top: 3rem;
}

.contact-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-links a:hover {
  color: var(--color-text);
}

/* Footer */
.footer {
  padding: 5vh 5vw;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  color: var(--color-text-dim);
}

/* Mobile */
@media (max-width: 1024px) {
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .project-card {
    width: 85vw;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .scramble-line {
    font-size: clamp(2rem, 10vw, 3rem);
  }
  
  .stats-inner {
    flex-direction: column;
    gap: 2rem;
  }
  
  .panel h2 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
  
  .project-card {
    width: 90vw;
    height: auto;
    min-height: 70vh;
  }
  
  .project-content {
    position: relative;
    top: auto;
    transform: none;
    padding: 3rem 2rem;
  }
  
  .horizontal-track {
    flex-direction: column;
    width: 100%;
    gap: 2rem;
  }
  
  .stack-grid {
    grid-template-columns: 1fr;
  }
  
  .cursor, .cursor-follower {
    display: none;
  }
}
