/* AskFrankie homepage. Brand rules: brand/guidelines.md in askfrankie-v2. */

@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/familjen-grotesk-latin.woff2") format("woff2");
}

:root {
  --paper: #F4F3EF;
  --tint: #ECEBE5;
  --ink: #161616;
  --slate: #54555B;
  --mist: #9B9B9E;
  --hairline: #E2E1DA;
  --blue: #2B3BE0;
  --blue-press: #2230C4;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Familjen Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

h1, h2 {
  margin: 0;
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Buttons: capsules, blue only for the primary action */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 0.875rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); }
.btn-secondary { border: 1px solid rgb(22 22 22 / 0.16); color: var(--ink); }
.btn-secondary:hover { border-color: rgb(22 22 22 / 0.4); }
.btn:focus-visible, .nav-link:focus-visible, .hero-download-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Nav: sits over the hero; the small wordmark and a backdrop appear once the big one scrolls away */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-brand { display: block; width: 92px; color: var(--ink); transition: opacity 200ms ease; }
.nav-brand svg { display: block; width: 100%; height: auto; }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-link { font-size: 0.9375rem; font-weight: 520; text-decoration: none; color: var(--slate); white-space: nowrap; }
.nav-link:hover { color: var(--ink); }
.js .nav:not(.is-scrolled) .nav-brand { opacity: 0; pointer-events: none; }
.nav.is-scrolled {
  background: rgb(244 243 239 / 0.82);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 1px 0 var(--hairline);
}

/* Hero: the wordmark with caret Frankie standing in for the caret */
.hero {
  display: grid;
  place-items: center;
  padding: clamp(112px, 14vh, 160px) var(--gutter) 0;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.hero-mark {
  display: block;
  width: min(880px, 92vw);
  height: auto;
  color: var(--ink);
  overflow: visible;
}
.hero-title {
  margin-top: clamp(28px, 4vw, 48px);
  font-size: clamp(2.5rem, 6.4vw, 5rem);
}
.hero-lede {
  margin-top: 16px;
  max-width: 30ch;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--slate);
}
.hero .actions { margin-top: 32px; }

.hero-downloads {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: 24px;
}
.hero-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 560;
  text-decoration: none;
  transition: color 160ms ease;
}
.hero-download-link span {
  text-decoration: underline rgb(22 22 22 / 0.3);
  text-underline-offset: 4px;
}
.hero-download-link:hover { color: var(--blue); }
.hero-download-link:hover span { text-decoration-color: currentColor; }
.hero-download-link svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.hero-download-account {
  padding-inline-start: 24px;
  border-inline-start: 1px solid var(--hairline);
}
.hero-download-account p {
  color: var(--slate);
  font-size: 0.8125rem;
  line-height: 1.2;
}

