/* Marketing landing — reuses app.css design tokens (Soča green on warm cream,
   theme-aware). Loaded only on the public landing page.

   Motion is added by app/static/js/marketing.js as finite Web Animations API
   entrances; there are deliberately NO permanently-hidden CSS states here, so
   the page is complete and usable with the script blocked, JS off, reduced
   motion, or when printing. */

html { scroll-behavior: smooth; }
.mk { color: var(--ink); overflow-x: hidden; }
.mk-wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
.mk-section, .mk-hero-section { scroll-margin-top: 72px; }

/* The standalone landing loads app.css, whose `main { max-width: 780px }` would
   otherwise cage the full-width section backgrounds. Reset it for this page. */
main.mk-main { max-width: none; margin: 0; padding: 0; }

/* Skip link (visually hidden until focused) */
.mk-skip { position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .6rem 1rem; font-weight: 700;
  text-decoration: none; transition: top .15s ease; }
.mk-skip:focus-visible { top: 12px; }

/* Shared, deliberate focus ring for landing controls */
.mk a:focus-visible, .mk-btn:focus-visible, .mk-burger > summary:focus-visible,
.mk-faq summary:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: var(--radius-sm); }
@media (prefers-color-scheme: dark) {
  .mk a:focus-visible, .mk-btn:focus-visible, .mk-burger > summary:focus-visible,
  .mk-faq summary:focus-visible, .brand:focus-visible { outline-color: var(--accent); }
}

/* Sticky header */
.mk-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); }
.mk-header .mk-nav { display: flex; align-items: center; gap: 1rem; padding-block: .6rem; min-height: 64px; }
.brand { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--ink);
  text-decoration: none; letter-spacing: -.01em; margin-right: auto; }
.mk-links { display: flex; align-items: center; gap: 1.4rem; }
.mk-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.mk-links a:hover { color: var(--accent-2); }

.mk-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: 0 1.15rem; border-radius: var(--radius-btn); font-weight: 700;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 1rem;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
/* Deeper light-theme green (#16773d ≈ 5.61:1 for white) instead of bright accent */
.mk-btn.primary { background: var(--accent-2); color: #fff; }
.mk-btn.primary:hover { background: color-mix(in srgb, #000 10%, var(--accent-2)); transform: translateY(-1px); box-shadow: var(--shadow); }
.mk-btn.primary:active { transform: none; box-shadow: none; }
.mk-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.mk-btn.ghost:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--accent-2); }
.mk-btn.sm { min-height: 40px; padding: 0 1rem; font-size: .94rem; }
.mk-btn.lg { min-height: 52px; padding: 0 1.7rem; font-size: 1.05rem; }
@media (prefers-color-scheme: dark) {
  /* dark --ink is cream, so deep pine text on the bright green reads strongly */
  .mk-btn.primary { background: var(--accent); color: #10201b; }
  .mk-btn.primary:hover { background: color-mix(in srgb, #fff 8%, var(--accent)); color: #10201b; }
  .mk-btn.ghost { color: var(--ink); }
}

/* Mobile hamburger (CSS-only via <details>; JS adds close-on-select/Escape) */
.mk-burger { display: none; position: relative; }
.mk-burger > summary { list-style: none; cursor: pointer; width: 46px; height: 44px;
  display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 1.3rem; line-height: 1; color: var(--ink); }
.mk-burger > summary::-webkit-details-marker { display: none; }
.mk-burger-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .5rem; display: flex; flex-direction: column; gap: .2rem; }
.mk-burger-panel a { color: var(--ink); text-decoration: none; font-weight: 600; padding: .8rem .9rem;
  border-radius: var(--radius-sm); }
.mk-burger-panel a:hover { background: var(--surface-2); }
.mk-burger-panel .mk-btn { margin-top: .3rem; }

/* Hero — two columns on desktop, stacked on mobile */
.mk-hero-section { padding-block: 3.2rem 2.4rem; }
.mk-hero { text-align: center; }
.mk-eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent-2); background: var(--accent-soft);
  padding: .3rem .7rem; border-radius: var(--radius-chip); margin-bottom: 1rem; }
.mk-hero h1 { font-family: var(--serif); font-size: clamp(2.1rem, 6vw, 3.3rem); line-height: 1.07;
  letter-spacing: -.015em; margin: 0 0 1rem; text-wrap: balance; }
.mk-hero p.lead { font-size: 1.16rem; color: var(--ink-2); margin: 0 auto 1.4rem; max-width: 42ch; }
.mk-cta-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: center; }
.mk-cta-note { margin: .9rem 0 0; color: var(--ink-2); font-size: .9rem; }
.mk-trust { margin-top: 1.4rem; color: var(--ink-2); font-size: .92rem; display: flex;
  flex-wrap: wrap; gap: .45rem 1.3rem; justify-content: center; }
