/* Kloqlee — the site under the app's sky. The sky is painted by sky.js; until
   it runs (or without it) the page shows the dawn the app is named for. */

:root {
  --amber: #FFB24D;
  --on-amber: #1B1300;
  --stars: 0.08;
  --ink: #F3F5FB;
  --ink2: rgb(226 232 250 / 0.76);
  --accent-ink: #FFC774;
  --glass: rgb(14 18 46 / 0.34);
  --glass-line: rgb(255 255 255 / 0.16);
  --glass-hi: rgb(255 255 255 / 0.10);
  --shadow: 0 24px 60px -24px rgb(4 6 20 / 0.55);
  color-scheme: dark;
}
:root[data-sky="light"] {
  --ink: #0D1B2E;
  --ink2: rgb(34 50 74 / 0.86);
  --accent-ink: #A84F00;
  --glass: rgb(255 255 255 / 0.42);
  --glass-line: rgb(255 255 255 / 0.66);
  --glass-hi: rgb(255 255 255 / 0.55);
  --shadow: 0 24px 60px -28px rgb(20 40 80 / 0.35);
  color-scheme: light;
}

/* On a dark sky the horizon can still be bright — dawn, dusk — so text
   carries a soft shade of night with it, as iOS does over a wallpaper. */
:root[data-sky="dark"] h1, :root[data-sky="dark"] h2, :root[data-sky="dark"] .text > p,
:root[data-sky="dark"] .eyebrow, :root[data-sky="dark"] .lede, :root[data-sky="dark"] .note {
  text-shadow: 0 1px 2px rgb(8 10 30 / .35), 0 2px 18px rgb(8 10 30 / .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #22306A;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Eased only once the first sky is up, so a page never loads mid-fade. */
.sky-ready body { transition: color .6s ease; }

/* The sky: fixed behind everything, so the page moves over it. */
.sky {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, #22306A, #4A4D8D 33.3%, #D9847C 66.7%, #FFD7A6);
}
.sky .stars { position: absolute; inset: 0; opacity: var(--stars); }
.sky-ready .sky { transition: background .6s ease; }
.sky-ready .sky .stars { transition: opacity .6s ease; }
.sky .stars i { position: absolute; border-radius: 50%; background: #fff; }
.sky .grain {
  position: absolute; inset: -50%; opacity: .07; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { width: min(1100px, 100% - 40px); margin: 0 auto; }

/* Glass, as the app draws it: a frosted pane with a lit edge. */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
}

/* Bar */
.bar { position: sticky; top: 12px; z-index: 10; margin-top: 12px; }
.bar nav {
  display: flex; align-items: center; gap: 18px;
  padding: 8px 10px 8px 8px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; }
.bar .links { margin-left: auto; display: flex; gap: 4px; }
.bar .links a { color: var(--ink); text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 999px; }
.bar .links a:hover { background: var(--glass-hi); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 72px 0 40px; }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); margin: 0 0 14px; }
h1 { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; margin: 0 0 22px; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink2); margin: 0 0 30px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px;
  background: var(--amber); color: var(--on-amber); font-weight: 650; text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 10px 30px -10px rgb(255 160 60 / .7);
}
.store svg { width: 20px; height: 20px; }
.note { color: var(--ink2); font-size: 15px; }

/* The sky through the day */
.scrub { margin-top: 34px; padding: 18px 20px; border-radius: 26px; max-width: 30rem; }
.scrub p { margin: 0 0 10px; color: var(--ink2); font-size: 15px; }
.scrub .row { display: flex; align-items: center; gap: 14px; }
.scrub output { font-size: 34px; font-weight: 200; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scrub input[type=range] { flex: 1; min-width: 0; accent-color: var(--amber); height: 28px; }
.scrub button {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--glass-hi); border: 1px solid var(--glass-line);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}

/* Phones */
.phone {
  position: relative; width: 276px; max-width: 100%; aspect-ratio: 1206 / 2622;
  border-radius: 46px; padding: 9px; background: #0b0c12;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .14), 0 40px 80px -24px rgb(0 0 0 / .55);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 38px; }
.phone .swap { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); }
.sky-ready .phone .swap { transition: opacity .6s ease; }
:root[data-sky="light"] .phone .night, :root[data-sky="dark"] .phone .day { opacity: 0; }
.hero .phone { justify-self: center; width: 300px; transform: rotate(2deg); }

/* Sections */
section { padding: 56px 0; scroll-margin-top: 72px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature.flip .text { order: 2; }
.feature .shots { display: flex; justify-content: center; gap: 22px; }
.feature .shots .phone:nth-child(2) { margin-top: 48px; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 18px; }
.text > p { color: var(--ink2); font-size: 18px; margin: 0 0 16px; max-width: 32em; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: 15px; font-weight: 550; }
.chips svg { width: 18px; height: 18px; flex: none; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.cards div { padding: 22px; border-radius: 26px; }
.cards strong { display: block; font-size: 18px; margin-bottom: 6px; letter-spacing: -.01em; }
.cards span { color: var(--ink2); font-size: 16px; }

.panel { padding: 40px; border-radius: 34px; }
.panel h2 { margin-bottom: 10px; }
.panel > p { color: var(--ink2); font-size: 18px; margin: 0; max-width: 40em; }

footer { padding: 40px 0 56px; color: var(--ink2); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
footer a { color: var(--ink2); }

/* Documents: the privacy policy and the terms, on one readable pane. */
.doc { padding: 48px 0 24px; }
.doc article { padding: clamp(24px, 5vw, 56px); border-radius: 34px; max-width: 48rem; margin: 0 auto; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc h2 { font-size: 22px; letter-spacing: -.01em; margin: 34px 0 8px; color: var(--accent-ink); }
.doc .updated { color: var(--ink2); margin: 0 0 26px; font-size: 15px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: .5rem 0; }
.doc code { background: var(--glass-hi); padding: .1em .35em; border-radius: .3em; font-size: .92em; }

@media (max-width: 860px) {
  .hero, .feature { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero { padding-top: 40px; }
  .hero .phone { width: 250px; transform: none; }
  .feature.flip .text { order: 0; }
  .feature .shots .phone { width: 220px; }
  .cards { grid-template-columns: 1fr; }
  .bar .links a:not(.keep) { display: none; }
  .panel { padding: 26px; }
  .scrub output { font-size: 28px; }
}
@media (max-width: 480px) {
  .feature .shots { gap: 12px; }
  .feature .shots .phone { width: calc(50% - 6px); border-radius: 30px; padding: 6px; }
  .feature .shots .phone img { border-radius: 25px; }
  .feature .shots .phone:only-child { width: 240px; border-radius: 40px; padding: 9px; }
  .feature .shots .phone:only-child img { border-radius: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky-ready .sky, .sky-ready .sky .stars, .sky-ready body, .sky-ready .phone .swap { transition: none; }
}
