/* heyflayr.com homepage: Navy & Mint.
 *
 * The layout and look follow the Navy Mint website design (Plus Jakarta
 * Sans, navy and mint). Brand tokens, buttons, the section labels and the
 * logo come from /assets/brand.css. The product visuals are Ismail's
 * animations (responsive-static/anim/, one iframe each), plus the analytics
 * dashboard kept from the original homepage.
 */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font: 16px/1.5 var(--fl-font); color: var(--fl-navy); background: #FFFFFF; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--fl-navy); text-decoration: none; }
ul { list-style: none; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw, 68px); }
h2 { font-size: clamp(32px, 3.8vw, 50px); }
p { text-wrap: pretty; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
main [id] { scroll-margin-top: 72px; }

/* ---- hero ------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; padding: 88px 0 96px; background: linear-gradient(180deg, var(--fl-frost-2), var(--fl-frost)); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 60% at 85% 20%, rgba(46, 72, 255, .2), transparent 70%); }
.hg { position: relative; display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 48px; align-items: center; }
.hero .sub { font-size: 19px; color: var(--fl-muted); margin: 22px 0 30px; max-width: 500px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { display: flex; gap: 32px; margin-top: 34px; }
.stats div { display: flex; align-items: center; gap: 10px; }
.stats b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--fl-cobalt); }
.stats span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; color: var(--fl-muted); }

/* ---- feature rows ---------------------------------------------------------- */
.feat { padding: 110px 0; }
.fg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; align-items: center; }
.fg.rev { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.fg.rev .ft { order: 2; }
.ft p { color: var(--fl-muted); font-size: 17px; margin-top: 18px; max-width: 440px; }
.ft .fl-btn { margin-top: 28px; }
.dk { position: relative; overflow: hidden; background: var(--fl-navy); color: #FFFFFF; }
.dk::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 70% at 0% 100%, rgba(46, 232, 165, .28), transparent 70%), radial-gradient(40% 60% at 100% 0%, rgba(46, 72, 255, .45), transparent 70%); }
.dk > * { position: relative; }
.dk h2, .dk h3 { color: #FFFFFF; }
.dk p, .dk .ft p { color: var(--fl-on-dark); }



/* ---- support + compliance panel ------------------------------------------- */
.center { text-align: center; }
.center .sub { color: var(--fl-muted); font-size: 17px; max-width: 520px; margin: 18px auto 28px; }
.dk .center .sub { color: var(--fl-on-dark); }
.panel { margin-top: 64px; text-align: left; }
.acc { display: none; background: var(--fl-frost); padding: 48px 36px; flex-direction: column; justify-content: center; }
.ai { border-bottom: 1px solid var(--fl-line); padding: 18px 0; }
.ai:last-child { border: 0; }
.ai h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.ai button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; }
.ai button:focus-visible { outline: 3px solid var(--fl-cobalt); outline-offset: 4px; border-radius: 6px; }
.ai i { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 16px;
  background: #FFFFFF; color: var(--fl-navy); border: 1.5px solid var(--fl-line); }
.ai.on i { background: var(--fl-navy); color: #FFFFFF; border-color: var(--fl-navy); }
.ai p { display: none; margin: 10px 0 0 38px; font-size: 14px; color: var(--fl-muted); }
.ai.on p { display: block; }

/* ---- widget fan: the five live storefront widgets, faded at the edges ------ */
.fan { padding: 110px 0 0; }


/* ---- product animations -------------------------------------------------- */
/* Each is its own page (responsive-static/anim/, built by build_anims.py): a
   fixed design canvas that scales to the frame's width. The frame keeps the
   canvas' proportions (--w / --h), so it scales like a picture. On phones a
   wide one can show just the part that matters: --cx and --cw are where the
   crop starts and how wide it is, in canvas pixels. */
.anim { position: relative; width: 100%; aspect-ratio: var(--w) / var(--h); }
/* The iframe runs 80px past the bottom of its frame, transparent, so the
   drop shadow under an animated panel fades out instead of ending in a hard
   line where the frame stops. Layout still uses the frame's own size. */
.anim { --anim-shadow-room: 80px; }
.anim iframe { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + var(--anim-shadow-room)); border: 0; display: block; background: transparent; pointer-events: none; }
.hv { position: relative; }
/* On wide screens the animations run past their column towards the page
   edge, so they play at about their design size. */
.hg, .feat .fg, .integ .fg, .rep .fg { --bleed: min(80px, max(0px, (100vw - 1180px) / 2)); }
.anim-hero { width: calc(100% + min(120px, max(0px, (100vw - 1180px) / 2))); }
/* Desktop crop (--dcx/--dcw, canvas px): the hero's content is a hub panel in
   the middle of a wide canvas, so the empty sides are trimmed to show it
   larger. Phones use the tighter --cx/--cw crop below, which wins there. */
.anim[style*="--dcx"] { aspect-ratio: var(--dcw) / var(--h); overflow-x: clip; overflow-y: visible; }
.anim[style*="--dcx"] iframe { width: calc(100% * var(--w) / var(--dcw)); left: calc(-100% * var(--dcx) / var(--dcw)); }
.feat .fg > .anim, .integ .fg > .anim, .rep .fg > .anim { width: calc(100% + var(--bleed)); }
.feat .fg.rev > .anim, .rep .fg.rev > .anim { margin-left: calc(-1 * var(--bleed)); }
/* The chat panel draws its own rounded card; the shadow belongs out here. */
.anim-chat { border-radius: 2.6% / 5%; box-shadow: 0 40px 80px -40px rgba(14, 26, 79, .35); }
.anim-widget { max-width: 1100px; margin: 40px auto 0; }
.fan { padding: 110px 0 60px; }

/* ---- integrations ----------------------------------------------------------- */
.integ { padding: 100px 0; overflow: hidden; background: var(--fl-frost); }

/* ---- apps Flayr replaces ------------------------------------------------------ */
.rep { padding: 110px 0; }
.rg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; }
/* Bars alternate navy/mint along every line, rows included: --c is a card's
   top bar, --c2 its closing bar, always the other colour, so the bottom line
   reads navy-mint-navy under a mint-navy-mint one instead of repeating it. */
