/* Earn Screen Time — earnscreentime.app
   Static site: no build step, no third-party requests. */

:root {
  --pink: #FA286F;
  --ink: #0A0A0A;
  --ink-soft: #2B2B30;
  --grey: #6E6E76;
  --ground: #EFEFF2;
  --ground-deep: #D9D9DF;
  --paper: #FFFFFF;
  --hairline: #D9D9DE;
  --screen: #0B0B0C;

  --gutter: clamp(16px, 2.2vw, 32px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }
img, svg, video { display: block; max-width: 100%; }

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: var(--gutter);
  pointer-events: none;
}

.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 12px 22px;
  border-radius: 100px;
  pointer-events: auto;
}

/* The glass pill fades in once the page scrolls. */
.site-header__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(rgba(250, 250, 251, 0.94), rgba(243, 243, 245, 0.94));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 2px 0.5px 0 #fff,
    0 1px 1px -0.5px rgba(10, 10, 14, 0.06),
    0 4px 8px -2px rgba(10, 10, 14, 0.08),
    0 16px 28px -8px rgba(10, 10, 14, 0.12);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.is-scrolled .site-header__bar::before { opacity: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
  min-width: 0;
  text-decoration: none;
  font-size: clamp(17px, 2vw, 30px);
  font-weight: 400;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand__logo {
  width: clamp(48px, 6vw, 92px);
  height: auto;
  flex: none;
}

.brand__name { color: var(--ink); }
.brand__break { display: none; }
.brand__platform { color: var(--grey); }

/* ---------- Button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  flex: none;
  padding: 0.62em 1.15em 0.66em 1em;
  border-radius: 100px;
  color: #fff;
  font-size: clamp(15px, 1.65vw, 24px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  background: radial-gradient(53% 128% at 36.4% -18.1%, #6D6F73 0%, #07080B 95.85%);
  box-shadow:
    0 0.56px 0.56px -0.375px rgba(7, 8, 12, 0.09),
    0 1.7px 1.7px -0.75px rgba(7, 8, 12, 0.1),
    0 4.5px 4.5px -1.125px rgba(7, 8, 12, 0.12),
    0 14px 14px -1.5px rgba(7, 8, 12, 0.2),
    inset 0 2px 10px 1px rgba(250, 250, 255, 0.2),
    inset 0 0 2px 1px rgba(250, 250, 255, 0.2),
    inset 0 2px 0.5px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.25s ease;
}

.btn:hover { transform: translateY(-1px) scale(1.02); filter: brightness(1.12); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.btn__apple {
  width: 0.95em;
  height: 0.95em;
  margin-top: -0.12em;
  fill: currentColor;
}

.btn--large {
  font-size: clamp(20px, 2.1vw, 30px);
  padding: 0.7em 1.35em 0.74em 1.2em;
}

/* ---------- Layout ---------- */

main { display: block; }

.section {
  padding: clamp(56px, 8vw, 120px) var(--gutter);
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.section__title {
  margin: 0 auto;
  max-width: 18ch;
  text-align: center;
  font-size: clamp(32px, 4.6vw, 66px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

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

.hero {
  padding-top: clamp(150px, 19vw, 300px);
  padding-bottom: clamp(40px, 5vw, 72px);
  text-align: center;
}

.hero__title {
  margin: 0 auto;
  max-width: 11em;
  font-size: clamp(44px, 7.6vw, 116px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
  background: linear-gradient(100deg, #0A0A0A 30%, #4A4A52 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ink);
  padding-bottom: 0.08em; /* keeps descenders inside the clipped gradient */
}

.hero__sub {
  margin: clamp(18px, 2.2vw, 32px) auto 0;
  max-width: 26ch;
  font-size: clamp(19px, 2.3vw, 33px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
  text-wrap: balance;
}

/* ---------- Film ---------- */

.film {
  position: relative;
  padding-top: clamp(24px, 3vw, 48px);
}

/* Soft white bloom behind the player, as on the reference. */
.film::before {
  content: "";
  position: absolute;
  inset: -12% 0 -8% 0;
  background: radial-gradient(50% 50% at 50% 50%, #fff 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: clamp(18px, 2.4vw, 36px);
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 50% 110%, rgba(250, 40, 111, 0.22) 0%, rgba(250, 40, 111, 0) 70%),
    linear-gradient(#17171A, #0B0B0C);
  box-shadow:
    0 2px 4px -1px rgba(10, 10, 14, 0.1),
    0 24px 48px -12px rgba(10, 10, 14, 0.28),
    0 60px 100px -30px rgba(10, 10, 14, 0.3);
  display: grid;
  place-items: center;
}

.film__frame video,
.film__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.placeholder {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 1.6vw, 22px);
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(13px, 1.2vw, 17px);
  letter-spacing: 0.01em;
  text-align: center;
}

.placeholder__play {
  width: clamp(56px, 7vw, 104px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.placeholder__play svg { width: 34%; margin-left: 8%; fill: #fff; }

/* ---------- Reviews ---------- */

.reviews__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  margin-top: clamp(32px, 4.5vw, 64px);
}

.review {
  min-height: 300px;
  padding: clamp(22px, 2.2vw, 32px);
  border-radius: clamp(22px, 2.2vw, 32px);
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(10, 10, 14, 0.04), 0 12px 32px -16px rgba(10, 10, 14, 0.12);
}

.review__stars { display: flex; gap: 4px; color: var(--ink); }
.review__stars svg { width: 18px; height: 18px; fill: currentColor; }

.review__title { margin: 16px 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.review__meta { margin: 0 0 14px; font-size: 14px; color: var(--grey); }
.review__body { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }

/* Placeholder state: grey stars and skeleton lines, no invented words. */
.review--placeholder .review__stars { color: var(--ground-deep); }

.skeleton {
  display: block;
  height: 12px;
  margin-top: 12px;
  border-radius: 6px;
  background: var(--ground);
}
.skeleton--title { height: 16px; width: 62%; margin-top: 20px; }
.skeleton--meta { width: 40%; margin-bottom: 22px; }
.skeleton--short { width: 55%; }

.reviews__note {
  margin: clamp(20px, 2.4vw, 32px) 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--grey);
}

/* ---------- Devices ---------- */

.devices {
  container-type: inline-size;
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  /* The iPhone sits over the iPad's bottom right: the iPad recording's rep count is bottom left. */
  padding: 0 9cqw 5cqw 0;
}

.device {
  background: #0B0B0C;
  box-shadow:
    inset 0 0 0 0.18cqw #3A3A40,
    inset 0 0 0 0.4cqw #0B0B0C,
    0 2cqw 4cqw -1.5cqw rgba(10, 10, 14, 0.35),
    0 5cqw 8cqw -3cqw rgba(10, 10, 14, 0.3);
}

.device__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 60% at 50% 100%, rgba(250, 40, 111, 0.16) 0%, rgba(250, 40, 111, 0) 70%),
    linear-gradient(#1C1C1E, #0B0B0C);
}

.device__screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Each screen has its recording's exact shape and the bezel wraps it, so object-fit: cover crops
   nothing (an outer 4:3 with even padding left the screen wider than 4:3, cutting off the status bar). */
.device--ipad {
  padding: 2.4cqw;
  border-radius: 4cqw;
}
.device--ipad .device__screen { aspect-ratio: 4 / 3; height: auto; border-radius: 1.8cqw; }

.device--iphone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22cqw;
  padding: 0.9cqw;
  border-radius: 3.6cqw;
}
.device--iphone .device__screen { aspect-ratio: 1206 / 2622; height: auto; border-radius: 2.8cqw; }

/* Dynamic Island. A screen recording carries its own. */
.device--iphone .device__screen:has(video)::after { content: none; }
.device--iphone .device__screen::after {
  content: "";
  position: absolute;
  top: 1cqw;
  left: 50%;
  width: 6cqw;
  height: 1.7cqw;
  border-radius: 1cqw;
  background: #000;
  transform: translateX(-50%);
}

.devices .placeholder { font-size: clamp(10px, 1.5cqw, 17px); }
.device--iphone .placeholder__play { width: 7cqw; }
.device--ipad .placeholder__play { width: 9cqw; }

/* ---------- Call to action ---------- */

.cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 88px);
}

.figure { padding: 6% 0; }

.figure__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.cta__title {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 64px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.checks {
  margin: clamp(20px, 2.4vw, 34px) 0 clamp(26px, 3vw, 42px);
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: clamp(17px, 1.55vw, 22px);
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.checks li { display: flex; align-items: flex-start; gap: 0.6em; }

.checks svg {
  flex: none;
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.12em;
}

.cta__fine {
  margin: clamp(18px, 2vw, 26px) 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--grey);
}

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

.site-footer {
  padding: clamp(40px, 8vw, 140px) var(--gutter) clamp(20px, 2vw, 32px);
  overflow: hidden;
}

.site-footer__wordmark {
  margin: 0;
  font-size: 11.6vw; /* refined to an exact fit by site.js */
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
  color: var(--ground-deep);
  text-shadow: 0 2px 3px rgba(255, 255, 255, 0.85), 0 -2px 3px rgba(0, 0, 0, 0.07);
  user-select: none;
}

.site-footer__links {
  display: flex;
  justify-content: flex-end;
  gap: 0.3em;
  margin-top: clamp(10px, 1.4vw, 22px);
  font-size: clamp(14px, 1.2vw, 18px);
  color: var(--ink-soft);
}

.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Text pages (legal, privacy) ---------- */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(140px, 16vw, 220px) var(--gutter) clamp(40px, 6vw, 80px);
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.doc .doc__date { margin: 0 0 40px; color: var(--grey); }

.doc h2 {
  margin: 40px 0 10px;
  padding-top: 14px;
  border-top: 1.5px solid var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc a { text-underline-offset: 3px; }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .reviews__row {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    margin-inline: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .reviews__row::-webkit-scrollbar { display: none; }
  .review { scroll-snap-align: center; }
}

@media (max-width: 820px) {
  .cta__grid { grid-template-columns: 1fr; text-align: center; }
  .figure { display: none; }
  .checks { justify-items: start; text-align: left; }
}

/* Header wordmark degrades in stages: drop "for iOS", then break onto two
   lines, then hide the text and leave the logo and button. */
@media (max-width: 600px) {
  .brand__platform { display: none; }
  .site-header__bar { padding: 8px 8px 8px 14px; }
}

@media (max-width: 420px) {
  .brand { line-height: 1.05; }
  .brand__break { display: inline; }
}

@media (max-width: 340px) {
  .brand > span { display: none; }
}

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