/* ============================================================
   Floorfilment marketing site — shared stylesheet
   Brand tokens mirror app/static/brand.css (Deep Pile / Indigo /
   Loom Purple / Lavender Weave / Underlay Mist, Quicksand).
   Kept self-contained so the site deploys with no dependency on
   the application build.
   ============================================================ */

/* Quicksand is self-hosted: no third-party request, so the site sets no
   cookies and discloses no visitor IP to Google. Variable font, weights 300-700.
   Source: Google Fonts v37, Open Font Licence 1.1. */
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/quicksand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/quicksand-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ff-ink:      #1F1B47;
  --ff-indigo:   #332D66;
  --ff-purple:   #5D55A0;
  --ff-lavender: #A89FD9;
  --ff-mist:     #D9D4EF;
  --ff-line:     #ECEAF6;
  --ff-body:     #55507A;
  --ff-white:    #FFFFFF;

  --ff-green: #2FA36B;
  --ff-amber: #F0A030;
  --ff-red:   #E5484D;

  --ff-r-card: 16px;
  --ff-r-pill: 999px;

  --ff-font: "Quicksand", ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", sans-serif;

  --wrap: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--ff-font);
  color: var(--ff-ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.14; font-weight: 300; letter-spacing: -0.005em; }
b, strong { font-weight: 700; }
a { color: inherit; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ff-indigo); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--ff-r-card) 0; font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---- Parquet weave ---- */
.ff-parquet {
  background-color: var(--ff-indigo);
  background-image:
    repeating-linear-gradient(45deg,  var(--ff-weave, #2A2558) 0 3px, transparent 3px 9px),
    repeating-linear-gradient(-45deg, var(--ff-weave, #2A2558) 0 3px, transparent 3px 9px);
  background-size: 26px 26px;
}

/* ---- Logo lockup ---- */
.ff-lockup { display: inline-flex; align-items: center; gap: 0.6em; text-decoration: none; }
.ff-wordmark { font-weight: 400; letter-spacing: 0.01em; line-height: 1; font-size: 1.35rem; }
.ff-wordmark b { font-weight: 700; }

/* ---- Buttons ---- */
.ff-btn {
  font-family: var(--ff-font); font-weight: 700; font-size: 0.95rem;
  border-radius: var(--ff-r-pill); padding: 0.62em 1.6em;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5em; transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.ff-btn-primary { background: var(--ff-indigo); color: #fff; }
.ff-btn-primary:hover { background: var(--ff-purple); }
.ff-btn-ghost { background: transparent; color: var(--ff-indigo); border-color: var(--ff-indigo); }
.ff-btn-ghost:hover { background: var(--ff-mist); }
.ff-btn-light { background: #fff; color: var(--ff-indigo); }
.ff-btn-light:hover { background: var(--ff-mist); }
.ff-btn-onDark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.ff-btn-onDark:hover { background: rgba(255,255,255,0.12); }
.ff-btn:focus-visible { outline: 3px solid var(--ff-lavender); outline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--ff-lavender); outline-offset: 3px; border-radius: 4px; }

/* ---- Header ---- */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.93); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ff-line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }
header.site nav { display: flex; align-items: center; }
header.site nav a.nl {
  text-decoration: none; font-weight: 500; font-size: 0.95rem;
  margin-left: 1.7rem; color: var(--ff-ink); opacity: 0.78;
}
header.site nav a.nl:hover, header.site nav a.nl[aria-current="page"] { opacity: 1; color: var(--ff-purple); }
header.site nav a.nl[aria-current="page"] { font-weight: 700; }
header.site nav .ff-btn { margin-left: 1.7rem; }

.navtoggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--ff-ink); }

@media (max-width: 900px) {
  .navtoggle { display: inline-flex; }
  header.site nav {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--ff-line);
    flex-direction: column; align-items: stretch; padding: 12px 24px 22px;
    box-shadow: 0 16px 30px rgba(31,27,71,0.10);
  }
  header.site nav.open { display: flex; }
  header.site nav a.nl { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--ff-line); opacity: 1; }
  header.site nav .ff-btn { margin: 16px 0 0; justify-content: center; }
}

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; color: #fff; }
.hero .wrap { position: relative; z-index: 2; padding: 92px 24px 100px; max-width: 980px; }
.hero h1 { font-size: clamp(36px, 6.2vw, 66px); }
.hero p.sub { font-size: clamp(17px, 2.1vw, 21px); color: var(--ff-mist); margin: 24px 0 36px; max-width: 54ch; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
/* The weave is the brand's signature device, so it has to survive the overlay.
   Stripe sits above the #332D66 ground; the fade stays opaque behind the
   headline and thins out to the right where there is no text to protect. */
.hero-weave { position: absolute; inset: 0; z-index: 1; --ff-weave: #453D85; }
.hero-fade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(105deg, #1F1B47 26%, rgba(31,27,71,0.52) 100%); }
.hero .eyebrow { color: var(--ff-lavender); }

/* Compact hero for interior pages */
.hero.compact .wrap { padding: 66px 24px 72px; }
.hero.compact h1 { font-size: clamp(32px, 5vw, 52px); }

/* ---- Sections ---- */
section.feat { padding: 84px 0; }
section.feat.tight { padding: 62px 0; }
section.alt { background: #FBFAFE; }
section.mist { background: var(--ff-mist); }

.eyebrow {
  display: block; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ff-purple); margin-bottom: 13px;
}
section.feat h2 { font-size: clamp(27px, 3.9vw, 40px); max-width: 22ch; }
section.feat h2 b { color: var(--ff-purple); }
.lede { color: var(--ff-body); font-size: 1.06rem; max-width: 62ch; margin-top: 16px; }
.lede + .lede { margin-top: 14px; }
.prose p { color: var(--ff-body); font-size: 1.02rem; max-width: 66ch; margin-top: 15px; }
.prose p b, .prose p strong { color: var(--ff-ink); }

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 18px; margin-top: 46px; }
/* Exactly two columns, never auto-fit. With auto-fit a 1140px wrap yields
   three tracks, so a four-card set rendered 3 + 1 with an orphan on its own
   row. Two-card sets are unaffected; four-card sets become a balanced 2x2.
   Short-copy sets that want a single row of four use .cards-4 instead. */
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1040px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .cards, .cards-2, .cards-4 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--ff-line); border-radius: var(--ff-r-card);
  padding: 30px 26px; background: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(31,27,71,0.08); }
