/* ==========================================================================
   Fortune Group — home header + 3D "machining cell" hero
   Palette: white / steel mist / graphite / red gradient only
   ========================================================================== */
:root {
  --gf-paper: #ffffff;
  --gf-mist: #eef1f4;
  --gf-line: rgba(27, 31, 36, 0.09);
  --gf-ink: #1b1f24;
  --gf-ink-soft: #4a525c;
  --gf-red: #d90a0a;
  --gf-oxide: #7e0606;
  --gf-red-grad: linear-gradient(100deg, #ff3b2f 0%, #d90a0a 45%, #7e0606 100%);
  --gf-display: "Archivo", "Manrope", system-ui, sans-serif;
  --gf-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ------------------------------------------------------------------ hero */
.gf-hero {
  position: relative;
  min-height: min(100svh, 940px);
  padding: 132px 0 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--gf-paper);
  color: var(--gf-ink);
  isolation: isolate;
}
.gf-hero__bg {
  position: absolute; inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 70% at 72% 55%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #ffffff 0%, var(--gf-mist) 100%);
}
/* faint machinist's grid, strongest behind the part */
.gf-hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--gf-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--gf-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(55% 60% at 70% 50%, #000 0%, transparent 75%);
  mask-image: radial-gradient(55% 60% at 70% 50%, #000 0%, transparent 75%);
}

.gf-hero__stage {
  position: absolute;
  top: 70px; right: 0; bottom: 0;
  width: 60%;
  z-index: -1;
}
.gf-hero__stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.gf-hero__fallback {
  position: absolute; inset: 12% 6% 18% 10%;
  width: 84%; height: 70%;
  object-fit: cover;
  border-radius: 28px;
  display: none;
}
.gf-nowebgl .gf-hero__fallback { display: block; }
.gf-nowebgl .gf-hero__stage canvas,
.gf-nowebgl .gf-dro { display: none; }

/* machine readout (DRO) */
.gf-dro {
  position: absolute;
  right: clamp(16px, 4vw, 64px);
  bottom: clamp(110px, 16vh, 150px);
  min-width: 186px;
  padding: 14px 16px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--gf-line);
  box-shadow: 0 18px 40px -24px rgba(27, 31, 36, 0.45);
  font-family: var(--gf-display);
  font-variation-settings: "wdth" 88;
  font-variant-numeric: tabular-nums;
  color: var(--gf-ink);
  pointer-events: none;
}
.gf-dro__mode {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--gf-ink-soft);
  margin-bottom: 8px;
}
.gf-dro__mode::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gf-red);
  box-shadow: 0 0 0 4px rgba(217, 10, 10, 0.15);
  animation: gf-blink 1.6s steps(2, jump-none) infinite;
}
.gf-dro__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  font-size: 15px; line-height: 1.55;
}
.gf-dro__row span { color: var(--gf-ink-soft); font-weight: 500; }
.gf-dro__row b { font-weight: 700; font-size: 17px; }
@keyframes gf-blink { 50% { opacity: 0.25; } }

/* text column */
.gf-hero__inner { position: relative; width: 100%; display: flex; align-items: center; }
.gf-slides { display: grid; width: min(560px, 46%); padding: 24px 0 40px; }
.gf-slide { grid-area: 1 / 1; visibility: hidden; }
.gf-slide.is-active,
.gf-slide.is-leaving { visibility: visible; }

