/* Firefly site chrome — shared by index.html and sedgepatent.html.
   Page-specific layout stays in each page. Do not duplicate these rules.

   Drift reconciled while extracting (same-named rules that differed):
   - .agree checkbox: homepage custom control (accent #6b6b70, appearance:none,
     checked checkmark). SEDGE page had a native checkbox with accent #2cdc9e.
   - Gradient animation: keep -webkit- prefixes (homepage had them; SEDGE did not).
   - Accessibility widget: homepage set host opacity .8; SEDGE left it at 1.
     Shared: opacity .8 and --acc-widget-z-index: 200 (widget default was 100000).
   - .acsb-trigger was a dead selector (wrong widget). Real host is #acc-widget-host.
   Unused homepage leftovers on the SEDGE page (hero-content, full-bleed-img,
   sedge-section, device-visual) were not carried into this file.
*/

:root {
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 100px;

  --z-sticky: 100;
  --z-fab: 200;
  --z-chat: 210;
  --z-nav: 400;

  /* Widget reads this inside its shadow tree. Keep under 1000. */
  --acc-widget-z-index: 200;

  --accent: #2cdc9e;
  --text-primary: #f2f2f0;
  --text-body: #9a9a9e;
  --text-muted: #6b6b70;
  --bg-raised: #141416;
  --bg-elevated: #1c1c1f;
  --border: #28282c;
  --green: oklch(72% 0.16 155);
  --red: oklch(68% 0.16 25);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --surface: var(--bg-raised);
  --surface-elevated: var(--bg-elevated);
  --text-secondary: var(--text-body);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Widget JS writes this inline at 100000; !important keeps it under 1000. */
  --acc-widget-z-index: 200 !important;
}

html,
body {
  background: #000;
}