.card .ic {
  width: 54px; height: 54px; border-radius: 14px; background: var(--ff-mist);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
  font-weight: 700; color: var(--ff-indigo); font-size: 1.3rem;
}
.card h3 { font-weight: 600; font-size: 1.16rem; margin-bottom: 9px; }
.card p { color: var(--ff-body); font-size: 0.95rem; }
.card p + p { margin-top: 10px; }

/* Card that is a link to another page */
a.card { text-decoration: none; display: block; }
a.card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 700; color: var(--ff-purple); font-size: 0.93rem; }
a.card:hover .more { gap: 10px; }

/* ---- Dark split ---- */
.split { background: var(--ff-indigo); color: #fff; overflow: hidden; }
.split.ink { background: var(--ff-ink); }
.split .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 52px; align-items: center; padding: 80px 24px; }
.split h2 { font-size: clamp(26px, 3.5vw, 37px); }
.split h2 b { color: var(--ff-lavender); }
.split .eyebrow { color: var(--ff-lavender); }
.split p { color: var(--ff-mist); margin-top: 16px; max-width: 54ch; }
.split ul.ticks { list-style: none; margin-top: 26px; display: grid; gap: 16px; }
.split ul.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ff-mist); }
.split ul.ticks li svg { flex-shrink: 0; margin-top: 4px; }
.split ul.ticks li b { color: #fff; font-weight: 700; }
@media (max-width: 860px) { .split .wrap { grid-template-columns: 1fr; gap: 36px; } }

/* ---- Diamonds ---- */
.diamonds { position: relative; min-height: 320px; }
.dm { position: absolute; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.dm-inner { transform: rotate(-45deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; line-height: 1.12; padding: 6px; }
.dm .n { display: block; font-size: 30px; font-weight: 700; color: var(--ff-ink); }
.dm .l { display: block; font-size: 0.72rem; color: var(--ff-ink); text-align: center; max-width: 104px; }
@media (max-width: 860px) { .diamonds { display: none; } }

/* ---- Steps ---- */
.steps { counter-reset: step; display: grid; gap: 2px; margin-top: 44px; }
.step {
  display: grid; grid-template-columns: 74px 1fr; gap: 26px; align-items: start;
  padding: 30px 0; border-top: 1px solid var(--ff-line);
}
.step:last-child { border-bottom: 1px solid var(--ff-line); }
.step .num {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--ff-indigo); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700;
}
.step h3 { font-size: 1.28rem; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--ff-body); max-width: 64ch; }
@media (max-width: 620px) { .step { grid-template-columns: 1fr; gap: 14px; } }

/* ---- Pull quote / callout ---- */
.callout {
  border-left: 4px solid var(--ff-lavender);
  background: #FBFAFE; border-radius: 0 var(--ff-r-card) var(--ff-r-card) 0;
  padding: 26px 30px; margin-top: 34px;
}
.callout p { color: var(--ff-body); max-width: 68ch; }
.callout p + p { margin-top: 12px; }
.callout .lbl { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ff-purple); margin-bottom: 10px; }

