/*
Theme Name:   Cubikey Theme
Author:       Cubikey
Description:  Cubikey theme – global header + footer, every page built from "Cubikey Sections" block patterns (or Elementor).
Version:      1.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain:  cubikey-child
*/

/* ==========================================================
   STYLE.CSS = GLOBAL / SHARED STYLES (loaded on every page)
   ----------------------------------------------------------
   1. Design tokens        6. Two-tone headline + word scrub
   2. Base                 7. Pill buttons (rolling text)
   3. Content wrapper      8. Blog section   (shared)
   4. Section spacing      9. FAQ section    (shared)
   5. Helpers             10. Lenis + reduced motion

   Page files (home.css, ctv.css, australia.css …) only hold
   styles that exist on that one page.
   ========================================================== */


/* ==========================================================
   1. DESIGN TOKENS
   ========================================================== */
:root {
  /* Colours */
  --cb-bg:        #ffffff;
  --cb-surface:   #f5f5f7;
  --cb-text:      #0a0a0a;
  --cb-grey:      #a3a3a3;   /* second half of two-tone headlines */
  --cb-muted:     #7a7a7a;   /* body copy on white */
  --cb-border:    #e4e4ea;
  --cb-lime:      #e5fe41;   /* accent: buttons, dots */
  --cb-primary:   #0a0a0a;
  --cb-primary-contrast: #ffffff;

  /* Type */
  --cb-font: "Inter", "Inter Placeholder", system-ui, sans-serif;

  /* Layout – global content wrapper (same as the header) */
  --cb-wrap:      1362px;
  --cb-wrap-pad:  20px;
  --cb-container: var(--cb-wrap);
  --cb-radius:    16px;
  --cb-radius-sm: 10px;
  --cb-header-h:  88px;

  /* Vertical rhythm – every section uses these */
  --cb-section-y:    clamp(64px, 8vw, 120px);   /* normal section */
  --cb-section-y-sm: clamp(48px, 6vw, 90px);    /* tighter section */
  --cb-gap-title:    clamp(40px, 6vw, 80px);    /* headline -> content */

  /* Motion */
  --cb-ease:      cubic-bezier(.22, 1, .36, 1);
  --cb-dur:       .8s;
}
@media (max-width: 1024px) {
  :root { --cb-header-h: 76px; }
}
@media (max-width: 767px) {
  :root {
    --cb-section-y:    56px;
    --cb-section-y-sm: 48px;
    --cb-gap-title:    36px;
  }
}


/* ==========================================================
   2. BASE
   ========================================================== */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--cb-font);
  color: var(--cb-text);
  background: var(--cb-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;               /* no side scroll from bleeding sliders */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--cb-font);
  font-weight: 600;
  letter-spacing: -0.02em;
}

img, video { max-width: 100%; }

a { transition: color .25s ease; }

:focus-visible {
  outline: 2px solid var(--cb-primary);
  outline-offset: 3px;
}


/* animations.css fades the whole <body> in over 0.6s on every page load –
   that makes every page feel slow, so it is switched off here. */
html.cb-js body { animation: none; }


/* ==========================================================
   3. GLOBAL CONTENT WRAPPER  –  max-width 1362px, padding 0 20px
   Use .cb-container for the inner box of EVERY section on
   every page (same width + side padding as .cb-header__inner).
   ========================================================== */
.cb-container {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--cb-wrap);
  margin-inline: auto;
  padding-inline: var(--cb-wrap-pad);
}


/* ==========================================================
   4. SECTION SPACING
   .cb-section      -> top + bottom padding  (var --cb-section-y)
   .cb-section--sm  -> tighter
   .cb-section--flush-top / --flush-bottom -> remove one side
   ========================================================== */
