/* ============================================================
   Frame Theory — bridge for inner pages
   Loaded AFTER css/style.css, the page stylesheet and ft-design.css on
   every public page except the homepage. It maps the old design
   variables onto the new tokens and switches off the retired effects
   (custom cursor, scroll-progress bar, shimmer/aurora) so every page
   shares the same nav, footer, type and theme. style.css itself is not
   edited because /admin, /portal and /game still load it.
   ============================================================ */

/* Old font variables now resolve to Inter Tight */
:root, [data-theme="dark"] {
  --font-serif:   var(--font);
  --font-sans:    var(--font);
  --font-display: var(--font);
  --ease-out:     cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out:  cubic-bezier(0.65, 0.02, 0.35, 1);
  --card-bg:      var(--bg-raised);
  --bg-footer:    var(--bg);
  --gold-light:   var(--gold-soft);
  --cream:        var(--text-2);
}

/* Retired effects */
body { cursor: auto; }
.cursor, .cursor-follower, .scroll-progress, .nav-backdrop, .aurora, .hero-bg::before, .hero-bg::after { display: none !important; }
.theme-toggle { cursor: pointer; }
.careers-filter-btn, .blog-filter-btn { cursor: pointer; }
.btn-primary, .btn-outline { transform: none !important; }

/* Headings: bold Inter Tight with tight tracking; emphasised words take the one gradient */
h1, h2, .section-title, .page-title {
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
h1 em, h2 em, h3 em, .section-title em, .page-title em, [class*="title"] em, [class*="hero"] em {
  font-style: normal !important;
  font-family: inherit !important;
  background: var(--grad) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
  padding-bottom: 0.08em;
}
em { font-style: normal; }
.section-label {
  font-family: var(--font);
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
}

/* Pill buttons, large-radius cards, hairline borders */
.btn-primary, .btn-outline, button[type="submit"].btn-primary {
  border-radius: 999px !important;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
}
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.blog-card, .work-card, .svc-card, .portfolio-card, .careers-card, .market-service-card, .service-panel, .cap-card, .country-card {
  border-radius: var(--r-card);
  border-color: var(--line);
}
input, select, textarea { font-family: var(--font); }

/* Anchors clear the floating nav; sticky page toolbars sit beneath it */
[id] { scroll-margin-top: 96px; }
.filter-section { top: 86px; }

/* Page content leaves room for the pill nav */
.page-content { padding-top: 0; }

/* New easing for the reveal that inner pages still use */
.reveal, .reveal-left, .reveal-right {
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

/* Footer overrides for old generic `footer` rule */
footer.ft-footer { padding: clamp(56px, 8vw, 110px) var(--gutter) 28px; background: var(--bg); }

/* Retire the old grid-line and glow backgrounds on page heroes */
.page-hero::before, .about-left::before, .contact-info::before,
.page-hero-bg::before, .page-hero-bg::after,
.portfolio-hero-bg::before, .portfolio-hero-bg::after,
.vogue-hero-bg::before, .vogue-hero-bg::after {
  content: none !important;
  background: none !important;
}

/* ============================================================
   Homepage feel on inner pages
   ============================================================ */

/* Hero headline: the homepage scale, tracking and silver fade */
body.ft-page main h1 {
  font-family: var(--font) !important;
  font-weight: 700 !important;
  font-size: clamp(2.7rem, 6.6vw, 5.6rem) !important;
  letter-spacing: -0.045em !important;
  line-height: 1.06 !important;
  background: var(--silver);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-bottom: 0.06em;
}
/* Long or article-style titles stay readable */
body.ft-p-frame-theory-os main h1,
body.ft-p-blog-post main h1,
body.ft-p-career main h1,
body.ft-p-cookies main h1 { font-size: clamp(2.1rem, 4.6vw, 3.8rem) !important; }
body.ft-page main h1 em { background-image: var(--grad) !important; -webkit-background-clip: text !important; background-clip: text !important; }

/* Corner brackets locking onto the hero headline (built by js/ft-motion.js) */
.ft-pgbr {
  position: absolute; z-index: 3; pointer-events: none;
  --o: 90px; --pad: 20px;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}
.ft-pgbr.is-on { opacity: 1; }
.ft-pgbr .b {
  position: absolute; width: 24px; height: 24px; border: 0 solid var(--gold);
  transition: transform 1.2s var(--ease-in-out);
  will-change: transform;
}
.ft-pgbr.is-scrub .b { transition: none; }
.ft-pgbr .b-tl { left: calc(var(--pad) * -1); top: calc(var(--pad) * -1); border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 7px; transform: translate(calc(var(--o) * -1), calc(var(--o) * -1)); }
.ft-pgbr .b-tr { right: calc(var(--pad) * -1); top: calc(var(--pad) * -1); border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 7px; transform: translate(var(--o), calc(var(--o) * -1)); }
.ft-pgbr .b-bl { left: calc(var(--pad) * -1); bottom: calc(var(--pad) * -1); border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 7px; transform: translate(calc(var(--o) * -1), var(--o)); }
.ft-pgbr .b-br { right: calc(var(--pad) * -1); bottom: calc(var(--pad) * -1); border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 7px; transform: translate(var(--o), var(--o)); }
.ft-pgbr.is-locked { --o: 0px; }

/* Headings rise as they enter (class added by JS only to below-the-fold items) */
.ft-rise { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.ft-rise.ft-in { opacity: 1; transform: none; }

/* Closing call-to-action (components/footer.php) */
.ft-cta {
  text-align: center;
  padding: clamp(80px, 12vw, 170px) var(--gutter) clamp(70px, 10vw, 140px);
}
.ft-cta h2 {
  font-size: clamp(2.8rem, 8vw, 7rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1.04;
  margin: 14px 0 6px; padding-bottom: 0.06em;
}
.ft-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: clamp(22px, 3vw, 36px); }

@media (prefers-reduced-motion: reduce) {
  .ft-pgbr .b { transition: none; }
  .ft-rise { opacity: 1; transform: none; }
}

/* Retired gold shimmer on hero emphasis words */
.vogue-hero h1 em { animation: none !important; display: block; }

/* About: founder card without a photo, linking to the social profiles */
.founder-card {
  position: relative; aspect-ratio: auto !important; min-height: 0;
  padding: clamp(28px, 4vw, 52px); border-radius: var(--r-card) !important;
  background: var(--bg-raised); border: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 6px;
}
.founder-card::before, .founder-card::after {
  content: ''; position: absolute; width: 26px; height: 26px; border: 0 solid var(--gold); pointer-events: none;
}
.founder-card::before { left: 14px; top: 14px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 8px; }
.founder-card::after { right: 14px; bottom: 14px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 8px; }
.founder-card-label { font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.founder-card-name { font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.06; margin-top: 8px; }
.founder-card-role { color: var(--gold); font-weight: 500; margin: 0 0 22px !important; }
.founder-card-links { display: grid; gap: 10px; }
.founder-card-link {
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 22px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); font-weight: 600; letter-spacing: -0.01em;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out), transform 0.45s var(--ease-out);
}
.founder-card-link span { flex: 1; }
.founder-card-link i { font-style: normal; color: var(--muted); transition: transform 0.4s var(--ease-out), color 0.3s; }
.founder-card-link:hover { border-color: var(--text); background: var(--line); transform: translateY(-2px); }
.founder-card-link:hover i { transform: translate(3px, -3px); color: var(--text); }
.founder-card-link:active { transform: scale(0.98); }
