/* ===== The Craft Section ===== */

/* --- Base (Mobile) --- */
.craft {
  position: relative;
  padding: var(--space-2xl) 0;
  background: var(--az-dark-2);
  overflow: hidden;
}

.craft__texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(244, 131, 46, 0.015) 2px,
    rgba(244, 131, 46, 0.015) 3px
  );
}

.craft__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 2;
}

/* ── Image Column ── */
.craft__image-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.craft__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.craft__image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  position: relative;
  z-index: 2;
}

/* Layered Edge */
.craft__layers {
  position: absolute;
  top: 8%;
  right: -10px;
  bottom: 8%;
  width: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 3;
  pointer-events: none;
}

.craft__layers span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--az-orange);
  transform-origin: left center;
}

.craft__layers span:nth-child(1) { width: 10px; opacity: 0.50; }
.craft__layers span:nth-child(2) { width: 8px;  opacity: 0.38; }
.craft__layers span:nth-child(3) { width: 10px; opacity: 0.28; }
.craft__layers span:nth-child(4) { width: 7px;  opacity: 0.20; }
.craft__layers span:nth-child(5) { width: 9px;  opacity: 0.12; }

/* Data chip under image */
.craft__image-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 0.5rem 0.75rem;
  background: var(--az-dark-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: fit-content;
}

.craft__image-tag svg {
  color: var(--az-orange);
  flex-shrink: 0;
}

/* ── Content Column ── */
.craft__content {
  display: flex;
  flex-direction: column;
}

.craft__title {
  font-size: var(--fs-h1);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.craft__body {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-lg);
  max-width: 500px;
}

/* ── Process Steps ── */
.craft__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-lg);
}

.craft__step {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  grid-template-rows: auto;
  gap: 0 0.85rem;
  align-items: start;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.craft__step:last-child {
  border-bottom: 1px solid var(--border-subtle);
}

/* Orange nozzle dot on the left border on hover */
.craft__step::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--az-orange);
  box-shadow: 0 0 10px rgba(244,131,46,0.4);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.craft__step:hover::before {
  width: 60px;
}

.craft__step-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--az-orange-dim);
  border: 1px solid var(--border-orange);
  color: var(--az-orange);
  flex-shrink: 0;
  grid-row: 1 / 3;
}

.craft__step-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.craft__step-content strong {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.craft__step-content span {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.6;
}

.craft__step-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding-top: 0.15rem;
}

.craft__step-time svg {
  color: var(--az-orange);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── CTA Link ── */
.craft__cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--az-orange);
  transition: all 0.3s ease;
  width: fit-content;
}

.craft__cta-link svg {
  transition: transform 0.3s ease;
}

.craft__cta-link:hover {
  color: var(--az-orange-light);
}

.craft__cta-link:hover svg {
  transform: translateX(4px);
}


/* --- Tablet (768px+) --- */
@media (min-width: 768px) {
  .craft__inner {
    grid-template-columns: 42% 1fr;
    gap: clamp(2.5rem, 5vw, 4rem);
  }

  .craft__step-time {
    grid-column: 3;
    grid-row: 1;
  }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .craft__inner {
    grid-template-columns: 45% 55%;
    gap: 4rem;
  }

  .craft__layers {
    right: -14px;
    width: 14px;
  }

  .craft__layers span:nth-child(1) { width: 14px; }
  .craft__layers span:nth-child(2) { width: 11px; }
  .craft__layers span:nth-child(3) { width: 14px; }
  .craft__layers span:nth-child(4) { width: 9px;  }
  .craft__layers span:nth-child(5) { width: 12px; }
}

/* --- Mobile --- */
@media (max-width: 767px) {
  .craft__image {
    aspect-ratio: 1 / 1;
    max-width: 400px;
    margin-inline: auto;
  }

  .craft__layers {
    display: none;
  }

  .craft__step {
    grid-template-columns: 36px 1fr;
    gap: 0 0.7rem;
  }

  .craft__step-time {
    grid-column: 2;
    margin-top: 0.4rem;
  }

  .craft__image-tag {
    margin-inline: auto;
  }
}

/* Build reveal initial state */
.reveal-craft {
  opacity: 0;
  transform: translateY(25px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-craft {
    opacity: 1;
    transform: none;
  }

  .craft__step::before {
    transition: none;
  }
}
