/* ============================
   PORTAL — Landing Site Styles
   ============================ */

/* --- Font Faces --- */
@font-face {
  font-family: 'Kalice Trial';
  src: url('fonts/KaliceTrial-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Neue Montreal';
  src: url('fonts/PPNeueMontreal-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Google Fonts loaded in HTML: Inter, JetBrains Mono */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'PP Neue Montreal', 'Inter', system-ui, -apple-system, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

/* --- Tokens --- */
:root {
  --bg-black: #000000;
  --bg-dark: #09090b;
  --bg-card: #141416;
  --bg-card-light: #2c2c2c;
  --border-card: #1e1e22;
  --border-light: #383838;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --text-dim: rgba(255, 255, 255, 0.2);
  --green: #22c55e;
  --content-width: 614px;
}

/* --- Layout --- */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ============================================================
   SITE HEADER (both pages)
   ============================================================ */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 32px 24px;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 530;
  letter-spacing: -0.32px;
  line-height: 24px;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}

.site-header__logo:hover {
  opacity: 0.7;
}

.site-header__mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  filter:
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
    drop-shadow(0 0 6px #ffd600)
    drop-shadow(0 0 14px rgba(255, 100, 0, 0.8))
    drop-shadow(0 0 28px rgba(255, 60, 0, 0.5));
  animation: mark-glow 3s ease-in-out infinite;
}

@keyframes mark-glow {
  0%, 100% {
    filter:
      drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
      drop-shadow(0 0 6px #ffd600)
      drop-shadow(0 0 14px rgba(255, 100, 0, 0.8))
      drop-shadow(0 0 28px rgba(255, 60, 0, 0.5));
  }
  50% {
    filter:
      drop-shadow(0 0 4px rgba(255, 255, 255, 0.8))
      drop-shadow(0 0 8px #ffd600)
      drop-shadow(0 0 20px rgba(255, 100, 0, 1))
      drop-shadow(0 0 36px rgba(255, 60, 0, 0.6));
  }
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.32px;
  padding: 12px 20px;
  border-radius: 16px;
}

.btn--download {
  background: #fff;
  color: var(--bg-dark);
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  padding: 12px 20px;
  border-radius: 12px;
}

/* ============================================================
   MAIN PAGE
   ============================================================ */

.page-main {
  background: var(--bg-black);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* --- Glow background (page-level, not clipped) --- */
.glow-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200vh;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

/* --- Glow blob pulse (GPU-only: transform + opacity) --- */
@keyframes blob-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(9);
    opacity: 0.9;
  }
  50% {
    transform: translate(-50%, -50%) scale(9.5);
    opacity: 1;
  }
}

.glow-container {
  isolation: isolate;
}

.glow-blob {
  position: absolute;
  left: 50%;
  top: 72vh;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%) scale(9);
  transform-origin: center center;
  mix-blend-mode: lighten;
  animation: blob-pulse 6s ease-in-out infinite;
  will-change: transform, opacity;
  pointer-events: none;
  image-rendering: auto;
}

/* --- Hero section --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Hero content --- */
.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(100px, 14vh, 160px);
  max-width: 614px;
  gap: 24px;
}

.hero-title {
  font-family: 'Kalice Trial', Georgia, serif;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.12;
  letter-spacing: -1.28px;
  font-weight: 400;
  max-width: 570px;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  opacity: 0.7;
  max-width: 614px;
}

/* --- Plugin mini widget --- */
/* Centered at the same point as the glow rings */
.plugin-widget {
  position: absolute;
  z-index: 11;
  left: 50%;
  top: 72vh;
  transform: translate(-50%, -50%);
  width: 280px;
  background: var(--bg-card-light);
  border-radius: 12px;
  overflow: hidden;
}

.plugin-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 40px;
  border-bottom: 1px solid var(--border-light);
}

.plugin-widget__name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plugin-widget__icon {
  width: 16px;
  height: 16px;
}

.plugin-widget__label {
  font-size: 12px;
  font-weight: 500;
  color: #e5e5e5;
}

.plugin-widget__close {
  font-size: 16px;
  color: #8c8c8c;
}

.plugin-widget__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 40px;
}

.plugin-widget__status-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plugin-widget__dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--green);
}

.plugin-widget__status-text {
  font-size: 12px;
  color: #e5e5e5;
}

