/* AffiCMS — Premium modern SaaS (monochrome #262626) */

:root {
  --affi-bg: #fafafa;
  --affi-bg-elevated: #ffffff;
  --affi-ink: #262626;
  --affi-mute: #737373;
  --affi-mute-soft: #a3a3a3;
  --affi-signal: #262626;
  --affi-signal-dim: #0a0a0a;
  --affi-line: rgba(38, 38, 38, 0.08);
  --affi-line-strong: rgba(38, 38, 38, 0.14);
  --affi-glass: rgba(255, 255, 255, 0.72);
  --affi-glass-strong: rgba(255, 255, 255, 0.88);
  --affi-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --affi-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --affi-dur: 220ms;
  --affi-dur-slow: 520ms;
  --affi-radius: 16px;
  --affi-radius-sm: 10px;
  --affi-shadow-xs: 0 1px 2px rgba(38, 38, 38, 0.04);
  --affi-shadow-soft:
    0 1px 2px rgba(38, 38, 38, 0.03),
    0 8px 24px rgba(38, 38, 38, 0.04),
    0 24px 48px rgba(38, 38, 38, 0.03);
  --affi-shadow-lift:
    0 2px 4px rgba(38, 38, 38, 0.04),
    0 12px 32px rgba(38, 38, 38, 0.08),
    0 32px 64px rgba(38, 38, 38, 0.05);
  --affi-font-display: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
  --affi-font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* === Atmosphere (layered mesh, no flat fill) === */

.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(38, 38, 38, 0.05), transparent 55%),
    radial-gradient(ellipse 50% 45% at 100% 20%, rgba(38, 38, 38, 0.035), transparent 50%),
    radial-gradient(ellipse 45% 40% at 0% 80%, rgba(38, 38, 38, 0.03), transparent 48%),
    linear-gradient(165deg, #fafafa 0%, #f5f5f5 42%, #f0f0f0 100%);
  pointer-events: none;
}

.bg-atmosphere::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.9) 0%, transparent 42%),
    radial-gradient(circle at 72% 58%, rgba(255, 255, 255, 0.55) 0%, transparent 38%);
  animation: affi-drift 28s var(--affi-ease) infinite alternate;
  pointer-events: none;
}

.bg-atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(38, 38, 38, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 38, 38, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 38%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 38%, #000 10%, transparent 70%);
  pointer-events: none;
}

@keyframes affi-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1.5%, 0) scale(1.04); }
}

/* === Chrome === */

.site-header {
  border-bottom: 1px solid var(--affi-line);
  background: var(--affi-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--affi-shadow-xs);
}

.site-footer {
  border-top: 1px solid var(--affi-line);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.brand-link {
  transition:
    opacity var(--affi-dur) var(--affi-ease),
    transform var(--affi-dur) var(--affi-ease);
  cursor: pointer;
}

.brand-link:hover {
  opacity: 0.78;
}

.brand-link:active {
  transform: scale(0.98);
}

.page-chip {
  font-family: var(--affi-font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--affi-mute);
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--affi-line);
  border-radius: 999px;
  background: var(--affi-glass-strong);
  box-shadow: var(--affi-shadow-xs);
}

.nav-quiet {
  position: relative;
  transition: color var(--affi-dur) var(--affi-ease);
  cursor: pointer;
}

.nav-quiet::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 1.5px;
  border-radius: 1px;
  background: var(--affi-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--affi-dur-slow) var(--affi-ease-out);
}

.nav-quiet:hover {
  color: var(--affi-ink);
}

.nav-quiet:hover::after {
  transform: scaleX(1);
}

.nav-quiet:focus-visible {
  outline: 2px solid var(--affi-ink);
  outline-offset: 4px;
  border-radius: 3px;
}

/* === Home brand === */

.home-brand {
  isolation: isolate;
}

.home-column {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  padding: 1.15rem;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    var(--affi-shadow-lift),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: -18%;
  border-radius: 36px;
  background: radial-gradient(circle, rgba(38, 38, 38, 0.07) 0%, transparent 68%);
  z-index: -1;
  pointer-events: none;
}

.brand-mark img {
  width: clamp(3.75rem, 11vw, 5.25rem);
  height: auto;
  display: block;
}

