/* Landing day-narrative — responsive + interactive controls */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/landing/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/landing/fonts/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 700;
  /* optional = no late swap CLS on first paint */
  font-display: optional;
  src: url('/landing/fonts/schibsted-grotesk.woff2') format('woff2');
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('/landing/fonts/syne-700.woff') format('woff');
}

html[data-route='landing'] {
  scroll-behavior: smooth;
  overflow-x: clip;
}

html[data-route='landing'] body {
  margin: 0;
  background: #12151a;
  overflow-x: clip;
}

#landing-shell {
  background: #12151a;
  color: #f3f4f6;
  font-family: 'Schibsted Grotesk', ui-sans-serif, system-ui, sans-serif;
  overflow-x: clip;
}

#landing-shell a {
  text-decoration: none;
  color: inherit;
}

#hud {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

#rail-dot {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Interactive checkout controls */
.lp-pay,
.lp-tip {
  appearance: none;
  font: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lp-pay {
  border: 1px solid rgba(18, 21, 26, 0.12);
  background: #fff;
  color: #4a5058;
  border-radius: 8px;
  padding: 10px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
}

.lp-pay[aria-pressed='true'] {
  border-color: #12151a;
  background: #12151a;
  color: #fff;
}

.lp-tip {
  flex: 1;
  border: 1px solid rgba(18, 21, 26, 0.12);
  background: #fff;
  border-radius: 6px;
  padding: 7px 0;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #4a5058;
}

.lp-tip[aria-pressed='true'] {
  border-color: #12151a;
  background: #e4e6ea;
  font-weight: 600;
  color: #12151a;
}

.lp-pay-btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: #12151a;
  color: #fff;
  padding: 13px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease,
    box-shadow 0.3s ease;
  font-family: inherit;
}

.lp-pay-btn:not(.is-paid):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.lp-pay-btn.is-paid {
  background: #1f6f4a;
  cursor: default;
}

.lp-diff {
  margin: 10px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: #7fba9c;
}

.lp-diff.is-off {
  color: #e0a08a;
}

/* Hero entrance — mirrored in index.html critical CSS for first paint */
#landing-shell .u {
  animation: lpRise 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#landing-shell .u[style*='animation-delay:.05s'] {
  animation-delay: 0.05s;
}
#landing-shell .u[style*='animation-delay:.16s'] {
  animation-delay: 0.16s;
}
#landing-shell .u[style*='animation-delay:.26s'] {
  animation-delay: 0.26s;
}
#landing-shell .u[style*='animation-delay:.36s'] {
  animation-delay: 0.36s;
}
#landing-shell .u[style*='animation-delay:.46s'] {
  animation-delay: 0.46s;
}

@keyframes lpRise {
  from {
    opacity: 0.4;
    transform: translate3d(0, 28px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lpSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes lpFaqIn {
  from {
    opacity: 0;
    transform: translate3d(0, -8px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Restored style-hover behaviors from original design */
#landing-shell a[href='/demo'][style*='background:#fff'],
#landing-shell a[href='/signup'][style*='background:#fff'] {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
#landing-shell a[href='/demo'][style*='background:#fff']:hover,
#landing-shell a[href='/signup'][style*='background:#fff']:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}
#landing-shell a[href='/demo'][style*='background:#fff']:active,
#landing-shell a[href='/signup'][style*='background:#fff']:active {
  transform: translateY(-1px);
}

#landing-shell a[style*='border:1px solid rgba(255,255,255,.3)'] {
  transition: background 0.3s ease, border-color 0.3s ease;
}
#landing-shell a[style*='border:1px solid rgba(255,255,255,.3)']:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
}

#landing-shell footer a {
  transition: color 0.25s ease;
}
#landing-shell footer a:hover {
  color: #fff !important;
}

/* Product mock cards — lift on hover */
#landing-shell [style*='box-shadow:0 30px 70px'] {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.55s
    cubic-bezier(0.16, 1, 0.3, 1);
}
#landing-shell [style*='box-shadow:0 30px 70px']:hover {
  transform: translateY(-8px);
  box-shadow: 0 44px 96px rgba(0, 0, 0, 0.6) !important;
}

#landing-shell .lp-tip:hover:not([aria-pressed='true']),
#landing-shell .lp-pay:hover:not([aria-pressed='true']) {
  border-color: rgba(18, 21, 26, 0.28);
  background: #f6f7f8;
}

#landing-shell summary {
  list-style: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
#landing-shell summary::-webkit-details-marker {
  display: none;
}
#landing-shell summary:hover .faq-mark {
  color: rgba(255, 255, 255, 0.85);
}
#landing-shell details[open] > p {
  animation: lpFaqIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero-mark .lp-mark-spin,
