/* ==========================================================================
   home.css — Homepage-specific styles.
   Loaded after main.css only on index.html.
   Falkor UI system: solid white header · dark banner hero · flat sections.
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════════════
   1 · HERO — full-screen statement banner (below solid white header)
   ══════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  /* −3% (46.2 → 44.8rem cap) and reserve ~9rem so the scale band sits
     above the fold on desktop load */
  /* min-block-size: clamp(30rem, calc(97vh - var(--header-height) - 9rem), 44.8rem); */
  min-block-size: clamp(30rem, calc(100vh - var(--header-height) - 140px), 100vh);
  display: grid;
  align-items: start;                       /* copy shifted up from center */
  padding-block: clamp(2rem, 7vh, 4rem) var(--space-2xl);
  overflow: hidden;
  isolation: isolate;
  background: var(--navy-950);              /* seals any sub-pixel gap at edges */
}

/* The <picture> wrapper must not become a phantom grid row */
.hero > picture { display: contents; }

/* Background video (falkor hero loop) — sits above the image fallback */
.hero__bg-video {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
  pointer-events: none;
}

/* Reduced motion: no autoplaying video — the still image shows instead */
@media (prefers-reduced-motion: reduce) {
  .hero__bg-video { display: none; }
}

/* Navy globe backdrop + gradient scrim for text legibility */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 120% at 82% 40%, rgba(21, 58, 122, 0.55), transparent 60%),
    var(--navy-950);
}
.hero__bg-img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 78% center;
  opacity: 0.78;
  z-index: -1;
  -webkit-mask-image: linear-gradient(90deg, transparent 4%, #000 42%);
          mask-image: linear-gradient(90deg, transparent 4%, #000 42%);
}
.hero::after {
  /* left-side darkening so headline holds AA contrast */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--navy-950) 12%, rgba(5, 10, 22, 0.55) 46%, transparent 78%);
  pointer-events: none;
}

/* — Hero copy (single-column statement) —
   Wide enough that long CTAs + ISO marks share one line (logistics) */
.hero__copy {
  max-inline-size: min(100%, 60rem);
}
/* Staggered entrance for a premium first impression (motion-safe below) */
.hero__copy > * {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-in var(--dur-slower) var(--ease-out) forwards;
}
.hero__copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero__copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero__copy > *:nth-child(3) { animation-delay: 0.28s; }
.hero__copy > *:nth-child(4) { animation-delay: 0.42s; }
@keyframes hero-in { to { opacity: 1; transform: none; } }

/* Falkor typography: flat eyebrow, FK Grotesk Medium 400 headline */
.hero__eyebrow {
  display: block;
  color: var(--color-accent-pale);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.hero__title {
  margin-block-start: var(--space-md);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);        /* falkor hero: 3.75rem / 4.5rem leading */
  font-weight: 400;
  line-height: var(--lh-tight);    /* 1.2 */
  letter-spacing: var(--tracking-snug);
  max-inline-size: 18ch;
}
.hero__title .accent {
  color: var(--color-accent-pale); /* falkor primary-blue — solid, no gradient */
}
.hero__lead {
  margin-block-start: var(--space-md);
  color: rgba(232, 238, 248, 0.85);
  font-size: 1.25rem;              /* falkor lead */
  line-height: 1.4;                /* falkor body 140% */
  max-inline-size: 52ch;
}

/* — Hero CTAs (falkor square buttons on dark) — */
.hero__actions {
  margin-block-start: clamp(1.5rem, 1rem + 2vw, 2.5rem);  /* falkor mt-6→10 */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

/* ISO certification marks — directly after the CTAs, same line */
.hero__certs {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.75rem + 1vw, 1.5rem);
  margin-inline-start: var(--space-md);   /* sits right after the buttons */
}
.hero__certs img {
  block-size: 4.75rem;            /* both badges identical box */
  inline-size: 4.75rem;
  object-fit: contain;
  opacity: 0.92;
}
@media (max-width: 62rem) {
  .hero__certs { margin-inline-start: 0; inline-size: 100%; }
  .hero__certs img { block-size: 3.5rem; inline-size: 3.5rem; }
}
/* Light outline button for the dark hero (falkor border style, square) */
.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-border: #fff;
}
.btn--outline-light:hover {
  background-color: var(--color-brand);
  color: #ffffff;   /* literal: --color-ink is white inside .theme-dark */
  border-color: transparent;
}
.btn--outline-light svg { transition: transform 300ms var(--ease-standard); }
.btn--outline-light:hover svg { transform: translateX(4px); }

