/* Lapso site.
   Layout: full-bleed bands, each painted in one of the app's five wallpaper palettes, the way the
   wallpaper rotates; content is left-aligned on one grid; one family (Bricolage Grotesque), condensed
   for display, normal width for reading. The bands keep their palette in both system themes. */

/* Self-hosted so visitors' browsers never contact Google. Bricolage Grotesque, SIL OFL 1.1
   (fonts/OFL.txt); variable latin subset from Google Fonts v9. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("../fonts/bricolagegrotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;

  /* OLED palette, also the page default */
  --bg: #000000;
  --ink: #F2F2F2;
  --sub: #A9A9AE;
  --past: #F2F2F2;
  --now: #FF7A45;
  --future: #2B2B2B;
  --line: #262628;
  --raise: #121213;

  --frame: #1C1C1E;
  --frame-edge: #3A3A3C;
  --clock: #F2F2F2;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.95rem, 1.25rem + 2.6vw, 3.25rem);
  --step-3: clamp(2.6rem, 1.2rem + 5.4vw, 5.6rem);

  --gutter: clamp(16px, 4.5vw, 56px);
  --band-pad: clamp(3.5rem, 8vw, 7rem);
}

[data-band="oled"] {
  --bg: #000000; --ink: #F2F2F2; --sub: #A9A9AE; --past: #F2F2F2; --now: #FF7A45;
  --future: #2B2B2B; --line: #262628; --raise: #121213;
  color-scheme: dark;
}
[data-band="clara"] {
  --bg: #F6F4EF; --ink: #222222; --sub: #5A5650; --past: #222222; --now: #D9480F;
  --future: #D9D5CC; --line: #DDD8CE; --raise: #FFFFFF;
  color-scheme: light;
}
[data-band="bosque"] {
  --bg: #0C1511; --ink: #E4F1E7; --sub: #9FB8A6; --past: #8FC79A; --now: #F2C14E;
  --future: #1F2E26; --line: #22352B; --raise: #12201A;
  color-scheme: dark;
}
[data-band="oceano"] {
  --bg: #0A1220; --ink: #E5EEF9; --sub: #9BB0CC; --past: #7FB2E5; --now: #F4A261;
  --future: #1C2840; --line: #1F2D46; --raise: #101B2D;
  color-scheme: dark;
}
[data-band="arena"] {
  --bg: #1A1612; --ink: #F3E7D3; --sub: #B8A58A; --past: #E8D5B5; --now: #E76F51;
  --future: #332B23; --line: #352D25; --raise: #221D18;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ul, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--now);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Bands and grid ---------- */

.band {
  background: var(--bg);
  color: var(--ink);
  transition: background-color 0.45s ease, color 0.45s ease;
}

.wrap {
  max-width: 76rem;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.band > .wrap { padding-block: var(--band-pad); }

.band-label {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  font-size: 0.8125rem;
  color: var(--sub);
}
.band-label::before {
  content: "";
  width: 0.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--now);
}

.section-title {
  font-size: var(--step-2);
  font-weight: 700;
  font-stretch: 78%;
  line-height: 1;
  letter-spacing: -0.012em;
}

.lead {
  max-width: 34em;
  color: var(--sub);
}
.lead + .lead { margin-top: 1rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.split > * { min-width: 0; }

.stack { display: grid; gap: 1.25rem; align-content: start; }

/* ---------- Brand ---------- */

.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}

.today-dot {
  display: inline-block;
  width: 0.3em;
  height: 0.3em;
  margin-left: 0.07em;
  border-radius: 50%;
  background: var(--now);
}

/* ---------- Header ---------- */

.band > .wrap.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-left: auto;
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--sub);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }

.lang-toggle {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--sub); }

/* ---------- Hero ---------- */

.hero > .wrap.hero-body { padding-block: clamp(1.5rem, 5vw, 4rem) var(--band-pad); }

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.hero-body > * { min-width: 0; }

.hero-title {
  font-size: var(--step-3);
  font-weight: 700;
  font-stretch: 75%;
  line-height: 0.96;
  letter-spacing: -0.018em;
  max-width: 17ch;
}