.cb-section {
  position: relative;
  padding-block: var(--cb-section-y);
}
.cb-section--sm           { padding-block: var(--cb-section-y-sm); }
.cb-section--flush-top    { padding-top: 0; }
.cb-section--flush-bottom { padding-bottom: 0; }
.cb-section--dark         { background: #0a0a0a; color: #fff; }


/* ==========================================================
   5. HELPERS
   ========================================================== */
.cb-sr {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cb-muted { color: var(--cb-muted); }


/* ==========================================================
   6. TWO-TONE HEADLINE + WORD SCRUB
   <h2 class="cb-headline">
     <span class="cb-headline__dark"> dark part </span>
     <span> grey part </span>
   </h2>
   Words wrapped in .cb-about__word fade in while scrolling
   (front-page.php / page templates do the wrapping in PHP).
   ========================================================== */
.cb-headline {
  margin: 0;
  max-width: 1040px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.4;
  letter-spacing: -0.04em;
  font-weight: 400;
  color: var(--cb-grey);
  text-wrap: pretty;
}
.cb-headline__dark { color: var(--cb-text); }
.cb-section--dark .cb-headline__dark { color: #fff; }

@supports (animation-timeline: view()) {
  .cb-js .cb-about__word {
    animation: cb-word-in linear both;
    animation-timeline: view();
    animation-range: cover calc(var(--i, 0) * 1%) cover calc(var(--i, 0) * 1% + 14%);
  }
}
@keyframes cb-word-in {
  from { opacity: .18; }
  to   { opacity: 1; }
}
/* old name, still used by ctv.css / home.css */
@keyframes cb-about-word {
  from { opacity: .18; }
  to   { opacity: 1; }
}

@media (max-width: 767px) {
  .cb-headline { line-height: 1.43; }
}


/* ==========================================================
   7. PILL BUTTONS  (text rolls up on hover – uses cubikey_roll())
   .cb-pill            black
   .cb-pill--lime      lime
   ========================================================== */
.cb-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 40px;
  background: #0a0a0a;
  color: #fff;
  font: 600 18px/1.4 var(--cb-font);
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .35s var(--cb-ease), box-shadow .35s ease;
}
.cb-pill:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); }
.cb-pill--lime { background: var(--cb-lime); color: #0a0a0a; }
.cb-pill--lime:hover { color: #0a0a0a; box-shadow: 0 10px 30px -10px rgba(229, 254, 65, .55); }
.cb-pill--sm { min-height: 0; padding: 8px 18px; font-size: 16px; }

.cb-pill .cb-roll { position: relative; display: block; height: 1.4em; line-height: 1.4; overflow: hidden; }
.cb-pill .cb-roll > span { display: block; transition: transform .45s var(--cb-ease); }
.cb-pill:hover .cb-roll > span,
.cb-pill:focus-visible .cb-roll > span { transform: translateY(-100%); }

@media (max-width: 1024px) {
  .cb-pill { min-height: 48px; font-size: 16px; }
  .cb-pill--sm { min-height: 0; }
}


/* ==========================================================
   8. BLOG SECTION  (shared – home + inner pages)
   Desktop / tablet: section sticks, the next section slides
   over it. Mobile: normal flow. --cb-blog-top / --cb-blog-cover
   are set by JS (home.js / ctv.js).
   ========================================================== */
#blog.cb-blog {
  position: sticky;
  top: var(--cb-blog-top, var(--cb-adminbar, 0px));
  z-index: 0;
  background: #fff;
  color: var(--cb-text);
  padding-block: var(--cb-section-y-sm) var(--cb-section-y);
  font-family: var(--cb-font);
}
/* everything after the sticky blog paints over it (FAQ, contact …) on every page */
#blog.cb-blog ~ * { position: relative; z-index: 1; }
#blog.cb-blog ~ section { background-color: #fff; }

.cb-blog__inner {
  transform-origin: 50% 0;
  transform: scale(calc(1 - var(--cb-blog-cover, 0) * .04));
  opacity: calc(1 - var(--cb-blog-cover, 0) * .6);
}
.cb-blog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}
.cb-blog__headline { max-width: 900px; line-height: 1.5; }