/* ══════════════════════════════════════════════════════════════════════
   2 · SCALE BAND
   ══════════════════════════════════════════════════════════════════════ */
.scale-band {
  /* border-block-end: 1px solid var(--color-line); */
  background: var(--color-surface-alt);
}
.scale-band__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding-block: var(--space-xl);
}
@media (max-width: 62rem) { .scale-band__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg) var(--space-md); } }
@media (max-width: 40rem) { .scale-band__grid { grid-template-columns: 1fr; } }
.scale__value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1;
  letter-spacing: var(--tracking-snug);
}
.scale__value .u { color: var(--color-brand); }
.scale__label { margin-block-start: var(--space-2xs); color: var(--color-muted); font-size: var(--fs-sm); }
.scale__item { position: relative; }
.scale__item + .scale__item::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--space-lg) * -0.5);
  inset-block: 0.2em;
  inline-size: 1px;
  background: var(--color-line);
}
@media (max-width: 62rem) { .scale__item + .scale__item::before { display: none; } }

/* ══════════════════════════════════════════════════════════════════════
   3 · PROOF
   ══════════════════════════════════════════════════════════════════════ */
.proof__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-block-start: var(--space-xl);
}
@media (max-width: 62rem) { .proof__grid { grid-template-columns: 1fr; } }
.proof__item {
  padding-inline-start: var(--space-md);
  border-inline-start: 2px solid var(--color-brand);
}
.proof__industry {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-brand);
  font-weight: var(--fw-bold);
  margin-block-end: var(--space-2xs);
}
.proof__text { color: var(--color-ink-soft); font-size: var(--fs-base); line-height: var(--lh-relaxed); }
.proof__note { margin-block-start: var(--space-xl); color: var(--color-muted); font-size: var(--fs-sm); }

/* — Partners marquee (falkor "Our partners" strip) — */
.partners {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(2rem, 1.5rem + 3vw, 5rem);
  margin-block-start: var(--space-2xl);
}
@media (max-width: 62rem) { .partners { grid-template-columns: 1fr; gap: var(--space-lg); } }

.partners__label {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
  font-weight: 400;
  color: var(--color-ink);
  white-space: nowrap;
}

.partners__marquee {
  overflow: hidden;
  /* soft fade at both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.partners__track {
  display: flex;
  align-items: center;
  gap: clamp(3rem, 2rem + 4vw, 6rem);
  inline-size: max-content;
  /* marquee keyframes live in animations.css; reverse = left → right */
  animation: marquee 30s linear infinite reverse;
}
.partners__marquee:hover .partners__track { animation-play-state: paused; }

.partners__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--color-graphite, #7B7E83);
  white-space: nowrap;
  opacity: 0.85;
}
/* One uniform size for every mark: fixed height, auto width, B&W */
img.partners__logo {
  block-size: 2.25rem;
  inline-size: auto;
  max-inline-size: 11rem;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.8;
}

/* Reduced motion: static strip (global rule also kills the animation) */
@media (prefers-reduced-motion: reduce) {
  .partners__track { animation: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   3 · DIVISION SPLIT — full-bleed 3-panel router (BICC-style, falkor UI)
   ══════════════════════════════════════════════════════════════════════ */
.dsplit {
  position: relative;
  background: var(--navy-950);
  isolation: isolate;
}

/* Centered overline title floating over the panels */
.dsplit__heading {
  position: absolute;
  inset-block-start: clamp(2rem, 6vh, 3.5rem);
  inset-inline: 0;
  z-index: 2;
  text-align: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  pointer-events: none;
  padding-inline: var(--gutter);
}

.dsplit__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* Each panel is one big link */
.dsplit__panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-block-size: clamp(30rem, 88vh, 46rem);
  overflow: hidden;
  isolation: isolate;
}
.dsplit__panel:focus-visible {
  outline: var(--focus-width) solid var(--color-accent-pale);
  outline-offset: -4px;
}

/* Background image */
.dsplit__bg { display: contents; }
.dsplit__bg img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
  transition: transform 700ms var(--ease-standard);
}
.dsplit__panel:hover img,
.dsplit__panel:focus-visible img { transform: scale(1.05); }

