/* The stylesheet of every page of the Live to Video website. */

/* Nunito is the rounded type for the headings on devices that do not have SF Pro Rounded. A browser
   downloads it only on those devices. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(/fonts/nunito-latin-wght-normal.woff2) format("woff2-variations");
}

:root {
  --blue: #0a85ff;
  --purple: #b052de;
  --light-blue: #6cb6ff;
  --light-purple: #cf97eb;
  --gradient: linear-gradient(90deg, var(--blue), var(--purple));
  --light-gradient: linear-gradient(90deg, var(--light-blue), var(--light-purple));
  --night: #07060d;
  --night-2: #110f1f;
  --dusk: #120e24;
  --ink: #f4f2fb;
  --ink-2: #b9b4cf;
  --ink-on-video: #e4e0f3;
  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

/* The footer stays at the bottom of the window on a short page. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  background: var(--night);
  color: var(--ink);
}

main {
  flex: 1;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--rounded);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.gradient-text {
  background: var(--light-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Text that is not settled yet. A release build fails while a page has it. */
mark.todo {
  padding: 0 4px;
  border-radius: 4px;
  background: #ffd60a;
  color: #000;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.section {
  padding: clamp(64px, 10vw, 128px) var(--gutter);
}

.eyebrow {
  font-family: var(--rounded);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.fine {
  font-size: 14px;
  color: var(--ink-2);
}

/* The header of each page, on top of the start of the page. */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--rounded);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wordmark img {
  width: 36px;
  height: 36px;
}

.site-header nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
}

.site-header nav a {
  text-decoration: none;
  opacity: 0.85;
}

.site-header nav a:hover {
  opacity: 1;
}

/* The link to the App Store. Without Apple's badge file, the build draws a stand-in. */

.app-store-badge {
  display: inline-flex;
  border-radius: 9px;
}

.app-store-badge img {
  height: 54px;
  width: auto;
}

.app-store-badge.stand-in {
  flex-direction: column;
  justify-content: center;
  height: 54px;
  padding: 0 20px 0 52px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  border: 1px solid #a6a6a6;
  text-decoration: none;
  position: relative;
  line-height: 1.1;
}

.app-store-badge.stand-in::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50% 50% 46% 46%;
  background: #fff;
}

.app-store-badge.stand-in small {
  font-size: 11px;
  letter-spacing: 0.02em;
}

.app-store-badge.stand-in strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* A phone frame around a video. */

.phone {
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 9 / 19.5;
  border-radius: 48px;
  padding: 10px;
  background: #1b1a22;
  box-shadow:
    0 0 0 2px #3a3946,
    0 40px 80px rgba(0, 0, 0, 0.55);
}

.phone video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 38px;
  background: #000;
}

.phone::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 92px;
  height: 26px;
  margin-left: -46px;
  border-radius: 13px;
  background: #000;
}

.sound-button {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font: 600 15px var(--text);
  color: #fff;
  background: rgba(20, 18, 32, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  white-space: nowrap;
}

.sound-button[hidden] {
  display: none;
}

/* The home page: the hero, with three Live Photo videos side by side. */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-videos {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #000;
}

.hero-videos video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 13, 0.7) 0%, rgba(7, 6, 13, 0) 22%),
    linear-gradient(0deg, rgba(7, 6, 13, 1) 4%, rgba(7, 6, 13, 0.55) 42%, rgba(7, 6, 13, 0) 70%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 0 var(--gutter) clamp(40px, 8vh, 96px);
  max-width: 980px;
}

.hero h1 {
  font-size: clamp(44px, 8vw, 104px);
}

.hero-copy > p {
  margin-top: 20px;
  max-width: 620px;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-on-video);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 32px;
}

/* The home page: the selected photos become one video. */

.become {
  background: linear-gradient(180deg, var(--night) 0%, var(--dusk) 100%);
}

.become .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.become h2 {
  grid-column: 1 / -1;
  font-size: clamp(34px, 5vw, 60px);
  text-align: center;
}