#cta-mark .lp-mark-spin {
  width: 100%;
  height: 100%;
  background: url('/landing/img/hero-mark.webp') center / contain no-repeat;
  animation: lpSpin 90s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  #landing-shell .u {
    animation: none !important;
    opacity: 1 !important;
  }
  #hero-mark .lp-mark-spin,
  #cta-mark .lp-mark-spin {
    animation: none !important;
  }
  #landing-shell [style*='box-shadow:0 30px 70px'],
  #landing-shell a[href='/demo'][style*='background:#fff'],
  #landing-shell a[href='/signup'][style*='background:#fff'] {
    transition: none !important;
  }
  #landing-shell [style*='box-shadow:0 30px 70px']:hover,
  #landing-shell a[href='/demo'][style*='background:#fff']:hover,
  #landing-shell a[href='/signup'][style*='background:#fff']:hover {
    transform: none !important;
  }
  #landing-shell details[open] > p {
    animation: none !important;
  }
}

/* ——— Phone + iPad (incl. landscape). Desktop chrome from 1200px. ——— */
@media (max-width: 1199px) {
  #landing-shell {
    overflow-x: clip;
  }

  #landing-shell nav > div {
    padding: 14px 20px !important;
    gap: 10px !important;
  }

  #landing-shell nav .lp-nav-brand-text {
    font-size: 15px !important;
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #hud {
    display: none !important;
  }

  #day-rail,
  #rail-dot {
    display: none !important;
  }

  #landing-shell section[data-hour],
  #landing-shell section:not([data-hour]):not(.lp-hero-section) {
    padding: 72px 20px !important;
  }

  #landing-shell .lp-hero-inner {
    padding: 108px 20px 48px !important;
  }

  #landing-shell .lp-hero-section {
    align-items: flex-start !important;
    min-height: auto !important;
    padding-bottom: 8px;
  }

  #landing-shell h1 {
    font-size: clamp(2rem, 7vw, 2.75rem) !important;
    line-height: 1.08 !important;
    max-width: none !important;
  }

  #landing-shell h2 {
    font-size: clamp(1.6rem, 5.4vw, 2.35rem) !important;
    line-height: 1.12 !important;
  }

  #landing-shell .lp-section-lead {
    font-size: 16px !important;
    max-width: none !important;
  }

  #landing-shell .lp-grid-2,
  #landing-shell .lp-grid-cobro,
  #landing-shell .lp-grid-wallet,
  #landing-shell .lp-grid-cierre,
  #landing-shell .lp-grid-why,
  #landing-shell .lp-grid-plans,
  #landing-shell .lp-hero-pillars {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  #landing-shell .lp-grid-kpi {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  #landing-shell .lp-hero-pillars {
    gap: 18px !important;
    padding: 28px 20px 32px !important;
  }

  #landing-shell .lp-grid-cobro {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 28px !important;
  }

  #landing-shell .lp-mock {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  #landing-shell .lp-grid-wallet .lp-mock,
  #landing-shell #aurelia .lp-mock {
    max-width: 380px !important;
  }

  #landing-shell .lp-mock-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  #landing-shell .lp-agenda-grid {
    min-width: 520px;
  }

  #landing-shell footer > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }

  #hero-mark {
    right: -40% !important;
    width: min(100vw, 640px) !important;
    height: min(100vw, 640px) !important;
    margin-top: -40vw !important;
    opacity: 0.07 !important;
  }

  #cta-mark {
    width: min(110vw, 720px) !important;
    height: min(110vw, 720px) !important;
    margin: -55vw 0 0 -55vw !important;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #landing-shell section[data-hour],
  #landing-shell section:not([data-hour]):not(.lp-hero-section) {
    padding: 88px 32px !important;
  }

  #landing-shell .lp-hero-inner {
    padding: 120px 32px 56px !important;
  }

  #landing-shell .lp-hero-pillars {
    padding: 32px 32px 40px !important;
  }

  #landing-shell nav > div {
    padding: 18px 32px !important;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  #landing-shell .lp-hero-pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }

  #landing-shell .lp-grid-why {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 32px !important;
  }
}

@media (max-width: 767px) {
  #landing-shell div[style*='display:flex; gap:14px'],
  #landing-shell div[style*='display:flex; gap:14px;'],
  #landing-shell .u[style*='display:flex; gap:14px'],
  #landing-shell .lp-hero-ctas {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #landing-shell a[href='/demo'],
  #landing-shell a[href='/signup'],
  #landing-shell a[href='/login'] {
    justify-content: center !important;
    width: 100%;
    box-sizing: border-box;
  }

  #landing-shell nav .lp-nav-login {
    display: none !important;
  }

  #landing-shell .lp-hero-brand {
    font-size: clamp(1.35rem, 6vw, 1.75rem) !important;
  }

  #landing-shell .lp-agenda-toolbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  #landing-shell .lp-grid-kpi {
    grid-template-columns: 1fr !important;
  }

  #landing-shell summary span:first-child {
    font-size: 17px !important;
  }
}

#landing-shell .faq-mark {
  display: inline-block;
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}
#landing-shell details[open] .faq-mark {
  transform: rotate(45deg);
  color: rgba(255, 255, 255, 0.75);
}
