/* =====================================================================
   FlyForms — Whistler theme
   Loaded after app.css. Re-maps the site's design tokens to a warm,
   light palette (off-white and white bands, black type, one #7147EB
   accent), Host Grotesk headlines over Inter text, tactile 10px buttons,
   24px cards with a thin warm line, and roomier section spacing.
   ===================================================================== */

:root {
  /* Palette */
  --wh-warm: #faf9f8;
  --wh-white: #ffffff;
  --wh-sand: #f3f0ec;
  --wh-ink: #000000;
  --wh-ink-2: #4a4340;
  --wh-grey: #6f6a66;          /* body copy: Whistler's grey, deepened to pass 4.5:1 */
  --wh-line: #e8e3dc;
  --wh-line-soft: #efede8;
  --wh-accent: #7147eb;        /* primary */
  --wh-accent-deep: #5732d4;   /* primary text on light fills */
  --wh-accent-tint: #eee9fd;
  --wh-accent-rgb: 113 71 235;
  --wh-button: #2d2d2d;
  --wh-display: "Host Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Shadows lifted from the reference */
  --wh-btn-dark: 0 12px 24px -6px rgb(45 32 17 / .4), inset 0 -2px 0 0 #000, 0 3px 7px 0 rgb(0 0 0 / .3);
  --wh-btn-light: 0 3px 3px 0 rgb(209 205 199 / .24), inset 0 -2px 0 0 rgb(240 240 239 / .7),
                  0 1px 2px 0 rgb(178 170 158 / .32), 0 0 0 1px var(--wh-line-soft);
  --wh-float: 0 1px 0 0 var(--wh-line-soft), 0 14px 34px -12px rgb(45 32 17 / .22);
  --wh-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0 0.35 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Site tokens */
  --brand-hue: 287;
  --brand: var(--wh-accent);
  --brand-500: var(--wh-accent);
  --brand-foreground: var(--wh-ink);
  --brand-muted: var(--wh-accent-tint);
  --brand-muted-foreground: var(--wh-accent-deep);
  --background: var(--wh-warm);
  --foreground: var(--wh-ink);
  --card: var(--wh-white);
  --card-foreground: var(--wh-ink);
  --popover: var(--wh-white);
  --popover-foreground: var(--wh-ink);
  --primary: var(--wh-button);
  --primary-foreground: #fbfaf9;
  --secondary: var(--wh-sand);
  --secondary-foreground: var(--wh-ink);
  --muted: var(--wh-sand);
  --muted-foreground: var(--wh-grey);
  --accent: var(--wh-accent-tint);
  --accent-foreground: var(--wh-accent-deep);
  --border: var(--wh-line);
  --input: var(--wh-line);
  --ring: var(--wh-accent);
  --signal: #22a45d;
  --signal-muted: #e5f5eb;
  --signal-foreground: #fff;
  --radius: 10px;
  --glass-ground-1: var(--wh-accent);
  --glass-ground-2: var(--wh-accent);
  --glass-ground-3: #b9a4f6;
  --sidebar: var(--wh-warm);

  /* Type */
  --font-sans: "Inter", "Noto Sans Arabic", ui-sans-serif, system-ui, sans-serif;
  --text-hero: clamp(42px, 5.2vw, 70px);
  --text-hero--line-height: 1.12;
  --text-hero--font-weight: 500;
  --text-hero--letter-spacing: -.02em;
  --text-display: clamp(34px, 3.8vw, 52px);
  --text-display--line-height: 1.12;
  --text-display--font-weight: 500;
  --text-display--letter-spacing: -.015em;
  --text-title: clamp(30px, 3.3vw, 46px);
  --text-title--line-height: 1.15;
  --text-title--font-weight: 500;
  --text-title--letter-spacing: -.01em;
  --text-heading: 22px;
  --text-heading--line-height: 28px;
  --text-heading--font-weight: 500;
  --text-heading--letter-spacing: -.005em;
  --text-subheading: 17px;
  --text-subheading--line-height: 24px;
  --text-subheading--font-weight: 500;
  --text-body: 18px;              /* normal paragraphs */
  --text-body--line-height: 29px;
  --text-body-sm: 14px;
  --text-body-sm--line-height: 21px;
  --text-overline: 12px;          /* small helper labels */
  --text-overline--line-height: 18px;
  --text-overline--font-weight: 500;
  --text-overline--letter-spacing: 0;
}

html { color-scheme: light; background: var(--wh-warm); }
body.theme-whistler { background: var(--wh-warm); color: var(--wh-ink); }

