/* ============================================================
   TOOLS HUB — tools.decision.partners
   Reuses dp design system (common.css)
   ============================================================ */

html {
  /* smooth scroll for anchor jumps from menu submenu */
  scroll-behavior: smooth;
}

body.hub-page {
  overflow-y: auto;
  justify-content: flex-start;
  align-items: stretch;
}

/* Anchor scroll offset so sticky header doesn't cover target card */
.tool-card[id] {
  scroll-margin-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---- Header ---- */
.hub-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: rgba(15, 36, 62, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.hub-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: white;
}

.hub-logo-brand {
  font-family: "Century Gothic", "Arial", sans-serif;
  font-weight: bold;
  font-size: 1.2rem;
  color: white;
  letter-spacing: -0.5px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.hub-logo-brand em {
  font-style: normal;
  color: var(--dp-accent);
}

.hub-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hub-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.hub-nav-arrow {
  display: block;
  flex-shrink: 0;
  vertical-align: middle;
}

.hub-nav-link:hover {
  color: var(--dp-accent);
  background: rgba(220, 224, 72, 0.08);
  text-decoration: none;
}

.hub-nav-link.accent {
  background: linear-gradient(135deg, var(--dp-accent), #c5ca30);
  color: var(--dp-dark);
}

.hub-nav-link.accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(220, 224, 72, 0.25);
  background: linear-gradient(135deg, var(--dp-accent), #c5ca30);
  color: var(--dp-dark);
}

/* ---- Hero ---- */
.hub-hero {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 6rem 2rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.hub-hero-badge {
  display: inline-block;
  background: rgba(220, 224, 72, 0.15);
  color: var(--dp-accent);
  font-size: 0.78rem;
  padding: 7px 20px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: none !important;
  border: 1px solid rgba(220, 224, 72, 0.3);
  margin-bottom: 1.5rem;
}

.hub-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--dp-light-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-hero p {
  font-size: 1.15rem;
  color: #aabdd1;
  line-height: 1.65;
  max-width: 700px;
  margin: 0 auto;
}

/* ---- Story Flow ---- */
/* CSS Grid: 4 equal cards + 3 arrows between them.
   Desktop: horizontal row (card arrow card arrow card arrow card).
   Mobile: single column, arrows rotate to point down. */
.story-flow {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr);
  align-items: stretch;
  gap: 0.85rem;
  padding: 1rem 2rem 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.story-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.75rem 1.4rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  height: 100%;
}

.story-step:hover {
  transform: translateY(-3px);
  border-color: rgba(220, 224, 72, 0.25);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.35),
    0 0 30px rgba(220, 224, 72, 0.06);
}

.story-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dp-accent);
  color: var(--dp-dark);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.story-step-label {
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: white;
  margin: 0 0 1rem 0;
  line-height: 1.25;
  /* min-height reserves space for 2 lines → all body texts start at same Y */
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-step-body {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.story-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dp-accent);
  opacity: 0.55;
  font-size: 1.5rem;
  width: 28px;
  user-select: none;
}

@media (max-width: 900px) {
  .story-flow {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }

  .story-arrow {
    transform: rotate(90deg);
    margin: 0.25rem auto;
    width: auto;
    height: 28px;
  }
}

/* ---- Tool Grid ---- */
/* 6-column helper raster: each card spans 2 cols → 3 cards per row.
   5 cards total = 3 live tools on top, 2 coming-soon centered below. */
.tool-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem;
}

.tool-grid > .tool-card {
  grid-column: span 2;
}

/* Row 2: cards 4 + 5 centered below the top row of 3 */
.tool-grid > .tool-card:nth-child(4) {
  grid-column: 2 / span 2;
}
.tool-grid > .tool-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.tool-card {
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center; /* center badge, h2, tagline; lists stretch via class */
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 224, 72, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(220, 224, 72, 0.08);
}

.tool-card-featured {
  border-color: rgba(220, 224, 72, 0.35);
  box-shadow:
    0 0 0 1px rgba(220, 224, 72, 0.15),
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(220, 224, 72, 0.1);
}

.tool-card-featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--dp-accent), transparent);
}

.tool-card-soon {
  opacity: 0.85;
}