.hero-lead {
  margin-top: 1.75rem;
  max-width: 31em;
  font-size: 1.1875rem;
  color: var(--sub);
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2.25rem;
  padding: 0.85rem 1.35rem;
  border: 1.5px dashed var(--sub);
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink);
}
.store-pill::before {
  content: "";
  width: 0.6rem;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.today-line {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  max-width: 31em;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
}

.hero-device {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
}

.mode-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--sub);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}
.mode-switch button::before {
  content: "";
  width: 0.45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.mode-switch button[aria-pressed="true"] { color: var(--ink); background: var(--raise); }
.mode-switch button[aria-pressed="true"]::before { background: var(--now); box-shadow: none; }

/* ---------- Phone ---------- */

.phone {
  width: 100%;
  max-width: var(--phone-w, 20rem);
  aspect-ratio: 1272 / 2772;
  padding: 2.4%;
  border-radius: 14% / 6.4%;
  background: var(--frame);
  box-shadow: inset 0 0 0 1px var(--frame-edge);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 11.8% / 5.4%;
  background: #000000;
  container-type: inline-size;
}
.phone-screen[data-palette="clara"] { --clock: #222222; }
.phone-screen[data-palette="bosque"] { --clock: #E4F1E7; }
.phone-screen[data-palette="oceano"] { --clock: #E5EEF9; }
.phone-screen[data-palette="arena"] { --clock: #F3E7D3; }

.phone-screen::before {
  content: "";
  position: absolute;
  top: 2.4%;
  left: 50%;
  z-index: 2;
  width: 5.2cqw;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #000000;
  box-shadow: 0 0 0 0.7cqw #161618;
}

.phone-screen canvas {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

.clock {
  position: absolute;
  inset: 9% 0 auto;
  z-index: 1;
  text-align: center;
  color: var(--clock);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.clock-date {
  display: block;
  font-size: 4.8cqw;
  font-weight: 500;
  opacity: 0.85;
}
.clock-time {
  display: block;
  font-size: 22cqw;
  font-weight: 300;
  font-stretch: 75%;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
}

.phone-screen.is-off canvas,
.phone-screen.is-off .clock { opacity: 0; }

/* ---------- Year ---------- */

.year-layout {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.year-layout > * { min-width: 0; }

.year-count {
  font-size: var(--step-1);
  font-weight: 600;
  font-stretch: 85%;
  font-variant-numeric: tabular-nums;
}

.year-grid {
  display: grid;
  gap: clamp(4px, 0.55vw, 8px);
}
.year-row {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
}
.year-month {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sub);
}
.year-dots {
  display: grid;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  gap: clamp(2px, 0.4vw, 6px);
}
.year-dots i {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--future);
}
.year-dots i.is-past { background: var(--past); }
.year-dots i.is-today {
  background: var(--now);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--now) 28%, transparent);
}

/* ---------- Modes ---------- */

.modes-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 0;
  list-style: none;
}
.mode {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  min-width: 0;
}
.mode .phone { --phone-w: 15rem; }
.mode h3 {
  font-size: var(--step-1);
  font-weight: 700;
  font-stretch: 80%;
  line-height: 1.1;
}
.mode p { margin-top: 0.4rem; color: var(--sub); max-width: 26em; }

/* ---------- Tracking ---------- */

.track-demo {
  display: grid;
  gap: 1.75rem;
  max-width: 25rem;
}

.notif {
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--raise);
}
.notif-app {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--sub);
}
.notif-app b { color: var(--ink); font-weight: 600; }
.app-icon {
  display: grid;
  grid-template-columns: repeat(3, 0.24rem);
  gap: 0.12rem;
  padding: 0.22rem;
  border-radius: 0.35rem;
  background: #000000;
}
.app-icon i {
  width: 0.24rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #F2F2F2;
}
.app-icon i:last-child { background: #FF7A45; }
.notif-title { margin-top: 0.55rem; font-weight: 600; }
.notif-body { color: var(--sub); }
.notif-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.95rem;
}
.notif-actions button {
  font: inherit;
  font-weight: 600;
  min-width: 4.5rem;
  padding: 0.5rem 1.1rem;
  color: var(--past);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.notif-actions button:hover { border-color: var(--past); }
.notif-actions button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--past);
  border-color: var(--past);
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.4rem;
}
.track-grid span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-family: var(--emoji);
  font-size: clamp(0.95rem, 3.4vw, 1.3rem);
  line-height: 1;
}
.track-grid span::before {
  content: "";
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--future);
}
.track-grid span.is-ring::before { background: transparent; box-shadow: inset 0 0 0 2px var(--past); }
.track-grid span.is-today::before { background: var(--now); }
.track-grid span.is-met::before { display: none; }

.track-stats {
  display: flex;
  gap: 2.5rem;
}
.track-stats dt { font-size: var(--step--1); color: var(--sub); }
.track-stats dd {
  font-size: var(--step-2);
  font-weight: 600;
  font-stretch: 75%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.track-status { min-height: 3.2em; color: var(--sub); }

/* ---------- Goals ---------- */

.goals-head { display: grid; gap: 1.25rem; max-width: 40rem; }

.list-note {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 0.75rem;
  font-size: var(--step--1);
  color: var(--sub);
}

.goal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.goal-list li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, 15rem) minmax(0, 8.5rem);
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
}
.goal-emoji { font-family: var(--emoji); font-size: 1.5rem; line-height: 1; }
.goal-name { font-weight: 600; }
.goal-kind { display: block; font-size: var(--step--1); color: var(--sub); }
.goal-left {
  text-align: right;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
}
.meter {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 3px;
}
.meter i {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--future);
}
.meter i.is-past { background: var(--past); }
.meter i.is-now { background: var(--now); }

