/* ==========================================================================
   octatail.com — page layout on top of the product kit (assets/kit/*).
   The kit styles every product view 1:1; this file only adds the page:
   navigation, hero, sections, the framed product window and motion.
   ========================================================================== */

:root {
  --lp-max: 1240px;
  --lp-pad: 24px;
  --lp-win-w: 1440px;
  --lp-win-h: 880px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

html,
body.lp {
  height: auto;
}

body.lp {
  font-size: 15px;
  overflow-x: hidden;
  background: var(--canvas);
}

.lp-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: var(--inv-bg);
  color: var(--inv-fg);
  font-weight: 500;
}

.lp-skip:focus {
  top: 12px;
}

.lp-wrap {
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 0 var(--lp-pad);
}

/* --- Navigation ------------------------------------------------------------ */

.lp-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease);
}

.lp-nav.scrolled {
  background: color-mix(in srgb, var(--canvas) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--line-1);
}

.lp-nav-inner {
  width: 100%;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 0 var(--lp-pad);
  display: flex;
  align-items: center;
  gap: 32px;
}

.lp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--fg-1);
}

.lp-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.lp-links {
  display: flex;
  gap: 2px;
}

.lp-links a {
  padding: 7px 11px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--fg-2);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.lp-links a:hover {
  color: var(--fg-1);
  background: var(--surface-2);
}

.lp-nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lp-nav .btn {
  height: 34px;
  font-size: 13.5px;
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 14.5px;
}

.lp-arrow {
  display: inline-grid;
  place-items: center;
  transition: transform var(--dur-2) var(--ease);
}

.btn:hover .lp-arrow {
  transform: translateX(2px);
}

/* --- Hero -------------------------------------------------------------------------- */

.lp-hero {
  position: relative;
  padding: 150px 0 0;
  overflow: hidden;
  isolation: isolate;
}

.lp-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.lp-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to bottom, transparent, var(--canvas) 70%);
  z-index: -1;
  pointer-events: none;
}

.lp-hero-inner {
  position: relative;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 0 var(--lp-pad);
}

.lp-h1 {
  margin-top: 20px;
  font-size: clamp(46px, 7.6vw, 98px);
  font-weight: 500;
  letter-spacing: -0.048em;
  line-height: 0.97;
  max-width: 900px;
}

.lp-lede {
  margin-top: 24px;
  max-width: 560px;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.55;
  color: var(--fg-2);
}

.lp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.lp-note {
  margin-top: 16px;
}

.lp-ticker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 30px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--surface-1) 72%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
}

.lp-ticker b {
  color: var(--fg-1);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.lp-ticker-line {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-ticker-line .hi {
  color: var(--fg-1);
}

.lp-stage {
  position: relative;
  max-width: 1340px;
  margin: 76px auto 0;
  padding: 0 var(--lp-pad) 40px;
  perspective: 2200px;
}

.lp-stage .lp-window {
  transform-origin: 50% 0;
  transform: rotateX(calc(var(--tilt, 1) * 16deg)) scale(calc(1 - var(--tilt, 1) * 0.04));
  will-change: transform;
}

.lp-caption {
  margin-top: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--fg-3);
}

/* entrance */
.lp-rise {
  animation: lp-rise 900ms var(--ease) both;
}

.lp-hero-inner > .lp-rise:nth-child(2) { animation-delay: 60ms; }
.lp-hero-inner > .lp-rise:nth-child(3) { animation-delay: 140ms; }
.lp-hero-inner > .lp-rise:nth-child(4) { animation-delay: 220ms; }
.lp-hero-inner > .lp-rise:nth-child(5) { animation-delay: 280ms; }
.lp-hero-inner > .lp-rise:nth-child(6) { animation-delay: 340ms; }

@keyframes lp-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* --- The framed product window --------------------------------------------------- */

.lp-window {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--canvas);
  overflow: hidden;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--canvas) 60%, transparent),
    0 50px 120px -30px rgba(0, 0, 0, 0.75),
    0 0 120px -40px var(--glow);
}

:root[data-theme="light"] .lp-window {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02), 0 40px 100px -30px rgba(0, 0, 0, 0.25), 0 8px 24px -8px rgba(0, 0, 0, 0.08);
}

.lp-window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-1);
  background: var(--sidebar-bg);
}

.lp-dots {
  display: flex;
  gap: 6px;
}