/* Caret Frankie (ported from the app's frankie-caret-character) */
.frankie { overflow: visible; }
.frankie-limb { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.frankie-end { fill: var(--ink); }
.frankie-body { fill: var(--blue); }
.frankie-eye ellipse { fill: #fff; }
.frankie-pupil {
  fill: var(--ink);
  translate: calc(var(--px, 0) * 1px) calc(var(--py, 0) * 1px);
  transition: translate 240ms var(--ease);
}
.frankie-smile, .frankie-happy path {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
}
.frankie-shadow {
  fill: rgb(0 0 0 / 0.08);
  transform-box: fill-box;
  transform-origin: center;
  animation: frankie-shadow 3.2s ease-in-out infinite;
}
.frankie-figure { animation: frankie-float 3.2s ease-in-out infinite; }
.frankie-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: frankie-blink 5s infinite;
}
.frankie-eye + .frankie-eye { animation-delay: 0.02s; }
.frankie-happy, .frankie-arm-wave { opacity: 0; }
.frankie-arm-wave {
  transform-box: view-box;
  transform-origin: 79px 58px;
}
.frankie.is-waving .frankie-eyes, .frankie.is-waving .frankie-arm-down { opacity: 0; }
.frankie.is-waving .frankie-happy { opacity: 1; }
.frankie.is-waving .frankie-arm-wave { opacity: 1; animation: frankie-wave 0.5s ease-in-out 4 alternate; }
[data-frankie] { cursor: pointer; }

@keyframes frankie-float { 50% { translate: 0 -2.5px; } }
@keyframes frankie-shadow { 50% { scale: 0.86 1; } }
@keyframes frankie-blink {
  0%, 94%, 100% { scale: 1 1; }
  97% { scale: 1 0.1; }
}
@keyframes frankie-wave {
  from { rotate: -6deg; }
  to { rotate: 10deg; }
}

/* Entrance: letters rise, then Frankie drops onto the end of the name */
.js .hero-letters { animation: rise 700ms var(--ease) both; }
.js .hero-frankie .frankie-drop { animation: drop 640ms cubic-bezier(0.3, 1.4, 0.5, 1) 420ms both; }
.js .hero-title, .js .hero-lede, .js .hero .actions { animation: rise 700ms var(--ease) both; }
.js .hero-title { animation-delay: 180ms; }
.js .hero-lede { animation-delay: 260ms; }
.js .hero .actions { animation-delay: 340ms; }

@keyframes rise {
  from { opacity: 0; translate: 0 18px; }
}
@keyframes drop {
  from { opacity: 0; translate: 0 -40px; }
  60% { opacity: 1; }
}

/* Sections */
.band { padding: clamp(80px, 12vw, 160px) 0; }
.band--dark { background: var(--ink); color: var(--paper); }
.band--tint { background: var(--tint); }

.band-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.band-head h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.band-head p { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); color: var(--slate); max-width: 34ch; }
.band--dark .band-head p { color: var(--mist); }
.band-head--center { justify-items: center; text-align: center; }

@media (min-width: 860px) {
  .band-head:not(.band-head--center) {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 48px;
  }
}

.film { margin: 0; }
.film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  background: var(--tint);
}
.band--dark .film video { background: #22222a; }
.film figcaption {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--slate);
  max-width: 40ch;
}

.film-pair {
  display: grid;
  gap: 40px 24px;
}
@media (min-width: 860px) {
  .film-pair { grid-template-columns: 1fr 1fr; }
  .film-pair .film:nth-child(2) { transition-delay: 120ms; }
}

/* "Frankie runs your ..." with the caret doing the typing */
.typed-wrap { text-align: center; }
.typed-line { font-size: clamp(2.25rem, 6.4vw, 5.25rem); }
.typed { color: var(--ink); }
.caret {
  display: inline-block;
  width: 0.34em;
  height: 0.72em;
  margin-left: 0.06em;
  border-radius: 0.03em;
  background: var(--blue);
  translate: 0 0.04em;
  animation: caret-blink 1.15s steps(1) infinite;
}
.typed-wrap.is-typing .caret { animation: none; }
.typed-wrap p {
  margin: 24px auto 0;
  max-width: 36ch;
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  color: var(--slate);
}
@keyframes caret-blink { 50% { opacity: 0; } }

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cta-frankie { width: 104px; height: 130px; margin-bottom: 24px; }
.cta h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 32px; }

.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
  font-size: 0.875rem;
  color: var(--slate);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}
