/* ==========================================================
   Creotrax brand overrides — loaded after main.css
   ========================================================== */
:root, .dark {
  --color-primary-50: #eef4ff;
  --color-primary-200: #cfdefd;
  --color-primary-400: #5e8bfb;
  --color-primary-500: #2f6bf2;
  --color-primary-600: #1f55d6;
  --color-gradient-8: linear-gradient(156deg, #fff 32.92%, #9db9fd 91%);
}

/* Shift the template's purple product mockups toward Creotrax blue */
.ctx-hue img { filter: hue-rotate(-41deg) saturate(0.96); }

/* ==========================================================
   Client gallery mockup
   ========================================================== */
.ctx-gallery {
  background: #fff;
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 24px 60px -24px rgba(16, 24, 40, 0.25);
}
.dark .ctx-gallery { background: #171c24; }

.ctx-cover {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 8.4;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(255, 219, 187, 0.55) 0%, rgba(255, 219, 187, 0) 55%),
    linear-gradient(160deg, #241f2b 0%, #4a3f4e 38%, #8a6a5e 68%, #d9a983 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  gap: 10px;
}
.ctx-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 50% 100%, rgba(0,0,0,0.35), transparent 70%);
  pointer-events: none;
}
.ctx-cover > * { position: relative; z-index: 1; }
.ctx-cover-kicker {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: 0.75;
}
.ctx-cover-names {
  font-weight: 300;
  font-style: italic;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.ctx-cover-btn {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  backdrop-filter: blur(2px);
}

.ctx-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 8px 10px;
  font-size: 13px;
  color: rgba(26, 26, 28, 0.55);
  overflow: hidden;
}
.dark .ctx-tabs { color: rgba(252, 252, 252, 0.55); }
.ctx-tabs .is-active {
  color: #1a1a1c;
  font-weight: 600;
  border-bottom: 2px solid var(--color-primary-500);
  padding-bottom: 2px;
}
.dark .ctx-tabs .is-active { color: #fcfcfc; }
.ctx-tabs .ctx-tab-count {
  margin-left: auto;
  font-size: 12px;
  color: rgba(26, 26, 28, 0.4);
}
.dark .ctx-tabs .ctx-tab-count { color: rgba(252, 252, 252, 0.4); }

.ctx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 58px;
  gap: 6px;
}
.ctx-grid .t {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}
.ctx-grid .t::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 30% 20%, rgba(255,255,255,0.18), transparent 55%),
    radial-gradient(130% 110% at 80% 100%, rgba(0,0,0,0.22), transparent 60%);
}
.t-a { grid-row: span 2; background: linear-gradient(150deg, #e0cdbb, #a9897a); }
.t-b { grid-row: span 3; background: linear-gradient(165deg, #9fb0c4, #5d6e85); }
.t-c { grid-row: span 2; background: linear-gradient(145deg, #c9cfc2, #7e8a74); }
.t-d { grid-row: span 3; background: linear-gradient(150deg, #e7d6c3, #b08d68); }
.t-e { grid-row: span 2; background: linear-gradient(160deg, #4b4650, #28242e); }
.t-f { grid-row: span 3; background: linear-gradient(145deg, #d8b8a5, #93685b); }

.ctx-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.94);
  color: #1a1a1c;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.18);
}
.ctx-chip svg { flex-shrink: 0; }

.ctx-float {
  position: absolute;
  z-index: 3;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px -12px rgba(16, 24, 40, 0.28);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dark .ctx-float { background: #1f252f; }
.ctx-float .ctx-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(145deg, #f0b8a0, #c97d62);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ctx-float p { font-size: 13px; line-height: 1.35; color: #1a1a1c; margin: 0; }
.dark .ctx-float p { color: #fcfcfc; }
.ctx-float p span { display: block; font-size: 11px; color: rgba(26,26,28,0.5); font-weight: 400; }
.dark .ctx-float p span { color: rgba(252,252,252,0.5); }
.ctx-float--comment { top: 34%; right: -14px; max-width: 230px; }
.ctx-float--picks { bottom: 26px; left: -14px; }
.ctx-float .ctx-check {
  width: 34px; height: 34px; border-radius: 999px; flex-shrink: 0;
  background: var(--color-primary-50); color: var(--color-primary-500);
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 480px) {
  .ctx-float--comment { right: 2px; }
  .ctx-float--picks { left: 2px; }
}

/* ==========================================================
   FAQ accordion
   ========================================================== */
.ctx-faq { max-width: 850px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.ctx-faq details {
  background: #fff;
  border: 1px solid var(--color-stroke-2, #e3e7ed);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.dark .ctx-faq details { background: #171c24; border-color: #2a333e; }
.ctx-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  color: #1a1a1c;
}
.dark .ctx-faq summary { color: #fcfcfc; }
.ctx-faq summary::-webkit-details-marker { display: none; }
.ctx-faq summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--color-primary-500);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.ctx-faq details[open] summary::after { transform: rotate(45deg); }
.ctx-faq .ctx-faq-body { padding: 0 22px 20px; color: rgba(26, 26, 28, 0.7); }
.dark .ctx-faq .ctx-faq-body { color: rgba(252, 252, 252, 0.65); }

/* Hero typography balance */
.hero-section h1 { font-size: clamp(38px, 4.5vw, 62px); line-height: 1.1; letter-spacing: -0.02em; }

/* ==========================================================
   Products dropdown (hover / keyboard focus, no JS)
   ========================================================== */
.ctx-dd-chev { transition: transform 0.2s ease; }
.ctx-dd:hover .ctx-dd-chev, .ctx-dd:focus-within .ctx-dd-chev { transform: rotate(180deg); }
.ctx-dd-panel {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 10px;              /* hover bridge between link and panel */
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}
.ctx-dd:hover .ctx-dd-panel, .ctx-dd:focus-within .ctx-dd-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.ctx-dd-panel > a { display: flex; }
.ctx-dd-panel::before {            /* the card */
  content: ""; position: absolute; inset: 10px 0 0 0; z-index: -1;
  background: #fff; border: 1px solid var(--color-stroke-2, #e3e7ed);
  border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(16, 24, 40, 0.3);
}
.dark .ctx-dd-panel::before { background: #171c24; border-color: #2a333e; }
.ctx-dd-panel { width: 340px; }
.ctx-dd-item {
  align-items: flex-start; gap: 12px; margin: 6px; padding: 10px 12px;
  border-radius: 10px; color: #1a1a1c; text-decoration: none; transition: background 0.15s;
}
.ctx-dd-item:first-child { margin-top: 16px; }
.ctx-dd-item:last-child { margin-bottom: 8px; }
.ctx-dd-item:hover { background: var(--color-background-3, #f4f5f8); }
.dark .ctx-dd-item { color: #fcfcfc; }
.dark .ctx-dd-item:hover { background: #1f252f; }
.ctx-dd-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--color-primary-50); color: var(--color-primary-500);
  display: flex; align-items: center; justify-content: center;
}
.dark .ctx-dd-icon { background: rgba(47, 107, 242, 0.18); }
.ctx-dd-item strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.ctx-dd-item small { display: block; font-size: 12.5px; color: rgba(26, 26, 28, 0.6); line-height: 1.35; margin-top: 2px; }
.dark .ctx-dd-item small { color: rgba(252, 252, 252, 0.55); }

/* ==========================================================
   CreoDrive mockup
   ========================================================== */
.ctx-drive {
  background: #fff; border-radius: 20px; padding: 10px;
  box-shadow: 0 24px 60px -24px rgba(16, 24, 40, 0.25);
}
.dark .ctx-drive { background: #171c24; }
.ctx-drive-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px 12px; font-size: 13px; color: rgba(26, 26, 28, 0.55);
}
.dark .ctx-drive-bar { color: rgba(252, 252, 252, 0.55); }
.ctx-drive-crumb i { font-style: normal; margin: 0 5px; opacity: 0.5; }
.ctx-drive-crumb b { color: #1a1a1c; font-weight: 600; }
.dark .ctx-drive-crumb b { color: #fcfcfc; }
.ctx-drive-btn {
  background: var(--color-primary-500); color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; flex-shrink: 0;
}
.ctx-drive-rows { display: flex; flex-direction: column; gap: 4px; }
.ctx-drive-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 12px; background: var(--color-background-2, #f9fafb);
}
.dark .ctx-drive-row { background: #1f252f; }
.ctx-drive-ic {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ctx-drive-ic.is-folder { background: var(--color-primary-50); color: var(--color-primary-500); }
.ctx-drive-ic.is-video  { background: #fdf0e6; color: #d9731f; }
.ctx-drive-ic.is-doc    { background: #eef7ee; color: #2f8a4c; }
.dark .ctx-drive-ic.is-folder { background: rgba(47,107,242,0.18); }
.dark .ctx-drive-ic.is-video  { background: rgba(217,115,31,0.18); }
.dark .ctx-drive-ic.is-doc    { background: rgba(47,138,76,0.18); }
.ctx-drive-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; color: #1a1a1c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dark .ctx-drive-name { color: #fcfcfc; }
.ctx-drive-name small { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; color: rgba(26, 26, 28, 0.55); margin-top: 2px; }
.dark .ctx-drive-name small { color: rgba(252, 252, 252, 0.55); }
.ctx-drive-name em { font-style: normal; color: var(--color-primary-500); font-weight: 600; }
.ctx-drive-prog { display: inline-block; width: 70px; height: 5px; border-radius: 999px; background: rgba(26,26,28,0.1); overflow: hidden; }
.dark .ctx-drive-prog { background: rgba(252,252,252,0.15); }
.ctx-drive-prog i { display: block; height: 100%; background: var(--color-primary-500); border-radius: 999px; }
.ctx-drive-meta { font-size: 12px; color: rgba(26, 26, 28, 0.45); flex-shrink: 0; }
.dark .ctx-drive-meta { color: rgba(252, 252, 252, 0.45); }
.ctx-float--share { top: -22px; right: -14px; max-width: 260px; }
.ctx-float--opened { bottom: -22px; right: -14px; max-width: 300px; }
@media (max-width: 480px) {
  .ctx-float--share { right: 2px; top: -14px; }
  .ctx-float--opened { right: 2px; }
  .ctx-drive-meta { display: none; }
}