.lp-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-5);
}

.lp-url {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: min(340px, 52%);
  justify-content: center;
  height: 24px;
  padding: 0 12px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-3);
  white-space: nowrap;
}

.lp-url b {
  color: var(--fg-1);
  font-weight: 500;
}

.lp-win-tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-4);
}

.lp-window-body {
  position: relative;
  height: calc(var(--lp-win-h) * var(--k, 1));
  overflow: hidden;
  background: var(--canvas);
}

.lp-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--lp-win-w);
  height: var(--lp-win-h);
  border: 0;
  transform: scale(var(--k, 1));
  transform-origin: 0 0;
  pointer-events: none;
  background: var(--canvas);
}

/* --- Sections -------------------------------------------------------------------- */

.lp-section {
  position: relative;
  padding: 150px 0 0;
}

.lp-head {
  max-width: var(--lp-max);
  margin: 0 auto 56px;
  padding: 0 var(--lp-pad);
}

.lp-h2 {
  margin-top: 18px;
  max-width: 860px;
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 500;
  letter-spacing: -0.042em;
  line-height: 1.03;
}

.lp-sub {
  margin-top: 20px;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-2);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

.lp-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* The problem */
.lp-problem {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lp-problem:nth-child(2) { transition-delay: 90ms; }
.lp-problem:nth-child(3) { transition-delay: 180ms; }

.lp-idx {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}

.lp-problem h3,
.lp-proof h3,
.lp-sec h3 {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lp-problem > p,
.lp-proof p,
.lp-sec p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-2);
}

.lp-problem .lp-panel-slot {
  margin-top: 24px;
  flex: 1 1 auto;
  display: flex;
}

.lp-panel-slot > .panel {
  width: 100%;
}

/* --- How it works: sticky product tour ---------------------------------------------- */

.lp-loop-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 64px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--lp-pad);
}

.lp-steps {
  padding: 8vh 0 34vh;
}

.lp-step {
  min-height: 74vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.22;
  transition: opacity 500ms var(--ease);
}

.lp-step.active {
  opacity: 1;
}

.lp-step-idx {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.lp-step h3 {
  margin-top: 14px;
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.lp-step p {
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--fg-2);
}

.lp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.lp-keys {
  gap: 14px;
  font-size: 12.5px;
  color: var(--fg-3);
}

.lp-keys > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lp-sticky {
  position: sticky;
  top: max(84px, calc(50vh - 330px));
  align-self: start;
  margin-top: 8vh;
}

.lp-rail {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.lp-rail button {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-4);
  transition: color var(--dur-2) var(--ease);
}

.lp-rail button i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
  position: relative;
}

.lp-rail button i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg-1);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

.lp-rail button.on,
.lp-rail button.done {
  color: var(--fg-1);
}

.lp-rail button.done i::after {
  transform: scaleX(1);
}

/* --- Intelligence bento ---------------------------------------------------------------- */

.lp-bento > [data-slot] {
  display: flex;
  min-width: 0;
}

.lp-bento > [data-slot] > .panel {
  width: 100%;
}

.lp-bento > [data-reveal]:nth-child(even) {
  transition-delay: 90ms;
}

/* --- Evidence ----------------------------------------------------------------------------- */

.lp-evidence {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.lp-capture {
  margin: 0;
}

.lp-capture-img {
  position: relative;
  margin: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1200 / 760;
}

.lp-capture-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.lp-pin {
  position: absolute;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  color: #fafafa;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform var(--dur-2) var(--ease);
}

.lp-pin::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid #0a0a0a;
  opacity: 0;
}

.lp-pin.on {
  transform: scale(1.18);
}

.lp-pin.on::after {
  animation: lp-ping 1400ms var(--ease) both;
}

@keyframes lp-ping {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.4); }
}

.lp-capture-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  padding: 14px 16px 16px;
}

.lp-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line-1);
  font-size: 13px;
  color: var(--fg-3);
  transition: color var(--dur-2) var(--ease);
}

.lp-legend-row .n {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-3);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-2);
}

.lp-legend-row b {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--fg-1);
  text-align: right;
}

.lp-legend-row.on {
  color: var(--fg-1);
}

.lp-legend-row.on .n {
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-color: var(--inv-bg);
}

