/* The landing page (index.html): white, one brand colour, system fonts (no external requests), a screenshot and its text side by side in turn.
   The other pages keep styles.css. */
:root {
  --brand: #4444bb;
  --brand-soft: #eeeefb;
  --ink: #1d1d2b;
  --ink-2: #5d5d73;
  --line: #e7e7f1;
  --maxw: 1100px;
  --phone-w: min(340px, 62vw);
  --feature-pad: clamp(40px, 9vh, 110px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

/* ----- Hero ----- */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(56px, 12vh, 120px) 24px clamp(40px, 8vh, 72px);
  text-align: center;
}
.hero__logo { border-radius: 24px; box-shadow: 0 18px 40px -16px rgba(68, 68, 187, 0.5); }
.hero__title { margin: 20px 0 0; font-size: clamp(44px, 8vw, 72px); line-height: 1; font-weight: 800; letter-spacing: -0.02em; color: var(--brand); }
.hero__tagline { margin: 10px 0 0; font-size: clamp(20px, 3.4vw, 28px); font-weight: 600; color: var(--ink); }
.hero__lead { margin: 22px auto 0; max-width: 34em; font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-2); }

.store-buttons { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 18px; margin-top: 32px; }
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 54px; width: auto; display: block; }
.store-badge--google img { height: 78px; width: auto; max-width: none; margin: -12px -6px; } /* the Google Play badge file has transparent padding around the badge: it is drawn larger so that the badge itself is as high as the App Store one */
.store-badge:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 10px; }

/* ----- Features ----- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(28px, 7vw, 110px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--feature-pad) 24px;
}
.feature--reverse .feature__media { order: 2; }

.feature__media { display: flex; justify-content: center; position: relative; will-change: transform; }
/* a soft brand-coloured glow behind the screen */
.feature__media::before {
  content: "";
  position: absolute;
  inset: 8% -6% 4%;
  background: radial-gradient(closest-side, var(--brand-soft), rgba(255, 255, 255, 0) 100%);
  z-index: 0;
}

.phone {
  --w: var(--phone-w);
  position: relative;
  z-index: 1;
  width: var(--w);
  border-radius: calc(var(--w) * 0.135);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(29, 29, 43, 0.08), 0 36px 70px -26px rgba(68, 68, 187, 0.45), 0 12px 24px -12px rgba(29, 29, 43, 0.25);
}
.phone img { display: block; width: 100%; height: auto; }

.feature__text { will-change: transform; }
.feature__text h2 { margin: 0; font-size: clamp(28px, 4.2vw, 42px); line-height: 1.12; letter-spacing: -0.015em; }
.feature__text p { margin: 16px 0 0; max-width: 28em; font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); }
.feature__text .feature__fineprint { margin-top: 10px; font-size: 13px; color: #8a8aa0; }

/* the privacy card: the place of a screenshot, a list of promises */
.privacy-card {
  position: relative;
  z-index: 1;
  width: min(380px, 84vw);
  padding: 34px 30px;
  border-radius: 28px;
  background: linear-gradient(160deg, #5656cf, var(--brand));
  color: #fff;
  box-shadow: 0 36px 70px -26px rgba(68, 68, 187, 0.55);
}
.privacy-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.privacy-card li { position: relative; padding-left: 40px; font-size: 18px; font-weight: 500; line-height: 1.35; }
.privacy-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 1px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%234444bb' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* ----- Appearing while scrolling (only with JavaScript; without it everything is simply there) ----- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ----- Closing ----- */
.closing { text-align: center; padding: clamp(48px, 10vh, 100px) 24px clamp(56px, 10vh, 100px); }
.closing h2 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.01em; }

/* ----- Footer ----- */
footer { border-top: 1px solid var(--line); padding: 32px 24px 44px; text-align: center; color: var(--ink-2); font-size: 14px; }
footer p { margin: 6px 0; }
.footer__links a { color: var(--brand); text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__separator { margin: 0 8px; color: #b9b9cc; }

/* ----- Wide screens: the next screenshot starts higher, about a fifth of a screenshot's height (2.17 times its width), so that the screens interlace instead of standing in a strict row ----- */
@media (min-width: 860px) {
  /* the two paddings between the screenshots, and then a fifth of a screenshot's height */
  .feature + .feature { margin-top: calc(var(--feature-pad) * -2 - var(--phone-w) * 0.435); }
  /* the card of "Private by design" is much lower than a screenshot and its text lies under the screenshot above: it rises, but only by most of the paddings between the two, never into the screenshot */
  .feature + .feature.feature--card { margin-top: calc(var(--feature-pad) * -1.6); }
}

/* ----- Tablet and phone: one column, the screenshot above its text ----- */
@media (max-width: 859px) {
  .feature { grid-template-columns: 1fr; gap: 32px; padding: 44px 22px; text-align: center; }
  .feature--reverse .feature__media { order: 0; }
  .feature__text p { margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .feature__media, .feature__text { will-change: auto; }
}