.rc { --c: var(--fl-navy); --c2: var(--fl-mint); padding: 32px 30px 36px; border-top: 4px solid var(--c); border-right: 1px solid var(--fl-line); }
.rc:nth-child(2n) { --c: var(--fl-mint); --c2: var(--fl-navy); }
.rc:nth-child(3n) { border-right: 0; }
.rc:nth-child(n+4) { border-bottom: 4px solid var(--c2); }
.rc h3 { font-size: 21px; letter-spacing: -.02em; line-height: 1.15; }
.rc p { font-size: 14.5px; color: var(--fl-muted); margin-top: 12px; }

/* ---- analytics ------------------------------------------------------------------ */
.an { background: linear-gradient(90deg, #E3FAF1, #FFFFFF); }

/* ---- Inside the Hub ---------------------------------------------------------------- */
.nl { padding: 96px 0; }
.nl .bar { width: 56px; height: 5px; border-radius: 3px; background: var(--fl-mint); margin-bottom: 22px; }
.nl h2 { font-size: 48px; }
.nl p { font-size: 18px; max-width: 420px; margin-top: 14px; }
.form { display: flex; max-width: 440px; margin-top: 28px; padding: 6px; border-radius: 100px; background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(255, 255, 255, .2); }
.form:focus-within { border-color: var(--fl-mint); }
.form input { flex: 1; min-width: 0; padding: 0 16px; background: none; border: 0; outline: none; color: #FFFFFF; font: 15px var(--fl-font); }
.form input::placeholder { color: rgba(255, 255, 255, .5); }
.form .fl-btn { padding: 11px 20px; }
.cons { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--fl-on-dark); cursor: pointer; }
.cons input { accent-color: var(--fl-mint); width: 14px; height: 14px; flex: none; }
.cons a { color: var(--fl-mint); text-decoration: underline; }

/* ---- FAQ (the original's real <details> answers, in the new look) ---------------------- */
.faq { padding: 40px 0 100px; }
.faq h2 { text-align: center; margin-bottom: 40px; }
.fl { max-width: 760px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); }
.ld-faq-item { border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 20px 26px; }
.ld-faq-item:last-child { border: 0; }
.ld-faq-summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.ld-faq-summary::-webkit-details-marker { display: none; }
.ld-faq-summary:focus-visible { outline: 3px solid var(--fl-mint); outline-offset: 4px; border-radius: 6px; }
.ld-faq-q { font-size: 16px; font-weight: 700; color: #FFFFFF; line-height: 1.4; }
.ld-faq-icon { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: rgba(255, 255, 255, .12); color: #FFFFFF; transition: transform .2s; }
.ld-faq-item[open] .ld-faq-icon { background: var(--fl-mint); color: var(--fl-navy); transform: rotate(45deg); }
.ld-faq-a { margin-top: 10px; font-size: 14.5px; color: var(--fl-on-dark); }

/* ---- closing CTA ------------------------------------------------------------------------ */
.cta { padding: 60px 0 120px; }

/* ---- tablets and phones ------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hg, .fg { grid-template-columns: 1fr; }
  /* Phones and tablets: animations run edge to edge; the accordion is back as
     text, above the inbox half of the chat panel. */
  .anim-hero, .feat .fg > .anim, .integ .fg > .anim, .rep .fg > .anim { width: 100%; }
  .panel { border-radius: 28px; overflow: hidden; border: 1px solid var(--fl-line); box-shadow: 0 30px 70px -30px rgba(14, 26, 79, .35); }
  .acc { display: flex; }
  .anim-chat { border-radius: 0; box-shadow: none; }
  /* Cropped to the part each animation actually paints, centred on it, and
     kept to a sensible size on tablets. */
  .hv .anim, .feat .fg > .anim, .feat .fg.rev > .anim, .integ .fg > .anim, .rep .fg > .anim { max-width: 600px; margin-left: auto; margin-right: auto; }
  .hv .anim-hero { max-width: 420px; }
  /* Sides clipped (the crop), bottom left open so the shadow can fade out. */
  .anim[style*="--cx"] { aspect-ratio: var(--cw) / var(--h); overflow-x: clip; overflow-y: visible; }
  .anim[style*="--cx"] iframe { width: calc(100% * var(--w) / var(--cw)); left: calc(-100% * var(--cx) / var(--cw)); }
  .fg.rev { grid-template-columns: 1fr; }
  .fg.rev .ft { order: 0; }
  .rg { grid-template-columns: 1fr; }
  .rc { border-right: 0; }
  /* Stacked, each card keeps its top bar; only the last closes the list. */
  .rc:nth-child(n+4) { border-bottom: 0; }
  .rc:last-child { border-bottom: 4px solid var(--c2); }
  }
@media (max-width: 480px) {
  .hv .anim, .feat .fg > .anim, .feat .fg.rev > .anim, .integ .fg > .anim, .rep .fg > .anim, .rep .fg.rev > .anim, .fan .anim { width: calc(100% + 40px); margin-left: -20px; margin-right: -20px; }
  .hv .anim-hero { max-width: none; }
  .wrap { padding: 0 20px; }
  .hero { padding: 56px 0 64px; }
  .feat, .rep { padding: 80px 0; }
  .fan { padding-top: 80px; }
  .integ { padding: 72px 0; }
    .nl { padding: 72px 0; }
  .acc { padding: 32px 22px; }
  .nl h2 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) { .ld-faq-icon { transition: none; } }