.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Scroll reveal (content stays visible without JavaScript) */
.js [data-reveal] {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 700ms var(--ease), translate 700ms var(--ease);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

@media (max-width: 520px) {
  body { font-size: 1.0625rem; }
  .nav-actions { gap: 14px; }
  /* The phone menu has no room for a fifth item; FAQ stays in the footer there. */
  .nav-link-wide { display: none; }
  .nav-brand { width: 76px; }
  .nav-actions .btn-sm { padding: 0 12px; }
  .hero { padding-top: 88px; }
  .actions { width: 100%; }
  .hero .actions .btn, .cta .actions .btn { flex: 1 1 0; }
  .hero-downloads { flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; }
  .hero-download-account { padding: 10px 0 0; border-inline-start: 0; border-top: 1px solid var(--hairline); }
  .film video { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; translate: none; }
}

/* Pricing page */
.pricing { padding: clamp(120px, 14vw, 168px) 0 clamp(80px, 12vw, 140px); }
.pricing-head { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.pricing-head h1 { font-size: clamp(3rem, 7vw, 5.5rem); }
.pricing-head p { margin-top: 16px; font-size: clamp(1.125rem, 1.8vw, 1.3125rem); color: var(--slate); }

.plans {
  display: grid;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}
@media (min-width: 760px) {
  .plans { grid-template-columns: 1fr 1fr; }
}
.plan {
  padding: clamp(24px, 3vw, 36px);
  border-radius: 20px;
  background: var(--tint);
}
.plan h2 { font-size: 1.75rem; letter-spacing: -0.02em; }
.plan-for { margin-top: 4px; color: var(--slate); }
.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-top: 28px;
  color: var(--slate);
}
.plan-amount {
  font-size: clamp(3rem, 5vw, 3.75rem);
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
}
.plan ul {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgb(22 22 22 / 0.08);
  list-style: none;
  font-size: 1rem;
}

.pricing-notes {
  display: grid;
  gap: 6px;
  margin: 32px auto 0;
  padding: 0;
  list-style: none;
  text-align: center;
  font-size: 1rem;
  color: var(--slate);
}
.pricing .actions { margin-top: 40px; }

/* Pricing page: what's included */
.compare-band { padding: 0 0 clamp(80px, 12vw, 140px); }
.compare-head { text-align: center; margin-bottom: clamp(32px, 5vw, 48px); }
.compare-head h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.compare-head p { margin: 16px auto 0; max-width: 40ch; font-size: clamp(1.125rem, 1.8vw, 1.3125rem); color: var(--slate); }

.compare {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 1rem;
}
.compare th, .compare td {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  font-weight: 400;
}
.compare thead th { padding-top: 0; font-size: 0.9375rem; font-weight: 560; color: var(--slate); }
.compare th:not(:first-child), .compare td { width: 24%; text-align: center; }
.tick {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash { color: var(--mist); }
.compare .compare-group th {
  padding: 40px 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
}
.compare tbody:first-of-type .compare-group th { padding-top: 16px; }
.compare-band .actions { margin-top: 40px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Features page */
.features { padding: clamp(120px, 14vw, 168px) 0 clamp(80px, 12vw, 140px); }
.feature-group { max-width: 1040px; margin: 0 auto; padding: 40px 0; border-top: 1px solid var(--hairline); }
.feature-group h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.feature-tag { margin-left: 8px; font-size: 0.8125rem; font-weight: 560; letter-spacing: 0; color: var(--slate); vertical-align: middle; }
.feature-list { display: grid; gap: 24px 32px; margin: 24px 0 0; }
.feature-list dt { font-size: 1.0625rem; font-weight: 560; }
.feature-list dd { margin: 4px 0 0; font-size: 1rem; color: var(--slate); }
@media (min-width: 640px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .feature-list { grid-template-columns: repeat(3, 1fr); } }
.features .actions { margin-top: 48px; }

@media (max-width: 400px) {
  .nav-actions { gap: 10px; }
  .nav-link { font-size: 0.875rem; }
}

/* "What do you do?" — try Frankie for your business */
.try { padding-top: clamp(48px, 5vw, 64px); }
.try .band-head { margin-bottom: clamp(24px, 4vw, 40px); }

.try-ask {
  display: flex;
  gap: 8px;
  max-width: 620px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(22 22 22 / 0.08), 0 12px 32px -16px rgb(22 22 22 / 0.18);
}
.try-ask:focus-within { box-shadow: 0 0 0 2px var(--blue), 0 12px 32px -16px rgb(22 22 22 / 0.18); }
.try-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  outline: none;
}
.try-input::placeholder { color: #6E6E73; }
.try-go { flex: none; }

/* The demo: an Ask Frankie window, styled like the app */
.fx {
  --fx-text: #1D1D1F;
  --fx-muted: #6E6E73;
  --fx-line: #E5E5EA;
  --fx-fill: hsl(240 11% 96%);
  --fx-blue: hsl(235 74% 52%);
  display: flex;
  flex-direction: column;
  height: min(620px, 78svh);
  max-width: 1000px;
  margin: 12px auto 0;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  color: var(--fx-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 40px 80px -40px rgb(22 22 22 / 0.45);
  text-align: left;
}
.fx[hidden], .try-ask[hidden] { display: none; }
.fx:not([hidden]) { animation: fx-open 520ms var(--ease) both; }
@keyframes fx-open { from { opacity: 0; scale: 0.96; translate: 0 16px; } }

.fx-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--fx-line);
  flex: none;
}
.fx-lights { display: flex; gap: 7px; }
.fx-lights i { width: 11px; height: 11px; border-radius: 50%; background: #E5E5EA; }
.fx-name { font-size: 0.8125rem; font-weight: 600; color: var(--fx-muted); }
.fx-tools { display: flex; gap: 14px; margin-left: auto; }
.fx-tools svg, .fx-tab svg, .fx-close svg, .fx-send svg, .fx svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.fx-tools svg { color: var(--fx-muted); }

.fx-body { position: relative; display: flex; flex: 1 1 auto; min-height: 0; }
.fx-chat { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.fx-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.fx-scroll:focus { outline: none; }
.fx-scroll:focus-visible { outline: 2px solid var(--fx-blue); outline-offset: -2px; }
.fx-msgs { display: grid; gap: 22px; max-width: 760px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px); }

.fx-user { justify-self: end; max-width: 80%; padding: 11px 16px; border-radius: 20px; background: var(--fx-fill); line-height: 1.55; }
.fx-reply { display: grid; gap: 12px; line-height: 1.75; animation: rise 300ms var(--ease) both; }
.fx-activity { display: flex; align-items: center; gap: 4px; font-size: 0.875rem; color: var(--fx-muted); }
.fx-activity .caret { font-size: 1.125rem; background: var(--fx-blue); }
.fx-text { line-height: 1.75; }

.fx-steps { border: 1px solid rgb(229 229 234 / 0.9); border-radius: 12px; padding: 4px 6px; }
.fx-steps-head {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px; border: 0; background: none;
  font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--fx-muted); cursor: pointer; text-align: left;
}
.fx-steps-head svg { width: 14px; height: 14px; rotate: 90deg; transition: rotate 200ms var(--ease); }
.fx-steps.is-collapsed .fx-steps-head svg { rotate: 0deg; }
.fx-steps.is-collapsed .fx-step-list { display: none; }
.fx-step-list { display: grid; gap: 2px; margin: 0; padding: 0 0 4px; list-style: none; }
.fx-step { animation: rise 300ms var(--ease) both; }
.fx-step-row {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 7px 6px; border: 0; border-radius: 8px;
  background: none; font: inherit; font-size: 0.9375rem; line-height: 1.45; text-align: left; color: var(--fx-text); cursor: pointer;
}
.fx-step-row:hover { background: var(--fx-fill); }
.fx-step-row:focus-visible { outline: 2px solid var(--fx-blue); outline-offset: 1px; }
.fx-step-row > svg { flex: none; width: 14px; height: 14px; margin-top: 4px; color: var(--fx-muted); transition: rotate 200ms var(--ease); }
.fx-step.is-open .fx-step-row > svg { rotate: 90deg; }
.fx-step-text { flex: 1 1 auto; }
.fx-step-icon { position: relative; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--fx-text); color: #fff; }
.fx-step-icon svg { width: 11px; height: 11px; stroke-width: 3; }
.fx-spin { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--fx-line); border-top-color: var(--fx-blue); animation: fx-spin 700ms linear infinite; display: none; }
.fx-step.is-running .fx-step-icon { background: transparent; }
.fx-step.is-running .fx-step-icon svg { display: none; }
.fx-step.is-running .fx-spin { display: block; }
.fx-step.is-running .fx-step-text { color: var(--fx-muted); }
@keyframes fx-spin { to { rotate: 360deg; } }

.fx-detail { margin: 2px 6px 8px 34px; padding: 12px 14px; border-radius: 12px; background: var(--fx-fill); font-size: 0.875rem; line-height: 1.5; color: #3A3A3C; animation: rise 260ms var(--ease) both; }
.fx-detail-head { margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--fx-text); }
.fx-detail p + p { margin-top: 6px; }
.fx-detail ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.fx-detail li { display: flex; justify-content: space-between; gap: 16px; }
.fx-detail li span:last-child { color: var(--fx-text); text-align: right; }

.fx-file {
  display: flex; align-items: center; gap: 12px; width: min(100%, 320px); min-height: 72px; padding: 10px 12px;
  border: 1px solid rgb(229 229 234 / 0.9); border-radius: 16px; background: #fff; font: inherit; text-align: left; color: var(--fx-text); cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  animation: rise 360ms var(--ease) both;
}
.fx-file:hover { border-color: #C7C7CC; box-shadow: 0 6px 18px -10px rgb(0 0 0 / 0.25); }
.fx-file.is-new { box-shadow: 0 0 0 3px hsl(235 74% 52% / 0.18); }
.fx-file-icon { display: grid; place-items: center; flex: none; width: 40px; height: 48px; border-radius: 8px; background: hsl(0 80% 96%); color: hsl(0 70% 50%); }
.fx-file-icon svg { width: 22px; height: 22px; }
.fx-file-text { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.fx-file-text strong { font-size: 0.875rem; font-weight: 600; }
.fx-file-text span { font-size: 0.75rem; color: var(--fx-muted); }
.fx-file-open { flex: none; padding: 5px 12px; border: 1px solid var(--fx-line); border-radius: 999px; font-size: 0.8125rem; font-weight: 500; }

.fx-composer {
  display: flex; align-items: center; gap: 8px; width: calc(100% - 24px); max-width: 760px; margin: 0 auto; padding: 6px 6px 6px 18px;
  border: 1px solid hsl(263 68% 55% / 0.44); border-radius: 28px; background: rgb(255 255 255 / 0.9);
  box-shadow: 0 8px 32px -12px hsl(263 68% 55% / 0.25), 0 0 0 3px hsl(263 68% 55% / 0.06);
  flex: none;
}
.fx-composer:focus-within { border-color: hsl(263 68% 55% / 0.8); }
.fx-input { flex: 1 1 auto; min-width: 0; height: 40px; border: 0; background: none; font: inherit; color: var(--fx-text); outline: none; }
.fx-input::placeholder { color: var(--fx-muted); }
.fx-send { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--fx-text); color: #fff; cursor: pointer; }
.fx-send:disabled { background: #D1D1D6; cursor: default; }
.fx-hint { flex: none; padding: 6px 0 10px; font-size: 0.6875rem; color: var(--fx-muted); text-align: center; }

.fx-panel { display: flex; flex-direction: column; flex: none; width: 41.5%; min-width: 0; border-left: 1px solid var(--fx-line); background: #F2F2F7; animation: fx-slide 360ms var(--ease) both; }
.fx-panel[hidden] { display: none; }
.fx-panel:focus { outline: none; }
@keyframes fx-slide { from { opacity: 0; translate: 24px 0; } }
.fx-panel-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; border-bottom: 1px solid var(--fx-line); background: #fff; flex: none; }
.fx-tab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--fx-fill); font-size: 0.75rem; font-weight: 500; }
.fx-tab svg { width: 14px; height: 14px; }
.fx-close { display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; border: 0; border-radius: 50%; background: none; color: var(--fx-muted); cursor: pointer; }
.fx-close:hover { background: var(--fx-fill); color: var(--fx-text); }
.fx-panel-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px; }
.fx-page {
  padding: 28px 26px 30px; background: #fff; border-radius: 2px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.12), 0 12px 30px -18px rgb(0 0 0 / 0.3);
  font-size: 0.875rem; line-height: 1.55;
}

.fx-actions { display: flex; flex-wrap: wrap; gap: 8px; animation: rise 360ms var(--ease) both; }

@media (max-width: 760px) {
  .fx { height: min(640px, 80svh); border-radius: 16px; }
  .fx-panel { position: absolute; inset: 0; width: auto; border-left: 0; z-index: 2; }
  .fx-user { max-width: 88%; }
}

/* Frankie's job application, shown as a PDF in the panel */
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/newsreader-italic-latin.woff2") format("woff2");
}
.cv-kicker { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fx-blue); }
.cv-meta { display: grid; gap: 2px; margin: 10px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--fx-line); }
.cv-meta div { display: flex; gap: 12px; }
.cv-meta dt { width: 40px; flex: none; color: var(--fx-muted); }
.cv-meta dd { margin: 0; font-weight: 600; }
.cv-part { margin-top: 16px; }
.cv-part h3 { margin: 0 0 6px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fx-muted); }
.cv-part ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cv-part li { position: relative; padding-left: 18px; }
.cv-part li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 6px; height: 10px; border-radius: 2px; background: var(--fx-blue); }
.cv-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; border-top: 1px solid var(--fx-line); }
.cv-terms p { font-weight: 600; }
.cv-sign { margin-top: 20px; font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 1.75rem; line-height: 1; }
.cv-sign .caret { font-size: 1.5rem; background: var(--fx-blue); }

