/* Keeply website */
:root {
  --brand: #e3572e;
  --brand-ink: #c2441f;
  --brand-soft: #fdebe4;
  --cream: #fff6ea;
  --bg: #fffaf4;
  --bg-alt: #fff1e4;
  --surface: #ffffff;
  --text: #1d1a17;
  --muted: #6b625a;
  --border: #eadfd3;
  --shadow: 0 18px 50px -20px rgba(80, 40, 10, .35);
  --radius: 22px;
  --maxw: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #f06a40; --brand-ink: #ff8a63; --brand-soft: #3a2119;
    --bg: #141110; --bg-alt: #1c1816; --surface: #221d1a; --text: #f6efe8; --muted: #b3a89e;
    --border: #3a322d; --shadow: 0 18px 50px -20px rgba(0, 0, 0, .8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #f06a40; --brand-ink: #ff8a63; --brand-soft: #3a2119;
  --bg: #141110; --bg-alt: #1c1816; --surface: #221d1a; --text: #f6efe8; --muted: #b3a89e;
  --border: #3a322d; --shadow: 0 18px 50px -20px rgba(0, 0, 0, .8); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.controls { display: flex; align-items: center; gap: 8px; }
.lang {
  position: relative; display: flex; align-items: center;
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; height: 40px; padding: 0 10px 0 34px;
}
.lang svg { position: absolute; left: 11px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.lang select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: .92rem; font-weight: 600; height: 100%; padding-right: 16px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 4px center, right 0 center; background-size: 4px 4px; background-repeat: no-repeat;
}
.lang select:focus { outline: none; }
.lang:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
:root[data-effective-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-effective-theme="dark"] .theme-toggle .moon { display: none; }

/* Hero */
.hero { overflow: hidden; padding: 64px 0 40px; background: radial-gradient(1200px 500px at 85% -10%, var(--brand-soft), transparent 60%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-ink); font-weight: 700; font-size: .92rem; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; align-items: center; }
.badge { display: inline-flex; border-radius: 10px; }
.badge img { height: 48px; width: auto; }
.badge-fallback { display: inline-flex; align-items: center; height: 48px; padding: 0 18px; border-radius: 10px; background: #000; color: #fff; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid #a6a6a6; }
.note { color: var(--muted); font-size: .92rem; }
.hero-shot { position: relative; justify-self: center; width: min(320px, 78vw); }
.hero-shot::before { content: ""; position: absolute; inset: 8% -18% 4%; background: var(--brand); opacity: .14; filter: blur(50px); border-radius: 50%; }

/* Device frames (iPhone 17 Pro / iPad Pro style, drawn in CSS) */
.phone {
  position: relative; isolation: isolate; padding: 3.4%; border-radius: 16.5% / 7.7%;
  background: #050505;
  box-shadow:
    0 0 0 1.5px #3b3a38,
    0 0 0 4px #9d9a95,
    0 0 0 5px #5d5b58,
    var(--shadow);
}
.phone .screen { position: relative; border-radius: 13.4% / 6.2%; overflow: hidden; background: #000; }
.phone .screen img { width: 100%; }
.phone .screen::after { /* Dynamic Island */
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  top: 1.25%; width: 30.5%; height: 4.1%; border-radius: 999px; background: #000;
  box-shadow: inset 0 0 0 1px #0d0d0d;
}
.phone .screen::before { /* glass sheen */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 28%);
}
.hw { position: absolute; background: linear-gradient(90deg, #6f6c68, #b7b3ad 50%, #6f6c68); border-radius: 3px; z-index: -1; }
.phone .hw { width: 2.2%; }
.phone .hw-action  { left: -3.3%; top: 17.5%; height: 4.6%; }
.phone .hw-volup   { left: -3.3%; top: 25%;   height: 8%; }
.phone .hw-voldown { left: -3.3%; top: 35%;   height: 8%; }
.phone .hw-power   { right: -3.3%; top: 27%;  height: 12%; }
.phone .hw-camctl  { right: -3.1%; top: 55%;  height: 6.5%; width: 1.8%; background: linear-gradient(90deg, #4c4a47, #8e8a84); }

.tablet {
  position: relative; isolation: isolate; padding: 2.6%; border-radius: 5.2% / 3.9%; background: #050505;
  box-shadow: 0 0 0 1.5px #3b3a38, 0 0 0 4px #a7a39d, 0 0 0 5px #5d5b58, var(--shadow);
}
.tablet .screen { position: relative; border-radius: 2.8% / 2.1%; overflow: hidden; background: #000; }
.tablet .screen img { width: 100%; }
.tablet .cam { position: absolute; right: 1.05%; top: 50%; width: 1%; aspect-ratio: 1; border-radius: 50%; transform: translateY(-50%); background: radial-gradient(circle at 40% 40%, #2b3a55, #0a0a0c 65%); }
.tablet .hw-top { top: -1.2%; right: 10%; width: 9%; height: .9%; }

/* Sections */
section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.icon { width: 46px; height: 46px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; }

.gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 20px 34px;
  margin: 0 auto; max-width: calc(var(--maxw) + 40px); scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.gallery figure { flex: 0 0 min(240px, 62vw); margin: 0; scroll-snap-align: center; padding: 0 8px; }
.gallery figcaption { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 14px; font-weight: 600; }

.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }

.privacy-card { background: var(--text); color: var(--bg); border-radius: 28px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.privacy-card p { color: color-mix(in srgb, var(--bg) 75%, transparent); font-size: 1.08rem; margin: 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: center; font-weight: 600; background: color-mix(in srgb, var(--bg) 8%, transparent); border-radius: 14px; padding: 12px 16px; }
.checks svg { flex: none; width: 22px; height: 22px; color: var(--brand); }

.price { text-align: center; max-width: 760px; margin: 0 auto; }
.price p { color: var(--muted); font-size: 1.08rem; }

.cta { text-align: center; }
.cta img.app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.cta .badges { justify-content: center; }
.cta p { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 44px; font-size: .9rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; }
.footer-links a { color: var(--text); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--brand-ink); text-decoration: underline; }
.site-footer .legal { font-size: .8rem; max-width: 760px; }

/* Subpages */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.3rem; margin-top: 2em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .6em; }
.doc .muted { color: var(--muted); }
.back { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; text-decoration: none; margin-bottom: 24px; }
.todo { background: #fff3a8; color: #3b3200; border-radius: 4px; padding: 0 4px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 20px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; padding: 18px 28px 18px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--brand); font-weight: 500; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 6px; }

/* Responsive */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .split, .privacy-card { grid-template-columns: 1fr; }
  .split .tablet { order: -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 24px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .badges { justify-content: center; }
  .features { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .wrap { padding: 0 16px; }
  .brand span { font-size: 1.1rem; }
  .badge img, .badge-fallback { height: 44px; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