.gf-slide__eyebrow {
  font-family: var(--gf-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--gf-red);
  margin-bottom: 18px;
}
.gf-hero .gf-slide__title {
  font-family: var(--gf-display);
  font-variation-settings: "wdth" 116;
  font-weight: 800;
  font-size: clamp(40px, 4.9vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--gf-ink);
  text-transform: none;
  margin: 0 0 24px;
}
.gf-hero .gf-slide__title span { color: inherit; -webkit-text-stroke: 0; font: inherit; }
.gf-slide__text {
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--gf-ink-soft);
  margin: 0 0 32px;
}
.gf-slide__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.gf-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--gf-display);
  font-size: 16px; font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s var(--gf-ease), box-shadow 0.25s var(--gf-ease), background-color 0.25s;
}
.gf-btn--red {
  background: var(--gf-red-grad);
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(217, 10, 10, 0.75);
}
.gf-btn--red:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(217, 10, 10, 0.9); }
.gf-btn--ghost {
  color: var(--gf-ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(27, 31, 36, 0.16);
}
.gf-btn--ghost:hover { color: var(--gf-red); border-color: var(--gf-red); }
.gf-btn:focus-visible,
.gf-tab:focus-visible { outline: 3px solid rgba(217, 10, 10, 0.45); outline-offset: 3px; }

/* word-by-word rise from a mask */
.gf-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.gf-w > span { display: inline-block; transform: translateY(110%); }
.gf-slide.is-active .gf-w > span {
  transform: none;
  transition: transform 0.95s var(--gf-ease) calc(var(--i, 0) * 45ms + 180ms);
}
.gf-slide.is-leaving .gf-w > span {
  transform: translateY(-110%);
  transition: transform 0.5s cubic-bezier(0.6, 0, 0.8, 0.4) calc(var(--i, 0) * 18ms);
}
.gf-slide__text,
.gf-slide__cta { opacity: 0; transform: translateY(18px); }
.gf-slide.is-active .gf-slide__text,
.gf-slide.is-active .gf-slide__cta {
  opacity: 1; transform: none;
  transition: opacity 0.7s ease 0.55s, transform 0.8s var(--gf-ease) 0.55s;
}
.gf-slide.is-active .gf-slide__cta { transition-delay: 0.7s; }
.gf-slide.is-leaving .gf-slide__text,
.gf-slide.is-leaving .gf-slide__cta { opacity: 0; transition: opacity 0.3s ease; }

/* process tabs with autoplay progress */
.gf-tabs {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 8px;
  padding-bottom: 34px;
}
.gf-tab {
  display: grid; gap: 12px;
  text-align: left;
  background: none; border: 0; padding: 6px 0;
  cursor: pointer;
  font-family: var(--gf-display);
  font-size: 15px; font-weight: 600;
  color: var(--gf-ink-soft);
  transition: color 0.3s;
}
.gf-tab:hover,
.gf-tab.is-active { color: var(--gf-ink); }
.gf-tab__bar { position: relative; height: 3px; border-radius: 3px; background: rgba(27, 31, 36, 0.12); overflow: hidden; }
.gf-tab__bar i {
  position: absolute; inset: 0;
  background: var(--gf-red-grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.gf-tab.is-done .gf-tab__bar i { transform: scaleX(1); }

/* --------------------------------------------------------------- tablet */
@media (max-width: 1199px) {
  .gf-slides { width: min(520px, 50%); }
  .gf-hero__stage { width: 58%; }
}
/* --------------------------------------------------------- phone/tablet */
@media (max-width: 991px) {
  .gf-hero { padding-top: 96px; min-height: 0; grid-template-rows: auto auto auto; }
  .gf-hero__stage {
    position: relative;
    top: auto; right: auto; bottom: auto;
    width: 100%;
    height: clamp(300px, 52vw, 440px);
    order: -1;
    z-index: 0;
  }
  .gf-hero__bg::after {
    -webkit-mask-image: radial-gradient(70% 40% at 50% 22%, #000 0%, transparent 75%);
    mask-image: radial-gradient(70% 40% at 50% 22%, #000 0%, transparent 75%);
  }
  .gf-dro { top: 8px; bottom: auto; left: 16px; right: auto; min-width: 132px; padding: 8px 10px 6px; border-radius: 10px; }
  .gf-dro__mode { font-size: 11px; margin-bottom: 4px; }
  .gf-dro__row { font-size: 11px; line-height: 1.45; gap: 10px; }
  .gf-dro__row b { font-size: 12px; }
  .gf-dro__row:nth-child(4),
  .gf-dro__row:nth-child(5) { display: none; }
  .gf-slides { width: 100%; padding: 8px 0 24px; }
  .gf-hero .gf-slide__title { font-size: clamp(34px, 8.4vw, 56px); }
  .gf-slide__text { font-size: 16px; margin-bottom: 24px; }
  .gf-tabs { gap: 12px; padding-bottom: 28px; }
  .gf-tab { font-size: 13px; }
}
@media (max-width: 767px) {
  /* leave room for the sticky Call / WhatsApp / Quote bar */
  .gf-tabs { padding-bottom: 20px; }
}
@media (max-width: 420px) {
  .gf-btn { padding: 0 20px; font-size: 15px; }
  .gf-dro__row:nth-child(4) { display: none; }
}

/* -------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gf-w > span,
  .gf-slide__text,
  .gf-slide__cta { transform: none !important; transition: opacity 0.2s !important; }
  .gf-dro__mode::before { animation: none; }
}

/* ==========================================================================
   v2 — premium layer: laser-cut headline, ghost type, callouts, light
   ========================================================================== */
@property --cut { syntax: "<percentage>"; inherits: false; initial-value: 0%; }

/* cinematic light: white key from above, red bounce under the fixture */
.gf-hero__bg::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(38% 30% at 70% 84%, rgba(217, 10, 10, 0.13) 0%, rgba(217, 10, 10, 0) 70%),
    conic-gradient(from 180deg at 70% -10%, rgba(255,255,255,0) 160deg, rgba(255,255,255,0.95) 180deg, rgba(255,255,255,0) 200deg),
    radial-gradient(70% 60% at 0% 0%, rgba(27, 31, 36, 0.035) 0%, rgba(27, 31, 36, 0) 70%);
}

/* oversized process word behind the stage */
.gf-ghost {
  position: absolute;
  right: 2vw; bottom: 64px;
  z-index: -1;
  width: 64%;
  display: grid;
  justify-items: end;
  pointer-events: none;
  user-select: none;
}
.gf-ghost span {
  grid-area: 1 / 1;
  font-family: var(--gf-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(80px, 10.2vw, 172px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(27, 31, 36, 0.10);
  background: linear-gradient(180deg, rgba(217, 10, 10, 0.07) 0%, rgba(217, 10, 10, 0) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  clip-path: inset(0 0 100% 0);
  transform: translateY(14%);
  transition: clip-path 0.6s cubic-bezier(0.6, 0, 0.8, 0.4), transform 0.6s cubic-bezier(0.6, 0, 0.8, 0.4);
}
.gf-ghost span.is-active {
  clip-path: inset(0 0 0 0);
  transform: none;
  transition: clip-path 1.2s var(--gf-ease) 0.35s, transform 1.2s var(--gf-ease) 0.35s;
}

/* engineering-drawing crop marks around the stage */
.gf-frame { position: absolute; inset: 7% 4% 12% 6%; pointer-events: none; }
.gf-frame i { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(27, 31, 36, 0.28); }
.gf-frame i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.gf-frame i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.gf-frame i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.gf-frame i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* laser-cut headline: a red cutting head sweeps across and reveals the words */
.gf-cut { position: relative; margin: 0 0 24px; }
.gf-cut .gf-slide__title { margin: 0; clip-path: inset(-10% calc(100% - var(--cut)) -10% 0); }
.gf-laser {
  position: absolute;
  top: -6%; bottom: -6%;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 59, 47, 0) 0%, #ff3b2f 18%, #d90a0a 82%, rgba(217, 10, 10, 0) 100%);
  box-shadow: 0 0 10px 2px rgba(255, 40, 20, 0.55), 0 0 32px 6px rgba(217, 10, 10, 0.25);
  opacity: 0;
  pointer-events: none;
}
.gf-laser::after { /* hot spot */
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 10px; height: 46%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 59, 47, 0.6) 55%, rgba(255, 59, 47, 0));
  filter: blur(1px);
}
.gf-slide.is-active .gf-cut .gf-slide__title { --cut: 100%; transition: --cut 1.15s cubic-bezier(0.55, 0.05, 0.35, 1) 0.2s; }
.gf-slide.is-active .gf-laser { animation: gf-laser 1.15s cubic-bezier(0.55, 0.05, 0.35, 1) 0.2s both; }
.gf-slide.is-leaving .gf-cut { opacity: 0; transform: translateY(-14px); transition: opacity 0.35s ease, transform 0.45s ease; }
@keyframes gf-laser {
  0% { left: 0; opacity: 0; }
  6% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* callouts pinned to the 3D part */
.gf-leaders { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.gf-leader {
  fill: none;
  stroke: rgba(27, 31, 36, 0.55);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s var(--gf-ease);
}
.gf-pin { fill: #fff; stroke: var(--gf-red); stroke-width: 2; opacity: 0; transition: opacity 0.4s; }
.gf-callouts-on .gf-leader { stroke-dashoffset: 0; }
.gf-callouts-on .gf-pin { opacity: 1; }
.gf-callout {
  position: absolute; left: 0; top: 0;
  display: grid; gap: 2px;
  padding-left: 12px;
  border-left: 2px solid var(--gf-red);
  font-family: var(--gf-display);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  will-change: transform;
}
.gf-callouts-on .gf-callout { opacity: 1; transition-delay: 0.45s; }
.gf-callout b { font-size: 17px; font-weight: 700; font-variation-settings: "wdth" 108; color: var(--gf-ink); letter-spacing: -0.01em; }
.gf-callout span { font-size: 13px; font-weight: 500; color: var(--gf-ink-soft); }

/* proof line under the copy */
.gf-proof {
  grid-row: 2;
  display: flex; align-items: center; gap: 14px;
  margin: 36px 0 0;
  font-size: 14px;
  color: var(--gf-ink-soft);
  max-width: 44ch;
}
.gf-proof::before { content: ""; flex: 0 0 40px; height: 2px; background: var(--gf-red-grad); }

/* a touch less shout in the headline so copy, CTA and stage balance */
.gf-hero .gf-slide__title { font-size: clamp(40px, 4.5vw, 74px); }

@media (max-width: 991px) {
  .gf-ghost { width: 100%; right: -2vw; bottom: auto; top: 96px; justify-items: center; }
  .gf-ghost span { font-size: 24vw; }
  .gf-frame { inset: 6% 3% 8% 3%; }
  .gf-callout b { font-size: 13px; }
  .gf-callout span { font-size: 11px; }
  .gf-proof { margin-top: 24px; font-size: 13px; }
}
@media (max-width: 600px) {
  /* phones: keep the stage clean — part + readout only */
  .gf-leaders, .gf-callout, .gf-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gf-laser { display: none; }
  .gf-cut .gf-slide__title { clip-path: none; }
  .gf-ghost span, .gf-leader, .gf-callout { transition: none !important; }
}

/* tab numbering */
.gf-tab__name { display: flex; align-items: baseline; gap: 10px; }
.gf-tab__no { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: rgba(27, 31, 36, 0.35); transition: color 0.3s; }
.gf-tab.is-active .gf-tab__no { color: var(--gf-red); }
@media (max-width: 600px) {
  .gf-tabs { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .gf-tab { font-size: 0; gap: 8px; }
  .gf-tab__no { font-size: 12px; }
}
