/* Kepiq site. Glass photo lenses on paper, one vermilion petal. No external fonts, no inline styles (CSP). */

:root {
  color-scheme: light dark;
  --paper: #f6f4ef;
  --paper-2: #edeae3;
  --card: #fffefb;
  --ink: #0b0b0c;
  --ink-2: #3b3b3e;
  --ink-3: #5f5f63;
  --line: rgba(11, 11, 12, 0.12);
  --accent: #ff4d1a;
  --accent-text: #c2360b;
  --band: #0b0b0c;
  --band-ink: #f3f1ec;
  --band-ink-2: #b9b7b2;
  --frame: #161618;
  --frame-edge: #c9c8cc;
  --shadow: 0 40px 80px -30px rgba(40, 30, 20, 0.35), 0 12px 24px -12px rgba(40, 30, 20, 0.18);
  --glass: rgba(246, 244, 239, 0.72);
  --radius: 22px;
  --wrap: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: -apple-system-headline, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #080808;
    --paper-2: #121212;
    --card: #151515;
    --ink: #f3f1ec;
    --ink-2: #cfcdc8;
    --ink-3: #a3a19c;
    --line: rgba(243, 241, 236, 0.14);
    --accent-text: #ff7448;
    --band: #141414;
    --band-ink: #f3f1ec;
    --band-ink-2: #b9b7b2;
    --frame: #050505;
    --frame-edge: #4a4a4e;
    --shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --glass: rgba(8, 8, 8, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.022em; margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.mark { width: 26px; height: 26px; color: var(--ink); flex: none; }
.mark .petal-accent { fill: var(--accent); }
.mark .petal-ink { fill: currentColor; }
.top nav { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.top nav a { text-decoration: none; padding: 8px 10px; border-radius: 999px; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); background: var(--line); }
.top nav .lang { border: 1px solid var(--line); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; padding: 6px 11px; margin-left: 4px; }
@media (max-width: 560px) { .top nav .opt-wide { display: none; } }

/* App Store button */
.store { display: inline-flex; flex-direction: column; justify-content: center; min-width: 180px; height: 60px; padding: 0 26px; border-radius: 14px; background: var(--ink); color: var(--paper); text-decoration: none; line-height: 1.1; margin: 0; }
.store:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.store-small { font-size: 12px; letter-spacing: 0.01em; opacity: 0.86; }
.store-big { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.store-soon { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.store-soon .store-small { opacity: 1; color: var(--ink-2); }
/* After release: Apple's official badge (src/badges/) or, without it, the site's own plain link. */
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.store-badge img { height: 56px; width: auto; }
.store-link { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 28px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; }
.store-link::after { content: "\2192"; color: var(--accent); }
.store-link:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }

/* Hero */
.hero { position: relative; overflow-x: clip; padding: 64px 0 72px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: 40px; }
.hero h1 { display: flex; flex-direction: column; gap: 14px; }
.h1-name { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(50px, 6.6vw, 80px); letter-spacing: -0.045em; line-height: 0.95; }
.h1-name .mark { width: 0.78em; height: 0.78em; }
.h1-line { font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -0.03em; line-height: 1.04; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 34em; margin: 26px 0 30px; }
.fine { text-wrap: balance; font-size: 14px; color: var(--ink-3); margin: 16px 0 0; }
.nw { white-space: nowrap; }
.hero-art { position: relative; height: 680px; }
/* The iPad sits on the left so its month titles and places stay visible; the iPhone overlaps only photo area. */
.hero-ipad { position: absolute; left: 0; top: 0; --dw: 470px; }
.hero-phone { position: absolute; right: 0; bottom: 0; --pw: 244px; z-index: 3; }

/* Device frames, drawn in CSS around the real App Store screenshots */
.dev-phone, .dev-ipad { margin: 0; background: linear-gradient(160deg, #3a3a3e, var(--frame) 30%, var(--frame)); box-shadow: 0 0 0 1px var(--frame-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow); }
.dev-phone { width: var(--pw, 280px); padding: calc(var(--pw, 280px) * 0.034); border-radius: calc(var(--pw, 280px) * 0.17); }
.dev-phone img { display: block; width: 100%; border-radius: calc(var(--pw, 280px) * 0.138); background: #fff; }
.dev-ipad { width: var(--dw, 520px); padding: calc(var(--dw, 520px) * 0.028); border-radius: calc(var(--dw, 520px) * 0.058); }
.dev-ipad img { display: block; width: 100%; border-radius: calc(var(--dw, 520px) * 0.034); background: #fff; }
.dev-phone picture, .dev-ipad picture { display: block; }

/* Glass lenses: CC0 photos refracted through a glass sphere, pre-rendered with alpha by tools/imgtool.swift */
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble { position: absolute; width: var(--bs, 110px); aspect-ratio: 1; filter: drop-shadow(0 18px 18px rgba(30, 20, 10, 0.28)); animation: drift 14s ease-in-out infinite alternate; }
.bubble picture, .bubble img { display: block; width: 100%; height: 100%; }
.bubble.b1 { --bs: 116px; right: 0; top: -2%; }
.bubble.b2 { --bs: 84px; left: -11%; top: 64%; z-index: 4; animation-delay: -3s; }
.bubble.b3 { --bs: 60px; left: 49%; bottom: -3%; z-index: 4; animation-delay: -6s; }
.bubble.b4 { --bs: 66px; right: -5%; top: 54%; z-index: 4; animation-delay: -9s; }
.bubble.b5 { --bs: 50px; left: -4%; top: -3%; z-index: 4; animation-delay: -2s; }
.cta { position: relative; overflow-x: clip; }
.cta .bubbles { max-width: 1100px; margin: 0 auto; }
.cta .bubble.b1 { --bs: 110px; left: 3%; top: 6%; }
.cta .bubble.b2 { --bs: 74px; right: 9%; top: 12%; bottom: auto; left: auto; }
.cta .bubble.b3 { --bs: 58px; left: 16%; bottom: 12%; top: auto; }
.cta .bubble.b4 { --bs: 92px; right: 4%; bottom: 10%; top: auto; left: auto; }
.cta .wrap { position: relative; z-index: 2; }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(8px, -14px, 0); } }
@media (prefers-reduced-motion: reduce) { .bubble, .pl { animation: none; } html { scroll-behavior: auto; } }
/* Light-mode app captures glare on the dark page: dim them a little in dark mode only. */
@media (prefers-color-scheme: dark) { .dev-phone img, .dev-ipad img, .screen-card img { filter: brightness(0.9); } }

/* Statement */
.intro { padding: 72px 0 40px; }
.statement { text-wrap: pretty; font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 42px); line-height: 1.18; letter-spacing: -0.025em; font-weight: 600; max-width: 26em; margin: 0; color: var(--ink-3); }
.statement strong { color: var(--ink); font-weight: 600; }

/* Features */
.feature { padding: 64px 0; }
.feature-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 56px; }
.feature.flip .feature-copy { order: 2; }
.feature-copy { max-width: 30em; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 16px; }
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50% 0 50% 50%; background: var(--accent); transform: rotate(-45deg); }
.feature h2, .section-head h2 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.035em; margin-bottom: 20px; }
.feature p { font-size: 19px; color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); }
.feature-art { display: flex; justify-content: center; align-items: center; position: relative; min-height: 560px; }
.feature-art .dev-phone { --pw: 280px; }
.pair { display: flex; gap: 22px; align-items: flex-start; }
.pair .dev-phone { --pw: 240px; }
.pair .dev-phone:last-child { margin-top: 70px; }
/* Search: the top of the screen as a card (query, results, "Show all") */
.screen-card { margin: 0; width: min(360px, 100%); border-radius: 34px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.screen-card picture, .screen-card img { display: block; width: 100%; }
.screen-card img { -webkit-mask-image: linear-gradient(180deg, #000 93%, transparent); mask-image: linear-gradient(180deg, #000 93%, transparent); }
/* People & Pets: pets as glass lenses, three of them named */
.people-art { position: relative; width: min(470px, 100%); aspect-ratio: 1; }
.pl { position: absolute; width: var(--s); filter: drop-shadow(0 20px 20px rgba(30, 20, 10, 0.26)); animation: drift 16s ease-in-out infinite alternate; }
.pl picture, .pl img { display: block; width: 100%; height: auto; }
.pl1 { --s: 44%; left: 4%; top: 10%; }
.pl2 { --s: 33%; right: 6%; top: 2%; animation-delay: -4s; }
.pl3 { --s: 36%; left: 46%; top: 46%; animation-delay: -8s; }
.pl4 { --s: 22%; left: 10%; top: 66%; animation-delay: -11s; }
.pl5 { --s: 16%; right: 2%; top: 40%; animation-delay: -6s; }
.tag { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); box-shadow: 0 0 0 1px var(--line), 0 6px 16px -8px rgba(0, 0, 0, 0.3); }
.feature-art::before { content: ""; position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 13%, transparent), transparent 66%); z-index: -1; }

