/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--text-on-dark);
  overflow: hidden;
  padding-top: var(--space-8);
  padding-bottom: var(--space-9);
}
.hero__fog {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.hero__fog span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  background: radial-gradient(circle, rgba(127, 224, 236, 0.35), transparent 70%);
  animation: drift 22s ease-in-out infinite;
}
.hero__fog span:nth-child(1) { width: 480px; height: 480px; top: -120px; left: -80px; animation-delay: 0s; }
.hero__fog span:nth-child(2) { width: 360px; height: 360px; bottom: -100px; left: 20%; animation-delay: -6s; background: radial-gradient(circle, rgba(201, 122, 60, 0.25), transparent 70%); }
.hero__fog span:nth-child(3) { width: 420px; height: 420px; top: 10%; right: -100px; animation-delay: -12s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .hero__fog span { animation: none; } }

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-7);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; } }

.hero__title {
  font-size: clamp(2.75rem, 7vw, var(--fs-5xl));
  margin-block: var(--space-4) var(--space-4);
}
.hero__title em {
  font-style: normal;
  color: var(--accent-cold);
}
.hero__lead {
  font-size: var(--fs-md);
  color: var(--text-on-dark-muted);
  max-width: 46ch;
  margin-bottom: var(--space-5);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: var(--space-5);
  margin-top: var(--space-7);
  font-family: var(--font-mono);
}
.hero__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--text-on-dark);
}
.hero__stats span { color: var(--text-on-dark-muted); font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: 0.08em; }

.hero__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  aspect-ratio: 4 / 5;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,15,17,0) 40%, rgba(12,15,17,0.65) 100%);
}
.hero__media-tag {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(12,15,17,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* ---------- Marquee ---------- */
.marquee {
  background: var(--charcoal);
  border-block: 1px solid var(--line-dark);
  overflow: hidden;
  padding-block: var(--space-4);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--space-7);
  animation: marquee 34s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
.marquee__track span {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-7);
}
.marquee__track span::after { content: "·"; color: var(--accent-warm); margin-left: var(--space-7); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Section headers ---------- */
.section-head {
  max-width: 62ch;
  margin-bottom: var(--space-6);
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, var(--fs-3xl)); margin-top: var(--space-3); }
.section-head p { margin-top: var(--space-3); color: var(--text-on-light-muted); font-size: var(--fs-md); }
.surface-dark .section-head p { color: var(--text-on-dark-muted); }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- Before / After slider ---------- */
.compare {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  touch-action: pan-y;
  user-select: none;
  max-width: 100%;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.compare__after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.compare__handle::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.compare__grip {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: ew-resize;
  border: none;
  color: var(--ink);
}
.compare__grip svg { width: 20px; height: 20px; }
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}
.compare__tag {
  position: absolute;
  top: var(--space-3);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(12,15,17,0.72);
  color: var(--text-on-dark);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
}
.compare__tag--before { left: var(--space-3); }
.compare__tag--after { right: var(--space-3); }

/* ---------- Cards: services ---------- */
.card-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  isolation: isolate;
}
.service-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.service-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,15,17,0.05) 30%, rgba(12,15,17,0.92) 100%);
}
.service-card:hover img { transform: scale(1.06); }
.service-card__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: var(--space-5);
  color: var(--text-on-dark);
}
.service-card__body .eyebrow { color: var(--accent-cold); margin-bottom: var(--space-2); }
.service-card__body h3 { font-size: var(--fs-lg); }
.service-card__body p {
  font-size: var(--fs-sm);
  color: var(--text-on-dark-muted);
  margin-top: var(--space-2);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), margin var(--dur-base) var(--ease-out);
}
.service-card:hover p, .service-card:focus-within p { max-height: 120px; opacity: 1; }

/* ---------- Process steps ---------- */
.process {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 768px) { .process { grid-template-columns: repeat(4, 1fr); } }
.process__step { position: relative; padding-top: var(--space-6); border-top: 1px solid var(--line-dark); }
.process__step .num {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent-warm);
  display: block;
  margin-bottom: var(--space-3);
}
.process__step h3 { font-size: var(--fs-md); margin-bottom: var(--space-2); }
.process__step p { color: var(--text-on-dark-muted); font-size: var(--fs-sm); }

/* ---------- Advantage list ---------- */
.advantage-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .advantage-grid { grid-template-columns: repeat(2, 1fr); } }
.advantage {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--paper);
}
.advantage svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--ember-strong); }
.advantage h3 { font-size: var(--fs-md); margin-bottom: var(--space-1); }
.advantage p { font-size: var(--fs-sm); color: var(--text-on-light-muted); }

