/* Strona prezentacyjna myHeartLog (/). Tylko jasny motyw — tak jak w zaakceptowanej makiecie. */
:root {
  --ink: #14161A;
  --ink-2: #3D434C;
  --muted: #5B616B;
  --line: #ECEEF1;
  --soft: #F1F3F6;
  --band: #F4F5F7;
  --accent: #1D4ED8;
  --accent-dark: #1E3A8A;
  --accent-soft: #E8EEFC;
  --on-accent-2: #DCE6FB;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.l-stack { display: flex; flex-direction: column; gap: 28px; }
.l-intro { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.l-intro p { font-size: 18px; color: var(--ink-2); }
h2 { font-size: clamp(28px, 2rem + 0.6vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }

/* ---------- Nagłówek ---------- */
.l-head {
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
}
.l-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.l-brand:hover { color: var(--ink); }
.l-word { font-size: 20px; letter-spacing: -0.02em; }
.l-word strong { font-weight: 800; }
.l-nav { display: flex; align-items: center; gap: 20px; font-size: 15px; font-weight: 500; flex-wrap: wrap; }
.l-nav a { text-decoration: none; color: var(--ink-2); padding: 10px 0; }
.l-nav a:hover { color: var(--accent); }
.l-nav .l-nav-cta { background: var(--accent); color: #FFFFFF; padding: 10px 16px; border-radius: 12px; font-weight: 600; }
.l-nav .l-nav-cta:hover { background: var(--accent-dark); color: #FFFFFF; }

/* ---------- Przyciski ---------- */
.l-btn {
  min-height: 56px; padding: 0 26px; border-radius: 16px; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 150ms var(--ease-out), background-color 150ms, box-shadow 150ms;
}
.l-btn.primary { background: var(--accent); color: #FFFFFF; box-shadow: 0 6px 16px rgba(29, 78, 216, 0.22); }
.l-btn.primary:hover { background: var(--accent-dark); color: #FFFFFF; }
.l-btn.soft { background: var(--soft); color: var(--ink); }
.l-btn.soft:hover { background: #E6E8EC; color: var(--ink); }
.l-btn:active, .l-nav-cta:active { transform: scale(0.97); }

/* ---------- Hero ---------- */
.l-hero { padding-top: 32px; padding-bottom: 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.l-hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.l-pill { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
.l-hero h1 { font-size: clamp(36px, 1.6rem + 2.4vw, 52px); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
.l-lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 520px; }
.l-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Animowany telefon ---------- */
.l-phone-wrap { flex: 0 0 280px; margin: 0 auto; display: flex; justify-content: center; }
.l-phone { width: 270px; height: 560px; background: #0E1013; border-radius: 44px; padding: 10px; box-shadow: 0 30px 60px rgba(20, 30, 60, 0.22), 0 2px 0 rgba(255, 255, 255, 0.06) inset; }
.l-screen { position: relative; width: 100%; height: 100%; background: #F4F5F7; border-radius: 35px; overflow: hidden; font-size: 12px; }
.ph-s { position: absolute; inset: 0; padding: 34px 14px 14px; display: flex; flex-direction: column; gap: 8px; opacity: 0; animation: ph-cycle 9s ease-in-out infinite; }
.ph-s2 { padding-top: 44px; gap: 10px; animation-delay: 3s; }
.ph-s3 { padding-top: 36px; gap: 10px; animation-delay: 6s; }
.ph-title { font-weight: 600; text-align: center; }
.ph-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ph-field { background: #FFFFFF; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.ph-row { flex-direction: row; justify-content: space-between; align-items: center; }
.ph-active { box-shadow: inset 0 0 0 2px var(--accent); }
.ph-lbl { font-size: 8px; font-weight: 600; color: var(--muted); }
.ph-val { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.ph-val.sm { font-size: 24px; }
.ph-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.ph-keys span { height: 40px; border-radius: 10px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ph-keys .ph-blank { background: transparent; }
.ph-key { animation: ph-tap 1.5s ease-in-out infinite; }
.ph-save { margin-top: 6px; height: 40px; border-radius: 12px; background: var(--accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.ph-ok { width: 48px; height: 48px; border-radius: 24px; background: var(--accent-soft); align-self: center; display: flex; align-items: center; justify-content: center; }
.ph-h { font-size: 18px; font-weight: 700; text-align: center; }
.ph-result { flex-direction: row; justify-content: space-between; align-items: flex-end; padding: 12px; }
.ph-big { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.ph-slash { color: #8A9099; font-weight: 500; }
.ph-pulse { font-size: 18px; font-weight: 700; }
.ph-pulse small { font-size: 9px; color: var(--muted); font-weight: 400; }
.ph-status { font-size: 10px; gap: 6px; padding: 10px 12px; }
.ph-love { position: absolute; left: 12px; right: 12px; bottom: 18px; background: #FFFFFF; border-radius: 16px; padding: 12px; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16); font-weight: 500; line-height: 1.35; opacity: 0; animation: ph-love 9s ease-out 3s infinite; }
.ph-love svg { flex-shrink: 0; }
.ph-h2 { font-size: 22px; font-weight: 700; }
.ph-sub { font-size: 9px; color: var(--muted); }
.ph-mid { font-size: 18px; font-weight: 700; }
.ph-export { height: 38px; border-radius: 12px; border: 1.5px solid var(--accent); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
@keyframes ph-cycle { 0% { opacity: 0; transform: translateY(10px); } 4% { opacity: 1; transform: none; } 30% { opacity: 1; transform: none; } 34% { opacity: 0; } 100% { opacity: 0; } }
@keyframes ph-tap { 0%, 60%, 100% { transform: scale(1); background: #FFFFFF; } 75% { transform: scale(.92); background: #E6E8EC; } }
@keyframes ph-love { 0%, 6% { opacity: 0; transform: translateY(12px); } 12%, 28% { opacity: 1; transform: none; } 33%, 100% { opacity: 0; } }

/* ---------- Jak działa ---------- */
.l-band { background: var(--band); padding: 72px 0; }
.l-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.l-steps li { background: #FFFFFF; border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: transform 200ms var(--ease-out), box-shadow 200ms; }
.l-steps li:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 30, 60, 0.08); }
.l-steps h3 { font-size: 19px; font-weight: 700; }
.l-steps p { color: var(--ink-2); }
.l-num { width: 36px; height: 36px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.l-num.sm { width: 28px; height: 28px; font-size: 14px; }
.l-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.l-feat { display: flex; gap: 14px; align-items: flex-start; }
.l-feat svg { flex-shrink: 0; }
.l-feat > span { display: flex; flex-direction: column; gap: 4px; }
.l-feat > span > span { font-size: 15px; color: var(--muted); line-height: 1.45; }

/* ---------- Prywatność ---------- */
.l-privacy { background: var(--accent); color: #FFFFFF; padding: 72px 0; }
.l-privacy .l-intro p { color: var(--on-accent-2); }
.l-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.l-tiles li { background: rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.l-tiles strong { font-size: 17px; }
.l-tiles span { font-size: 15px; line-height: 1.45; color: var(--on-accent-2); }
.l-link-light { align-self: flex-start; color: #FFFFFF; font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding: 10px 0; }
.l-link-light:hover { color: var(--on-accent-2); }
.l-privacy :focus-visible { outline-color: #FFFFFF; }

/* ---------- Pobierz ---------- */
.l-get { padding-top: 72px; padding-bottom: 72px; }
.l-desktop-note { font-size: 17px; background: var(--accent-soft); color: var(--ink); border-radius: 16px; padding: 16px 18px; max-width: 760px; }
.l-desktop-note strong { color: var(--accent); }
.l-platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.l-platform { border: 1.5px solid var(--line); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.l-platform h3 { font-size: 19px; font-weight: 700; }
.l-platform p { font-size: 15px; color: var(--ink-2); }
.l-platform .l-btn { margin-top: auto; min-height: 52px; font-size: 16px; border-radius: 14px; }
.l-fallback { background: var(--band); border-radius: 12px; padding: 12px 14px; animation: l-in 240ms var(--ease-out); }
/* Na telefonie własna platforma idzie pierwsza i jest wyróżniona. */
.is-ios [data-platform="ios"], .is-android [data-platform="android"] { order: -1; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Stopka ---------- */
.l-foot { border-top: 1px solid var(--line); padding: 28px 0 max(40px, env(safe-area-inset-bottom)); }
.l-foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 14px; color: var(--muted); }
.l-foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.l-foot-links a { text-decoration: none; font-weight: 500; padding: 10px 0; }

/* ---------- Arkusz „Dodaj do ekranu początkowego” (iOS) ---------- */
.l-sheet {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0 12px max(112px, calc(env(safe-area-inset-bottom) + 96px));
  border: 0; background: transparent; display: none; flex-direction: column; justify-content: flex-end;
}
.l-sheet[open] { display: flex; }
.l-sheet::backdrop { background: rgba(14, 16, 19, 0.45); }
.l-sheet[open] .l-sheet-card { animation: l-sheet-up 320ms var(--ease-out); }
.l-sheet[open]::backdrop { animation: l-fade 220ms var(--ease-out); }
.l-sheet-card { width: 100%; max-width: 420px; margin: 0 auto; background: #FFFFFF; border-radius: 26px; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.l-sheet-head { display: flex; align-items: center; gap: 12px; }
.l-sheet-head h2 { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: 0; flex: 1; }
.l-close { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--soft); color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.l-close:active { transform: scale(0.93); }
.l-hint-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.l-hint-steps li { display: flex; align-items: center; gap: 12px; line-height: 1.4; }
.l-hint-steps svg { vertical-align: -4px; }
.l-sheet-note { font-size: 13px; color: var(--muted); line-height: 1.45; }
.l-arrow { position: absolute; left: 50%; bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px)); margin-left: -14px; color: #FFFFFF; animation: l-bob 1.2s ease-in-out infinite; }
.is-desktop .l-arrow, .is-android .l-arrow { display: none; }
@keyframes l-sheet-up { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes l-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes l-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes l-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

@media (max-width: 560px) {
  .l-hero { padding-top: 12px; gap: 40px; }
  .l-actions .l-btn { flex: 1 1 100%; }
  .l-nav { gap: 14px; }
  .l-nav a:not(.l-nav-cta) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ph-s, .ph-love, .ph-key, .l-arrow, .l-sheet[open] .l-sheet-card, .l-sheet[open]::backdrop, .l-fallback { animation: none; }
  .ph-s1 { opacity: 1; }
  .l-btn, .l-steps li { transition: none; }
}
