@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --cp-bg: #05080d;
  --cp-bg-2: #0d1219;
  --cp-card: #10161e;
  --cp-text: #f7f9fb;
  --cp-muted: #aeb6c1;
  --cp-line: rgba(235, 242, 250, 0.16);
  --cp-orange: #ff7310;
  --cp-orange-2: #ff963b;
  color-scheme: dark;
}

html[data-theme="light"] {
  --cp-bg: #e9eff4;
  --cp-bg-2: #dfe7ee;
  --cp-card: #edf2f6;
  --cp-text: #111820;
  --cp-muted: #5e6976;
  --cp-line: #dce3ea;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse 48% 32% at 22% 18%, rgba(229, 237, 246, 0.14), transparent 72%),
    linear-gradient(145deg, var(--cp-bg), var(--cp-bg-2) 54%, var(--cp-bg));
  color: var(--cp-text);
  font-family: "Cairo", "Inter", system-ui, sans-serif;
}

html[dir="ltr"] body {
  font-family: "Inter", "Cairo", system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.cp-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.cp-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 68px;
  border-bottom: 1px solid var(--cp-line);
  background: color-mix(in srgb, var(--cp-bg) 86%, transparent);
  backdrop-filter: blur(18px);
}

.cp-nav {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  direction: ltr;
}

.cp-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  direction: ltr;
}

.cp-mark {
  width: 50px;
  height: 38px;
  background: url("assets/af-mark-dark.png") center / contain no-repeat;
}

html[data-theme="light"] .cp-mark {
  background-image: url("assets/af-mark-light.png");
}

.cp-brand-copy {
  display: grid;
  line-height: 1.15;
}

.cp-brand-copy b {
  font-size: 14px;
}

.cp-brand-copy small {
  color: var(--cp-muted);
  font-size: 9px;
}

.cp-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  color: var(--cp-muted);
  font-size: 12px;
}

.cp-links a:hover {
  color: var(--cp-text);
}

.cp-actions {
  display: flex;
  gap: 8px;
}

.cp-icon,
.cp-lang {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cp-line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--cp-card) 72%, transparent);
  color: var(--cp-text);
  cursor: pointer;
}

.cp-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.cp-main {
  min-height: calc(100vh - 68px);
  padding: 82px 0 72px;
}

.cp-hero {
  position: relative;
  isolation: isolate;
  min-height: 370px;
  display: grid;
  align-content: center;
  padding: clamp(32px, 6vw, 74px);
  overflow: hidden;
  border: 1px solid var(--cp-line);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 46% 70% at 16% 52%, rgba(232, 240, 249, 0.2), transparent 72%),
    linear-gradient(145deg, #111821, #06090e 64%);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .cp-hero {
  background:
    radial-gradient(ellipse 48% 72% at 16% 52%, rgba(91, 117, 145, 0.2), transparent 72%),
    radial-gradient(ellipse 38% 62% at 80% 44%, rgba(255, 255, 255, 0.74), transparent 74%),
    linear-gradient(145deg, #edf2f6, #dbe5ed);
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
}

.cp-hero::after {
  content: "AF";
  position: absolute;
  z-index: -1;
  inset-inline-end: 7%;
  color: color-mix(in srgb, var(--cp-text) 3%, transparent);
  font: 900 clamp(160px, 26vw, 330px) / 1 "Inter", sans-serif;
  letter-spacing: -0.12em;
  transform: skewX(-8deg);
}

.cp-kicker {
  width: max-content;
  padding: 6px 10px;
  border: 1px solid rgba(255, 115, 16, 0.28);
  border-radius: 999px;
  background: rgba(255, 115, 16, 0.1);
  color: var(--cp-orange-2);
  font-size: 11px;
  font-weight: 800;
}

.cp-hero h1 {
  max-width: 780px;
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.cp-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--cp-muted);
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.9;
}

.cp-hero > .cp-kicker,
.cp-hero > h1,
.cp-hero > p {
  position: relative;
  z-index: 3;
  width: min(64%, 780px);
}

.cp-hero-metrics {
  position: absolute;
  z-index: 2;
  inset-inline-end: 4%;
  bottom: 12%;
  width: 32%;
  min-height: 210px;
  perspective: 900px;
}

.cp-hero-metrics::before {
  content: "";
  position: absolute;
  inset: 18% -8% -16%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(229, 238, 247, 0.28), transparent 72%);
  filter: blur(20px);
}