/* Dark band for Private */
.band { background: var(--band); color: var(--band-ink); margin: 40px 0; border-radius: 0; overflow: hidden; }
.band .feature-copy p, .band .ticks li { color: var(--band-ink-2); }
.band .kicker { color: #ff7448; }
.band a { color: var(--band-ink); }
.band .dev-phone { box-shadow: 0 0 0 1px #4a4a4e, inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 90px -30px rgba(0, 0, 0, 0.9); }

/* Everywhere */
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head p { font-size: 19px; color: var(--ink-2); }
.everywhere { padding: 72px 0; }
.everywhere-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.everywhere .dev-ipad { --dw: 100%; width: min(540px, 100%); }
.everywhere .dev-ipad { padding: 14px; border-radius: 34px; }
.everywhere .dev-ipad img { border-radius: 20px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; }
.card h3 { font-size: 19px; letter-spacing: -0.015em; margin-bottom: 8px; }
.card p { font-size: 15.5px; color: var(--ink-2); margin: 0; }

/* Privacy */
.privacy { padding: 80px 0; background: var(--paper-2); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 30px; }
.tile { background: var(--card); border-radius: var(--radius); padding: 26px 22px; border: 1px solid var(--line); }
.tile svg { width: 34px; height: 34px; margin-bottom: 18px; color: var(--ink); }
.tile svg .acc { fill: var(--accent); }
.tile h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -0.015em; }
.tile p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.more { font-weight: 600; }
.more::after { content: " \2192"; }

/* FAQ */
.faq { padding: 80px 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--ink-2); padding-right: 40px; margin: 0 0 22px; }
.faq .more { display: inline-block; margin-top: 26px; }

