/* DayFlow website — no external requests, system font stack */
:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --ink: #14142b;
  --muted: #5f6078;
  --line: rgba(20, 20, 43, .1);
  --accent: #5856eb;
  --accent-ink: #4340d6; /* AA contrast on light surfaces */
  --accent-soft: #e4e3fb;
  --grad: linear-gradient(135deg, #6f6cf2 0%, #9b6cf2 55%, #bd6af2 100%);
  --shadow: 0 10px 30px rgba(60, 50, 140, .12);
  --radius: 24px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e1f; --surface: #1a1a33; --ink: #f2f2fa; --muted: #a9a9c4;
    --line: rgba(255, 255, 255, .12); --accent: #8b89ff; --accent-ink: #aeacff;
    --accent-soft: #2a2a52; --shadow: 0 10px 30px rgba(0, 0, 0, .4);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
section { padding: clamp(56px, 9vw, 112px) 0; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40ch; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(16px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 550; }
.nav a:hover { color: var(--accent-ink); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang button { font: 600 .8rem var(--font); border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; color: var(--ink); cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 650 1rem var(--font); padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(88, 86, 235, .35); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn[aria-disabled="true"] { opacity: .75; cursor: default; transform: none; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); padding: 4px 10px; border-radius: 999px; margin-left: 4px; }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 88px); overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 720px; height: 720px; right: -200px; top: -240px; background: var(--grad); opacity: .16; border-radius: 50%; filter: blur(60px); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero .lead { margin-bottom: 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 16px; font-size: .9rem; color: var(--muted); }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.phone { border-radius: 38px; border: 8px solid #14142b; box-shadow: var(--shadow); overflow: hidden; background: #14142b; }
.phone img { width: 100%; }
.hero .phone { max-width: 340px; margin-inline: auto; transform: rotate(2deg); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(2deg) translateY(-10px); } }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero .phone { max-width: 280px; } }

/* Highlights */
.highlights { padding: 0; }
.hl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hl { background: var(--surface); border-radius: 20px; padding: 22px; border: 1px solid var(--line); }
.hl strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.hl span { color: var(--muted); font-size: .93rem; }
@media (max-width: 900px) { .hl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .hl-grid { grid-template-columns: 1fr; } }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.card .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; margin-bottom: 18px; color: #fff; }
.card .ico svg { width: 24px; height: 24px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.rev > :first-child { order: 2; }
.split .phone { max-width: 320px; margin-inline: auto; }
.tint { background: var(--surface); border-block: 1px solid var(--line); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.ticks li { padding-left: 32px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); }
.ticks li::after { content: ""; position: absolute; left: 7px; top: calc(.35em + 4px); width: 5px; height: 9px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair .phone { border-width: 6px; border-radius: 28px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }

/* Gallery */
.gallery { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 20px 24px; margin-inline: calc((100vw - min(100vw - 40px, var(--max))) / -2); scrollbar-width: thin; }
.gallery figure { margin: 0; flex: 0 0 240px; scroll-snap-align: center; }
.gallery .phone { border-width: 6px; border-radius: 28px; }
.gallery figcaption { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 12px; }

/* Privacy teaser, FAQ, CTA */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 22px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 650; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--accent-ink); line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); }
.final { text-align: center; background: var(--grad); color: #fff; border-radius: 36px; padding: clamp(40px, 7vw, 80px) 24px; }
.final h2 { color: #fff; }
.final p { opacity: .92; max-width: 46ch; margin-inline: auto; }
.final .btn-primary { background: #fff; color: #3b39c4; box-shadow: none; }
.final .cta { justify-content: center; margin-top: 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: .92rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* Legal / support pages */
.doc { padding: 48px 0 96px; max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2em; }
.doc li { margin-bottom: .4em; }
.draft { background: #fff4d6; color: #5c4400; border: 1px solid #e8c766; border-radius: 14px; padding: 16px 20px; margin: 20px 0 32px; font-size: .95rem; }
.todo { background: #fff4d6; color: #5c4400; padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.meta { color: var(--muted); font-size: .95rem; }

/* Language blocks (long-form pages) */
html[lang="en"] [lang="pl"]:not(html) { display: none !important; }
html[lang="pl"] [lang="en"]:not(html) { display: none !important; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .phone { animation: none; }
}

/* Editor steps (tabs) */
.step-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 28px; scrollbar-width: thin; }
.step-tabs button { flex: 0 0 auto; font: 650 .95rem var(--font); padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; white-space: nowrap; }
.step-tabs button:hover { border-color: var(--accent); }
.step-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.step-panel[hidden] { display: none; }
.step-panel .lead { margin-bottom: 0; }
.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; scrollbar-width: thin; }
.shots .phone { flex: 0 0 min(230px, 62%); scroll-snap-align: start; border-width: 6px; border-radius: 28px; }
.step-panel .shots { justify-content: flex-start; }
@media (max-width: 820px) { .step-panel { grid-template-columns: 1fr; } }

/* Widget flow */
.widget-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.wf { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.wf p { color: var(--muted); font-size: .96rem; }
.wf .num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 12px; }
.wf .shots .phone { flex-basis: min(180px, 58%); }
@media (max-width: 980px) { .widget-flow { grid-template-columns: 1fr; } }