body {
  background: #000;
  color: #f2f2f0;
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* -------------------------------------------------------------------------- */
/* Sticky header, gradient bar, announcement                                  */
/* -------------------------------------------------------------------------- */

.sticky-top {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: #000;
}

.gradient-bar,
.header-bottom-line,
.announcement-line-left,
.announcement-line-right {
  height: 3px;
  background: linear-gradient(90deg, #3ddc84, #4a8cff, #a855f7, #ec4899, #f59e0b, #3ddc84);
  background-size: 300% 100%;
  -webkit-animation: shift 18s linear infinite;
  animation: shift 18s linear infinite;
}

.gradient-bar {
  width: 100%;
}

@-webkit-keyframes shift {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

@keyframes shift {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000;
  height: 52px;
  padding: 4px 20px 0;
}

.logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lang {
  font-size: 0.9625rem;
  color: #b0b0b0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  margin-right: 4px;
}

.lang svg {
  opacity: 0.6;
}

.hamburger {
  display: block;
  width: 26px;
  height: 19px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.header-bottom-line {
  width: 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.header-bottom-line.visible {
  opacity: 1;
}

.announcement {
  display: flex;
  align-items: center;
  padding: 4px 0 0;
  background: #000;
  width: 100%;
  position: relative;
  z-index: 1;
}

.announcement-line-left,
.announcement-line-right {
  flex: 1;
}

.announcement-text {
  font-size: 0.6875rem;
  font-weight: 400;
  color: #5fcb69;
  white-space: nowrap;
  text-transform: uppercase;
  flex-shrink: 0;
  text-align: center;
  padding: 0 var(--space-xs);
}

/* -------------------------------------------------------------------------- */
/* Section system                                                             */
/* -------------------------------------------------------------------------- */

section {
  padding: var(--space-lg) var(--space-sm);
  position: relative;
}

.tone-a {
  background: #000;
}

.tone-b {
  background: #141416;
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-inner.wide {
  max-width: 1200px;
}

.centered {
  text-align: center;
}

.centered details{text-align:center}
.centered details div{text-align:center}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #5fcb69;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

h2.section-title {
  font-size: clamp(1.5rem, 5vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  line-height: 1.2;
}

.body-lines p {
  font-size: 1rem;
  color: #9a9a9e;
  margin-bottom: var(--space-sm);
  max-width: 640px;
  font-weight: 300;
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
}

.body-lines p.close {
  color: #f2f2f0;
  font-weight: 600;
  margin-top: 20px;
}

.body-lines p strong {
  color: #f2f2f0;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: 28px;
  padding: 12px 24px;
  border: 1px solid #28282c;
  border-radius: 100px;
  color: #f2f2f0;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.btn:hover {
  border-color: #9a9a9e;
  background: rgba(255, 255, 255, 0.04);
}

details {
  margin-top: var(--space-xs);
}

details summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5fcb69;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: var(--space-xs) 0;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::marker {
  display: none;
}

details summary svg {
  transition: transform 0.3s;
}

details[open] summary svg {
  transform: rotate(180deg);
}

/* -------------------------------------------------------------------------- */
/* Footer + subscribe                                                         */
/* -------------------------------------------------------------------------- */

footer {
  padding: var(--space-lg) var(--space-sm) var(--space-xl);
  background: #000;
}

.footer-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.footer-statement {
  margin-bottom: 28px;
}

.footer-statement p {
  font-size: 0.8125rem;
  color: #f2f2f0;
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}

.subscribe-block {
  margin-bottom: 24px;
}

.subscribe-label {
  color: #9a9a9e;
  font-size: 0.8125rem;
  margin-bottom: 14px;
  font-weight: 400;
}

.subscribe-row {
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: center;
  max-width: 340px;
  margin: 0 auto;
  background: #1c1c1f;
  border: 1px solid #28282c;
  border-radius: 100px;
  padding: 4px 4px 4px 18px;
}

.subscribe-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f2f2f0;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  padding: 10px 0;
}

.subscribe-row input::placeholder {
  color: #6b6b70;
}

.subscribe-row button {
  background: #2cdc9e;
  color: #000;
  border: none;
  border-radius: 100px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.agree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: 0.6875rem;
  color: #6b6b70;
  margin-top: 12px;
  cursor: pointer;
}

.agree input {
  accent-color: #6b6b70;
  margin: 0;
}

.agree input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid #6b6b70;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.agree input[type="checkbox"]:checked {
  background: #6b6b70;
  border-color: #6b6b70;
}

.agree input[type="checkbox"]:checked::after {
  content: "✓";
  color: #000;
  font-size: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.legal {
  font-size: 0.625rem;
  color: #6b6b70;
  border-top: 1px solid #28282c;
  padding-top: var(--space-sm);
  margin-top: 24px;
  font-weight: 300;
}

.legal p {
  margin-bottom: var(--space-xs);
}

.legal a {
  color: #6b6b70;
  text-decoration: none;
  margin: 0 6px;
}

/* -------------------------------------------------------------------------- */
/* Mobile nav                                                                 */
/* -------------------------------------------------------------------------- */

#mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-nav);
  background: rgba(0, 0, 0, 0.97);
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  overflow-y: auto;
}

#mobile-nav .mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #f2f2f0;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

#mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#mobile-nav nav a {
  color: #f2f2f0;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 500;
}

#mobile-nav nav a.nav-contact {
  color: #2cdc9e;
  font-size: 1rem;
  font-weight: 600;
}

#mobile-nav nav a.nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2cdc9e;
  color: #000;
  border-radius: 100px;
  padding: 14px 32px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 12px;
  align-self: flex-start;
}

#mobile-nav hr {
  border: none;
  border-top: 1px solid #28282c;
  margin: var(--space-xs) 0;
}

/* -------------------------------------------------------------------------- */
/* Floating buttons — defined once. No per-page !important.                   */
/* -------------------------------------------------------------------------- */

#ff-chat-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: var(--z-fab);
  padding: 14px 20px;
  border: none;
  border-radius: 100px;
  background: linear-gradient(90deg, #2bb870, #3d73d4, #8a3fcf, #c73a7d, #cc8409, #2bb870);
  background-size: 300% 100%;
  -webkit-animation: shift 18s linear infinite;
  animation: shift 18s linear infinite;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(44, 220, 158, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: .8125rem;
  font-family: inherit;
  color: #fff;
  opacity: 1;
}

#ff-chat-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

#ff-chat {
  display: none;
  position: fixed;
  bottom: 84px;
  left: 24px;
  z-index: var(--z-chat);
  width: 340px;
  max-height: 480px;
  background: #141416;
  border: 1px solid #28282c;
  border-radius: 16px;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.ff-chat-head {
  padding: var(--space-sm);
  border-bottom: 1px solid #28282c;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ff-chat-head span {
  font-weight: 600;
  font-size: 0.875rem;
  color: #f2f2f0;
}

.ff-chat-head button {
  background: none;
  border: none;
  color: #6b6b70;
  font-size: 1.25rem;
  cursor: pointer;
}

#ff-msgs {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

#ff-form {
  padding: 12px;
  border-top: 1px solid #28282c;
  display: flex;
  gap: var(--space-xs);
}

#ff-input {
  flex: 1;
  padding: 10px 14px;
  background: #1c1c1f;
  border: 1px solid #28282c;
  border-radius: 100px;
  color: #f2f2f0;
  font-family: inherit;
  font-size: 0.8125rem;
  outline: none;
}

#ff-form button[type="submit"] {
  background: #2cdc9e;
  color: #000;
  border: none;
  border-radius: 100px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
}

#acc-widget-host {
  opacity: 1;
  --acc-widget-z-index: 200;
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
}

#acc-widget-host .acc-toggle-btn{transform:scale(1.22);transform-origin:bottom right}

/* -------------------------------------------------------------------------- */
/* Breakpoints                                                                */
/* -------------------------------------------------------------------------- */

@media (min-width: 901px) {
  header {
    height: 64px;
    padding: 10px 48px 0;
  }

  .logo img {
    width: 48px;
    height: 48px;
  }

  .lang {
    font-size: 1.0625rem;
  }

  .hamburger {
    width: 34px;
    height: 24px;
  }

  .nav-right {
    gap: 20px;
  }

  .announcement {
    padding: 6px 0 0;
  }

  .announcement-text {
    font-size: 0.75rem;
  }

  section {
    padding: var(--space-xl) var(--space-lg);
  }

  .body-lines p {
    font-size: 1.0625rem;
  }

  footer {
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gradient-bar,
  .header-bottom-line,
  .announcement-line-left,
  .announcement-line-right,
  #ff-chat-btn {
    -webkit-animation: shift 18s linear infinite !important;
    animation: shift 18s linear infinite !important;
  }
}

/* JS fallback (index.html + sedgepatent.html, before </body>):
   if prefers-reduced-motion, rAF-sets background-position on
   .gradient-bar / header-bottom-line / announcement lines / #ff-chat-btn.
   iOS can block CSS animation; it cannot block that loop. */