/* ---------- Typography ---------- */

.theme-whistler :is(h1, h2, h3, .text-hero, .text-display, .text-title, .text-heading) {
  font-family: var(--wh-display);
}
.theme-whistler .text-muted-foreground:is(p, li, ul) { letter-spacing: .01em; }
.theme-whistler .text-overline { text-transform: none; }
.theme-whistler .wh-accent { color: var(--wh-accent); }

/* Small titles inside product mock-ups and cards stay small. */
.theme-whistler :is(article, form, [role=dialog], .flyforms-tilt-plate, #tour) .text-title {
  font-size: 26px; line-height: 32px; letter-spacing: -.01em;
}

/* Section labels → pill chips */
.theme-whistler .wh-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--wh-white); color: var(--wh-ink-2);
  box-shadow: var(--wh-btn-light);
  font-size: 13px; line-height: 18px; font-weight: 500;
}
.theme-whistler .wh-band-white .wh-kicker { background: var(--wh-warm); }
.theme-whistler .wh-kicker + h1, .theme-whistler div:has(> .wh-kicker) + div > :is(h1, h2) { margin-top: 18px; }

/* ---------- Header: transparent bar that floats as a white pill on scroll ---------- */

.theme-whistler header.sticky { padding-top: 14px; }
.theme-whistler .flyforms-siteheader {
  position: relative;
  height: 60px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  border-radius: 20px;
  padding-inline: 18px 10px;
  transition: background-color .25s ease, box-shadow .25s ease, max-width .25s ease;
}
.theme-whistler .flyforms-siteheader[data-scrolled=true] {
  background: rgb(255 255 255 / .92);
  backdrop-filter: blur(10px);
  box-shadow: var(--wh-float);
  max-width: 72rem;
  transform: none;
}
@media (min-width: 768px) {
  .theme-whistler .flyforms-siteheader > nav {
    position: absolute; left: 50%; transform: translateX(-50%); gap: 30px;
  }
}
.theme-whistler .flyforms-navlink { color: var(--wh-ink); font-size: 14px; }
.theme-whistler .flyforms-navlink:hover, .theme-whistler .flyforms-navlink.wh-active { color: var(--wh-accent); }
.theme-whistler .flyforms-siteheader .text-subheading { font-family: var(--wh-display); font-size: 22px; font-weight: 500; }

/* ---------- Buttons: tactile, 10px corners ---------- */

