/* ─────────────────────────────────────────────────────────
   Perch — signed-out marketing landing.

   Mirrors the Project Kestrel website's /perch page, restyled for the Perch
   app shell (its own header + footer live in index.html). Everything here is
   scoped under `.landing` and driven by landing-local `--pl-*` tokens that
   default to the app's light "Daybreak" theme. The dark variant overrides only
   those tokens under `body.landing-dark` (see the bottom of this file), so the
   logged-in app is never affected.
   ───────────────────────────────────────────────────────── */

.landing {
  --pl-bg:          var(--bg);
  --pl-panel:       var(--panel);
  --pl-panel-2:     var(--bg);
  --pl-ink:         var(--ink);
  --pl-muted:       var(--muted);
  --pl-border:      var(--border);
  --pl-border-mid:  var(--border-mid);
  --pl-accent:      var(--green);
  --pl-accent-soft: var(--green-dim);
  --pl-shadow:      rgba(0, 0, 0, 0.08);

  background: var(--pl-bg);
  color: var(--pl-ink);
}

.pl {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.pl-accent { color: var(--pl-accent); }
.pl-accent-strong { color: var(--pl-accent); font-weight: 600; }

.pl-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pl-accent);
  opacity: 0.9;
  margin: 0 0 14px;
}

/* ── Hero ─────────────────────────────────────────────── */
.pl-hero {
  text-align: center;
  padding: 80px 0 56px;
}
.pl-hero .pl { max-width: 760px; }
.pl-h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.5px;
  color: var(--pl-ink);
  max-width: 16ch;
  margin: 0 auto;
}
.pl-lead {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--pl-muted);
  max-width: 620px;
  margin: 18px auto 0;
}
.pl-kestrel-link {
  display: inline-block;
  margin: 18px auto 0;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pl-accent);
  text-decoration: none;
}
.pl-kestrel-link:hover { text-decoration: underline; }
.pl-trust {
  margin: 22px auto 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--pl-ink);
}
.pl-trust svg { color: var(--pl-accent); vertical-align: -2px; margin-right: 6px; }

/* ── Buttons ──────────────────────────────────────────── */
.pl-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 26px;
}
.pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
}
.pl-btn.primary {
  background: var(--pl-accent);
  color: #fff;
}
.pl-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -8px var(--pl-accent);
}
.pl-btn.ghost {
  background: transparent;
  border-color: var(--pl-border-mid);
  color: var(--pl-ink);
}
.pl-btn.ghost:hover { border-color: var(--pl-accent); color: var(--pl-accent); }

/* ── Section scaffolding ──────────────────────────────── */
.pl-section { padding: 64px 0; }
.pl-section + .pl-section { border-top: 1px solid var(--pl-border); }
.pl-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.pl-h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.3px;
  color: var(--pl-ink);
  margin: 0;
}

/* ── Live sample embed ────────────────────────────────── */
.pl-embed {
  display: block;
  width: 100%;
  max-width: 1180px;
  height: 660px;
  margin: 0 auto;
  border: 1px solid var(--pl-border-mid);
  border-radius: 14px;
  background: var(--pl-panel-2);
  box-shadow: 0 14px 40px -20px var(--pl-shadow);
}

/* ── Why I made it (two columns) ──────────────────────── */
.pl-why {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  max-width: 980px;
  margin: 0 auto;
}
.pl-why p { color: var(--pl-muted); line-height: 1.75; margin: 0 0 16px; }
.pl-why p:last-child { margin-bottom: 0; }

/* ── Social, but calm ─────────────────────────────────── */
.pl-calm { text-align: center; }
.pl-calm-inner { max-width: 660px; margin: 0 auto; }
.pl-calm-p {
  color: var(--pl-muted);
  line-height: 1.75;
  font-size: 1.05rem;
  margin: 14px auto 0;
}

/* ── Groups ───────────────────────────────────────────── */
.pl-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--pl-muted);
  line-height: 1.65;
}
.pl-brand {
  background-image: linear-gradient(115deg, var(--pl-accent), #95d94f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  padding-right: 0.05em;
  margin-right: -0.05em;
}
.pg-widget {
  max-width: 680px;
  margin: 0 auto;
  background: var(--pl-panel);
  border: 1px solid var(--pl-border);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 14px 40px -26px var(--pl-shadow);
}
.pg-tracks { display: flex; flex-direction: column; gap: 15px; }
.pg-track { display: flex; align-items: center; gap: 12px; }
.pg-avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-ui); font-weight: 700; font-size: 0.78rem;
  color: #fff; background: var(--c);
}
.pg-name { flex: none; width: 52px; font-family: var(--font-ui); font-size: 0.82rem; color: var(--pl-ink); font-weight: 500; }
.pg-line { position: relative; flex: 1 1 auto; height: 3px; background: var(--pl-border-mid); border-radius: 999px; }
.pg-line i {
  position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--c); box-shadow: 0 0 0 2px var(--pl-panel);
}
.pg-merge { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--pl-muted); }
.pg-merge::before, .pg-merge::after {
  content: ''; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--pl-border-mid), transparent);
}
.pg-merge span { font-family: var(--font-ui); font-size: 0.72rem; font-style: italic; white-space: nowrap; }
.pg-combined-label {
  display: block; text-align: center;
  font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--pl-accent); margin-bottom: 11px;
}
.pg-combined .pg-line { height: 4px; }
.pg-combined .pg-line i { width: 13px; height: 13px; }

