@import "../../../shared/app-landing.css";

body {
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 200, 61, 0.2), transparent 32%),
    radial-gradient(circle at 18% 36%, rgba(255, 224, 138, 0.12), transparent 34%),
    linear-gradient(145deg, #0d0a04 0%, #120e06 48%, #1a1408 100%);
}

.klenny-hero-shot {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.45));
}

.screen { margin: 0; }

@media (prefers-color-scheme: light) {
  /* Inline vars on <html> set the dark palette; light mode needs a deeper yellow for contrast. */
  html {
    --accent: #b77900 !important;
    --accent-2: #d99a00 !important;
    --bg: #fffaf0 !important;
    --bg-soft: #fff1cc !important;
  }

  body {
    background:
      radial-gradient(circle at 76% 18%, rgba(255, 200, 61, 0.32), transparent 32%),
      radial-gradient(circle at 18% 36%, rgba(255, 224, 138, 0.28), transparent 34%),
      linear-gradient(145deg, #fffaf0 0%, #fff5dc 48%, #fff1cc 100%);
  }
}

/* ---- Direct sales: language, download, install guide, FAQ ---- */
[data-lang][hidden] { display: none !important; }
[data-app-store][hidden] { display: none !important; }
section[id], .faq > div[id] { scroll-margin-top: 84px; }
.section-copy a, .feature-card p a:not(.btn), .faq a, .guide a, .fine-print a { color: var(--accent); }
strong { color: var(--text); }

.topbar nav { flex: 1; }
.lang-toggle { flex-shrink: 0; }
.lang-toggle button { min-width: 40px; padding: 6px 10px; }

.feature-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spec-list { margin: 4px 0 12px; padding: 0; list-style: none; color: var(--muted); font-size: 14px; line-height: 1.6; }
.spec-list li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.fine-print { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Install guide (in the page and inside the dialog) */
.guide-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.guide-step { counter-increment: guide; display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035)), var(--card); }
.guide-step h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; line-height: 1.25; }
.guide-step h3::before { content: counter(guide); flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #10131b; background: var(--accent); font-size: 14px; font-weight: 700; }
.guide-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.guide-art { aspect-ratio: 16 / 11; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, transparent); overflow: hidden; }
.guide-art svg { display: block; width: 100%; height: 100%; }
.ill-surface { fill: var(--card-strong); stroke: var(--border); }
.ill-muted { fill: color-mix(in srgb, var(--text) 13%, transparent); }
.ill-accent { fill: var(--accent); }
.ill-stroke { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.ill-dash { stroke-dasharray: 4 6; }
.ill-ring { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.ill-folder { fill: #5aa9f5; }
.ill-knob { fill: #fff; }
.ill-knob-stroke { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ill-pointer { fill: var(--text); stroke: var(--bg); stroke-width: 1.5; }
.ill-text { fill: var(--text); font: 600 10px "Poppins", "Helvetica Neue", Arial, sans-serif; }
.ill-title { font-size: 13px; font-weight: 700; }
.ill-small { font-size: 8.5px; }
.ill-mono { font-family: ui-monospace, Menlo, monospace; font-size: 9px; font-weight: 500; }
.ill-on-accent { fill: #10131b; }

/* Dialog shown after a download starts */
.guide-dialog { width: min(860px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--border); border-radius: 24px; color: var(--text); background: var(--bg); box-shadow: 0 40px 120px rgba(0,0,0,0.5); overflow: auto; overscroll-behavior: contain; }
.guide-dialog::backdrop { background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(6px); }
html.guide-open { overflow: hidden; }
.guide-dialog-head, .guide-dialog-foot { position: sticky; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; background: var(--bg); }
.guide-dialog-head { top: 0; align-items: flex-start; border-bottom: 1px solid var(--border); }
.guide-dialog-head .eyebrow { margin-bottom: 4px; }
.guide-dialog-head h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.guide-dialog-foot { bottom: 0; flex-wrap: wrap; border-top: 1px solid var(--border); }
.guide-dialog-foot .btn { min-height: 46px; cursor: pointer; font: inherit; font-weight: 700; }
.guide-dialog-body { padding: 18px 22px; }
.guide-close { flex: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--card); font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.guide-close:focus-visible, .guide-dialog-foot .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-dialog .guide-steps { grid-template-columns: 1fr; gap: 12px; }
.guide-dialog .guide-step { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 18px; row-gap: 8px; align-items: start; }
.guide-dialog .guide-art { grid-row: 1 / span 2; }

.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.faq summary { padding: 16px 20px; font-weight: 600; cursor: pointer; list-style-position: inside; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 16px; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); line-height: 1.6; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); }

@media (max-width: 920px) {
  .feature-grid.two-up { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Keep the sticky header to one row: icon, horizontally scrollable nav, language toggle. */
  .topbar .container { flex-direction: row; align-items: center; gap: 10px; }
  .topbar nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { white-space: nowrap; }
  .brand { flex-shrink: 0; }
  .brand span { display: none; }
  section[id], .faq > div[id] { scroll-margin-top: 72px; }
  .faq summary { padding: 14px 16px; }
  .faq details p { padding: 0 16px 16px; }
  .guide-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .guide-dialog-head, .guide-dialog-foot, .guide-dialog-body { padding-left: 14px; padding-right: 14px; }
  .guide-dialog-foot .btn { width: 100%; }
  .guide-dialog .guide-step { grid-template-columns: 1fr; }
  .guide-dialog .guide-art { grid-row: auto; width: 100%; aspect-ratio: auto; height: 150px; }
}

/* ==== Layout: fluid on wide screens, one column on phones ==================================
   Phones <= 640 px · tablets 641-1024 px (one column, 16:9 video) · desktop >= 1025 px
   (two-column hero) · wide screens: container grows to 1440 px. */
.container { max-width: 1440px; padding-left: clamp(16px, 4vw, 64px); padding-right: clamp(16px, 4vw, 64px); }
@media (min-width: 1800px) { .container { max-width: 1560px; } }
.section { padding: clamp(52px, 6vw, 112px) 0; }
h1 { font-size: clamp(44px, 5.4vw, 100px); }
.headline { font-size: clamp(28px, 3.2vw, 56px); }
.section-title { max-width: 920px; font-size: clamp(28px, 3vw, 54px); }
.lead, .section-copy { font-size: clamp(16px, calc(0.45vw + 12px), 20px); }
.section-copy { max-width: 72ch; }
.feature-grid { gap: clamp(14px, 1.4vw, 24px); }
.feature-card { padding: clamp(18px, 1.6vw, 28px); }
.feature-card h3 { font-size: clamp(18px, 1.3vw, 22px); }

/* Hero: copy left, promo video dominating the right column */
.hero { padding: clamp(36px, 5.5vw, 112px) 0 clamp(40px, 5vw, 96px); }
.hero-grid {
  grid-template-columns: minmax(420px, 0.66fr) minmax(0, 1.34fr);
  grid-template-areas: "top video" "cta video" "meta video";
  grid-template-rows: auto auto auto;
  align-content: center;
  align-items: start;
  column-gap: clamp(32px, 4.5vw, 96px);
  row-gap: 0;
}
.hero-top { grid-area: top; }
.hero-cta { grid-area: cta; margin-top: 6px; }
.hero-meta { grid-area: meta; }
.hero-video { grid-area: video; align-self: center; position: relative; display: flex; justify-content: center; }
.hero-top .lead { margin-bottom: 26px; }
.btn-xl { min-height: 60px; padding: 0 28px; font-size: clamp(17px, 1.1vw, 20px); border-radius: 16px; box-shadow: 0 18px 44px color-mix(in srgb, var(--accent) 34%, transparent); }
.hero-note { margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.hero-note a { color: var(--accent); }
.hero-video::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: color-mix(in srgb, var(--accent) 28%, transparent); filter: blur(80px); }
.hero-video video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 1px solid var(--border); border-radius: clamp(18px, 1.6vw, 30px); background: #fff8e6; object-fit: cover; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28), 0 8px 24px rgba(0, 0, 0, 0.12); }

/* Benefits: 2-column grid of cards (big screenshot + short text) */
.benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 40px); }
.benefit { display: flex; flex-direction: column; gap: clamp(14px, 1.4vw, 22px); padding: clamp(12px, 1.2vw, 20px) clamp(12px, 1.2vw, 20px) clamp(18px, 1.6vw, 28px); border: 1px solid var(--border); border-radius: clamp(18px, 1.6vw, 28px); background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035)), var(--card); }
.benefit-shot { margin: 0; border-radius: clamp(12px, 1.1vw, 20px); }
.benefit-copy { padding: 0 clamp(4px, 0.6vw, 10px); }
.benefit-copy h3 { margin-bottom: 8px; font-size: clamp(20px, 1.7vw, 30px); line-height: 1.15; }
.benefit-copy p { margin: 0; color: var(--muted); font-size: clamp(15px, calc(0.35vw + 11px), 18px); line-height: 1.65; }

/* Website vs. Mac App Store, side by side */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 32px); margin: 8px 0 16px; }
.compare-card { display: flex; flex-direction: column; padding: clamp(20px, 2.2vw, 40px); }
.compare-card > p:last-child { margin: auto 0 0; padding-top: 8px; }
.compare-card.is-featured { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 24px 58px color-mix(in srgb, var(--accent) 18%, transparent); }
.check-list, .dot-list { margin: 0 0 16px; padding: 0; list-style: none; color: var(--muted); font-size: clamp(15px, calc(0.3vw + 12px), 18px); line-height: 1.6; }
.check-list li, .dot-list li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.dot-list li::before { content: "•"; position: absolute; left: 6px; color: var(--muted); }

