/* Masterlist Gateway – extracted carry-over CSS
   Based on old gateway styles: hero/dividers/sections/grids + cards + buttons.
*/

/* ---------- Base tokens (keep if your new core doesn't already define these) ---------- */
:root {
  --bg: #050509;
  --bg-elevated: #101018;
  --bg-elevated-soft: #151521;
  --bg-gradient-one: #19192a;

  --accent: #ff7fb7;
  --accent-soft: rgba(255, 127, 183, 0.15);
  --accent-strong: rgba(255, 127, 183, 0.25);

  --text-main: #f7f7ff;
  --text-soft: #b9b9d3;
  --text-mute: #7a7a9b;

  --border-subtle: #25253a;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);

  --radius-lg: 18px;
  --radius-xl: 24px;

  --transition-fast: 140ms ease-out;
  --transition-med: 190ms ease-out;
}

/* If your new site already sets body background/typography, you can remove this block */
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, var(--bg-gradient-one) 0, var(--bg) 55%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- PAGE WIDTH CONSTRAINT (works with new layout) ---------- */
/* Wrap your gateway markup inside something like <main class="gateway">...</main> */
.gateway {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(135deg, rgba(255, 127, 183, 0.14), rgba(51, 51, 81, 0.25));
  border-radius: 28px;
  padding: 28px 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  user-select: none;
}

@media (min-width: 768px) {
  .hero { padding: 32px 28px 26px; }
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 127, 183, 0.3), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(130, 154, 255, 0.25), transparent 55%);
  opacity: 0.65;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-inner { position: relative; z-index: 1; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  user-select: none;
}

.hero-kicker-pill {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 127, 183, 0.7);
}

.hero-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .hero-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.hero-title-block { max-width: 640px; }

.hero-pre-title,
.hero-title {
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}

@media (min-width: 900px) {
  .hero-title { font-size: 2.1rem; }
}

.hero-subtitle {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  max-width: 520px;
}

.hero-subtitle strong {
  color: var(--text-main);
  font-weight: 600;
}

.hero-cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
}

@media (min-width: 768px) {
  .hero-cta-block {
    margin-top: 0;
    align-items: flex-end;
  }
}

.hero-default-note {
  font-size: 0.8rem;
  color: var(--text-mute);
  text-align: right;
}

.hero-badges-row {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-badge {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-soft);
  user-select: none;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(255, 127, 183, 0.8);
}

/* ---------- PRIMARY CTA BUTTON ---------- */
.hero-button-primary {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: radial-gradient(circle at 0 0, #ffd3ec 0, #ff7fb7 35%, #f1449e 90%);
  color: #250816;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255, 127, 183, 0.65);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
  text-decoration: none;
}

.hero-button-primary span.icon { font-size: 1.1rem; transform: translateY(1px); }

.hero-button-primary:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.06);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.7),
    0 0 26px rgba(255, 127, 183, 0.9);
}

.hero-button-primary:active {
  transform: translateY(0) scale(0.99);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(255, 127, 183, 0.75);
}

/* ---------- DIVIDER ---------- */
.divider-block {
  margin-top: 26px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .divider-block { margin-top: 30px; margin-bottom: 14px; }
}

.divider-line {
  flex: 1;
  height: 7.5px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.divider-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  white-space: nowrap;
}

.divider-label-arrow { font-size: 1.1rem; transform: translateY(1px); }

/* ---------- SECTION HEADERS + GRIDS ---------- */
.section {
  margin-top: 18px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
  max-width: 960px;
}

.section-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.section-caption {
  font-size: 0.8rem;
  color: var(--text-mute);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .card-grid.behaviour-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- MODE CARDS + PILLS ---------- */
.mode-card {
  display: flex;
  position: relative;
  padding: 14px 12px 12px;
  background: radial-gradient(circle at top left, rgba(255, 127, 183, 0.08), rgba(11, 11, 22, 0.95));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition:
    border-color var(--transition-med),
    box-shadow var(--transition-med),
    transform var(--transition-fast),
    all 0.5s ease;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  user-select: none;
}

.mode-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(0deg, transparent, transparent 30%, rgba(255, 127, 183, 0.3));
  transform: rotate(-45deg);
  transition: all 0.5s ease;
  opacity: 0;
}