.brand-display {
  margin: 0;
  font-family: var(--affi-font-body);
  font-size: clamp(3rem, 10vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  color: #262626;
  text-wrap: balance;
}

.accent-rule {
  width: 2.75rem;
  height: 2px;
  margin: 1.75rem auto 0;
  border-radius: 999px;
  background: #262626;
  transform-origin: center;
  opacity: 0.9;
}

.accent-rule.reveal {
  opacity: 0;
  transform: scaleX(0.35);
}

.accent-rule.reveal.is-visible {
  opacity: 0.9;
  transform: scaleX(1);
  transition:
    opacity 480ms var(--affi-ease) 80ms,
    transform 640ms var(--affi-ease-out) 80ms;
}

.brand-whisper {
  margin: 1.5rem auto 0;
  max-width: 28rem;
  font-family: var(--affi-font-body);
  font-size: clamp(1rem, 2.1vw, 1.1875rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.6;
  color: var(--affi-mute);
  text-wrap: balance;
}

/* === Page intro === */

.page-intro h1 {
  font-family: var(--affi-font-display);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--affi-ink);
}

.page-intro p {
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* === Surfaces === */

.panel {
  border: 1px solid var(--affi-line);
  border-radius: var(--affi-radius);
  background: var(--affi-glass-strong);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--affi-shadow-soft);
}

.panel a {
  color: var(--affi-ink);
  text-decoration: underline;
  text-decoration-color: rgba(38, 38, 38, 0.28);
  text-underline-offset: 0.18em;
  transition:
    color var(--affi-dur) var(--affi-ease),
    text-decoration-color var(--affi-dur) var(--affi-ease);
  cursor: pointer;
}

.panel a:hover {
  color: var(--affi-signal-dim);
  text-decoration-color: rgba(38, 38, 38, 0.7);
}

.panel a:focus-visible {
  outline: 2px solid var(--affi-ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.panel h2 {
  font-family: var(--affi-font-display);
  letter-spacing: -0.02em;
}

.panel code {
  font-size: 0.85em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(38, 38, 38, 0.05);
  border: 1px solid var(--affi-line);
}

.panel-cta {
  border-radius: calc(var(--affi-radius) - 4px);
  border: 1px solid var(--affi-line-strong);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(245, 245, 245, 0.85));
  box-shadow: var(--affi-shadow-xs);
}

.alert-ok {
  border-radius: var(--affi-radius-sm);
  border: 1px solid var(--affi-line-strong);
  background: rgba(38, 38, 38, 0.04);
  color: #262626;
  font-weight: 500;
}

.alert-err {
  border-radius: var(--affi-radius-sm);
  border: 1px solid rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.06);
  color: #b91c1c;
  font-weight: 500;
}

/* === Form === */

.field {
  width: 100%;
  border-radius: var(--affi-radius-sm);
  border: 1px solid var(--affi-line-strong);
  background: #fff;
  padding: 0.85rem 1rem;
  color: var(--affi-ink);
  font-family: var(--affi-font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  outline: none;
  box-shadow: var(--affi-shadow-xs);
  transition:
    border-color var(--affi-dur) var(--affi-ease),
    box-shadow var(--affi-dur) var(--affi-ease),
    background var(--affi-dur) var(--affi-ease);
}

.field::placeholder {
  color: var(--affi-mute-soft);
}

.field:hover {
  border-color: rgba(38, 38, 38, 0.22);
}

.field:focus {
  border-color: rgba(38, 38, 38, 0.45);
  background: #fff;
  box-shadow:
    var(--affi-shadow-xs),
    0 0 0 4px rgba(38, 38, 38, 0.08);
}

.field.is-invalid {
  border-color: rgba(185, 28, 28, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.btn-signal {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--affi-radius-sm);
  background: #262626;
  padding: 0.8rem 1.65rem;
  font-family: var(--affi-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 8px 20px rgba(38, 38, 38, 0.22);
  transition:
    background var(--affi-dur) var(--affi-ease),
    transform var(--affi-dur) var(--affi-ease),
    box-shadow var(--affi-dur) var(--affi-ease);
}

.btn-signal:hover {
  background: #0a0a0a;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 12px 28px rgba(38, 38, 38, 0.28);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-signal:active {
  transform: translateY(0);
  box-shadow: var(--affi-shadow-xs);
}

.btn-signal:focus-visible {
  outline: 2px solid #262626;
  outline-offset: 3px;
}

.panel a.btn-signal,
a.btn-signal {
  color: #ffffff;
  text-decoration: none;
  text-decoration-color: transparent;
}

.panel a.btn-signal:hover,
a.btn-signal:hover {
  color: #ffffff;
  text-decoration: none;
}

.cap-widget-afficms {
  --cap-background: #ffffff;
  --cap-border-color: rgba(38, 38, 38, 0.14);
  --cap-border-radius: 10px;
  --cap-color: #262626;
  --cap-checkbox-border: 1px solid rgba(38, 38, 38, 0.2);
  --cap-checkbox-background: #fff;
  --cap-checkbox-border-radius: 6px;
  --cap-font: "Plus Jakarta Sans", system-ui, sans-serif;
  --cap-spinner-color: #262626;
  --cap-spinner-background-color: rgba(38, 38, 38, 0.1);
  display: block;
  width: fit-content;
  max-width: 100%;
}

/* === Reveal motion === */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
  transition:
    opacity var(--affi-dur-slow) var(--affi-ease-out),
    transform var(--affi-dur-slow) var(--affi-ease-out),
    filter var(--affi-dur-slow) var(--affi-ease-out);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.reveal.delay-1 { transition-delay: 70ms; }
.reveal.delay-2 { transition-delay: 140ms; }
.reveal.delay-3 { transition-delay: 220ms; }

::selection {
  background: rgba(38, 38, 38, 0.12);
  color: #262626;
}

:focus-visible {
  outline: 2px solid #262626;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .bg-atmosphere::before {
    animation: none;
  }

  .reveal,
  .reveal.delay-1,
  .reveal.delay-2,
  .reveal.delay-3,
  .accent-rule.reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .nav-quiet::after,
  .btn-signal,
  .brand-link,
  .field {
    transition: none;
  }

  .btn-signal:hover,
  .brand-link:active {
    transform: none;
  }

  .brand-mark::after {
    display: none;
  }
}
