/* Page-specific styles for GitScribe landing page */

.ring-grad {
  background: var(--grad);
}

.glass-strong {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
}

/* Phone shadow + frame */
.phone-shadow {
  box-shadow:
    0 30px 60px -20px rgba(16, 185, 129, 0.30),
    0 50px 100px -40px rgba(6, 182, 212, 0.22),
    0 10px 30px -10px rgba(0, 0, 0, 0.30);
}

.phone-frame {
  background:
    linear-gradient(145deg, #2a2622 0%, #0d0b09 50%, #2a2622 100%);
  padding: 10px;
  border-radius: 44px;
  position: relative;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.08),
    inset 0 0 0 4px rgba(0, 0, 0, 0.6);
}

.phone-frame::before,
.phone-frame::after {
  content: '';
  position: absolute;
  background: linear-gradient(180deg, #1a1714 0%, #2a2622 50%, #1a1714 100%);
  border-radius: 2px;
}

.phone-frame::before {
  width: 4px;
  height: 60px;
  right: -3px;
  top: 130px;
}

.phone-frame::after {
  width: 4px;
  height: 96px;
  left: -3px;
  top: 110px;
}

.phone-screen {
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-camera {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1a1714 0%, #000 60%);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.06), inset 0 0 0 2px rgba(40, 40, 40, 0.6);
  z-index: 30;
}

.caret {
  animation: caret-blink 1s steps(2) infinite;
}

/* Info tooltip used in the comparison table.
   Uses FIXED positioning so tooltips are never clipped by any
   overflow container (overflow-x-auto, overflow-hidden, etc.).
   The visible icon is 14px; padding expands the click/tap target
   to ~32px. JS positions the balloon on hover/focus. */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--ink-900) / 0.70);
  cursor: help;
  transition: color 0.15s ease;
  flex-shrink: 0;
  padding: 9px;
  border-radius: 9999px;
}

.info-tip:hover,
.info-tip:focus-visible {
  color: rgb(var(--ink-900) / 0.95);
  outline: none;
}

/* The tooltip balloon — rendered via a fixed-position element
   injected by JS so it always escapes overflow containers. */
.info-tip-balloon {
  position: fixed;
  width: max-content;
  max-width: min(18rem, calc(100vw - 32px));
  padding: 8px 10px;
  border-radius: 8px;
  background: rgb(var(--ink-950));
  color: rgb(var(--ink-50));
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9999;
  transform: translateY(4px);
}

.info-tip-balloon.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.info-tip-balloon.is-below {
  transform: translateY(-4px);
}

.info-tip-balloon.is-below.is-visible {
  transform: translateY(0);
}

/* Caret arrow for the tooltip */
.info-tip-caret {
  position: fixed;
  border: 6px solid transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9999;
  transform: translateY(4px);
}

.info-tip-caret.is-above {
  border-top-color: rgb(var(--ink-950));
}

.info-tip-caret.is-below {
  border-bottom-color: rgb(var(--ink-950));
  transform: translateY(-4px);
}

.info-tip-caret.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Overflow carousel */
.carousel-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: visible;
}

/* The phone frame is an overlay - screens slide behind it */
.carousel-phone-wrapper {
  position: relative;
  z-index: 10;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Punch a hole in the phone frame padding area */
.phone-mask {
  /* phone-frame sets position:relative but this element must be absolute
     so inset-0 stretches it to fill the container. Declaring position here
     wins the cascade because .phone-mask appears after .phone-frame. */
  position: absolute;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: auto;
}

/* Horizontal track that holds all screen cards */
.carousel-track-area {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  overflow: visible;
  z-index: 5;
  pointer-events: none;
}

.carousel-track {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  pointer-events: auto;
}

.carousel-card {
  flex-shrink: 0;
  border-radius: 34px;
  /* Match inner phone screen radius */
  overflow: hidden;
  background: rgb(var(--ink-50));
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s ease;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

.carousel-card.active {
  transform: scale(1);
  opacity: 1;
  z-index: 6;
  box-shadow: none;
}

.carousel-card:not(.active) {
  transform: scale(0.82);
  opacity: 0.55;
  z-index: 4;
  cursor: pointer;
}

@media (min-width: 768px) {
  .carousel-stage {
    min-height: 720px;
  }
}

/* Screen panel inside each card */
.screen-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