/* Install steps: 5 columns when they fit */
.guide-steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(12px, 1.4vw, 22px); }
@media (min-width: 1180px) { .guide-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.faq { max-width: 1000px; }

/* Phones: sticky download bar (shown by klenny.js) */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.mobile-cta .btn { width: 100%; justify-content: center; min-height: 52px; }
[data-mobile-cta][hidden] { display: none !important; }
html.has-mobile-cta body { padding-bottom: 76px; }
@media (min-width: 641px) { .mobile-cta { display: none !important; } }

/* Tablet: one column, 16:9 video full width, one-line scrollable menu */
@media (max-width: 1024px) {
  .topbar nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { white-space: nowrap; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "cta" "video" "meta"; }
  .hero-top, .hero-meta { max-width: 760px; }
  .hero-video { margin-top: 32px; }
  .hero-meta { margin-top: 8px; }
  .compare { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .benefits, .compare { grid-template-columns: minmax(0, 1fr); }
}
/* Phones: 9:16 video full width right after the main button; 44 px touch targets */
@media (max-width: 640px) {
  .hero { padding-top: 28px; }
  .hero .app-lockup { display: none; } /* the icon is already in the header; brings the main button up */
  .brand { min-height: 44px; }
  .hero-top .lead { margin-bottom: 20px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .btn-xl { min-height: 58px; }
  .hero-video { margin-top: 22px; }
  .hero-video video { aspect-ratio: 9 / 16; width: 100%; height: auto; }
  .hero-note { margin-top: 18px; }
  .topbar nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; }
  .lang-toggle button { min-width: 44px; min-height: 44px; }
  footer a { display: inline-block; padding: 12px 2px; }
  .guide-steps { grid-template-columns: minmax(0, 1fr); }
}

/* Legal pages */
.legal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.legal-card ul { color: var(--muted); line-height: 1.6; padding-left: 20px; }