.mk-trust b { color: var(--ink); }
.mk-hero-media { display: flex; flex-direction: column; align-items: center; }
.mk-cap { margin: .7rem 0 0; color: var(--ink-2); font-size: .88rem; text-align: center; }

@media (min-width: 1024px) {
  .mk-hero { display: grid; grid-template-columns: 1fr 300px; gap: 4.5rem; align-items: center; text-align: left; }
  .mk-hero p.lead { margin-inline: 0; }
  .mk-cta-row, .mk-trust { justify-content: flex-start; }
  .mk-hero h1 { font-size: clamp(3rem, 3.4vw, 3.5rem); }
}

/* Section scaffolding */
.mk-section { padding-block: 3.2rem; }
.mk-head { margin-bottom: 2rem; }
.mk-section h2 { font-family: var(--serif); font-size: clamp(1.9rem, 3.2vw, 2.25rem);
  text-align: center; margin: 0 auto .5rem; text-wrap: balance; line-height: 1.15; }
.mk-section .sub { text-align: center; color: var(--ink-2); max-width: 56ch; margin: 0 auto; }
.mk-alt { background: var(--surface); border-block: 1px solid var(--line); }

/* Feature grid */
.mk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.mk-feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; }
.mk-alt .mk-feature { background: var(--bg); }
.mk-feature .ic { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-2); margin-bottom: .3rem; }
.mk-feature .ic svg { width: 22px; height: 22px; display: block; }
.mk-feature h3 { margin: .7rem 0 .35rem; font-size: 1.1rem; }
.mk-feature p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }

/* Three-step showcase with real app screenshots (phone mockups) */
.mk-show { display: grid; gap: 3.5rem; }
.mk-showstep { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: center; }
/* Even rows: reverse BOTH the visual placement and the track widths so text
   keeps the wide track. DOM order stays text-then-image for reading order. */
.mk-showstep:nth-child(even) { grid-template-columns: 300px 1fr; }
.mk-showstep:nth-child(even) .mk-phone { order: -1; }
.mk-showstep .step-num { display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent-2); color: #fff;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 700; margin-bottom: .7rem; }
.mk-showstep h3 { font-family: var(--serif); font-size: clamp(1.45rem, 2.4vw, 1.7rem); margin: 0 0 .5rem; letter-spacing: -.01em; }
.mk-showstep p { color: var(--ink-2); font-size: 1.04rem; line-height: 1.55; margin: 0 0 1rem; max-width: 46ch; }
.mk-showstep ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.mk-showstep li { position: relative; padding-left: 1.5rem; color: var(--ink-2); }
.mk-showstep li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }

/* Phone mockup — a device frame that keeps the screenshot's 720:1298 ratio */
.mk-phone { margin: 0; width: 100%; max-width: 300px; justify-self: center; border: 1px solid var(--line);
  border-radius: 26px; background: #0d0f0e; padding: 8px; box-shadow: var(--shadow-lg); }
.mk-phone img { display: block; width: 100%; height: auto; aspect-ratio: 720 / 1298; border-radius: 20px; }
.mk-hero-phone { max-width: 300px; }

@media (max-width: 820px) {
  .mk-showstep, .mk-showstep:nth-child(even) { grid-template-columns: 1fr; gap: 1.4rem; text-align: left; }
  .mk-showstep:nth-child(even) .mk-phone { order: 0; }
  .mk-showstep p { max-width: none; }
  .mk-showstep ul { max-width: none; }
  .mk-phone { max-width: 240px; }
  .mk-showstep .mk-phone { justify-self: center; }
}

/* Pricing */
.mk-price-note { text-align: center; color: var(--ink-2); margin: 0 auto 1.4rem; max-width: 52ch; }
.mk-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 1.2rem;
  justify-content: center; align-items: stretch; }