@media (max-width: 520px) {
  .try-ask { border-radius: 20px; flex-direction: column; padding: 8px; }
  .try-input { height: 48px; padding: 0 12px; }
  .try-go { width: 100%; }
}

/* Frankie builds the hero by hand, then hops onto the end of his name. */
.hero-inner { position: relative; }

.build .hero-letters,
.build .hero-title,
.build .hero-lede,
.build .hero .actions { animation: none; }

.build .hero-letter { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; }
.build .hero-letter.is-up { opacity: 1; }

.build .hero-frankie .frankie-drop { animation: none; opacity: 0; }
.build.is-built .hero-frankie .frankie-drop { opacity: 1; animation: drop 640ms cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.build.is-landed .hero-frankie .frankie-drop { animation: none; }

/* The box below waits until Frankie has landed. */
.build:not(.is-built) .try [data-reveal] { opacity: 0; translate: 0 24px; }
.build.is-built .try [data-reveal] { transition-delay: 500ms; }

/* Working Frankie */
.actor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
}
.actor-flip { width: 100%; height: 100%; transition: scale 160ms ease; }
.actor.is-left .actor-flip { scale: -1 1; }
.actor svg { display: block; width: 100%; height: 100%; overflow: visible; }
.a-shadow { fill: rgb(0 0 0 / 0.08); }

