/* ============================================================
   visual-texture.css — Phase 1: ghost letterforms + scaffold lines
   Editorial depth without clutter. Scoped under `fd-` classes so it
   never collides with Webflow-generated class names.
   Colors use literal rgba (token values) for cross-browser safety;
   no color-mix() / container units (see Phase 0 audit).
   Load order: ... -> main.css -> components/visual-texture.css
   ============================================================ */

/* ---- Section that hosts texture: positioning + stacking context ----
   NOTE: do NOT put overflow/contain/transform here — those break
   `position: sticky` on descendants (these sections pin scroll images).
   The ghost bleed is clipped by an inner .fd-ghost-clip layer instead. */
.fd-has-texture {
  position: relative;
  isolation: isolate;      /* contains the z-index stack */
}

/* Keep real Webflow content above the texture layer.
   Raise every direct child EXCEPT the texture elements themselves
   (works whether the section wraps content in .padding-global or a plain div). */
.fd-has-texture > :not(.fd-ghost):not(.fd-ghost-clip):not(.fd-hero-vrule) {
  position: relative;
  z-index: 2;
}

/* Ghost clip layer: absolutely fills the section, clips the oversized
   letter's bleed (so no horizontal page scroll) WITHOUT clipping the
   section itself. Sits at z-index 0 -> always behind real content. */
.fd-ghost-clip {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* =================== Ghost wordmark =================== */
.fd-ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.fd-ghost__word {
  position: absolute;
  left: 50%;
  bottom: -0.08em;                 /* slight bleed off the lower edge */
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-heading, "Fraunces", Georgia, serif);
  font-weight: 700;
  font-size: clamp(7rem, 36vw, 30rem);
  line-height: 0.78;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: rgba(26, 24, 21, 0.05);   /* Burned Bean #1A1815 @ ~5% on cream */
}

/* Variant: terracotta-tinted ghost for warmer sections */
.fd-ghost__word.is-warm {
  color: rgba(196, 136, 106, 0.10); /* #C4886A @ ~10% */
}

/* =================== Oversized single ghost letters =================== */
/* Spell "Fint" down the page: F (left), i (right), n (left), t (right).
   One per section, alternating edges, bleeding off the side. */
.fd-ghost-letter {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-family: var(--font-heading, "Fraunces", Georgia, serif);
  font-weight: 700;
  font-size: clamp(30rem, 92vw, 90rem);   /* way oversized — fills negative space */
  line-height: 0.68;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: rgba(26, 24, 21, 0.06);   /* same warm-dark tone as the hero ghost */
  user-select: none;
  -webkit-user-select: none;
}

.fd-ghost-letter.is-left  { left: -0.14em; }    /* wide glyphs (F, n) hang off the edge */
.fd-ghost-letter.is-right { right: -0.14em; }

/* Vertical anchor overrides (default is centered) */
.fd-ghost-letter.is-top    { top: 0;    bottom: auto; transform: none; }
.fd-ghost-letter.is-bottom { top: auto; bottom: 0;    transform: none; }

/* Narrow glyphs (i, t) sit just inside the edge so the whole letter reads */
.fd-ghost-letter.is-narrow.is-left  { left: 3vw; }
.fd-ghost-letter.is-narrow.is-right { right: 3vw; }

@media (max-width: 767px) {
  .fd-ghost-letter { font-size: clamp(18rem, 95vw, 34rem); }
  .fd-ghost-letter.is-left  { left: -0.18em; }
  .fd-ghost-letter.is-right { right: -0.18em; }
  .fd-ghost-letter.is-narrow.is-left  { left: 4vw; }
  .fd-ghost-letter.is-narrow.is-right { right: 4vw; }
}

/* =================== Scaffold lines =================== */
/* Labeled horizontal rule — editorial section header */
.fd-scaffold-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.fd-rule {
  flex: 1 1 auto;
  height: 2px;                     /* unified site-wide line width */
  min-width: 2rem;
  background: rgba(26, 24, 21, 0.14);
  transform: translateZ(0);        /* avoid sub-pixel blur on retina */
}

.fd-rule--vertical {
  width: 2px;
  height: auto;
  align-self: stretch;
  flex: 0 0 2px;
}

.fd-label {
  flex: 0 0 auto;
  font-family: var(--font-body, "Inter", system-ui, sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-primary, #c4886a);
}

.fd-label--muted {
  color: rgba(26, 24, 21, 0.55);
  font-weight: 500;
}

/* =================== Hero-specific =================== */
/* Vertical scaffold line dividing the hero's editorial grid */
.fd-hero-vrule {
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 50%;
  width: 1px;
  background: rgba(26, 24, 21, 0.12);
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 767px) {
  .fd-hero-vrule { display: none; }      /* grid stacks -> no column divider */
  .fd-scaffold-top { gap: 0.75rem; margin-bottom: 1.75rem; }
  .fd-label { font-size: 0.6875rem; letter-spacing: 0.12em; }
  .fd-ghost__word { font-size: clamp(5rem, 44vw, 14rem); }
}