/* ---------- Customize ---------- */

.custom-form { display: grid; gap: 1.75rem; margin-top: 0.75rem; }
.custom-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  --ring: var(--ink);
}
.custom-form legend {
  margin-bottom: 0.75rem;
  padding: 0;
  font-weight: 600;
}
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem 0.5rem 0.6rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9375rem;
  cursor: pointer;
}
.options input:checked + .chip { box-shadow: 0 0 0 2px var(--ring); border-color: transparent; }
.options input:focus-visible + .chip { outline: 2px solid var(--ring); outline-offset: 4px; }

.swatch { display: inline-flex; gap: 0.18rem; }
.swatch i {
  width: 0.55rem;
  aspect-ratio: 1;
  border-radius: 50%;
}
.swatch i:nth-child(1) { background: var(--past); }
.swatch i:nth-child(2) { background: var(--now); }
.swatch i:nth-child(3) { background: var(--future); box-shadow: inset 0 0 0 1px var(--line); }

.shape-icon {
  width: 0.8rem;
  aspect-ratio: 1;
  background: var(--ink);
  border-radius: 50%;
}
.shape-icon.is-square { border-radius: 28%; }

.custom-device { display: grid; justify-items: center; }

/* ---------- Privacy ---------- */

.privacy-title {
  font-size: var(--step-3);
  font-weight: 700;
  font-stretch: 75%;
  line-height: 0.98;
  letter-spacing: -0.018em;
}
.privacy-title span { display: block; }
.privacy-lead { margin-top: 1.75rem; }

.perms-title {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
  font-size: var(--step-1);
  font-weight: 700;
  font-stretch: 80%;
}
.perms > div {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 0.25rem 2rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}
.perms > div:last-child { border-bottom: 1px solid var(--line); }
.perms dt { font-weight: 600; }
.perms dd { color: var(--sub); }

.text-link {
  display: inline-block;
  margin-top: 1.75rem;
  font-weight: 600;
  text-decoration-color: var(--now);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

/* ---------- FAQ ---------- */

/* Follows the privacy band in the same palette, so it does not need a second top margin. */
#preguntas > .wrap { padding-top: 0; }

.faq-list { margin-top: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.15rem;
  font-size: var(--step-1);
  font-weight: 600;
  font-stretch: 88%;
  list-style: none;
  cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  flex: none;
  width: 0.8rem;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--sub);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-list details[open] summary::after { background: var(--now); box-shadow: none; }
.faq-list details p {
  max-width: 40em;
  padding-bottom: 1.35rem;
  color: var(--sub);
}

/* ---------- Footer ---------- */

.site-footer > .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--sub);
}
.site-footer .wordmark { color: var(--ink); font-size: 1.25rem; }
.footer-links { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.footer-links a { color: var(--sub); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Privacy policy page ---------- */

.policy > .wrap { max-width: 46rem; }
.policy h1 {
  font-size: var(--step-2);
  font-weight: 700;
  font-stretch: 78%;
  line-height: 1.02;
}
.policy .updated { margin-top: 0.75rem; font-size: var(--step--1); color: var(--sub); }
.policy .intro { margin-top: 1.75rem; font-size: 1.1875rem; }
.policy h2 {
  margin-top: 2.5rem;
  font-size: var(--step-1);
  font-weight: 700;
  font-stretch: 85%;
}
.policy p, .policy ul { margin-top: 0.75rem; color: var(--sub); }
.policy ul { padding-left: 1.25rem; }
.policy li + li { margin-top: 0.4rem; }
.policy li::marker { color: var(--now); }

/* ---------- Narrow screens ---------- */

@media (max-width: 880px) {
  .hero-body,
  .split,
  .year-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-device { justify-items: start; }
  .hero-device .phone { --phone-w: 17rem; }
  .custom-device { justify-items: start; }
  .custom-device .phone { --phone-w: 15rem; }
}

@media (max-width: 720px) {
  .site-nav a { display: none; }
  .modes-list { grid-template-columns: minmax(0, 1fr); }
  .mode {
    grid-template-columns: 6.75rem minmax(0, 1fr);
    gap: 1.25rem;
  }
  .mode .phone { --phone-w: 6.75rem; }
  .goal-list li { grid-template-columns: 2rem minmax(0, 1fr) auto; }
  .goal-list .meter { grid-column: 2 / -1; grid-row: 2; }
  .perms > div { grid-template-columns: minmax(0, 1fr); }
  .footer-links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