/* ---------- Project gallery ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.filter-chip {
  min-height: 40px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  border: 1px solid var(--line-light);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  color: var(--text-on-light-muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.filter-chip:hover { border-color: var(--ember-strong); color: var(--text-on-light); }
.filter-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--text-on-dark);
}

.project-grid, .highlight-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .project-grid, .highlight-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .project-grid, .highlight-grid { grid-template-columns: repeat(3, 1fr); } }

.project-card, .highlight-card {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  padding: 0;
}
.project-card__media, .highlight-card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.project-card__media img, .highlight-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.project-card:hover .project-card__media img, .project-card:focus-visible .project-card__media img,
.highlight-card:hover .highlight-card__media img, .highlight-card:focus-visible .highlight-card__media img { transform: scale(1.05); }
.project-card__body, .highlight-card__body { padding: var(--space-4); }
.project-card__body .eyebrow, .highlight-card__body .eyebrow { margin-bottom: var(--space-2); }
.project-card__body h3, .highlight-card__body h3 { font-size: var(--fs-md); }
.project-card__body p, .highlight-card__body p { font-size: var(--fs-sm); color: var(--text-on-light-muted); margin-top: var(--space-1); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  background: rgba(6, 8, 9, 0.92);
  backdrop-filter: blur(6px);
}
.lightbox.is-open { display: block; }
.lightbox__dialog {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}
@media (min-width: 768px) { .lightbox__dialog { padding: var(--space-6) var(--space-8); } }
.lightbox__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--text-on-dark);
  margin-bottom: var(--space-4);
}
.lightbox__title h2 { font-size: clamp(1.6rem, 4vw, var(--fs-2xl)); }
.lightbox__title p { color: var(--text-on-dark-muted); margin-top: var(--space-2); max-width: 60ch; }
.lightbox__close {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: var(--text-on-dark);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lightbox__close svg { width: 20px; height: 20px; }
.lightbox__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.lightbox__nav {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-on-dark);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lightbox__nav svg { width: 22px; height: 22px; }
.lightbox__stage-row { display: flex; align-items: center; justify-content: center; gap: var(--space-3); width: 100%; height: 100%; }
.lightbox__stage-row img { flex: 1 1 auto; min-width: 0; min-height: 0; }
.lightbox__thumbs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin-top: var(--space-4);
  padding-bottom: var(--space-2);
}
.lightbox__thumbs img {
  width: 72px; height: 54px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  opacity: 0.5;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity var(--dur-fast), border-color var(--dur-fast);
  flex-shrink: 0;
}
.lightbox__thumbs img.is-active { opacity: 1; border-color: var(--accent-cold); }

/* ---------- FAQ accordion ---------- */
.faq-list { border-top: 1px solid var(--line-light); }
.faq-item { border-bottom: 1px solid var(--line-light); }
.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-md);
  cursor: pointer;
  color: var(--text-on-light);
}
.faq-item__q svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-item[data-open="true"] .faq-item__q svg { transform: rotate(45deg); }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-out);
}
.faq-item[data-open="true"] .faq-item__a { max-height: 480px; }
.faq-item__a-inner { padding-bottom: var(--space-4); color: var(--text-on-light-muted); max-width: 68ch; }
.faq-item__a-inner ul { margin-top: var(--space-2); }
.faq-item__a-inner li { position: relative; padding-left: var(--space-4); margin-bottom: var(--space-2); }
.faq-item__a-inner li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--ember-strong); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--ink);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { font-size: clamp(1.9rem, 5vw, var(--fs-3xl)); max-width: 22ch; margin-inline: auto; }
.cta-banner p { color: var(--text-on-dark-muted); margin-top: var(--space-3); }
.cta-banner__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-5); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; } }
.contact-info__item {
  display: flex;
  gap: var(--space-3);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--line-light);
}
.contact-info__item svg { width: 22px; height: 22px; color: var(--ember-strong); flex-shrink: 0; margin-top: 2px; }
.contact-info__item h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); color: var(--text-on-light-muted); margin-bottom: var(--space-1); }
.contact-info__item a, .contact-info__item p { font-size: var(--fs-md); }

.form-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-field { display: flex; flex-direction: column; gap: var(--space-2); }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-size: var(--fs-sm); font-weight: 600; }
.form-field .req { color: var(--ember-strong); }
.form-field input, .form-field textarea {
  min-height: 48px;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-light);
  background: var(--paper);
  font: inherit;
  font-size: var(--fs-base);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent-warm); }
.form-note {
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  color: var(--text-on-light-muted);
  background: var(--frost-2);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}

/* ---------- Reveal animation utility ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
