/* ============================================
   COMPONENTS — CoreDrill SA
   All-new components distinct from Apex Equipment
   ============================================ */

/* ══════════════════════════════════════════════
   1. HERO — Full-bleed with credential strip
   ══════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("https://images.pexels.com/photos/21047659/pexels-photo-21047659.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080");
  background-size: cover;
  background-position: center center;
  z-index: 1;
  animation: heroBreath 25s ease-in-out infinite alternate;
}

@keyframes heroBreath {
  0%   { transform: scale(1);    filter: brightness(1); }
  100% { transform: scale(1.02); filter: brightness(1.03); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(17, 18, 20, 0.95) 0%, rgba(17, 18, 20, 0.45) 55%, rgba(200, 96, 42, 0.12) 100%);
  z-index: 2;
}

/* Diagonal accent slash across hero */
.hero__slash {
  position: absolute;
  bottom: -8%;
  right: -4%;
  width: 45%;
  height: 130%;
  background: var(--color-accent);
  opacity: 0.04;
  transform: rotate(-12deg);
  z-index: 2;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 5%;
  width: 100%;
  padding-top: calc(var(--header-height) + 2rem);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  max-width: 650px;
  letter-spacing: -1px;
}

.hero h1 .accent {
  color: var(--color-highlight);
  display: block;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: white;
  max-width: 500px;
  margin-bottom: 2.25rem;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 0;
}

/* Stagger */
.hero h1 { animation-delay: 0.1s; }
.hero__subtitle { animation-delay: 0.3s; }
.hero__actions { animation-delay: 0.5s; }

@media (max-width: 768px) {
  .hero { min-height: 600px; }
  .hero__actions { flex-direction: column; }
}

/* ══════════════════════════════════════════════
   2. CREDENTIAL BAR — replaces trust bar
   ══════════════════════════════════════════════ */
.credential-bar {
  background-color: var(--bg-elevated);
  border-block: 1px solid var(--border-color);
  padding: 0;
}

.credential-bar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 5%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.credential-bar__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border-right: 1px solid var(--border-color);
  transition: background-color var(--ease-fast);
}

.credential-bar__item:last-child { border-right: none; }
.credential-bar__item:hover { background-color: var(--bg-elevated-hover); }

.credential-bar__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: rgba(200, 96, 42, 0.1);
  border: 1px solid rgba(200, 96, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.credential-bar__label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.credential-bar__label small {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .credential-bar__inner { grid-template-columns: 1fr; }
  .credential-bar__item { border-right: none; border-bottom: 1px solid var(--border-color); }
  .credential-bar__item:last-child { border-bottom: none; }
}

/* ══════════════════════════════════════════════
   3. SERVICES — Alternating image+text rows (zigzag)
   ══════════════════════════════════════════════ */
.zigzag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.zigzag--reverse {
  direction: rtl;
}
.zigzag--reverse > * {
  direction: ltr;
}

.zigzag__image {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.zigzag__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-spring);
}

.zigzag:hover .zigzag__image img {
  transform: scale(1.04);
}

.zigzag__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg-main) 0%, transparent 20%);
  z-index: 1;
  pointer-events: none;
}

.zigzag--reverse .zigzag__image::after {
  background: linear-gradient(to left, var(--bg-main) 0%, transparent 20%);
}

.zigzag__text {
  padding: 4rem 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.zigzag__number {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
  color: var(--color-accent);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.zigzag__text h3 {
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.zigzag__text p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  max-width: 460px;
}

.zigzag__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.zigzag__tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-secondary);
  transition: all var(--ease-fast);
}

.zigzag:hover .zigzag__tag {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

@media (max-width: 900px) {
  .zigzag, .zigzag--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .zigzag__image { min-height: 280px; }
  .zigzag__image::after,
  .zigzag--reverse .zigzag__image::after {
    background: linear-gradient(to top, var(--bg-main) 0%, transparent 30%);
  }
}

/* ══════════════════════════════════════════════
   4. STATS — Horizontal scrolling ticker
   ══════════════════════════════════════════════ */
.stats-ticker {
  background-color: var(--color-primary);
  border-block: 1px solid var(--border-color);
  overflow: hidden;
  padding: 2.5rem 0;
}

.stats-ticker__track {
  display: flex;
  gap: 0;
  animation: tickerScroll 35s linear infinite;
  width: max-content;
}

.stats-ticker__item {
  flex-shrink: 0;
  padding: 0 3.5rem;
  border-right: 1px solid var(--border-color);
  text-align: center;
  min-width: 200px;
}

.stats-ticker__number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--color-highlight);
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}

.stats-ticker__label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════
   5. PROJECT GALLERY — Masonry-style grid
   ══════════════════════════════════════════════ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.project-card:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-spring);
}

.project-card:hover img {
  transform: scale(1.06);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 18, 20, 0.9) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--ease-normal);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  z-index: 1;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-card__label small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: none;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card:first-child {
    grid-row: span 1;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .project-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   6. PROCESS — Horizontal numbered steps
   ══════════════════════════════════════════════ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

/* Connecting line */
.process-steps::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(to right, var(--color-accent), var(--border-color) 50%, var(--color-accent));
  z-index: 0;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 1rem;
}

.process-step__number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--bg-elevated);
  border: 2px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-accent);
  margin: 0 auto 1.25rem;
  transition: all var(--ease-normal);
}

.process-step:hover .process-step__number {
  background-color: var(--color-accent);
  color: var(--text-primary);
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(200, 96, 42, 0.3);
}

.process-step h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.process-step p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .process-steps::before { display: none; }
}

@media (max-width: 480px) {
  .process-steps { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   7. SECTION HEADER (reused but different variant)
   ══════════════════════════════════════════════ */
.section-header {
  margin-bottom: 3.5rem;
}

.section-header--center { text-align: center; }

.section-header__rule {
  width: 48px;
  height: 3px;
  background-color: var(--color-accent);
  border: none;
  margin-bottom: 1.25rem;
}

.section-header--center .section-header__rule {
  margin-inline: auto;
}

.section-header p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  max-width: 560px;
}

.section-header--center p {
  margin-inline: auto;
}

.section-header__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════════
   8. CTA BAND — angled background
   ══════════════════════════════════════════════ */
.cta-band {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.cta-band__bg {
  position: absolute;
  inset: 0;
  background-image: url("https://images.pexels.com/photos/16862261/pexels-photo-16862261.jpeg?auto=compress&cs=tinysrgb&w=1920&h=600");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.cta-band__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(17, 18, 20, 0.92) 0%, rgba(200, 96, 42, 0.25) 100%);
  z-index: 1;
}

.cta-band__inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.cta-band__text {
  flex: 1;
  min-width: 280px;
}

.cta-band__text h2 {
  margin-bottom: 0.75rem;
}

.cta-band__text p {
  font-size: 1.05rem;
  color: rgba(240, 237, 232, 0.8);
  max-width: 480px;
}

@media (max-width: 768px) {
  .cta-band__inner {
    flex-direction: column;
    text-align: center;
  }
}