/* CTA */
.cta { padding: 90px 0 100px; text-align: center; }
.cta .mark { width: 64px; height: 64px; margin-bottom: 24px; }
.cta h2 { font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.035em; margin-bottom: 30px; }
.cta .fine { margin-top: 18px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: 14.5px; color: var(--ink-3); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover, .foot a[aria-current] { color: var(--ink); text-decoration: underline; }
.foot .langs { display: flex; gap: 14px; }
.foot .legal { flex-basis: 100%; font-size: 13px; margin: 0; }

/* Documents: privacy, support, terms */
.doc { padding: 64px 0 90px; }
.doc h1 { font-size: clamp(38px, 5.4vw, 60px); letter-spacing: -0.035em; margin-bottom: 18px; }
.doc .lead { margin: 0 0 18px; }
.doc .effective { font-size: 14px; color: var(--ink-3); margin-bottom: 40px; }
.doc h2 { font-size: 27px; letter-spacing: -0.02em; margin: 52px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 19.5px; letter-spacing: -0.012em; margin: 30px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); }
.doc ul { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--accent); }
.doc .contact-card { margin-top: 48px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.doc .contact-card p { margin: 0; }

/* 404 */
.nf { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.nf .code { font-size: clamp(90px, 18vw, 180px); font-weight: 800; letter-spacing: -0.06em; line-height: 0.9; margin: 0 0 10px; }
.nf h1 { font-size: 30px; margin-bottom: 12px; }
.nf p { color: var(--ink-2); }
.nf .links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.pill { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; }
.pill.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }

/* Responsive */
@media (max-width: 1080px) {
  .hero-ipad { --dw: 400px; }
  .hero-phone { --pw: 214px; }
  .hero-art { height: 580px; }
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero { padding: 40px 0 20px; }
  .hero-in, .feature-in, .everywhere-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-copy { text-align: center; }
  .hero h1 { align-items: center; }
  .lead { margin-inline: auto; }
  .hero-art { height: 500px; max-width: 520px; width: 100%; margin: 0 auto; }
  .hero-ipad { --dw: 340px; }
  .hero-phone { --pw: 200px; }
  .feature { padding: 44px 0; }
  .feature.flip .feature-copy { order: 0; }
  .feature-art { min-height: 0; }
  .intro { padding: 40px 0 10px; }
  .everywhere .dev-ipad { margin: 0 auto; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .hero-art { height: 420px; }
  .hero-ipad { --dw: 262px; }
  .hero-phone { --pw: 172px; }
  .bubble.b1 { --bs: 72px; }
  .bubble.b2 { --bs: 66px; }
  .bubble.b4 { --bs: 52px; }
  .cta .bubble.b1 { --bs: 70px; left: -4%; }
  .cta .bubble.b4 { --bs: 64px; right: -3%; }
  .tag { font-size: 13.5px; padding: 4px 11px; bottom: -4px; }
  .screen-card { width: min(320px, 100%); border-radius: 28px; }
  .feature-art .dev-phone { --pw: 250px; }
  .pair { gap: 12px; }
  .pair .dev-phone { --pw: 158px; }
  .pair .dev-phone:last-child { margin-top: 48px; }
  .cards, .tiles { grid-template-columns: minmax(0, 1fr); }
  .feature h2, .section-head h2 { font-size: 34px; }
  .feature p, .section-head p { font-size: 17.5px; }
  .faq summary { font-size: 18px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .cta .bubble.b3, .cta .bubble.b4 { display: none; }
  .cta .bubble.b1 { top: 6%; }
  .cta .bubble.b2 { top: 4%; right: 2%; }
}
.top nav a[aria-current] { color: var(--ink); font-weight: 600; }
.nf .code { background: linear-gradient(180deg, var(--ink) 40%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