/* Dark scrim for legibility; lifts slightly on hover */
.dsplit__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
  rgba(5, 10, 22, 0.7) 0%,
  rgba(5, 10, 22, 0.4) 65%,
  rgba(5, 10, 22, 0.8) 100%);
  transition: background-color 400ms var(--ease-standard), opacity 400ms var(--ease-standard);
}
.dsplit__panel:hover::after,
.dsplit__panel:focus-visible::after { opacity: 0.75; }

/* Panel content */
.dsplit__content {
  position: relative;
  text-align: center;
  padding: var(--space-lg);
  max-inline-size: 34ch;
}
.dsplit__name {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);   /* falkor h3 scale */
  font-weight: 400;
  line-height: var(--lh-snug);
}
.dsplit__line {
  margin-block-start: var(--space-2xs);
  color: rgba(232, 238, 248, 1);
  font-size: 1rem;
  line-height: 1.4;
}
.dsplit__cta {
  margin-block-start: var(--space-md);
}
/* The panel <a> owns the hover: mirror falkor's pale-blue fill on the button */
.dsplit__panel:hover .dsplit__cta,
.dsplit__panel:focus-visible .dsplit__cta {
  background-color: var(--color-brand);
  color: #ffffff;
  border-color: transparent;
}
.dsplit__panel:hover .dsplit__cta svg { transform: translateX(4px); }

/* Stack on tablet/mobile */
@media (max-width: 62rem) {
  .dsplit__grid { grid-template-columns: 1fr; }
  .dsplit__panel { min-block-size: clamp(18rem, 48vh, 26rem); }
  .dsplit__heading {
    position: static;
    padding-block: var(--space-lg) 0;
    background: var(--navy-950);
  }
}

/* ══════════════════════════════════════════════════════════════════════
   4 · WHAT WE DO — three divisions detail (falkor industries pattern:
   square image · title · body · arrow link, left-aligned, equal columns)
   ══════════════════════════════════════════════════════════════════════ */
.wwd .section__head {
  margin-block-end: var(--space-xl);
  max-inline-size: none;                 /* let the heading run on one line */
}
/* "What we do" — big, sentence case (overrides the small uppercase eyebrow) */
.wwd .eyebrow {
  text-transform: none;
  letter-spacing: var(--tracking-normal);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  color: var(--color-ink);
}
/* Tighter gap between eyebrow and heading; heading big + single line */
.wwd .section__head > * + * { margin-block-start: var(--space-2xs); }
.wwd .section__head h2 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: var(--lh-tight);
  color: var(--color-brand);             /* Werq blue */
}
@media (min-width: 62rem) {
  .wwd .section__head h2 { white-space: nowrap; }  /* one line on desktop */
}
.wwd .section__head .lead { max-inline-size: 56ch; margin-block-start: var(--space-sm); }

.wwd__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 62rem) {
  .wwd__grid { grid-template-columns: 1fr; max-inline-size: 32rem; }
}

.wwd__item {
  display: flex;
  flex-direction: column;
  text-align: start;
}

/* Square image slot (falkor 1:1), reduced 20% from full column width */
.wwd__media {
  aspect-ratio: 1 / 1;
  inline-size: 80%;
  background: var(--color-surface-sunken);
  margin-block-end: var(--space-lg);
}
.wwd__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.wwd__name {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);  /* falkor card title */
  font-weight: 400;
  color: var(--color-ink);
}
.wwd__sub {
  margin-block-start: var(--space-3xs);
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--color-ink);
}
.wwd__text {
  margin-block-start: var(--space-sm);
  color: var(--color-ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  max-inline-size: 42ch;
}
.wwd__text b { font-family: var(--font-display); font-weight: 400; color: var(--color-ink); }

/* Falkor underline arrow link, pinned to the bottom so columns stay equal */
.wwd__link {
  margin-block-start: auto;
  padding-block-start: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 1rem;
  border-block-end: 1px solid var(--color-ink);
  transition: color 300ms var(--ease-standard), border-color 300ms var(--ease-standard);
}
.wwd__link:hover {
  color: var(--color-muted);
  border-block-end-color: var(--color-muted);
}
.wwd__link svg { transition: transform 300ms var(--ease-standard); }
.wwd__link:hover svg { transform: translateX(4px); }

/* ══════════════════════════════════════════════════════════════════════
   5 · CUSTOM DEV — the quiet section
   ══════════════════════════════════════════════════════════════════════ */
/* Falkor "Agentic AI" pattern: pale-blue panel + media strip flush below */
.customdev { display: flex; flex-direction: column; }

.customdev__panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
  gap: clamp(2rem, 1.5rem + 3vw, 5rem);
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
  background: var(--color-brand-950);             /* Werq blue */
  color: #ffffff;
}
@media (max-width: 62rem) { .customdev__panel { grid-template-columns: 1fr; } }

