/* ════════════════════════════════════════════════
   Infinite Roofing Solutions — Dev Environment
   Premium Command Surface
   ════════════════════════════════════════════════ */

/* ── Reset & Tokens ────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1A3A5C;
  --navy-deep:  #0C1E33;
  --navy-black: #070F1A;
  --green:      #4A9B4A;
  --green-dim:  rgba(74,155,74,0.35);
  --gold:       #F5A623;
  --gold-dim:   rgba(245,166,35,0.30);

  --text-primary: #E8ECF1;
  --text-secondary: #8B99AE;
  --text-dim:   #5A6A80;
  --border:     rgba(255,255,255,0.06);
  --border-card: rgba(255,255,255,0.08);

  --surface:    rgba(255,255,255,0.025);
  --surface-hover: rgba(255,255,255,0.05);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
}

/* ── Base ────────────────────────────────────── */
html {
  background: var(--navy-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(26,58,92,0.40) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(74,155,74,0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 10% 90%, rgba(245,166,35,0.03) 0%, transparent 35%),
    var(--navy-black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ── Ambient Grain ──────────────────────────── */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── Cinematic Entrance ─────────────────────── */
.cin-fade {
  opacity: 0;
  transform: translateY(14px);
  animation: cinIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.cin-d1 { animation-delay: 0.15s; }
.cin-d2 { animation-delay: 0.30s; }
.cin-d3 { animation-delay: 0.48s; }
.cin-d4 { animation-delay: 0.64s; }

@keyframes cinIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.06s; }
.reveal-d2 { transition-delay: 0.18s; }

/* ══════════════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════════════ */
.top-bar {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.top-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.top-logo:hover { opacity: 1; }

.env-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
}

.env-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-dim);
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--green-dim); }
  50% { opacity: 0.6; box-shadow: 0 0 14px var(--green-dim); }
}

/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(80px, 12vw, 140px) 32px clamp(60px, 8vw, 100px);
  text-align: center;
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-dim);
}

.eyebrow-line {
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--text-dim), transparent);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 12px;
}

.hero-detail {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0;
}

/* ══════════════════════════════════════════════
   PROJECTS SECTION
   ══════════════════════════════════════════════ */
.projects-section {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 0 32px 80px;
}

.projects-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* Section Label */
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-label h2 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  white-space: nowrap;
}

.section-label-line {
  width: 20px;
  height: 2px;
  background: var(--green);
  border-radius: 1px;
  flex-shrink: 0;
}

.section-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: dotPulse 2.5s ease-in-out infinite;
}

/* ── Project Grid ──────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ── Project Card ──────────────────────────── */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  cursor: pointer;
}

.project-card:hover {
  background: var(--surface-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.25),
    0 4px 16px rgba(0,0,0,0.15);
}

/* Ambient glow on hover */
.card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.card-glow-green { background: var(--green); }
.card-glow-gold  { background: var(--gold); }
.project-card:hover .card-glow { opacity: 0.08; }

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 5px 12px;
  border-radius: 100px;
}

.badge-live {
  background: rgba(74,155,74,0.12);
  color: var(--green);
  border: 1px solid rgba(74,155,74,0.20);
}

.badge-variant {
  background: rgba(245,166,35,0.10);
  color: var(--gold);
  border: 1px solid rgba(245,166,35,0.18);
}

.badge-migration {
  background: rgba(100,149,237,0.12);
  color: #6495ED;
  border: 1px solid rgba(100,149,237,0.22);
}

.card-version {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  letter-spacing: 0.02em;
}

/* Card Body */
.card-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.card-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 0;
  flex: 1;
}

/* Card Footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.card-path {
  font-size: 12px;
  color: var(--text-dim);
}

.card-path code {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-card);
  color: var(--text-dim);
  transition: all 0.35s ease;
}
.project-card:hover .card-arrow {
  background: var(--navy);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-primary);
  transform: translateX(3px);
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 24px 32px;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  height: 20px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.35;
}

.footer-divider {
  color: var(--text-dim);
  opacity: 0.3;
  font-size: 18px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

.footer-meta {
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.5;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
  .top-bar-inner { padding: 14px 20px; }
  .top-logo { height: 26px; }
  .env-badge { font-size: 10px; padding: 5px 10px; }

  .hero { padding: clamp(60px, 10vw, 100px) 20px clamp(40px, 6vw, 60px); }
  .hero h1 { font-size: clamp(28px, 5vw, 40px); }

  .projects-section { padding: 0 20px 60px; }
  .project-grid { grid-template-columns: 1fr; gap: 20px; }

  .card-title { font-size: 20px; }

  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
  .footer-brand { flex-wrap: wrap; justify-content: center; }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero-eyebrow { gap: 10px; font-size: 10px; letter-spacing: 2px; }
  .eyebrow-line { width: 20px; }
  .hero h1 { font-size: 26px; }
  .hero-sub { font-size: 15px; }
  .project-card { padding: 24px 20px; }
  .section-label { flex-wrap: wrap; gap: 10px; }
  .section-status { margin-left: 0; }
  .top-bar-inner { padding: 12px 16px; }
}