.theme-whistler [data-slot=button] {
  border-radius: 10px !important;
  font-weight: 500;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.theme-whistler [data-slot=button].h-12 { height: 46px; padding-inline: 22px; }
.theme-whistler [data-slot=button].bg-primary {
  background: var(--wh-button); color: #fbfaf9; border: 0; box-shadow: var(--wh-btn-dark);
}
.theme-whistler [data-slot=button].bg-primary:hover { background: #1c1c1c; transform: translateY(-1px); }
.theme-whistler [data-slot=button]:is(.bg-background, .border-input, .bg-transparent):not(.bg-primary) {
  background: var(--wh-white); color: var(--wh-ink); border: 0; box-shadow: var(--wh-btn-light);
}
.theme-whistler [data-slot=button]:is(.bg-background, .border-input, .bg-transparent):not(.bg-primary):hover {
  transform: translateY(-1px); background: var(--wh-white);
}

/* ---------- Bands and spacing ---------- */

.theme-whistler .wh-band { position: relative; }
.theme-whistler .wh-band-warm { --band: var(--wh-warm); }
.theme-whistler .wh-band-white { --band: var(--wh-white); }
/* Full-bleed colour behind sections that are themselves width-capped. */
.theme-whistler .wh-band {
  background-color: var(--band);
  box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(0 -100vmax);
}
/* A band's own padding, or its inner section's when the band is only a wrapper. */
.theme-whistler main > section.wh-band:not(.wh-cta):not(.pt-0):not(.py-10):not(:has(> section)),
.theme-whistler main > .wh-band > section:not(.wh-hero) {
  padding-top: clamp(4.5rem, 8vw, 7.5rem);
}
.theme-whistler main > section.wh-band:not(.wh-cta):not(.py-10):not(:has(> section)),
.theme-whistler main > .wh-band > section:not(.wh-hero) {
  padding-bottom: clamp(4.5rem, 8vw, 7.5rem);
}
.theme-whistler #how { border: 0; }
.theme-whistler #how > div { padding-block: 0; }  /* the band already carries the spacing */
.theme-whistler #tour.pt-0 { margin-top: calc(-1 * clamp(2rem, 4vw, 3.5rem)); }

/* ---------- Cards: 24px, thin warm line, no lift ---------- */

.theme-whistler main :is(article.rounded-lg, .rounded-xl.border) { border-radius: 24px; }
.theme-whistler main article.rounded-lg { border-color: var(--wh-line); box-shadow: none; }
.theme-whistler main article.p-6 { padding: 32px; }
.theme-whistler main .rounded-lg.border:not(article) { border-radius: 16px; }
.theme-whistler .wh-band-white :is(article.bg-card, #how .bg-card) { background: var(--wh-warm); }
.theme-whistler .wh-band-warm article.bg-card { background: var(--wh-white); }
.theme-whistler main article .size-10.rounded-md { border-radius: 12px; background: var(--wh-accent-tint); color: var(--wh-accent-deep); }
.theme-whistler main article:hover { border-color: #dcd4c9; }

/* Product screenshots sit in a rounded frame */
.theme-whistler main picture img, .theme-whistler main img[src*="webp"] { border-radius: 18px; }

/* ---------- Heroes: centred, with Whistler's glowing horizon in the primary ---------- */

.theme-whistler .flyforms-wash::before {
  background-image: radial-gradient(70% 55% at 50% 0%, rgb(var(--wh-accent-rgb) / .08), transparent 70%);
}
.theme-whistler .wh-hero { padding-top: clamp(3.5rem, 7vw, 6rem); }
/* Centre the hero's text column only; the product mock-ups keep their own alignment. */
.theme-whistler .wh-hero > .grid > :first-child { text-align: center; }
.theme-whistler .wh-hero > .grid > :first-child :is(.max-w-form, h1, p) { margin-inline: auto; }
.theme-whistler .wh-hero > .grid > :first-child :is(.flex, ul) { justify-content: center; }
.theme-whistler .wh-hero h1 .text-brand { color: var(--wh-ink-2); }
.theme-whistler .wh-hero h1 + div p, .theme-whistler .wh-hero h1 ~ div > p { max-width: 44rem; }

.theme-whistler .wh-hero > .grid { grid-template-columns: minmax(0, 1fr) !important; gap: clamp(3rem, 6vw, 5rem); }
.theme-whistler .wh-hero > .grid > :first-child { display: flex; flex-direction: column; align-items: center; }
.theme-whistler .wh-hero > .grid > :last-child {
  position: relative; width: min(100%, 880px); margin-inline: auto;
}
.theme-whistler .wh-hero > .grid > :last-child::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  /* The ellipse's bright centre sits on the frame's top edge, so the arc rises out of it. */
  left: -24%; right: -24%; top: -230px; height: 270px;
  background: radial-gradient(46% 100% at 50% 100%, var(--wh-accent) 0%, rgb(140 104 242 / .8) 30%, rgb(185 164 246 / .38) 56%, transparent 76%);
  filter: blur(18px);
}
/* Keep the glow behind the frame, not inside it. */
.theme-whistler .wh-hero-home .flyforms-tilt-plate { background: var(--wh-white); }
.theme-whistler .wh-hero-home .flyforms-tilt-plate, .theme-whistler .wh-hero:not(.wh-hero-home) > .grid > :last-child .rounded-xl { border-radius: 24px; border-color: #d9cefb; box-shadow: 0 30px 60px -30px rgb(45 32 17 / .35); }
.theme-whistler .wh-hero-home .flyforms-tilt-plate > div:first-child { background: var(--wh-warm); }
.theme-whistler .wh-hero-home .flyforms-peek { border-radius: 18px; }
.theme-whistler .wh-hero .rounded-full.border.bg-card.text-overline { box-shadow: var(--wh-btn-light); border: 0; font-weight: 500; }

/* Logo strip: dark marks on the hero colour */
.theme-whistler .wh-logos { padding-block: 3rem 4.5rem; }
.theme-whistler .wh-logos img { filter: grayscale(1) brightness(0); opacity: .72; }
.theme-whistler .wh-logos img:hover { opacity: 1; filter: grayscale(1) brightness(0); }
.theme-whistler .wh-logos .text-overline { font-size: 14px; color: var(--wh-ink-2); }

/* ---------- Statement block → Whistler's colour banner, in the primary ---------- */

.theme-whistler .wh-statement .rounded-xl {
  background: var(--wh-accent); border: 0; border-radius: 24px; color: #fff;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.theme-whistler .wh-statement .rounded-xl > svg { color: #fff; opacity: .14; }
.theme-whistler .wh-statement h1 { color: #fff; }
.theme-whistler .wh-statement .text-brand { color: #dcd2fd; }
.theme-whistler .wh-statement .text-muted-foreground { color: rgb(255 255 255 / .86); }
.theme-whistler .wh-statement .wh-kicker { background: var(--wh-white); box-shadow: none; }

/* ---------- Closing call to action → large rounded panel ---------- */

.theme-whistler .wh-cta.bg-brand { background-color: var(--band); color: var(--wh-ink); margin-top: 0; overflow: visible; }
.theme-whistler .wh-cta > span[aria-hidden] { display: none; }
.theme-whistler .wh-cta > div {
  width: calc(100% - 48px);
  margin-block: clamp(3rem, 6vw, 5rem);
  border-radius: clamp(28px, 4vw, 48px);
  border: 1px solid var(--wh-line);
  background-color: var(--wh-warm);
  background-image: var(--wh-noise), radial-gradient(60% 60% at 50% 110%, rgb(var(--wh-accent-rgb) / .16), transparent 70%);
  padding-block: clamp(4rem, 8vw, 6.5rem);
}
.theme-whistler .wh-band-warm.wh-cta > div { background-color: var(--wh-white); }
/* The first CTA is the primary action: make it the dark button, as on the rest of the page. */
.theme-whistler .wh-cta a[data-slot=button][data-slot=button].bg-background { background: var(--wh-button); color: #fbfaf9; box-shadow: var(--wh-btn-dark); }
.theme-whistler .wh-cta a[data-slot=button][data-slot=button].bg-background:hover { background: #1c1c1c; }
.theme-whistler .wh-cta p { color: var(--wh-grey); }

/* ---------- Footer ---------- */

.theme-whistler footer { background: var(--wh-white); border-top: 0; }
.theme-whistler footer > span[aria-hidden] { display: none; }
.theme-whistler footer > div { padding-block: clamp(4rem, 7vw, 6rem) 2.5rem; }
.theme-whistler footer .max-w-form > p {
  font-family: var(--wh-display); font-size: clamp(28px, 3vw, 38px); line-height: 1.2;
  color: var(--wh-ink); max-width: 22ch; margin-top: 22px; letter-spacing: -.01em;
}
.theme-whistler footer .max-w-form .text-subheading { font-family: var(--wh-display); font-size: 22px; }
.theme-whistler footer .flex.gap-12 { gap: clamp(3rem, 8vw, 7rem); }
.theme-whistler footer .text-overline { font-size: 18px; line-height: 24px; color: var(--wh-ink); }
.theme-whistler footer ul { gap: 12px; margin-top: 20px; }
.theme-whistler footer ul a { font-size: 16px; color: var(--wh-ink); }
.theme-whistler footer ul a:hover { color: var(--wh-accent); }
.theme-whistler footer > div > p:last-child { margin-top: 4rem; border-color: var(--wh-line); color: var(--wh-grey); font-size: 15px; }

/* ---------- Product tour, templates, FAQ ---------- */

.theme-whistler #tour [role=tablist] { background: var(--wh-white); border: 0; box-shadow: var(--wh-btn-light); border-radius: 12px; }
.theme-whistler #tour [role=tab] { border-radius: 8px; }
.theme-whistler #tour [role=tab][aria-selected=true] { background: var(--wh-button); color: #fbfaf9; box-shadow: var(--wh-btn-dark); }
.theme-whistler #tour .rounded-xl, .theme-whistler #tour .rounded-lg.border { border-radius: 24px; }

.theme-whistler #templates button[aria-pressed] { border-radius: 10px; }
.theme-whistler #templates button[aria-pressed=true] { background: var(--wh-button); color: #fbfaf9; box-shadow: var(--wh-btn-dark); }
.theme-whistler #templates button.rounded-lg { border-radius: 24px; }

.theme-whistler #questions details {
  background: var(--wh-warm); border: 1px solid var(--wh-line); border-radius: 18px;
  padding: 18px 22px; margin-bottom: 12px;
}
.theme-whistler .wh-band-warm#questions details { background: var(--wh-white); }
.theme-whistler #questions details summary { font-size: 17px; font-weight: 500; }
.theme-whistler #questions details[open] summary svg { color: var(--wh-accent); }

/* ---------- Guide ---------- */

.theme-whistler[data-page^="docs"] main > div { padding-block: clamp(2.5rem, 5vw, 4rem); }
.theme-whistler[data-page^="docs_"] main article {
  background: var(--wh-white); border: 1px solid var(--wh-line); border-radius: 24px;
  padding: clamp(24px, 4.5vw, 56px);
}
.theme-whistler[data-page^="docs"] main nav a { border-radius: 10px; }
.theme-whistler[data-page^="docs"] main nav a.bg-accent { background: var(--wh-white); color: var(--wh-accent-deep); box-shadow: var(--wh-btn-light); }
.theme-whistler .flyforms-guide h1 { font-family: var(--wh-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; letter-spacing: -.01em; }
.theme-whistler .flyforms-guide h2 { font-family: var(--wh-display); font-size: 26px; font-weight: 500; border-color: var(--wh-line); }
.theme-whistler .flyforms-guide a { color: var(--wh-accent-deep); }
.theme-whistler .flyforms-guide img { border-radius: 18px; border-color: var(--wh-line); }
.theme-whistler .flyforms-guide :is(pre, code) { background: var(--wh-warm); }
.theme-whistler [aria-label="Reading mode"] { background: var(--wh-sand); border-radius: 12px; }
.theme-whistler [aria-label="Reading mode"] [aria-checked=true] { background: var(--wh-white); box-shadow: var(--wh-btn-light); border-radius: 9px; }

/* ---------- Forms, inputs, small surfaces ---------- */

.theme-whistler input:not([type=checkbox]):not([type=radio]), .theme-whistler textarea { border-radius: 10px; border-color: var(--wh-line); background: var(--wh-white); }
.theme-whistler [role=dialog] { border-radius: 24px; border-color: var(--wh-line); background: var(--wh-white); }
.theme-whistler [data-ff-overlay] { background: rgb(28 22 18 / .45); backdrop-filter: blur(3px); }

@media (prefers-reduced-motion: reduce) {
  .theme-whistler [data-slot=button]:hover { transform: none; }
}

/* Second-level heroes: the visual below the text reads as a framed product panel. */
.theme-whistler .wh-hero:not(.wh-hero-home) > .grid > :last-child { width: min(100%, 760px); }
.theme-whistler .wh-hero:not(.wh-hero-home) > .grid > :last-child .rounded-xl { background: var(--wh-white); }


/* Small tags inside the hero panels become pills, like Whistler's feature chips. */
.theme-whistler .wh-hero li.rounded-sm.border { border-radius: 999px; padding-inline: 10px; background: var(--wh-white); }

/* ---------- Floating menu: narrower once scrolled, hides on the way down ---------- */
.theme-whistler header.sticky { transition: transform .45s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.theme-whistler header.sticky[data-hidden=true] { transform: translateY(calc(-100% - 16px)); }
.theme-whistler .flyforms-siteheader[data-scrolled=true] { max-width: min(860px, 100%); }
@media (prefers-reduced-motion: reduce) {
  .theme-whistler header.sticky { transition: none; }
}

/* =====================================================================
   1495px content width and the paragraph scale
   On a 1920px screen every page's main content is 1495px wide.
   Normal paragraphs are 18px; helper text is 14px, tiny labels 12px.
   ===================================================================== */
:root {
  --wh-content: 1495px;
  --container-page: calc(var(--wh-content) + 48px);   /* sections pad 24px a side, leaving 1495px */
  --text-caption: 12px;
  --text-caption--line-height: 17px;
}
/* The header pill, the statement banner and the closing panel line up with the content edges. */
.theme-whistler .flyforms-siteheader { max-width: var(--wh-content); }
.theme-whistler .wh-statement .max-w-page { max-width: var(--wh-content); }
.theme-whistler .wh-cta > div { max-width: var(--wh-content); }
.theme-whistler[data-page^="docs"] main > div.max-w-6xl { max-width: calc(var(--wh-content) + 48px); }
.theme-whistler .flyforms-guide { max-width: 760px; }

/* Normal paragraphs: 18px */
.theme-whistler main p.text-body-sm,
.theme-whistler main p.text-body,
.theme-whistler .flyforms-guide p,
.theme-whistler .flyforms-guide li { font-size: 18px; line-height: 29px; }

/* Helper text: 14px */
.theme-whistler .wh-kicker { font-size: 14px; }
.theme-whistler main .wh-cta p.text-body-sm,   /* the invitation note under the closing call to action */
.theme-whistler main ul.text-body-sm, .theme-whistler main ul.text-body-sm li,
.theme-whistler main span.text-body-sm,
.theme-whistler .wh-logos .text-overline { font-size: 14px; line-height: 21px; }
.theme-whistler footer > div > p:last-child { font-size: 14px; }