.cp-hero-metrics article {
  position: absolute;
  width: 64%;
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(235, 242, 250, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(145deg, #171e27, #070a0f);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.08);
  color: #f7f9fb;
  animation: cp-float 5.4s ease-in-out infinite;
}

.cp-hero-metrics article:nth-child(1) {
  inset-inline-start: 0;
  top: 0;
}

.cp-hero-metrics article:nth-child(2) {
  inset-inline-end: 0;
  top: 62px;
  z-index: 2;
  animation-delay: -1.6s;
}

.cp-hero-metrics article:nth-child(3) {
  inset-inline-start: 9%;
  top: 124px;
  animation-delay: -3.1s;
}

.cp-hero-metrics small {
  color: #aab3be;
  font-size: 9px;
}

.cp-hero-metrics strong {
  font-size: 18px;
}

.cp-hero-metrics em {
  color: #929ba6;
  font-size: 8px;
  font-style: normal;
}

.cp-hero-metrics span {
  color: #35d17a;
  font-size: 9px;
}

@keyframes cp-float {
  0%, 100% { transform: translateY(0) rotateY(-4deg); }
  50% { transform: translateY(-7px) rotateY(2deg); }
}

.cp-sections {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.cp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cp-card,
.cp-article,
.cp-contact-panel {
  padding: 28px;
  border: 1px solid var(--cp-line);
  border-radius: 20px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--cp-card) 96%, transparent), color-mix(in srgb, var(--cp-bg) 94%, transparent));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.cp-card:hover,
.cp-channel:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 115, 16, 0.32);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
}

.cp-card span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 115, 16, 0.22);
  border-radius: 12px;
  background: rgba(255, 115, 16, 0.09);
  color: var(--cp-orange-2);
  font-size: 20px;
}

.cp-card h2,
.cp-article h2,
.cp-contact-panel h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.cp-card p,
.cp-article p,
.cp-contact-panel p,
.cp-article li {
  color: var(--cp-muted);
  font-size: 14px;
  line-height: 1.9;
}

.cp-article {
  padding: clamp(26px, 5vw, 52px);
}

.cp-article header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cp-article header b {
  color: var(--cp-orange-2);
  font-size: 12px;
}

.cp-article ol,
.cp-article ul {
  display: grid;
  gap: 8px;
}

.cp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--cp-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 50%, rgba(255, 115, 16, 0.13), transparent 35%),
    var(--cp-card);
}

.cp-cta h2 {
  margin: 0 0 5px;
}

.cp-cta p {
  margin: 0;
  color: var(--cp-muted);
}

.cp-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--cp-line);
  border-radius: 10px;
  background: transparent;
  color: var(--cp-text);
  font-weight: 800;
  cursor: pointer;
}

.cp-btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cp-orange), var(--cp-orange-2));
  color: #fff;
  box-shadow: 0 16px 34px rgba(255, 115, 16, 0.23);
}

.cp-faq {
  border: 1px solid var(--cp-line);
  border-radius: 16px;
  background: var(--cp-card);
}

.cp-faq + .cp-faq {
  margin-top: 10px;
}

.cp-faq summary {
  padding: 18px 20px;
  font-weight: 800;
  cursor: pointer;
}

.cp-faq p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--cp-muted);
  line-height: 1.8;
}

.cp-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cp-channel {
  min-height: 110px;
  display: grid;
  align-content: center;
  padding: 20px;
  border: 1px solid var(--cp-line);
  border-radius: 16px;
  background: var(--cp-card);
}

.cp-channel b {
  margin-bottom: 5px;
}

.cp-channel small {
  color: var(--cp-muted);
}

.cp-footer {
  padding: 30px 0;
  border-top: 1px solid var(--cp-line);
}

.cp-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cp-footer nav {
  display: flex;
  gap: 18px;
  color: var(--cp-muted);
  font-size: 11px;
}

.cp-footer p {
  color: var(--cp-muted);
  font-size: 10px;
}

.af-assistant-launcher,
.af-assistant-mark,
.af-assistant-send,
.af-assistant-confirm {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--cp-orange), var(--cp-orange-2)) !important;
  color: #fff !important;
  box-shadow: 0 16px 40px rgba(255, 115, 16, 0.26) !important;
}

.af-assistant-panel {
  border-color: rgba(255, 115, 16, 0.24) !important;
}

@media (max-width: 820px) {
  .cp-links {
    display: none;
  }

  .cp-nav {
    grid-template-columns: 1fr auto;
  }

  .cp-grid,
  .cp-channels {
    grid-template-columns: 1fr;
  }

  .cp-hero {
    min-height: 330px;
  }

  .cp-hero > .cp-kicker,
  .cp-hero > h1,
  .cp-hero > p {
    width: 100%;
  }

  .cp-hero-metrics {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 180px;
    margin-top: 26px;
  }

  .cp-hero {
    min-height: 540px;
  }
}

@media (max-width: 560px) {
  .cp-shell {
    width: min(100% - 24px, 520px);
  }

  .cp-brand-copy {
    display: none;
  }

  .cp-main {
    padding-top: 40px;
  }

  .cp-hero {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .cp-hero h1 {
    font-size: 38px;
  }

  .cp-cta,
  .cp-footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .cp-footer nav {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