.cb-blog__grid {
  margin-top: var(--cb-gap-title);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.cb-post { margin: 0; padding: 0; margin-top: var(--mt, 0); }
.cb-post__link { display: block; color: inherit; text-decoration: none; }
.cb-post__link:focus-visible { outline: 2px solid var(--cb-text); outline-offset: 4px; border-radius: 16px; }

.cb-post__media {
  position: relative;
  display: block;
  aspect-ratio: var(--ar, 1);
  border-radius: 16px;
  overflow: hidden;
  background: #e9e9ee;
}
.cb-post__media img {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform .8s var(--cb-ease);
}
.cb-post__link:hover .cb-post__media img { transform: scale(1.04); }

.cb-post__title {
  margin: 16px 0 0;
  max-width: 20em;
  font-size: 19px;
  line-height: 1.7;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--cb-muted);
  text-wrap: pretty;
  transition: color .3s ease;
}
.cb-post__link:hover .cb-post__title { color: var(--cb-text); }

@supports (animation-timeline: view()) {
  .cb-js .cb-post__media,
  .cb-js .cb-post__title {
    animation: cb-blog-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 85%;
  }
  .cb-js .cb-post:nth-child(2) .cb-post__media,
  .cb-js .cb-post:nth-child(2) .cb-post__title { animation-range: entry 8% entry 93%; }
  .cb-js .cb-post:nth-child(3) .cb-post__media,
  .cb-js .cb-post:nth-child(3) .cb-post__title { animation-range: entry 16% entry 100%; }
}
@keyframes cb-blog-in {
  from { opacity: .15; filter: blur(14px); transform: translateY(36px); }
  to   { opacity: 1;   filter: blur(0);    transform: none; }
}

@media (max-width: 1024px) {
  .cb-post__title { font-size: 17px; }
}
@media (max-width: 767px) {
  #blog.cb-blog { position: relative; top: auto; }
  .cb-blog__inner { transform: none; opacity: 1; }
  .cb-blog__head { flex-direction: column; gap: 24px; }
  .cb-blog__grid { grid-template-columns: 1fr; gap: 36px; }
  .cb-post { margin-top: 0; }
  .cb-post__media { aspect-ratio: 1 / 1.05; }
  .cb-post__title { font-size: 18px; line-height: 1.6; max-width: none; }
}


/* ==========================================================
   9. FAQ SECTION  (shared – home + inner pages)
   Sits above the sticky blog (z-index 1) and slides over it.
   ========================================================== */