/* ── How to create your own Perch (step flow) ─────────── */
.pl-flow { display: flex; align-items: stretch; justify-content: center; gap: 6px; }
.pl-step {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  background: var(--pl-panel); border: 1px solid var(--pl-border); border-radius: 16px;
  padding: 22px 20px; box-shadow: 0 14px 40px -28px var(--pl-shadow);
}
.pl-step-num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 13px; flex: none;
  border-radius: 50%; background: var(--pl-accent-soft); color: var(--pl-accent);
  font-family: var(--font-ui); font-weight: 700; font-size: 0.95rem;
  border: 1px solid var(--pl-accent);
}
.pl-step h3 { margin: 0 0 7px; font-family: var(--font-serif); color: var(--pl-ink); font-size: 1.02rem; }
.pl-step p { margin: 0; color: var(--pl-muted); line-height: 1.55; font-size: 0.9rem; }
.pl-arrow { align-self: center; color: var(--pl-accent); opacity: 0.6; flex: none; }
.pl-arrow svg { display: block; }
.pl-share-opts { display: flex; flex-direction: column; gap: 7px; margin-top: 13px; }
.pl-share-opts span {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 0.84rem; color: var(--pl-ink);
  background: var(--pl-accent-soft); border: 1px solid var(--pl-accent-soft);
  border-radius: 9px; padding: 7px 11px;
}

/* ── Privacy by design (guarantee cards) ──────────────── */
.pl-guarantees { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 980px; margin: 0 auto; }
.pl-guarantee {
  background: var(--pl-panel); border: 1px solid var(--pl-border); border-radius: 14px; padding: 20px;
  box-shadow: 0 14px 40px -30px var(--pl-shadow);
}
.pl-g-icon {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--pl-accent-soft); color: var(--pl-accent); margin-bottom: 12px;
}
.pl-g-icon svg { display: block; }
.pl-guarantee h3 { margin: 0 0 6px; font-family: var(--font-serif); color: var(--pl-ink); font-size: 0.98rem; }
.pl-guarantee p { margin: 0; color: var(--pl-muted); font-size: 0.9rem; line-height: 1.55; }
.pl-free {
  text-align: center; max-width: 640px; margin: 34px auto 10px;
  font-family: var(--font-serif); font-size: 1.4rem; line-height: 1.35; color: var(--pl-ink);
}
.pl-why-free {
  text-align: center; max-width: 600px; margin: 0 auto;
  font-family: var(--font-serif); font-size: 0.92rem; font-style: italic; color: var(--pl-muted); line-height: 1.55;
}
.pl-why-free a { color: var(--pl-accent); font-style: normal; font-weight: 600; text-decoration: none; }
.pl-why-free a:hover { text-decoration: underline; }

/* ── Closing CTA ──────────────────────────────────────── */
.pl-cta { text-align: center; padding: 72px 0 84px; border-top: 1px solid var(--pl-border); }
.pl-cta-p { margin: 12px auto 0; color: var(--pl-muted); font-size: 1.05rem; line-height: 1.65; max-width: 560px; }
.pl-cta .pl-actions { margin-top: 26px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .pl-why { grid-template-columns: 1fr; gap: 8px; }
  .pl-flow { flex-direction: column; align-items: stretch; }
  .pl-arrow { transform: rotate(90deg); margin: 2px 0; }
}
@media (max-width: 860px) {
  .pl-guarantees { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pl-hero { padding: 56px 0 44px; }
  .pl-section { padding: 48px 0; }
  .pl-embed { height: 480px; border-radius: 10px; }
  .pl-actions { flex-direction: column; align-items: stretch; }
  .pl-guarantees { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────
   DARK THEME — landing-specific tweaks. The global dark palette (the app
   tokens the landing inherits via --pl-*) lives in assets/theme.css, keyed off
   `:root[data-theme="dark"]` and driven by the site-wide theme toggle. Here we
   only fine-tune the landing's own surfaces + add the hero glow.
   ───────────────────────────────────────────────────────── */
:root[data-theme="dark"] .landing {
  --pl-panel:       #121a26;
  --pl-panel-2:     #0d1320;
  --pl-accent-soft: rgba(92, 193, 111, 0.13);
  --pl-shadow:      rgba(0, 0, 0, 0.5);
}

/* Soft green glow behind the hero — the one "gradient" flourish that lifts the
   dark page out of a flat fill, echoing the Kestrel marketing hero. */
:root[data-theme="dark"] .pl-hero {
  background:
    radial-gradient(62% 72% at 50% -12%, rgba(92, 193, 111, 0.16), transparent 70%),
    var(--pl-bg);
}

/* The primary button's green is already vivid on dark; soften its hover lift
   shadow so it reads on the dark surface. */
:root[data-theme="dark"] .pl-btn.primary:hover {
  box-shadow: 0 10px 26px -10px rgba(92, 193, 111, 0.55);
}
