/* Shared styles for timloup.com */
@font-face { font-family: "Jost"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("/fonts/jost-latin.woff2") format("woff2"); }

:root {
  --ink: #1d1d24;
  --muted: #5d6070;
  --accent: #5b7aa0;
  --accent-ink: #ffffff;
  --card: rgba(255, 255, 255, .62);
  --line: rgba(29, 29, 36, .12);
  --bg-top: #f6ebe9;
  --bg-bottom: #cdcee4;
  /* sampled from the screenshots' own background, top to bottom */
  --bg-gradient: linear-gradient(180deg, #f6ebe9 0%, #f2e8e9 18%, #ebe2e7 40%, #e0dae6 62%, #d4d3e3 82%, #cdcee4 100%);
  color-scheme: light dark;
  --font: "Jost", Futura, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1eff6;
    --muted: #b3b3c8;
    --accent: #93add3;
    --accent-ink: #14161d;
    --card: rgba(255, 255, 255, .08);
    --line: rgba(255, 255, 255, .15);
    --bg-top: #2b2229;
    --bg-bottom: #171a2c;
    /* the light gradient (blush pink down to periwinkle), darkened: warm plum at the top, midnight indigo at the bottom */
    --bg-gradient: linear-gradient(180deg, #2b2229 0%, #28212d 22%, #242131 48%, #1e1f32 76%, #171a2c 100%);
  }
}

* { box-sizing: border-box; }
html { background: var(--bg-bottom); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 300 19px/1.6 var(--font); letter-spacing: .025em;
  background: var(--bg-gradient) fixed;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 24px; }

.top { max-width: 680px; margin: 0 auto; padding: 22px 24px 0; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.top a { color: var(--muted); text-decoration: none; }
.top a:hover { color: var(--ink); }

/* app hero */
.hero { text-align: center; padding: 28px 0 8px; }
.icon { width: 124px; height: 124px; border-radius: 23%; box-shadow: 0 14px 34px rgba(40, 50, 90, .28); display: block; margin: 0 auto 20px; }
h1 { font-size: 46px; line-height: 1.1; margin: 0 0 8px; font-weight: 400; letter-spacing: .035em; }
.hero h1 { margin-bottom: 22px; }   /* the badge now follows the app name directly */
.tagline { font-size: 23px; line-height: 1.35; margin: 0 auto 22px; max-width: 520px; color: var(--ink); }
.badge { font-weight: 400; display: inline-block; padding: 11px 24px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-size: 17px; letter-spacing: .06em; }
.badge.soon { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* screenshots */
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 30px 24px 18px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shots img { flex: none; width: 232px; height: auto; border-radius: 26px; scroll-snap-align: center; box-shadow: 0 10px 28px rgba(40, 50, 90, .22); }
@media (min-width: 1240px) { .shots { justify-content: center; } }

/* screenshot viewer: a phone frame that never moves. Only the screen inside it changes, and the headline above is page text that changes with it.
   Swipe, use the arrows or dots, or press the arrow keys. The phone is sized from the window height so the whole phone and its headline always fit. */
.stage { --arrow: 44px; --gap: 12px; --capH: 78px; --aspect: .4862;   /* phone frame width / height */
  --ph: clamp(300px, calc(100svh - 190px), 900px);                       /* phone height: small screens leave room for the copy below */
  --pw: min(calc(var(--ph) * var(--aspect)), calc(100vw - 48px));
  --capfs: clamp(18px, calc(var(--pw) * .075), 32px);   /* caption font size */
  display: grid; row-gap: 14px; column-gap: var(--gap); align-items: center; justify-content: center;
  width: min(100%, calc(var(--pw) + 2 * (var(--arrow) + var(--gap))));
  grid-template-columns: var(--arrow) minmax(0, 1fr) var(--arrow);
  grid-template-areas: "cap cap cap" "phone phone phone" "prev dots next"; margin: 0 auto;
  /* the space above the caption is worked out so that the gap between the 'Coming soon' button and the first caption letters equals the gap between the title and the button (28px) */
  padding: max(0px, calc(28px - (78px - 2.6 * var(--capfs)) / 2 - 0.28 * var(--capfs))) 12px 20px; }
.cap { grid-area: cap; height: var(--capH); margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 400; letter-spacing: .02em; line-height: 1.3; font-size: var(--capfs); max-width: var(--pw); justify-self: center; transition: opacity .18s ease; }
.cap span { display: block; max-width: 100%; text-wrap: balance; }   /* spread the words so the lines are as close in length as possible, without splitting a word */
.cap em { font-style: italic; }
.phone { grid-area: phone; position: relative; width: var(--pw); height: calc(var(--pw) / var(--aspect)); justify-self: center; }
.phone::before { content: ""; position: absolute; z-index: 0; inset: 1%; border-radius: 20% / 9.8%; box-shadow: 0 18px 30px rgba(40, 50, 90, .30); }   /* the soft shadow lives on its own layer so the sliding screens stay smooth */
.screens { position: absolute; z-index: 1; left: 4.151%; top: 1.529%; width: 91.70%; height: 96.94%; border-radius: 14.66% / 6.75%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; background: #fff; }
.screens::-webkit-scrollbar { display: none; }
.screens img { flex: none; width: 100%; height: 100%; object-fit: cover; display: block; scroll-snap-align: center; scroll-snap-stop: always; }
.frame { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; pointer-events: none; }   /* the frame sits on top; its screen is a transparent window */
.phone:has(.screens:focus-visible) { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: 15%; }
.screens:focus-visible { outline: none; }
.vbtn { width: var(--arrow); height: var(--arrow); border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 300 30px/1 var(--font); padding: 0 0 4px; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.vbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.vbtn:disabled { opacity: .28; cursor: default; }
#shot-prev { grid-area: prev; }
#shot-next { grid-area: next; }
.dots { grid-area: dots; display: flex; justify-content: center; gap: 4px; height: 32px; align-items: center; }
.dots button { width: 26px; height: 26px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); opacity: .4; transition: opacity .2s, transform .2s; }
.dots button[aria-current="true"]::before { background: var(--accent); opacity: 1; transform: scale(1.25); }

/* app page layout: stacked on phones; on wide screens the screenshot viewer stays fixed on the left while the text scrolls on the right */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "media" "copy" "footer"; }
.layout > .hero { grid-area: hero; }
.layout > .media { grid-area: media; }
.layout > .copy { grid-area: copy; }
.layout > footer { grid-area: footer; }
@media (min-width: 900px) {
  body.app-page .top { position: absolute; top: 0; left: 0; max-width: none; padding: 22px 32px; }
  /* the left column is exactly as wide as the viewer: [half an arrow of space] [arrow] [phone] [arrow] [half an arrow of space]; the text gets everything else.
     On wide windows the phone and its headline use nearly all of the window's height. */
  .layout { --lph: clamp(320px, calc(100vh - 182px), 1100px); --lpw: calc(var(--lph) * .4862); --lcapfs: clamp(18px, calc(var(--lpw) * .075), 32px);   /* phone height / width and caption size, shared by the viewer and the heading block */
    max-width: none; margin: 0; padding: 0; column-gap: 0; grid-template-columns: max-content minmax(0, 1fr); grid-template-rows: auto 1fr auto; grid-template-areas: "media hero" "media copy" "media footer"; }
  .layout > .wrap { max-width: 852px; margin: 0; padding: 0 32px 0 0; }   /* text starts right where the viewer's column ends; 32px of breathing room on its right edge */
  .layout > .media { position: sticky; top: 0; height: 100vh; align-self: start; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px calc(var(--arrow, 44px) / 2) 28px; }
  .layout .stage { --ph: var(--lph); --pw: var(--lpw); width: auto; padding: 0; grid-template-columns: var(--arrow) var(--pw) var(--arrow); grid-template-areas: "cap cap cap" "prev phone next" ". dots ."; }
  /* icon, name and button are centred over the text; the top of the icon lines up with the top of the first caption letters:
     caption top = viewer top padding (16px) + any spare height around the phone + half the space the two caption lines leave in their 78px box + the gap above a capital letter (0.28 of the font size) */
  .layout > .hero { text-align: center; padding: calc(16px + (100vh - 44px - var(--lph) - 138px) / 2 + (78px - 2.6 * var(--lcapfs)) / 2 + 0.28 * var(--lcapfs)) 32px 22px 0; }
  .layout .icon { margin: 0 auto 20px; }
  .layout .tagline { margin-left: 0; margin-right: 0; max-width: none; }
  .layout > .copy { padding-bottom: 8px; }
  .layout > footer { width: auto; max-width: calc(852px - 32px); margin: 36px 32px 0 0; }   /* same width and right margin as the text, so the line and the heading block share one centre line */
}

/* text */
section { margin: 0; padding: 10px 0 6px; }
p { margin: 0 0 1.05em; }
b { font-weight: 500; }
h2 { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 34px 0 8px; font-weight: 500; }
ul { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin: 0 0 .5em; }

footer { margin: 36px auto 0; width: calc(100% - 48px); max-width: 632px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }   /* divider line, as wide as the text above it; links centred */
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* home page: list of apps */
.home h1 { text-align: left; font-size: 40px; margin: 40px 0 6px; }
.home .lead { color: var(--muted); margin: 0 0 28px; }
.apps { display: grid; gap: 14px; padding-bottom: 10px; }
.app { display: flex; gap: 18px; align-items: center; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; text-decoration: none; color: var(--ink); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.app:hover { border-color: var(--accent); }
.app img { width: 76px; height: 76px; border-radius: 23%; flex: none; box-shadow: 0 6px 16px rgba(40, 50, 90, .22); }
.app b { display: block; font-size: 23px; font-weight: 400; line-height: 1.2; }
.app span { color: var(--muted); font-size: 17px; line-height: 1.35; display: block; margin-top: 3px; }

/* policy / support pages */
.doc h1 { text-align: left; font-size: 38px; margin: 34px 0 4px; }
.doc .meta { color: var(--muted); font-size: 16px; margin: 0 0 22px; }

@media (max-width: 520px) {
  body { font-size: 18px; }
  h1 { font-size: 40px; }
  .tagline { font-size: 21px; }
  .shots img { width: 208px; }
}

/* app page text: tighter spacing between the sections that have headings */
.copy section { padding: 0; }
.copy h2 { margin-top: 28px; }

/* very wide windows: the paragraphs without headings sit on the left of the text area, the headed sections on the right */
@media (min-width: 1240px) {
  .layout > .hero, .layout > .copy { max-width: 1060px; }
  .layout > footer { max-width: calc(1060px - 32px); }
  .layout > .copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; align-items: start; }
  .copy .story section, .copy .sections section { padding-top: 0; }
  .copy .sections section:first-child h2 { margin-top: 0; }
}

/* vertical (phone) layout only */
@media (max-width: 899px) {
  .hero { padding-bottom: 0; }
  .hero h1 { margin-bottom: 28px; }   /* title -> button gap; the same 28px is kept between the button and the caption */
  footer { border-top: 0; }           /* no divider line above the footer links on phones; wide layouts keep it */
}
