/* ── FRAME & FLOW SECTION ── */

#frameflow {
  background: var(--white);
  color: var(--black);
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  padding-top: var(--rail-x);
}

/* ── TOP SPLIT PANEL ── */
.ff-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 64vh;
  position: relative;
}

/* ── FRAME SIDE (LEFT) ── */
.ff-panel-frame {
  position: relative;
  background: hsl(220, 15%, 10%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 60px;
}

/* Geometric grid canvas behind */
#ff-geo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

.ff-frame-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Corner bracket box around FRAME word */
.ff-frame-box {
  position: relative;
  padding: 20px 40px;
}

.ff-frame-box::before,
.ff-frame-box::after,
.ff-frame-box .ff-bc-tr,
.ff-frame-box .ff-bc-bl {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.ff-frame-box::before { content: ''; top: 0; left: 0; border-top: 1.5px solid rgba(255,255,255,0.5); border-left: 1.5px solid rgba(255,255,255,0.5); }
.ff-frame-box::after  { content: ''; bottom: 0; right: 0; border-bottom: 1.5px solid rgba(255,255,255,0.5); border-right: 1.5px solid rgba(255,255,255,0.5); }
.ff-frame-box .ff-bc-tr { top: 0; right: 0; border-top: 1.5px solid rgba(255,255,255,0.5); border-right: 1.5px solid rgba(255,255,255,0.5); }
.ff-frame-box .ff-bc-bl { bottom: 0; left: 0; border-bottom: 1.5px solid rgba(255,255,255,0.5); border-left: 1.5px solid rgba(255,255,255,0.5); }

/* Subtle full border inside corners */
.ff-frame-box::before,
.ff-frame-box::after,
.ff-frame-box .ff-bc-tr,
.ff-frame-box .ff-bc-bl {
  transition: opacity 0.4s ease;
}

.ff-word-frame {
  font-family: 'Bebas Neue', var(--sans);
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
  color: #ffffff;
  text-transform: uppercase;
  display: block;
}

.ff-panel-frame .ff-def,
.ff-panel-flow .ff-def {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  /* Pin to same absolute distance from panel bottom */
  position: absolute;
  bottom: 48px;
  left: 0; right: 0;
  text-align: center;
}

/* ── FLOW SIDE (RIGHT) ── */
.ff-panel-flow {
  position: relative;
  background: hsl(195, 20%, 12%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 60px;
}

/* Fluid canvas behind */
#ff-fluid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ff-flow-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.ff-word-flow {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #ffffff;
  display: block;
  transform: rotate(-2deg);
}

/* ── DIVIDER LINE ── */
.ff-divider {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.08);
  z-index: 10;
  pointer-events: none;
}

/* + symbol at the centre of the divider */
.ff-divider-plus {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsl(15, 12%, 8%);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ff-divider-plus svg {
  opacity: 0.5;
}

/* ── BOTTOM CAPTION BAND ── */
.ff-caption-band {
  background: var(--white);
  padding: 64px 40px;
  text-align: center;
  border-top: 1px solid rgba(13,12,11,0.06);
}

.ff-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ff-eyebrow::before, .ff-eyebrow::after {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--red);
}

.ff-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.65;
  color: var(--s300);
  max-width: 700px;
  margin: 0 auto;
}


/* ── WORD ENTRANCE ANIMATIONS ── */

/* FRAME: sharp snap — starts scaled down + shifted left, pops into place */
@keyframes ff-frame-in {
  0%   { opacity: 0; transform: translateX(-28px) scaleX(0.82); letter-spacing: -0.04em; }
  60%  { opacity: 1; transform: translateX(4px)   scaleX(1.02); letter-spacing: 0.14em; }
  100% { opacity: 1; transform: translateX(0)     scaleX(1);    letter-spacing: 0.12em; }
}

/* FLOW: slow horizontal wipe left → right */
@keyframes ff-flow-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

.ff-word-frame {
  opacity: 0;
}

.ff-word-frame.ff-animate {
  animation: ff-frame-in 0.45s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

.ff-word-flow {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #ffffff;
  display: block;
  transform: rotate(-2deg);
  clip-path: inset(0 100% 0 0);
}

.ff-word-flow.ff-animate {
  animation: ff-flow-wipe 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