.customdev__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.625rem);   /* falkor panel headline */
  font-weight: 400;
  line-height: var(--lh-snug);
  color: #ffffff;
  max-inline-size: 18ch;
}
.customdev__text {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.5;
  max-inline-size: 52ch;
}
/* White button on the blue panel (falkor bg-white pattern) */
.customdev__cta {
  margin-block-start: var(--space-lg);
  --btn-bg: #ffffff;
  --btn-fg: #1e1e1e;
}
.customdev__cta:hover,
.customdev__cta:active {
  background-color: var(--color-brand);
  color: #ffffff;
}
.customdev__cta svg { transition: transform 300ms var(--ease-standard); }
.customdev__cta:hover svg { transform: translateX(4px); }

/* Media strip flush under the panel (video/image drops in here) */
.customdev__media {
  block-size: clamp(14rem, 38vh, 22rem);
  background: var(--color-surface-sunken);
  overflow: hidden;
}
.customdev__media img,
.customdev__media video,
.customdev__video {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
}

/* ══════════════════════════════════════════════════════════════════════
   6 · INSIGHTS
   ══════════════════════════════════════════════════════════════════════ */
.insights__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-block-start: var(--space-xl);
}
@media (max-width: 62rem) { .insights__grid { grid-template-columns: 1fr; } }
/* Insights heading: exactly two lines (break lives in the markup) */
section[aria-labelledby="insights-title"] .section__head { max-inline-size: none; }
#insights-title { max-inline-size: none; }
@media (min-width: 48rem) {
  #insights-title { white-space: nowrap; }  /* each half holds its line */
}

.insight-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line-soft);
  background: var(--color-surface);
  transition: border-color var(--dur-base), box-shadow var(--dur-base), transform var(--dur-base);
}
.insight-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-brand-100); }

/* Square image holder — fills the card width edge to edge */
.insight-card__media {
  aspect-ratio: 1 / 1;
  inline-size: 100%;
  background: var(--color-surface-sunken);
  overflow: hidden;
}
.insight-card__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.insight-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--color-muted);
}
.insight-card__industry {
  color: var(--color-brand);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}
.insight-card__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color: var(--color-ink);
}
.insight-card__cta {
  margin-block-start: auto;
  color: var(--color-brand);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  display: inline-flex; align-items: center; gap: var(--space-3xs);
}

/* ══════════════════════════════════════════════════════════════════════
   7 · CLOSING CTA (dark)
   ══════════════════════════════════════════════════════════════════════ */
.closing {
  position: relative;
  overflow: hidden;
  background: var(--navy-950);
  isolation: isolate;
}
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(37, 99, 235, 0.35), transparent 60%),
    radial-gradient(60% 90% at 85% 100%, rgba(224, 162, 78, 0.12), transparent 55%);
}
/* Ambient background video at 10% opacity, under the glow gradients */
.closing__video {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.1;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .closing__video { display: none; }
}

.closing__inner {
  max-inline-size: 46rem;
  margin-inline: auto;
  text-align: center;
  padding-block: var(--space-3xl);
}
.closing__title { color: #fff; font-size: var(--fs-2xl); font-weight: var(--fw-extrabold); letter-spacing: var(--tracking-tight); }
.closing__text { margin: var(--space-md) auto 0; color: rgba(232, 238, 248, 0.8); font-size: var(--fs-md); max-inline-size: 52ch; }
.closing__actions { margin-block-start: var(--space-xl); display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap; }
.closing__footprint { margin-block-start: var(--space-lg); margin-inline: auto; color: rgba(232, 238, 248, 0.6); font-size: var(--fs-md); }

/* ══ Reduced motion: neutralise hero entrance animation ════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero__copy > * { opacity: 1; transform: none; animation: none; }
}