.mode-card:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 32px rgba(255, 127, 183, 0.3);
}

.mode-card:hover::before {
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

.mode-card[data-selected="true"] {
  border-color: rgba(255, 127, 183, 0.9);
  background: radial-gradient(circle at 0 0, var(--accent-strong), rgba(11, 11, 22, 0.95) 55%);
  background-size: 200% 200%;
  background-position: 0% 0%;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.9),
    0 0 24px rgba(255, 127, 183, 0.7);
  animation: archiveGlow 7s ease-in-out infinite;
}

.mode-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.mode-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.mode-card-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  color: var(--text-soft);
  white-space: nowrap;
  text-align: center;
}

.mode-card[data-selected="true"] .mode-card-tag {
  border-color: rgba(255, 127, 183, 0.9);
  background: rgba(255, 127, 183, 0.18);
  color: #ffe7f2;
}

.mode-card-body {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.mode-card-footnote {
  font-size: 0.7rem;
  color: var(--text-mute);
}

.mode-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  justify-content: end;
}

.pill {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-mute);
}

.pill-accent {
  border-color: rgba(255, 127, 183, 0.7);
  background: var(--accent-soft);
  color: #ffd7ee;
}

.pill-accent-notsafe {
  border-color: rgba(255, 127, 183, 0.7);
  background: rgba(255, 127, 183, 0.05);
  color: rgb(255, 127, 183);
}

.pill-accent-safe {
  border-color: rgba(160, 236, 199, 0.7);
  background: rgba(160, 236, 199, 0.05);
  color: rgb(160, 236, 199);
}

/* Behaviour cards variant */
.mode-card.behaviour {
  background: radial-gradient(circle at top, rgba(130, 154, 255, 0.14), rgba(9, 9, 18, 0.96));
  background-size: 200% 200%;
  background-position: 50% 50%;
}

.mode-card.behaviour::before {
  background: linear-gradient(0deg, transparent, transparent 30%, rgba(130, 154, 255, 0.3));
}

.mode-card.behaviour[data-selected="true"] {
  background: radial-gradient(circle at 0 0, rgba(130, 154, 255, 0.28), rgba(9, 9, 18, 0.98));
  background-size: 200% 200%;
  background-position: 0% 50%;
  border-color: rgba(172, 188, 255, 0.9);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(172, 188, 255, 0.7);
  animation: behaviourGlow 7s ease-in-out infinite;
}

.mode-card.behaviour[data-selected="true"] .mode-card-tag {
  border-color: rgba(172, 188, 255, 0.9);
  background: rgba(172, 188, 255, 0.18);
  color: #f0f3ff;
}

/* ---------- FINAL "ENTER ARCHIVE" BUTTON ---------- */
.behaviour-go-row {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

.behaviour-go-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 22px 12px 32px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 0 0, #ffd3ec 0, #ff7fb7 35%, #f1449e 90%);
  color: #0d0d19;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(140, 140, 255, 0.7);
  transition: 0.5s;
}

.behaviour-go-button:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.05);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(140, 140, 255, 0.95);
}

.behaviour-go-button:active {
  transform: scale(0.98);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(140, 140, 255, 0.7);
}

.behaviour-go-button-inner,
.arrow-counter { margin: 0; display: inline-flex; align-items: center; }

/* SVG arrow animation (as per old buttons.css) */
path.one { transition: 0.4s; transform: translateX(-60%); }
path.two { transition: 0.5s; transform: translateX(-30%); }

.behaviour-go-button:hover path.three { animation: color_anim 1s infinite 0.2s; }
.behaviour-go-button:hover path.one { transform: translateX(0%); animation: color_anim 1s infinite 0.6s; }
.behaviour-go-button:hover path.two { transform: translateX(0%); animation: color_anim 1s infinite 0.4s; }

@keyframes color_anim {
  0% { fill: white; }
  50% { fill: #FBC638; }
  100% { fill: white; }
}

@keyframes archiveGlow {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

@keyframes behaviourGlow {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}
