/* ============================================
   PREBALLIN — Homepage v2 (2026-07)
   Short, human, real images. Loads after styles.css
   and only styles .hm-* classes + hero layout.
   ============================================ */

/* --- Ambient background: three slow gradient blobs, GPU-cheap --- */
.hm-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hm-blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  opacity: 0.5;
  will-change: transform;
}

.hm-blob-a {
  top: -20vmax;
  left: -12vmax;
  background: radial-gradient(circle at center, rgba(225, 29, 47, 0.16) 0%, rgba(225, 29, 47, 0.05) 40%, transparent 70%);
  animation: hm-drift-a 46s ease-in-out infinite alternate;
}

.hm-blob-b {
  bottom: -25vmax;
  right: -15vmax;
  background: radial-gradient(circle at center, rgba(90, 40, 160, 0.13) 0%, rgba(90, 40, 160, 0.04) 40%, transparent 70%);
  animation: hm-drift-b 58s ease-in-out infinite alternate;
}

.hm-blob-c {
  top: 30%;
  left: 45%;
  width: 40vmax;
  height: 40vmax;
  background: radial-gradient(circle at center, rgba(255, 90, 102, 0.09) 0%, transparent 65%);
  animation: hm-drift-c 38s ease-in-out infinite alternate;
}

@keyframes hm-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14vw, 10vh, 0) scale(1.15); }
}

@keyframes hm-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-12vw, -12vh, 0) scale(0.95); }
}

@keyframes hm-drift-c {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-16vw, 14vh, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hm-blob { animation: none; }
}

body { position: relative; }
body > nav, body > section, body > footer { position: relative; z-index: 1; }

/* --- Hero --- */
.hm-hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 48px;
}

.hm-hero-inner {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.hm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  margin-bottom: 1.75rem;
  background: rgba(18, 18, 26, 0.6);
}

.hm-kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: hm-pulse 2.4s ease-in-out infinite;
}

@keyframes hm-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hm-hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 1.5rem;
}

.hm-hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.hm-hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Work marquee: real screenshots drifting under the hero --- */
.hm-hero > .container {
  width: 100%;
  min-width: 0;
}

.hm-marquee {
  max-width: 100%;
}

.hm-marquee {
  margin-top: 4.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}

.hm-marquee::-webkit-scrollbar { display: none; }

.hm-marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
}

.hm-marquee-item {
  flex: none;
  height: 210px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-card);
  display: block;
}

.hm-marquee-item img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  object-fit: cover;
}

.hm-marquee-item.is-diagram img {
  padding: 12px;
  background: var(--bg-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .hm-marquee { -webkit-mask-image: none; mask-image: none; }
}

.hm-marquee-note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  letter-spacing: 0.04em;
}

/* --- Section rhythm --- */
.hm-section { padding: 96px 0; }

.hm-section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.hm-section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0.75rem 0 1rem;
}

.hm-section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* --- Build cards: image-led, three across --- */
.hm-build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.hm-build-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  transition: transform var(--transition), border-color var(--transition);
}

.hm-build-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
}

.hm-build-card .hm-card-visual {
  height: 190px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hm-build-card .hm-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-build-card .hm-card-visual.is-diagram img {
  object-fit: contain;
  padding: 14px;
}

.hm-build-card .hm-card-body { padding: 1.5rem 1.5rem 1.75rem; }

.hm-build-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.hm-build-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.hm-build-card p a { font-weight: 600; }

/* --- Steps --- */
.hm-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: hm-step;
}

.hm-step {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  background: rgba(26, 26, 46, 0.55);
}

.hm-step .hm-step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-light);
  letter-spacing: 0.1em;
}

.hm-step h3 {
  font-size: 1.15rem;
  margin: 0.6rem 0 0.5rem;
}

.hm-step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.hm-safety {
  margin-top: 2.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text-secondary);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hm-safety strong { color: var(--text-primary); }

/* --- Work / portfolio teaser --- */
.hm-work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.hm-work-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  text-align: left;
  color: var(--text-primary);
  transition: transform var(--transition), border-color var(--transition);
}

.hm-work-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  color: var(--text-primary);
}

.hm-work-card .hm-work-visual {
  height: 150px;
  overflow: hidden;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.hm-work-card .hm-work-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-work-card .hm-work-visual.is-diagram img {
  object-fit: contain;
  padding: 12px;
}

.hm-work-card .hm-work-body { padding: 1.1rem 1.2rem 1.3rem; }

.hm-work-card .portfolio-kicker { display: block; margin-bottom: 0.35rem; }

.hm-work-card h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }

.hm-work-card span.hm-work-link {
  font-size: 0.85rem;
  color: var(--accent-light);
  font-weight: 600;
}

.hm-work-cta { text-align: center; margin-top: 2.5rem; }

/* --- Pricing (compact) --- */
.hm-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.hm-price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 1.75rem 1.4rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hm-price-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  position: relative;
}

.hm-price-card .hm-price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  white-space: nowrap;
}

.hm-price-card h3 { font-size: 1.05rem; }

.hm-price-card .hm-price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hm-price-card .hm-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.hm-price-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}

.hm-price-card .btn-secondary,
.hm-price-card .btn-primary {
  justify-content: center;
  text-align: center;
  width: 100%;
}

/* --- About --- */
.hm-about {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}

.hm-about-photo img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  width: 100%;
}

.hm-about-photo figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  text-align: center;
}

.hm-about-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.1rem;
}

.hm-about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.hm-about-text p strong { color: var(--text-primary); }

/* --- FAQ (compact two-column) --- */
.hm-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
}

.hm-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  background: rgba(26, 26, 46, 0.55);
}

.hm-faq-item h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }

.hm-faq-item p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --- Contact --- */
.hm-contact-wrap {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hm-contact-lines {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  margin: 1.75rem 0 2.5rem;
  color: var(--text-secondary);
}

.hm-contact-lines a { font-weight: 600; }

.hm-form {
  text-align: left;
  display: grid;
  gap: 1.1rem;
  margin-top: 2.5rem;
}

.hm-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.hm-form input,
.hm-form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
}

.hm-form input:focus,
.hm-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.hm-form textarea { min-height: 120px; resize: vertical; }

.hm-form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Scroll reveal (JS adds .hm-anim to <html>; no-JS stays visible) --- */
.hm-anim [data-fade] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hm-anim [data-fade].hm-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hm-anim [data-fade] { opacity: 1; transform: none; transition: none; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hm-build-grid, .hm-steps { grid-template-columns: 1fr 1fr; }
  .hm-work-grid, .hm-pricing-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hm-hero { padding-top: 104px; }
  .hm-build-grid, .hm-steps, .hm-work-grid, .hm-pricing-grid, .hm-faq-grid {
    grid-template-columns: 1fr;
  }
  .hm-about { grid-template-columns: 1fr; gap: 28px; }
  .hm-about-photo { max-width: 320px; margin: 0 auto; }
  .hm-marquee-item { height: 160px; }
  .hm-section { padding: 72px 0; }
  .hm-blob { opacity: 0.35; }
}
