/* ======== BRAND TOKENS & RESET ======== */

:root {
  /* Brand colors */
  --primary: #007dcb;                            /* Global blue */
  --primary-soft: rgba(0, 125, 203, 0.35);
  --secondary: #8e6cc6;
  --accent-teal: #3fe2b0;

  /* Backgrounds */
  --bg: #05030f;
  --bg-deep: #020007;
  --bg-panel: #0f172a;

  /* Text / neutrals */
  --text-main: #f9fafb;
  --text-soft: #9ca3af;
  --border-soft: #1e2536;

  /* Radii & shadows */
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 30px 80px rgba(0, 0, 0, 0.9);

  /* Typography */
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;

  /* Motion */
  --transition-med: 240ms ease-out;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #111827 0, var(--bg) 50%),
    radial-gradient(circle at bottom, #020013 0, var(--bg-deep) 50%);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ======== PAGE LAYOUT ======== */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Ambient glows */

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.bg-orb--tl {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -140px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3), transparent 40%),
    radial-gradient(circle at 60% 60%, var(--primary), transparent 65%);
}

.bg-orb--br {
  width: 520px;
  height: 520px;
  bottom: -200px;
  right: -160px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15), transparent 35%),
    radial-gradient(circle at 50% 70%, rgba(148, 163, 184, 0.6), transparent 60%);
}

/* ======== HEADER + BRANDING ======== */

.header {
  position: relative;
  z-index: 5;
  padding: 1.4rem 2.4rem 0.6rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo image from favicon */

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: contain;
  background: transparent;
  box-shadow: 0 0 14px rgba(0, 125, 203, 0.55);
  transition:
    transform 180ms ease-out,
    box-shadow 180ms ease-out,
    filter 180ms ease-out;
}

/* Micro hover pulse */
.brand-logo:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 20px rgba(0, 125, 203, 0.85);
  filter: brightness(1.05);
}

/* Text block (Innovative Edge / Consulting) */

.brand-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-main);
}

.brand-subtitle {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.9;
  margin-top: 3px;
}

/* ======== MAIN CONTENT ======== */

.main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.6rem 1.5rem 3rem;
}

/* Product suite label */

.suite-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 2.4rem;
  opacity: 0.9;
}

.suite-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.5),
    transparent
  );
}

.suite-text {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* Grid */

.grid {
  width: 100%;
  max-width: 1120px;
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  background: radial-gradient(
      circle at top,
      rgba(15, 23, 42, 0.95),
      rgba(2, 6, 23, 0.98)
    );
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 28px 120px rgba(0, 0, 0, 0.9);

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, 1fr);
  gap: 1.6rem;
}

/* Cards */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 23, 42, 1);
  transform-style: preserve-3d;
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    border-color var(--transition-med),
    filter var(--transition-med);
}

/* Background images – use your own previews */

.card-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) contrast(1.1) brightness(0.95);
  transform: scale(1.03);
  transition:
    transform 420ms ease-out,
    filter 420ms ease-out;
}

/* Update filenames to match your assets folder */
/* Home grid product backgrounds — unified brand look with subtle product accents */

.card-background--wordhive {
  background-image:
    /* Innovative Edge brand blue glow (top-left) */
    radial-gradient(circle at 20% 18%, rgba(0, 125, 203, 0.48), transparent 55%),
    /* Wordhive amber accent (bottom-right) */
    radial-gradient(circle at 82% 82%, rgba(251, 191, 36, 0.2), transparent 55%),
    /* Cinematic dark gradient */
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.7)),
    /* Underlying product preview */
    url("assets/img/wordhive-preview.png");
}

.card-background--siboquiz {
  background-image:
    /* Innovative Edge brand blue glow (top-left) */
    radial-gradient(circle at 20% 18%, rgba(0, 125, 203, 0.48), transparent 55%),
    /* SIBOQuiz purple accent (bottom-right) */
    radial-gradient(circle at 82% 82%, rgba(142, 108, 198, 0.26), transparent 55%),
    /* Cinematic dark gradient */
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.7)),
    /* Underlying product preview */
    url("assets/img/siboquiz-preview.png");
}

.card-background--quizflow {
  background-image:
    /* Innovative Edge brand blue glow (top-left) */
    radial-gradient(circle at 20% 18%, rgba(0, 125, 203, 0.48), transparent 55%),
    /* QuizFlowLabs teal accent (bottom-right) */
    radial-gradient(circle at 82% 82%, rgba(63, 226, 176, 0.24), transparent 55%),
    /* Cinematic dark gradient */
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.7)),
    /* Underlying product preview */
    url("assets/img/quizflow-preview.png");
}