.lp-custody .tl-item {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

.lp-custody .tl-item.in {
  opacity: 1;
  transform: none;
}

.lp-proofs {
  margin-top: 16px;
}

.lp-proof,
.lp-sec {
  padding: 24px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  box-shadow: var(--highlight);
}

.lp-proof-icon,
.lp-sec-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--fg-1);
  background: var(--surface-2);
}

/* --- Security --------------------------------------------------------------------------------- */

.lp-sec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lp-fine {
  margin-top: 28px;
  max-width: 760px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-3);
}

/* --- Pricing ----------------------------------------------------------------------------------- */

.lp-trial {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background:
    repeating-linear-gradient(135deg, transparent 0 7px, var(--line-1) 7px 8px),
    var(--surface-1);
  font-size: 15px;
}

.lp-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lp-plan {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  box-shadow: var(--highlight);
}

.lp-plan.featured {
  border-color: var(--line-4);
  background: var(--surface-2);
}

.lp-plan:nth-child(2) { transition-delay: 90ms; }
.lp-plan:nth-child(3) { transition-delay: 180ms; }

.lp-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lp-plan-head h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.lp-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 22px;
}

.lp-price-num {
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.lp-plan-for {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-2);
  min-height: 3.1em;
}

.lp-list {
  list-style: none;
  margin: 22px 0 26px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line-1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.lp-list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--fg-2);
}

.lp-list li::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  margin-top: 8px;
  background: var(--fg-2);
}

.lp-list b {
  color: var(--fg-1);
  font-weight: 500;
}

.lp-plan .btn {
  height: 40px;
}

.lp-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin-top: 48px;
}

.lp-faq details {
  border-top: 1px solid var(--line-1);
  padding: 18px 0;
}

.lp-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  font-weight: 500;
}

.lp-faq summary::-webkit-details-marker {
  display: none;
}

.lp-faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--fg-3);
  transition: transform var(--dur-2) var(--ease);
}

.lp-faq details[open] summary::after {
  transform: rotate(45deg);
}

.lp-faq details p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-2);
}

/* --- Final CTA + footer ---------------------------------------------------------------------- */

.lp-final {
  position: relative;
  margin-top: 150px;
  padding: 150px 0 160px;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line-1);
}

.lp-final::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 90% at 50% 100%, transparent 30%, var(--canvas) 85%);
  z-index: -1;
  pointer-events: none;
}

.lp-final-inner {
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 0 var(--lp-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.lp-final .lp-h2 {
  max-width: 820px;
}

.lp-final .lp-sub {
  margin-left: auto;
  margin-right: auto;
}

.lp-final .lp-cta {
  justify-content: center;
}

.lp-foot {
  border-top: 1px solid var(--line-1);
  background: var(--sidebar-bg);
  padding: 56px 0 32px;
}

.lp-foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.lp-foot-brand p {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--fg-3);
}

.lp-foot nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lp-foot nav a {
  font-size: 13.5px;
  color: var(--fg-2);
}

.lp-foot nav a:hover {
  color: var(--fg-1);
}

.lp-foot-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line-1);
  font-size: 12.5px;
  color: var(--fg-4);
}

/* --- Responsive ------------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .lp-links {
    display: none;
  }

  .lp-cols-3,
  .lp-plans,
  .lp-sec-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-evidence {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-loop-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .lp-sticky {
    order: -1;
    top: 72px;
    z-index: 5;
    margin-top: 0;
    padding: 10px 0 14px;
    background: linear-gradient(to bottom, var(--canvas) 82%, transparent);
  }

  .lp-steps {
    padding: 4vh 0 20vh;
  }

  .lp-step {
    min-height: 62vh;
    justify-content: flex-start;
    padding-top: 6vh;
  }

  .lp-foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --lp-pad: 16px;
  }

  .lp-signin {
    display: none;
  }

  .lp-hero {
    padding-top: 116px;
  }

  .lp-section {
    padding-top: 104px;
  }

  .lp-faq,
  .lp-capture-legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-window-bar {
    height: 30px;
  }

  .lp-dots,
  .lp-win-tag {
    display: none;
  }

  .lp-url {
    font-size: 10px;
    min-width: 0;
  }

  .lp-rail button span {
    display: none;
  }

  .lp-ticker {
    font-size: 11px;
  }

  .lp-final {
    margin-top: 104px;
    padding: 104px 0 112px;
  }

  .lp-foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .lp-stage .lp-window {
    transform: none;
  }
}