#section-faq.cb-faq {
  position: relative;
  z-index: 1;
  padding-block: var(--cb-section-y);
  background: #fff;
  color: var(--cb-text);
  font-family: var(--cb-font);
}
.cb-faq__heading {
  margin: 0 0 100px;
  font-size: clamp(30px, 3vw, 48px);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -.04em;
  color: var(--cb-grey);
}
.cb-faq__heading span { color: var(--cb-text); }
.cb-faq__list { max-width: 980px; margin-left: 216px; }
.cb-faq__item:not(:last-child) { margin: 0 0 42px; }
.cb-faq__question { margin: 0; }
.cb-faq__button {
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  width: 100%; padding: 0;
  background: none; border: 0; border-radius: 0;
  color: var(--cb-text); text-align: left;
  font: 400 22px/1.2 var(--cb-font); letter-spacing: -.035em;
  cursor: pointer;
}
.cb-faq__button:hover,
.cb-faq__button:focus { background: none; color: var(--cb-text); }
.cb-faq__button > span:first-child { max-width: 850px; }
.cb-faq__icon { position: relative; flex: none; width: 45px; height: 36px; border-radius: 30px; background: #0a0a0a; }
.cb-faq__icon i { position: absolute; top: 50%; left: 50%; width: 15px; height: 2px; background: #fff; transform: translate(-50%, -50%); transition: transform .3s ease; }
.cb-faq__icon i:last-child { transform: translate(-50%, -50%) rotate(90deg); }
.cb-faq__item.is-open .cb-faq__icon i:last-child { transform: translate(-50%, -50%) rotate(0); }
.cb-faq__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.cb-faq__item.is-open .cb-faq__panel { grid-template-rows: 1fr; }
.cb-faq__answer { min-height: 0; overflow: hidden; }
.cb-faq__answer p { max-width: 900px; margin: 0; padding: 16px 60px 0 0; font-size: 16px; line-height: 1.6; color: var(--cb-muted); }
html:not(.cb-js) .cb-faq__panel { grid-template-rows: 1fr; }

@media (max-width: 1024px) {
  .cb-faq__heading { margin-bottom: 72px; }
  .cb-faq__list { margin-left: 100px; }
  .cb-faq__button { font-size: 21px; }
  .cb-faq__answer p { font-size: 17px; }
}
@media (max-width: 767px) {
  .cb-faq__heading { margin-bottom: 48px; font-size: 32px; line-height: 1.25; }
  .cb-faq__list { margin: 0; }
  .cb-faq__item:not(:last-child) { margin-bottom: 30px; }
  .cb-faq__button { gap: 16px; font-size: 19px; line-height: 1.4; }
  .cb-faq__icon { width: 38px; height: 32px; }
  .cb-faq__answer p { padding: 12px 45px 0 0; font-size: 15px; line-height: 1.65; }
}
@media (max-width: 480px) {
  .cb-faq__heading { font-size: 28px; }
  .cb-faq__button { font-size: 17px; }
}


/* ==========================================================
   10. LENIS (smooth scroll) + REDUCED MOTION
   ========================================================== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cb-js .cb-about__word,
  .cb-js .cb-post__media,
  .cb-js .cb-post__title { animation: none !important; filter: none !important; transform: none !important; opacity: 1 !important; }
  .cb-blog__inner { transform: none; opacity: 1; }
  .cb-pill, .cb-pill .cb-roll > span,
  .cb-post__media img, .cb-post__title,
  .cb-faq__panel, .cb-faq__icon i { transition: none; }
}

/* ==========================================================
   11. FAST PAGE NAVIGATION  (with assets/js/navigation.js)
   - smooth fade between pages instead of a white flash
     (Chrome / Edge 126+, Safari 18.2+; other browsers just load normally)
   - the header stays still while the page content fades
   - thin loading bar shown the moment a link is clicked
   ========================================================== */
@view-transition { navigation: auto; }

.cb-header { view-transition-name: cb-header; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .32s;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}
::view-transition-group(cb-header) { animation-duration: 0s; }

.cb-navbar {
  position: fixed; top: 0; left: 0; z-index: 100000;
  width: 100%; height: 3px;
  background: #000;
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: 0; pointer-events: none;
}
.cb-navbar.is-loading {
  opacity: 1;
  animation: cb-navbar-run 6s cubic-bezier(.1, .7, .2, 1) forwards;
}
.cb-navbar.is-done {
  transform: scaleX(1); opacity: 0;
  transition: opacity .3s ease .1s;
}
@keyframes cb-navbar-run {
  0%   { transform: scaleX(0); }
  10%  { transform: scaleX(.35); }
  100% { transform: scaleX(.92); }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .cb-navbar.is-loading { animation: none; transform: scaleX(.6); }
}


/* ==========================================================
   12. FLUENT FORMS – GLOBAL STYLE (every page)
   Grey labels, white rounded fields, custom checkbox, white pill
   button with the lime arrow – same look as the contact section.
   The footer newsletter keeps its own style (footer.css).
   ========================================================== */
.fluentform:not(.cb-newsletter__form .fluentform) {
  --cb-ff-ink:   #0a0a0a;
  --cb-ff-muted: #a3a3a3;
  --cb-ff-line:  #e4e4ea;         /* field border – visible on white cards and grey sections */
  --cb-ff-lime:  #e5fe41;
  --cb-ff-field: #fff;            /* field background – change for forms on a white section */
  font-family: var(--cb-font);
}
.fluentform:not(.cb-newsletter__form .fluentform) form,
.fluentform:not(.cb-newsletter__form .fluentform) fieldset { margin: 0; padding: 0; border: 0; min-width: 0; background: none; }
.fluentform:not(.cb-newsletter__form .fluentform) fieldset { display: flex; flex-direction: column; gap: 14px; }

.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-group { margin: 0 !important; padding: 0; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-t-container { gap: 14px; margin: 0; }   /* Fluent "columns" */
.fluentform:not(.cb-newsletter__form .fluentform) .ff-t-cell { padding: 0 !important; }

/* labels */
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-input--label { margin: 0 0 6px; padding: 0; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-input--label label {
  margin: 0; color: var(--cb-ff-muted) !important;
  font: 500 13px/1.2 var(--cb-font) !important; letter-spacing: -0.01em;
}
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-is-required.asterisk-right label::after,
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-is-required.asterisk-left label::before { color: var(--cb-ff-muted) !important; margin: 0 0 0 3px; }

/* fields */
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-control {
  box-sizing: border-box; width: 100%; height: 52px !important; margin: 0;
  padding: 0 16px !important;
  background: var(--cb-ff-field) !important; border: 0 !important; border-radius: 12px !important;
  box-shadow: inset 0 0 0 1px var(--cb-ff-line) !important;
  color: var(--cb-ff-ink) !important; font: 500 14px/1.2 var(--cb-font) !important;
  letter-spacing: -0.01em; outline: 0; transition: box-shadow .2s ease;
}
.fluentform:not(.cb-newsletter__form .fluentform) textarea.ff-el-form-control {
  height: auto !important; min-height: 108px; padding: 16px !important; line-height: 1.4 !important; resize: vertical;
}
.fluentform:not(.cb-newsletter__form .fluentform) select.ff-el-form-control { padding-right: 40px !important; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-control::placeholder { color: var(--cb-ff-muted); opacity: 1; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-control:hover { box-shadow: inset 0 0 0 1px #cfcfd6 !important; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-control:focus { box-shadow: inset 0 0 0 1px var(--cb-ff-ink) !important; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-is-error .ff-el-form-control { box-shadow: inset 0 0 0 1px #d64545 !important; }

/* checkbox (Checkbox, Terms & Conditions or GDPR field) */
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-check { margin: 0; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-check-label,
.fluentform:not(.cb-newsletter__form .fluentform) .ff_tc_label,
.fluentform:not(.cb-newsletter__form .fluentform) .ff-el-tc label {
  display: flex !important; align-items: flex-start; gap: 10px; margin: 4px 0 6px; cursor: pointer;
  color: #888 !important; font: 500 13px/1.35 var(--cb-font) !important;
}
.fluentform:not(.cb-newsletter__form .fluentform) input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 18px; height: 18px; margin: 1px 0 0 !important; padding: 0;
  background: rgba(187, 187, 187, .2); border: 1px solid rgba(136, 136, 136, .35); border-radius: 4px;
  cursor: pointer; transition: background-color .2s ease, border-color .2s ease;
}
.fluentform:not(.cb-newsletter__form .fluentform) input[type="checkbox"]:checked {
  background: #0a0a0a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
  border-color: #0a0a0a;
}
.fluentform:not(.cb-newsletter__form .fluentform) input[type="checkbox"]:focus-visible { outline: 2px solid var(--cb-ff-ink); outline-offset: 2px; }

/* submit: white pill, text + lime circle with arrow */
.fluentform:not(.cb-newsletter__form .fluentform) .ff_submit_btn_wrapper { margin: 0 !important; text-align: center; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit {
  display: flex !important; align-items: center; justify-content: center; gap: 10px;
  width: 100% !important; height: 56px; margin: 0 !important; padding: 0 24px !important;
  background: #fff !important; border: 1px solid var(--cb-ff-line) !important; border-radius: 40px !important;
  color: var(--cb-ff-ink) !important; font: 500 15px/1 var(--cb-font) !important;
  letter-spacing: -0.02em; box-shadow: none !important; cursor: pointer; opacity: 1 !important;
  transition: border-color .25s ease;
}
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit::after {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--cb-ff-lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / 12px no-repeat;
  transition: transform .35s var(--cb-ease);
}
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit:hover,
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit:focus-visible { border-color: var(--cb-ff-ink) !important; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit:hover::after { transform: rotate(45deg); }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit.disabled,
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit[disabled] { opacity: .6 !important; cursor: progress; }

/* messages */
.fluentform:not(.cb-newsletter__form .fluentform) .error,
.fluentform:not(.cb-newsletter__form .fluentform) .text-danger,
.ff-errors-in-stack:not(.cb-newsletter__form *) { margin: 6px 0 0; color: #d64545; font: 500 13px/1.4 var(--cb-font); }
.ff-message-success:not(.cb-newsletter__form *) {
  margin: 0; padding: 16px 18px; background: #fff; border: 0; border-radius: 12px; box-shadow: none;
  color: #1f7a3d; font: 500 14px/1.4 var(--cb-font);
}

/* while sending: no arrow, no Fluent loader – one small spinner in the lime circle's place */
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit::before { content: none !important; display: none !important; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit [class*="spinner"],
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit [class*="loader"],
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit [class*="loading"],
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit svg { display: none !important; }
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit:is(.disabled, [disabled], .ff-working)::after,
.fluentform:not(.cb-newsletter__form .fluentform) form:is(.ff_submitting, .ff-form-loading) .ff-btn-submit::after {
  width: 16px; height: 16px; background: none !important; border: 2px solid rgba(10, 10, 10, .15); border-top-color: var(--cb-ff-ink, #0a0a0a);
  animation: cb-ff-spin .7s linear infinite;
}
@keyframes cb-ff-spin { to { transform: rotate(360deg); } }
/* sending: Fluent's own "ff-working" style pins ::after to the bottom-left (it is meant as a progress bar) –
   keep the spinner in the exact centre of the button and hide the label while it spins */
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit:is(.disabled, [disabled], .ff-working),
.fluentform:not(.cb-newsletter__form .fluentform) form:is(.ff_submitting, .ff-form-loading) .ff-btn-submit {
  position: relative !important; color: transparent !important; opacity: 1 !important; cursor: progress;
}
.fluentform:not(.cb-newsletter__form .fluentform) .ff-btn-submit:is(.disabled, [disabled], .ff-working)::after,
.fluentform:not(.cb-newsletter__form .fluentform) form:is(.ff_submitting, .ff-form-loading) .ff-btn-submit::after {
  position: absolute !important; left: 50% !important; top: 50% !important; right: auto !important; bottom: auto !important;
  width: 22px !important; height: 22px !important; margin: -11px 0 0 -11px !important; box-sizing: border-box;
  border-radius: 50% !important; border-width: 2px !important; border-style: solid !important;
  transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: reduce) {
  .fluentform .ff-el-form-control, .fluentform .ff-btn-submit, .fluentform .ff-btn-submit::after { transition: none; }
  .fluentform .ff-btn-submit::after { animation-duration: 1.6s !important; }
}
/* Fluent Forms number fields: no up/down arrows on the right (phone numbers, amounts) */
.fluentform input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.fluentform input[type="number"]::-webkit-outer-spin-button,
.fluentform input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ==========================================================
   FLUENT FORMS INSIDE THEME CARDS – same look as the theme's own forms there
   A. Hero "Request Your Proposal" card (.cbp-heroform__card):
      grey fields, dark labels, lime button with a black arrow circle
   B. Form card · heading + form (.cbp-formcard__card, e.g. job applications):
      grey rounded fields, black button with a lime arrow circle
   C. Contact section (.cb-contact): white fields without a border (grey section)
   ========================================================== */
/* shared for A + B */
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform fieldset { gap: 16px; }
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform .ff-t-container { gap: 12px; }
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform .ff-el-input--label { margin: 0 0 8px; }
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform .ff-el-is-required.asterisk-right label::after { color: inherit !important; margin: 0 !important; }
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform .ff-el-form-control {
  background: #f5f5f7 !important; box-shadow: none !important;
  font: 400 16px/1.4 var(--cb-font, "Inter", sans-serif) !important; color: #0a0a0a !important; letter-spacing: -0.01em;
}
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform .ff-el-form-control:hover { box-shadow: none !important; }
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform .ff-el-form-control:focus {
  box-shadow: inset 0 0 0 1px #0a0a0a, 0 0 0 4px rgba(200, 255, 30, .35) !important;
}
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform .ff-el-is-error .ff-el-form-control { box-shadow: inset 0 0 0 1px #d64545 !important; }
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform textarea.ff-el-form-control { padding: 14px 16px !important; }
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform .ff-btn-submit { font: 500 16px/1 var(--cb-font, "Inter", sans-serif) !important; }

/* A. hero proposal card */
.cbp-section .cbp-heroform__card .fluentform .ff-el-input--label label { color: #55555f !important; font: 400 14px/1.3 var(--cb-font, "Inter", sans-serif) !important; }
.cbp-section .cbp-heroform__card .fluentform .ff-el-form-control { height: 50px !important; border-radius: 4px !important; }
.cbp-section .cbp-heroform__card .fluentform textarea.ff-el-form-control { height: auto !important; min-height: 92px; }
.cbp-section .cbp-heroform__card .fluentform .ff-btn-submit {
  height: 56px; background: #e5fe41 !important; border: 1px solid #e5fe41 !important; color: #0a0a0a !important;
}
.cbp-section .cbp-heroform__card .fluentform .ff-btn-submit:hover,
.cbp-section .cbp-heroform__card .fluentform .ff-btn-submit:focus-visible { background: #e5fe41 !important; border-color: #0a0a0a !important; }
.cbp-section .cbp-heroform__card .fluentform .ff-btn-submit::after {
  background: #0a0a0a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5fe41' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* B. form card (job applications …) */
.cbp-section .cbp-formcard__card .fluentform fieldset { gap: 18px; }
.cbp-section .cbp-formcard__card .fluentform .ff-el-input--label label { color: #33333b !important; font: 500 14px/1.3 var(--cb-font, "Inter", sans-serif) !important; }
.cbp-section .cbp-formcard__card .fluentform .ff-el-form-control { height: 52px !important; border-radius: 14px !important; }
.cbp-section .cbp-formcard__card .fluentform textarea.ff-el-form-control { height: auto !important; min-height: 120px; }
.cbp-section .cbp-formcard__card .fluentform .ff-el-form-control.is-prefilled { box-shadow: 0 0 0 3px rgba(229, 254, 65, .55), inset 0 0 0 1px #0a0a0a !important; }
.cbp-section .cbp-formcard__card .fluentform .ff-btn-submit {
  height: 60px; background: #0a0a0a !important; border: 1px solid #0a0a0a !important; color: #fff !important;
}
.cbp-section .cbp-formcard__card .fluentform .ff-btn-submit:hover,
.cbp-section .cbp-formcard__card .fluentform .ff-btn-submit:focus-visible { background: #0a0a0a !important; color: #fff !important; border-color: #0a0a0a !important; }

/* select arrow in both cards (same as the theme form) */
.cbp-section :is(.cbp-heroform__card, .cbp-formcard__card) .fluentform select.ff-el-form-control {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background: #f5f5f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 18px center / 14px no-repeat !important;
}

/* while sending, the spinner sits on the lime (A) / black (B) button */
.cbp-section .cbp-formcard__card .fluentform .ff-btn-submit:is(.disabled, [disabled], .ff-working)::after,
.cbp-section .cbp-formcard__card .fluentform form:is(.ff_submitting, .ff-form-loading) .ff-btn-submit::after { border-color: rgba(255, 255, 255, .2); border-top-color: #e5fe41; }

/* C. contact section: white fields, no border (as before) */
.cb-contact .fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-control,
.cb-contact .fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-control:hover { box-shadow: inset 0 0 0 1px transparent !important; }
.cb-contact .fluentform:not(.cb-newsletter__form .fluentform) .ff-el-form-control:focus { box-shadow: inset 0 0 0 1px #0a0a0a !important; }