/* ---- Definition rows ---- */
.rows { margin-top: 42px; border-top: 1px solid var(--ff-line); }
.row2 { display: grid; grid-template-columns: 250px 1fr; gap: 30px; padding: 26px 0; border-bottom: 1px solid var(--ff-line); }
.row2 h3 { font-size: 1.1rem; font-weight: 600; }
.row2 p { color: var(--ff-body); font-size: 0.99rem; max-width: 64ch; }
@media (max-width: 720px) { .row2 { grid-template-columns: 1fr; gap: 8px; } }

/* ---- Status pill ---- */
.ff-status {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; font-size: 0.8rem;
  border-radius: var(--ff-r-pill); padding: 0.3em 0.95em;
  background: var(--ff-mist); color: var(--ff-ink);
}
.ff-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ff-dot-amber { background: var(--ff-amber); }
.ff-dot-green { background: var(--ff-green); }
.hero .ff-status { background: rgba(255,255,255,0.14); color: #fff; margin-bottom: 22px; }

/* ---- CTA band ---- */
.cta { position: relative; overflow: hidden; color: #fff; text-align: center; }
.cta .wrap { position: relative; z-index: 2; padding: 86px 24px; }
.cta h2 { font-size: clamp(29px, 4.6vw, 46px); max-width: 24ch; margin: 0 auto; }
.cta p { color: var(--ff-mist); margin: 18px auto 0; max-width: 56ch; }
.cta .ff-btn { margin-top: 30px; }
.cta-weave { position: absolute; inset: 0; z-index: 1; --ff-weave: #2A2558; }

/* ---- Form ---- */
.formcard {
  border: 1px solid var(--ff-line); border-radius: var(--ff-r-card);
  padding: 34px; background: #fff; box-shadow: 0 14px 40px rgba(31,27,71,0.07);
}
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .fgrid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .hint { font-weight: 400; color: var(--ff-body); font-size: 0.86rem; }
.field input, .field select, .field textarea {
  font-family: var(--ff-font); font-size: 1rem; color: var(--ff-ink);
  border: 1.5px solid var(--ff-line); border-radius: 10px; padding: 11px 13px;
  background: #fff; width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ff-purple); box-shadow: 0 0 0 3px rgba(168,159,217,0.35);
}
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; }
.roles label {
  border: 1.5px solid var(--ff-line); border-radius: 10px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 0.94rem;
}
.roles label:hover { border-color: var(--ff-lavender); }
.roles input:checked + span { color: var(--ff-purple); }
.roles label:has(input:checked) { border-color: var(--ff-purple); background: #FBFAFE; }
.formnote { color: var(--ff-body); font-size: 0.88rem; margin-top: 16px; max-width: 62ch; }
.formmsg { margin-top: 18px; padding: 14px 16px; border-radius: 10px; font-weight: 600; display: none; }
.formmsg.ok { display: block; background: #E8F5EE; color: #1C7A4C; }
.formmsg.err { display: block; background: #FDECEC; color: #B02B2F; }

/* ---- Footer ---- */
footer.site { background: var(--ff-ink); color: var(--ff-mist); padding: 58px 24px 34px; }
footer.site .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; max-width: var(--wrap); margin: 0 auto; }
@media (max-width: 860px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { footer.site .cols { grid-template-columns: 1fr; } }
footer.site h4 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ff-lavender); margin-bottom: 15px; }
footer.site ul { list-style: none; display: grid; gap: 10px; }
footer.site a { color: var(--ff-mist); text-decoration: none; font-size: 0.94rem; }
footer.site a:hover { color: #fff; text-decoration: underline; }
footer.site .blurb { font-size: 0.93rem; max-width: 34ch; margin-top: 16px; opacity: 0.85; }
footer.site .base {
  max-width: var(--wrap); margin: 42px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.13);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-size: 0.86rem; opacity: 0.78;
}