.become h2 .gradient-text {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.become .intro {
  grid-column: 1 / -1;
  max-width: 680px;
  margin: 0 auto 8px;
  text-align: center;
  font-size: 19px;
  color: var(--ink-2);
}

.become .intro p + p {
  margin-top: 14px;
}

.library {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 22px;
  overflow: hidden;
}

.library li {
  position: relative;
  aspect-ratio: 1;
}

.library img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library li:not(.picked) img {
  filter: brightness(0.55);
}

.library li.picked::after {
  content: "✓";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 13px var(--text);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0 0 2px #fff;
}

.arrow {
  font-family: var(--rounded);
  font-weight: 900;
  font-size: 48px;
}

.become .phone {
  justify-self: center;
}

.how {
  grid-column: 1 / -1;
  margin-top: 56px;
}

.how h3 {
  font-size: clamp(28px, 3.6vw, 44px);
  margin-bottom: 28px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps h4 {
  font-size: 24px;
  margin-bottom: 6px;
}

.steps p {
  font-size: 16px;
  color: var(--ink-2);
}

.automatic {
  margin-top: 36px;
  max-width: 760px;
  font-size: 19px;
  color: var(--ink-2);
}

.automatic strong {
  color: var(--ink);
}

/* The home page: the feature tiles. */

.clever {
  background: linear-gradient(180deg, var(--dusk) 0%, var(--night) 40%);
}

.clever h2 {
  font-size: clamp(34px, 5vw, 60px);
  margin-bottom: 36px;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 16px;
}

.tile {
  position: relative;
  border-radius: 28px;
  padding: 28px;
  background: var(--night-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tile h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.tile p {
  font-size: 16px;
  color: var(--ink-2);
}

.tile.big {
  grid-column: span 2;
  grid-row: span 2;
}

.tile.wide {
  grid-column: span 2;
}

.tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.tile > div {
  position: relative;
}

.tile.big h3 {
  font-size: clamp(30px, 3.4vw, 44px);
}

.tile.big p {
  max-width: 420px;
  font-size: 19px;
  color: var(--ink-on-video);
}

.tile.gradient {
  background: var(--gradient);
}

.tile.gradient p {
  color: rgba(255, 255, 255, 0.88);
}

/* The home page: the last call. */

.last {
  text-align: center;
}

.last h2 {
  font-size: clamp(36px, 6vw, 72px);
}

.last p {
  margin: 20px auto 32px;
  font-size: 20px;
  color: var(--ink-2);
}

/* A page of text, for example Support and Privacy. */

.text-page {
  max-width: calc(720px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 136px var(--gutter) clamp(64px, 10vw, 112px);
}

.text-page h1 {
  font-size: clamp(44px, 7vw, 72px);
  margin-bottom: 28px;
}

.text-page h2 {
  font-size: 26px;
  margin: 48px 0 12px;
  color: var(--ink);
}

.text-page p,
.text-page li {
  color: var(--ink-2);
}

.text-page p + p {
  margin-top: 14px;
}

.text-page a {
  color: var(--light-blue);
}

.text-page .lead {
  font-size: 21px;
  color: var(--ink);
}

.text-page .email {
  margin-top: 20px;
  font-family: var(--rounded);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 28px);
}

.text-page .email a {
  text-decoration: none;
}

/* The footer of each page. */

.site-footer {
  padding: 40px var(--gutter) 56px;
  font-size: 14px;
  color: var(--ink-2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer p {
  flex-basis: 100%;
  font-size: 12px;
  opacity: 0.8;
}

@media (max-width: 820px) {
  .hero-videos {
    grid-template-columns: 1fr;
  }

  .hero-videos video:not(:first-child) {
    display: none;
  }

  .become .wrap {
    grid-template-columns: 1fr;
  }

  .arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .steps,
  .bento {
    grid-template-columns: 1fr;
  }

  .tile.big,
  .tile.wide {
    grid-column: auto;
    grid-row: auto;
  }

  .tile:has(video) {
    min-height: 360px;
  }
}

@media (max-width: 420px) {
  .wordmark {
    gap: 8px;
    font-size: 19px;
  }

  .wordmark img {
    width: 32px;
    height: 32px;
  }

  .site-header nav {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