/* Badge sits at top of card in normal flow, centered */
.tool-card-badge {
  align-self: center;
  margin-bottom: 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.tool-card-badge.live {
  background: rgba(220, 224, 72, 0.15);
  color: var(--dp-accent);
  border: 1px solid rgba(220, 224, 72, 0.3);
}

.tool-card-badge.soon {
  background: rgba(103, 155, 216, 0.15);
  color: var(--dp-light-blue);
  border: 1px solid rgba(103, 155, 216, 0.3);
}

.tool-card h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: white;
  letter-spacing: -0.3px;
  text-align: center;
  line-height: 1.2;
  /* reserve 1 line — tool names are short so 1 line fits all */
  min-height: 1.2em;
  align-self: center;
}

.tool-card-tagline {
  font-size: 1rem;
  color: #aabdd1;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
  text-align: center;
  align-self: center;
  /* reserve 2 lines so feature list always starts at same Y across cards */
  min-height: 3em;
}

.tool-card-features {
  list-style: none;
  margin: 0 0 1.75rem 0;
  padding: 0;
  flex-grow: 1;
  align-self: stretch;
  text-align: left;
}

.tool-card-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.tool-card-features li:last-child {
  margin-bottom: 0;
}

.tool-card-features li strong {
  color: white;
  font-weight: 700;
}

.tool-card-features li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--dp-accent);
  font-size: 0.85rem;
}

.tool-card-cta {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  align-self: stretch;
}

.tool-card-cta:hover {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
  color: white;
}

.tool-card-cta.primary {
  background: linear-gradient(135deg, var(--dp-accent), #c5ca30);
  color: var(--dp-dark);
  border: none;
  font-weight: 700;
}

.tool-card-cta.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(220, 224, 72, 0.3);
  color: var(--dp-dark);
}

/* ---- Waitlist Form ---- */
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-self: stretch;
}

.waitlist-form input[type="email"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s;
}

.waitlist-form input[type="email"]:focus {
  border-color: var(--dp-accent);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 20px rgba(220, 224, 72, 0.15);
}

.waitlist-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.waitlist-form button {
  width: 100%;
  background: linear-gradient(135deg, var(--dp-blue), #2b65aa);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}

.waitlist-form button:hover {
  border-color: var(--dp-accent);
  box-shadow: 0 8px 20px rgba(220, 224, 72, 0.2);
  transform: translateY(-1px);
}

.waitlist-success {
  background: rgba(220, 224, 72, 0.12);
  color: var(--dp-accent);
  border: 1px solid rgba(220, 224, 72, 0.3);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---- CTA Section ---- */
.hub-cta {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 5rem 2rem 4rem;
  max-width: 800px;
  margin: 0 auto;
}

.hub-cta h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--dp-light-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-cta p {
  color: #aabdd1;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--dp-accent), #c5ca30);
  color: var(--dp-dark);
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(220, 224, 72, 0.3);
  text-decoration: none;
  color: var(--dp-dark);
}

/* ---- Footer ---- */
.hub-footer {
  position: relative;
  z-index: 10;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  background: rgba(15, 36, 62, 0.6);
  margin-top: 2rem;
}

.hub-footer-row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.hub-footer-row a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.hub-footer-row a:hover {
  color: var(--dp-accent);
  text-decoration: none;
}

.hub-footer-copy {
  font-weight: 500;
}

/* ---- Responsive ---- */
/* Tool grid: collapse to single column on narrow viewports */
@media (max-width: 900px) {
  .tool-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  /* reset all card column-spans → single column stack */
  .tool-grid > .tool-card,
  .tool-grid > .tool-card:nth-child(4),
  .tool-grid > .tool-card:nth-child(5) {
    grid-column: auto;
  }

  .tool-card h2 {
    padding-right: 4.5rem;
  }
}

@media (max-width: 768px) {
  .hub-hero h1 {
    font-size: 2.1rem;
  }

  .hub-hero p {
    font-size: 1rem;
  }

  .hub-header {
    padding: 14px 18px;
  }

  .hub-logo-brand {
    font-size: 1rem;
  }

  .hub-nav {
    gap: 8px;
  }

  .hub-nav-link {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .tool-grid {
    padding: 1rem;
    gap: 1rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .tool-card h2 {
    font-size: 1.4rem;
  }

  .hub-cta h2 {
    font-size: 1.7rem;
  }
}