.plugin-widget__docs {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* --- Energy lines (canvas) --- */
.energy-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* --- Agent icons --- */
.hero-icons {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.agent-icon {
  position: absolute;
  border-radius: 28%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  will-change: transform;
}

/* Drift animations injected by JS (unique per icon) */

/* Glass glare border: diagonal white → clear → white */
.agent-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.55) 0%,
    rgba(255,255,255,0.08) 35%,
    rgba(255,255,255,0.03) 50%,
    rgba(255,255,255,0.08) 65%,
    rgba(255,255,255,0.45) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Subtle glass overlay */
.agent-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,0.15), rgba(0,0,0,0.2));
  mix-blend-mode: overlay;
  pointer-events: none;
}

.agent-icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Icon tint colors (size/position set by JS) */
.agent-icon--claude {
  background: rgba(105, 82, 26, 0.2);
}

.agent-icon--portal {
  background: rgba(217, 169, 87, 0.2);
}

.agent-icon--portal img {
  border-radius: 12px;
}

.agent-icon--cursor {
  background: rgba(187, 175, 255, 0.2);
}

.agent-icon--cline {
  background: rgba(211, 104, 239, 0.2);
}

.agent-icon--openai {
  background: rgba(196, 201, 218, 0.15);
}

.agent-icon--copilot {
  background: rgba(100, 160, 255, 0.2);
}

.agent-icon--gemini {
  background: rgba(66, 133, 244, 0.2);
}

.agent-icon--windsurf {
  background: rgba(20, 110, 245, 0.2);
}

/* ============================================================
   FEATURES SECTION (Main Page)
   ============================================================ */

.features {
  position: relative;
  z-index: 1;
  padding: 120px 24px 160px;
}

.features-list {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 160px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature__title {
  font-family: 'Kalice Trial', Georgia, serif;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 400;
  max-width: 570px;
}

.feature__body {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  opacity: 0.7;
}

/* ============================================================
   INSTALL PAGE
   ============================================================ */

.page-install {
  background: var(--bg-dark);
  min-height: 100vh;
}

/* --- Install header --- */
.install-header {
  padding: 80px 24px 48px;
}

.install-header__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.install-header__title {
  font-family: 'Kalice Trial', Georgia, serif;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.12;
  letter-spacing: -1.28px;
  font-weight: 400;
}

.install-header__subtitle {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  opacity: 0.7;
}

/* --- Steps --- */
.step {
  padding: 48px 24px;
}

.step__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step__badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step__number {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}

.step__label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.28px;
  opacity: 0.4;
}

.step__title {
  font-family: 'Kalice Trial', Georgia, serif;
  font-size: clamp(28px, 3.5vw, 36px);
  line-height: 1.22;
  letter-spacing: -0.72px;
  font-weight: 400;
}

.step__desc {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  opacity: 0.7;
}

.step__hint {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.28px;
  opacity: 0.4;
}

/* --- Code block / instructions card --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
}

.instructions {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.instructions__item {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.instructions__num {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.4;
  flex-shrink: 0;
}

.instructions__text {
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.3px;
  opacity: 0.9;
}

.code-block {
  padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  opacity: 0.9;
}

/* --- Screenshot placeholder --- */
.screenshot-placeholder {
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.2;
}

/* --- Success section --- */
.success {
  padding: 80px 24px;
  text-align: center;
}

.success__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.success__check {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  border: 1px solid var(--green);
  background: linear-gradient(225deg, rgb(26, 58, 26) 15%, rgb(13, 31, 13) 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--green);
}

.success__title {
  font-family: 'Kalice Trial', Georgia, serif;
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.19;
  letter-spacing: -0.84px;
  font-weight: 400;
}

.success__desc {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  opacity: 0.7;
}

.success__prompt-box {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  position: relative;
}

.success__prompt-text-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 22px;
  font-weight: 400;
  opacity: 0.85;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

.success__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.success__copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
}

.success__hint {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.28px;
  opacity: 0.4;
}

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

@media (max-width: 768px) {
  .site-header {
    padding-top: calc(env(safe-area-inset-top, 20px) + 12px);
  }

  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-content {
    padding: 120px 24px 40px;
  }

  .hero-icons {
    display: block;
  }

  /* Positions set by JS on mobile too */

  .plugin-widget {
    top: 70vh;
    width: 240px;
  }

  .glow-blob {
    top: 70vh;
    transform: translate(-50%, -50%) scale(4.5);
  }

  .features {
    padding: 80px 24px 100px;
  }

  .features-list {
    gap: 100px;
  }

  .step__inner {
    gap: 12px;
  }

  .screenshot-placeholder {
    height: 200px;
  }
}