.mk-price { position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; }
/* Highlight without enlarging or a louder colour: a soft inset cream/green surface */
.mk-price.hl { border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.mk-badge { align-self: flex-start; background: var(--accent-soft); color: var(--accent-2);
  font-size: .74rem; font-weight: 700; padding: .22rem .6rem; border-radius: var(--radius-chip);
  margin-bottom: .7rem; max-width: 100%; }
.mk-price h3 { margin: 0; font-size: 1.2rem; }
.mk-price .tag { color: var(--ink-2); font-size: .9rem; margin: .2rem 0 1rem; }
.mk-price .amt { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; }
.mk-price .amt span { font-size: .95rem; font-weight: 400; color: var(--ink-2); }
.mk-price ul { list-style: none; padding: 0; margin: 1.1rem 0 1.4rem; display: grid; gap: .55rem; }
.mk-price li { position: relative; padding-left: 1.5rem; color: var(--ink-2); font-size: .95rem; }
.mk-price li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }
.mk-price .mk-btn { margin-top: auto; }
.mk-setup-note { text-align: center; color: var(--ink-2); margin-top: 1.2rem; font-size: .92rem; }

/* FAQ */
.mk-faq { max-width: 760px; margin: 0 auto; }
.mk-faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: .3rem 1.1rem; margin-bottom: .7rem; }
.mk-faq summary { cursor: pointer; font-weight: 600; padding: .8rem 2rem .8rem 0; list-style: none;
  position: relative; color: var(--ink); }
.mk-faq summary::-webkit-details-marker { display: none; }
/* Plus / minus indicator (only the indicator transitions; the answer opens natively) */
.mk-faq summary::after { content: ""; position: absolute; right: .1rem; top: 50%; width: 14px; height: 14px;
  margin-top: -7px; background:
    linear-gradient(var(--accent-2), var(--accent-2)) center / 14px 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) center / 2px 14px no-repeat;
  transition: transform .18s ease; }
.mk-faq details[open] summary::after { transform: rotate(90deg); background:
    linear-gradient(var(--accent-2), var(--accent-2)) center / 14px 2px no-repeat; }
.mk-faq details[open] summary { border-bottom: 1px solid var(--line); }
.mk-faq p { color: var(--ink-2); line-height: 1.55; }

/* Final CTA + footer */
.mk-final { text-align: center; padding-block: 3.5rem; }
.mk-final-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.6rem 1.4rem; max-width: 720px; margin: 0 auto; }
.mk-final h2 { font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 1.2rem; }
.mk-footer { border-top: 1px solid var(--line); padding-block: 1.6rem; color: var(--ink-2);
  font-size: .88rem; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; }
.mk-footer a { color: var(--ink-2); text-decoration: none; }
.mk-footer a:hover { color: var(--accent-2); }
.mk-footer .spacer { flex: 1; }

@media (max-width: 820px) {
  .mk-hero-section { padding-block: 2.4rem 1.8rem; }
  .mk-grid { grid-template-columns: 1fr; }
  .mk-prices { grid-template-columns: minmax(0, 420px); }
}

/* Collapse the header nav into a hamburger on narrow screens */
@media (max-width: 760px) {
  .mk-links { display: none; }
  .mk-burger { display: block; }
  .mk-section { padding-block: 2.4rem; }
  /* Equal-width, vertically stacked CTAs on narrow phones */
  .mk-cta-row { flex-direction: column; align-items: stretch; }
  .mk-cta-row .mk-btn { width: 100%; }
  .mk-cta-note, .mk-trust { text-align: center; justify-content: center; }
}

/* When reduced motion is requested, drop the landing's smooth anchor scrolling
   too (the script also handles this dynamically for live preference changes). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