.card-background--leashfree {
  background-image:
    /* Innovative Edge brand blue glow (top-left) */
    radial-gradient(circle at 20% 18%, rgba(0, 125, 203, 0.48), transparent 55%),
    /* LeashFree green accent (bottom-right) */
    radial-gradient(circle at 82% 82%, rgba(74, 222, 128, 0.2), transparent 55%),
    /* Cinematic dark gradient */
    linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.75)),
    /* Underlying product preview */
    url("assets/img/leashfree-preview.png");
}


/* Dark gradient overlay */

.card-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 55%),
    radial-gradient(circle at top left, rgba(0, 125, 203, 0.28), transparent 60%);
  mix-blend-mode: multiply;
}

/* Card content */

.card-content {
  position: relative;
  inset: 0;
  padding: 1.5rem 1.7rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  height: 100%;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: #f9fafb;
}

.card-hint {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(229, 231, 235, 0.7);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity var(--transition-med),
    transform var(--transition-med);
}

/* Hover states */

.card:hover {
  border-color: var(--primary-soft);
  box-shadow: 0 36px 120px rgba(15, 23, 42, 1);
}

.card:hover .card-background {
  transform: scale(1.07);
  filter: saturate(1.3) contrast(1.2) brightness(1.02);
}

.card:hover .card-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ======== FOOTER (GLOBAL) ======== */

.footer {
  position: relative;
  z-index: 3;
  padding: 1.4rem 1.5rem 2.1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-inner {
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background:
    radial-gradient(circle at top left, rgba(0, 125, 203, 0.25), transparent 55%),
    rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(18px);
}

.footer-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

.footer-strong {
  color: var(--text-main);
}

/* ======== PREVIEW OVERLAY ======== */

.preview {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}

.preview.is-active {
  display: block;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(15, 23, 42, 0.95),
    rgba(2, 6, 23, 0.99)
  );
  backdrop-filter: blur(18px);
}

.preview-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 92vw);
  height: min(640px, 80vh);
  margin: 6vh auto;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(0, 125, 203, 0.2), transparent 40%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 32px 140px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Preview header with branding + layout */

.preview-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.4rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.85)
  );
}

.preview-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.preview-brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: contain;
  background: transparent;
  box-shadow: 0 0 12px rgba(0, 125, 203, 0.6);
}

.preview-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.preview-brand-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
}

.preview-brand-subtitle {
  font-family: var(--font-body);
  font-size: 0.58rem;
  color: var(--primary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 2px;
}

.preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: center;
}

.preview-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, #ffffff 0, #22c55e 45%, #16a34a 100%);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.9);
}

.preview-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-self: end;
}

.preview-link {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.8);
  color: #dbeafe;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.9);
}

.preview-link:hover {
  border-color: rgba(191, 219, 254, 1);
  background: radial-gradient(
    circle at top left,
    rgba(0, 125, 203, 0.4),
    rgba(15, 23, 42, 1)
  );
}

.preview-close {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.95);
  color: #9ca3af;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.preview-close:hover {
  border-color: rgba(248, 113, 113, 0.9);
  color: #fecaca;
}

.preview-frame-wrap {
  flex: 1;
  background: #020617;
  padding: 0.6rem;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  border: none;
  background: #020617;
}

/* Preview footer (inside modal) */

.preview-footer {
  padding: 0.7rem 1.4rem 0.9rem;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.9)
  );
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-footer-text {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  text-align: center;
}

.preview-footer-strong {
  color: var(--text-main);
}

/* ======== REVEAL + TILT ======== */

.js-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 420ms ease-out,
    transform 420ms ease-out;
}

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

.tilt {
  will-change: transform;
}

/* ======== RESPONSIVE ======== */

@media (max-width: 960px) {
  .header {
    padding-inline: 1.6rem;
  }

  .grid {
    padding: 1.2rem;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(190px, 1fr);
  }

  .preview-panel {
    height: min(640px, 86vh);
    margin-top: 7vh;
  }
}

@media (max-width: 640px) {
  .header {
    padding: 1.1rem 1.2rem 0.4rem;
  }

  .brand-title {
    font-size: 0.9rem;
  }

  .main {
    padding-inline: 1.1rem;
  }

  .grid {
    padding: 1rem;
    border-radius: 24px;
  }

  .card-content {
    padding: 1.2rem 1.3rem;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .suite-label {
    margin-bottom: 1.8rem;
  }

  .preview-header {
    grid-template-columns: 1fr;
    row-gap: 0.7rem;
    text-align: left;
  }

  .preview-title-wrap {
    justify-self: flex-start;
  }

  .preview-footer-text {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }

  .footer-inner {
    padding-inline: 1.2rem;
  }

  .footer-text {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    white-space: normal;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