.a-leg, .a-arm { transform-box: view-box; }
.a-leg-l { transform-origin: 50px 99px; }
.a-leg-r { transform-origin: 70px 99px; }
.a-arm-l { transform-origin: 41px 58px; transition: rotate 220ms var(--ease); }
.a-arm-r, .a-wave-r { transform-origin: 79px 58px; transition: rotate 220ms var(--ease); }

.actor.is-walking .a-leg-l { animation: a-step 300ms ease-in-out infinite alternate; }
.actor.is-walking .a-leg-r { animation: a-step 300ms ease-in-out infinite alternate-reverse; }
.actor.is-walking .a-fig { animation: a-bob 150ms ease-in-out infinite alternate; }
.actor.is-walking:not(.is-carrying):not(.is-working) .a-arm-l { animation: a-swing 300ms ease-in-out infinite alternate-reverse; }
.actor.is-walking:not(.is-carrying):not(.is-working) .a-arm-r { animation: a-swing 300ms ease-in-out infinite alternate; }
/* Arms: down by default, both up to carry, one scribbling to work. */
.a-up, .a-wave-r { display: none; }
.actor.is-carrying .a-arm-l, .actor.is-carrying .a-arm-r { display: none; }
.actor.is-carrying .a-up { display: inline; }
.actor.is-working .a-arm-r { display: none; }
.actor.is-working .a-wave-r { display: inline; animation: a-scribble 170ms ease-in-out infinite alternate; }
.actor.is-hopping .a-leg-l { rotate: 18deg; }
.actor.is-hopping .a-leg-r { rotate: -18deg; }

.a-happy { opacity: 0; }
.actor.is-happy .a-happy { opacity: 1; }
.actor.is-happy .a-eyes { opacity: 0; }

@keyframes a-step { from { rotate: -22deg; } to { rotate: 22deg; } }
@keyframes a-bob { to { translate: 0 -3px; } }
@keyframes a-swing { from { rotate: -16deg; } to { rotate: 16deg; } }
@keyframes a-scribble { from { rotate: -10deg; } to { rotate: 14deg; } }

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 560;
  text-decoration: none;
}
.skip-link:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
