/* Global layout, typography helpers, shared components */

/* ─── MOBILE / DESKTOP HELPERS ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
}
.mobile-only { display: none; }

.font-syne { font-family: var(--font-display); }
.font-instrument { font-family: var(--font-body); }
.font-geist { font-family: var(--font-mono); }

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

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-main {
  padding-top: 64px;
}

.container {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-headline {
  font-family: var(--font-display);
}

.hero-cta-primary {
  background: var(--fire);
  color: var(--bg-void);
  transition: background 200ms ease, box-shadow 200ms ease;
}
.hero-cta-primary:hover {
  background: var(--spark);
  box-shadow: 0 0 40px rgba(255, 49, 0, 0.4);
}

.hero-cta-secondary {
  border: 1px solid var(--border-active);
  color: var(--ink);
  transition: background 200ms ease, color 200ms ease;
}
.hero-cta-secondary:hover {
  background: var(--bg-surface);
}

.hamburger-svg { width: 32px; height: 32px; overflow: visible; }
.hamburger-path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: square;
  transition: stroke 0.4s;
}

.brutalist-input {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  padding: 16px;
  width: 100%;
}
.brutalist-input:focus {
  outline: none;
  border-color: var(--fire);
  box-shadow: 0 0 0 2px rgba(255,49,0,0.14);
}

.stat-number {
  font-family: var(--font-display);
  color: #fff;
}

@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}

.text-dim { color: var(--ink-dim); }
.text-fire { color: var(--fire); }
.text-wire { color: var(--wire); }
.text-spark { color: var(--spark); }
.bg-fire { background: var(--fire); }

.uppercase { text-transform: uppercase; }
.resize-none { resize: none; }
.pl-4 { padding-left: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* GPU acceleration for animated cards */
.service-card,
.process-card,
.project-card {
  will-change: transform;
}

/* Video container positioning context */
.video-container {
  position: relative;
}

/* ─── SELECTION COLOR ───────────────────────────────────────────────────── */
::selection { background: var(--fire); color: var(--bg-void); }
::-moz-selection { background: var(--fire); color: var(--bg-void); }

/* ─── CUSTOM SCROLLBAR ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--fire); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--spark); }

/* ─── FOCUS STYLES ──────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--fire); outline-offset: 4px; border-radius: var(--radius); }

/* ─── IMAGE LOAD TRANSITION ─────────────────────────────────────────────── */
.about-photo img {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.about-photo img.loaded { opacity: 1; }

/* ─── BLINKING CURSOR ───────────────────────────────────────────────────── */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.blink-cursor {
  animation: blink-cursor 0.6s step-end infinite;
  color: var(--fire);
}

/* ─── HERO SCAN LINE ────────────────────────────────────────────────────── */
@keyframes hero-scanline {
  0% { top: 0; }
  100% { top: 100%; }
}
.hero-scanline {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(255,49,0,0.08);
  z-index: 5;
  pointer-events: none;
  animation: hero-scanline 8s linear infinite;
}

/* ─── HEADLINE PULSE GLOW ───────────────────────────────────────────────── */
@keyframes headline-pulse {
  0%, 100% { text-shadow: 0 0 40px rgba(255,49,0,0); }
  50% { text-shadow: 0 0 40px rgba(255,49,0,0.15); }
}
.line-2 {
  animation: headline-pulse 3s ease-in-out infinite;
}

/* ─── LASER SWEEP ───────────────────────────────────────────────────────── */
.laser-sweep {
  position: fixed;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--fire);
  z-index: 99995;
  pointer-events: none;
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 1;
}

/* ─── SCREEN GLOW BEHIND BROWSER FRAMES ─────────────────────────────────── */
.browser-frame {
  position: relative;
}
.browser-frame::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 600px; height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 600px 300px, rgba(255,49,0,0.04) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* ─── SERVICES STATS ROW ────────────────────────────────────────────────── */
.services-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.services-stats .stat-item {
  text-align: center;
}
.services-stats .stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--ink);
}
.services-stats .stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* ─── PROCESS FINALE LINE ───────────────────────────────────────────────── */
.process-finale {
  text-align: center;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink-dim);
  margin-top: 2rem;
  padding: 0 1.5rem;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
}
.process-finale .weeks-spark {
  color: var(--spark);
}

/* ─── ABOUT FACT CHIPS ──────────────────────────────────────────────────── */
.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.about-chips .chip {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  border: 1px solid var(--border);
  padding: 6px 12px;
  text-transform: uppercase;
}

/* ─── ABOUT SKILLS LIST ─────────────────────────────────────────────────── */
.about-skills {
  margin-top: 2rem;
}
.about-skills .skill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
}
.about-skills .skill-name {
  color: var(--ink-dim);
  letter-spacing: 0.05em;
}
.about-skills .skill-bar {
  color: var(--fire);
  letter-spacing: 2px;
}

/* ─── MOBILE RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: clamp(48px, 14vw, 72px) !important;
  }
  .hero__cards {
    display: none !important;
  }
  .services-grid {
    grid-template-columns: 1fr !important;
  }
  .service-card {
    width: 100% !important;
  }
  .browser-frame iframe {
    height: 360px !important;
  }
  .about__grid {
    grid-template-columns: 1fr !important;
  }
  .about__portrait {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
  }
  .process-track {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }
  .process-card {
    width: 100% !important;
  }
  .process-connector {
    width: 1px !important;
    height: 2rem !important;
    align-self: center;
  }
  .process-line {
    display: none !important;
  }
  .contact__grid {
    grid-template-columns: 1fr !important;
  }
  .contact-form .row {
    grid-template-columns: 1fr !important;
  }
  .services-stats {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
}
