/* Landing page. Built from the app's "Retoucher's Proof" system (see ../DESIGN.md):
   the white proof sheet, red pencil rings and cyan crop marks, with the pencil red
   taken up as the page's main color. */

:root {
  --ground: #ffffff;
  --sheet: #ffffff;
  --band: #242527;
  --ink: #1b1515;
  --muted: #5b6066;
  --hairline: #e2e4e5;
  --hover: #f3f4f5;
  --red: #c4271e;
  --red-deep: #a51e16;
  --red-ink: #b8241b;
  --on-red: #ffffff;
  --on-red-soft: #ffffff;
  --focus: #1b1515;
  --on-red-line: rgba(255, 255, 255, .55);
  --pencil-red: #d4302a;
  --error-red: #b3261e;
  --ok-ink: #1f6b3a;
  --crop-cyan: #2aa7c9;
  --shadow-sheet: 0 1px 2px rgba(22, 23, 24, .08), 0 8px 24px rgba(22, 23, 24, .08);
  --shadow-on-red: 0 2px 4px rgba(0, 0, 0, .16), 0 22px 48px rgba(0, 0, 0, .26);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 24px;
  --max: 1240px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121314;
    --sheet: #1c1e20;
    --band: #232427;
    --ink: #f4eceb;
    --muted: #a3a8ae;
    --hairline: #2e3134;
    --focus: #ffffff;
    --hover: #232528;
    --red: #c4271e;
    --red-deep: #a51e16;
    --red-ink: #ff7b6e;
    --error-red: #ff7a70;
    --ok-ink: #7fd39a;
    --crop-cyan: #3fb6d6;
    --shadow-sheet: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-on-red: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 48px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #121314;
  --sheet: #1c1e20;
  --band: #232427;
  --ink: #f4eceb;
  --muted: #a3a8ae;
  --hairline: #2e3134;
  --focus: #ffffff;
  --hover: #232528;
  --red: #c4271e;
  --red-deep: #a51e16;
  --red-ink: #ff7b6e;
  --error-red: #ff7a70;
  --ok-ink: #7fd39a;
  --crop-cyan: #3fb6d6;
  --shadow-sheet: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-on-red: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 48px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

/* Lip shades chosen on the page recolor the red, light and dark */
:root[data-shade="berry"] { --red: #8c2347; --red-deep: #721b39; --red-ink: #8c2347; }
:root[data-shade="brick"] { --red: #a8361f; --red-deep: #8a2c19; --red-ink: #a8361f; }
:root[data-shade="plum"] { --red: #5b2a4a; --red-deep: #47203a; --red-ink: #6e3459; }
@media (prefers-color-scheme: dark) {
  :root[data-shade="berry"]:not([data-theme="light"]) { --red: #7a1f3e; --red-deep: #651a33; --red-ink: #f28bb0; }
  :root[data-shade="brick"]:not([data-theme="light"]) { --red: #93301c; --red-deep: #7a2817; --red-ink: #f59a7f; }
  :root[data-shade="plum"]:not([data-theme="light"]) { --red: #5b2a4a; --red-deep: #47203a; --red-ink: #d9a3c8; }
}
:root[data-theme="dark"][data-shade="berry"] { --red: #7a1f3e; --red-deep: #651a33; --red-ink: #f28bb0; }
:root[data-theme="dark"][data-shade="brick"] { --red: #93301c; --red-deep: #7a2817; --red-ink: #f59a7f; }
:root[data-theme="dark"][data-shade="plum"] { --red: #5b2a4a; --red-deep: #47203a; --red-ink: #d9a3c8; }

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: #0f4c55; color: #fff; }

a { color: inherit; text-decoration-color: currentColor; text-underline-offset: 3px; }
a:hover { color: var(--red-ink); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.on-red :focus-visible, .band :focus-visible { outline-color: #fff; }
.on-red .proof :focus-visible, .band .proof :focus-visible, .band .sheet :focus-visible { outline-color: #1b1515; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--sheet); color: var(--ink); padding: 8px 14px; border-radius: 9px;
}
.skip:focus { top: 12px; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 var(--gutter);
  background: var(--ground); color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}
.bar-name { font-size: 18px; font-weight: 750; letter-spacing: -.01em; text-decoration: none; }
.bar-name:hover { color: var(--ink); }
.bar-note { color: var(--muted); font-size: 15px; }
.bar-cta { margin-left: auto; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: 9px;
  font: 650 16px/1.2 var(--sans); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color 150ms, border-color 150ms, color 150ms;
}
.button-save { background: var(--red); color: #fff; }
.button-save:hover { background: var(--red-deep); color: #fff; }
.on-red .button-save { background: #fff; color: var(--red-deep); }
.on-red .button-save:hover { background: #fff; color: #1b1515; }
.button:disabled { opacity: .6; cursor: progress; }

/* Hero: a red field holding the proof sheet, its fixes and the waitlist form */
.hero-band { background: var(--red); color: var(--on-red); }
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 48px var(--gutter) 72px;
  display: grid; gap: 28px 40px;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas:
    "title title"
    "proof panel";
  align-items: start;
}
.hero h1 {
  grid-area: title;
  font: 800 clamp(2.5rem, 1.1rem + 3.5vw, 4.1rem)/1.02 var(--display);
  letter-spacing: -.035em;
}
.hero-panel { grid-area: panel; display: grid; gap: 26px; }
.lede { font-size: 19px; line-height: 1.5; }

/* Proof sheet */
.proof {
  grid-area: proof; position: relative; margin: 0;
  background: #fff; color: #1b1515; box-shadow: var(--shadow-on-red);
  padding: 28px 28px 18px;
}
.crop { position: absolute; width: 24px; height: 24px; pointer-events: none; }
.crop-tl { top: 9px; left: 9px; border-top: 1px solid #2aa7c9; border-left: 1px solid #2aa7c9; }
.crop-br { bottom: 9px; right: 9px; border-bottom: 1px solid #2aa7c9; border-right: 1px solid #2aa7c9; }

.frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #c4c8cb; }
.stamp {
  position: absolute; top: 12px;
  font: 800 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 3px; border: 1.5px solid #1b1515;
  transform: rotate(-2deg); pointer-events: none;
}
.stamp-before { left: 12px; background: #1b1515; color: #fff; }
.stamp-after { right: 12px; background: #fff; color: #1b1515; }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Fixes list, numbered to match the rings */
.fixes { grid-area: fixes; }
.fixes-heading {
  font: 650 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-red-soft); margin-bottom: 14px;
}
.fixes-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px 24px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.fixes-list li { font-size: 15px; line-height: 1.4; }
.fix-title { display: block; }
.fixes-list strong { font-weight: 700; font-size: 16px; }
.num {
  display: grid; place-items: center; width: 28px; height: 28px;
  border: 2px solid var(--on-red-line); border-radius: 50%;
  font: 800 15px/1 var(--sans); font-variant-numeric: tabular-nums;
}

/* Try it: real-face photo with clickable spots */
.try-face .frame img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.face-marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.zit-mark { opacity: 0; }
.zit-mark.is-on { animation: flash 1600ms ease-out both; }
@keyframes flash { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
.mark-ring { fill: none; stroke: #d4302a; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; }
.zit-mark.is-on .mark-ring { animation: draw 450ms cubic-bezier(.16, 1, .3, 1) both; }
.zit-mark text {
  font: 800 30px var(--sans); fill: #d4302a; font-variant-numeric: tabular-nums;
  paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round;
}
.zit {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; padding: 0;
  border: 1.5px dashed rgba(255, 255, 255, .9); border-radius: 50%;
  background: transparent; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(27, 21, 21, .25);
  transition: border-color 150ms, transform 150ms;
}
.zit:hover { border-style: solid; transform: scale(1.08); }
.zit[aria-pressed="true"] { border-color: transparent; box-shadow: none; }
.zit:focus-visible { outline: 3px solid #1b1515; outline-offset: 2px; }
.try-face .stamp-before { display: none; }
.try-face.is-original .stamp-before { display: inline-block; }
.try-face.is-original .stamp-after { display: none; }
.try-face .stamp-before { left: auto; right: 12px; }
.try-face.is-original .zit { visibility: hidden; }
.compare {
  margin-left: auto; padding: 8px 14px; border: 1px solid #c9cdd1; border-radius: 9px;
  background: #fff; color: #1b1515; font: 600 14px/1.2 var(--sans); cursor: pointer;
}
.compare:hover { background: #f3f4f5; }
.compare[aria-pressed="true"] { background: #1b1515; border-color: #1b1515; color: #fff; }

.try { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; }
.try-label { font-weight: 650; font-size: 14px; }
.shades { display: flex; gap: 8px; }
.shade {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(27, 21, 21, .25);
  cursor: pointer; transition: transform 150ms ease-out, box-shadow 150ms;
}
.shade:hover { transform: scale(1.08); }
.shade[aria-pressed="true"] { box-shadow: 0 0 0 2px #1b1515; }
.shade:focus-visible { outline: 3px solid #1b1515; outline-offset: 3px; }

.fix {
  display: grid; grid-template-columns: 34px 1fr; gap: 6px; width: 100%;
  padding: 8px 10px 10px 8px; margin: -8px -10px -10px -8px;
  border: 0; border-radius: 10px; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
  transition: background-color 150ms, opacity 150ms;
}
.fix:hover { background: rgba(255, 255, 255, .1); }
.fix:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.fix[aria-pressed="true"] .num { background: #fff; border-color: #fff; color: var(--red); }
.fix-state { display: none; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: #fff; color: var(--band); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; vertical-align: 2px; }
.fix[aria-pressed="true"] .fix-state { display: inline; }
.fixes-hint { margin-top: 14px; font-size: 14px; color: var(--on-red-soft); }

/* Hero video: a baked before/after loop with a sliding line */
.hero-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-toggle {
  position: absolute; left: 12px; bottom: 12px;
  padding: 6px 12px; border: 0; border-radius: 6px;
  background: rgba(27, 21, 21, .62); color: #fff;
  font: 600 13px/1.2 var(--sans); cursor: pointer;
}
.video-toggle:hover { background: rgba(27, 21, 21, .8); }
.hero-video .video-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.video-note { margin-top: 12px; font-size: 13px; line-height: 1.45; color: #5b6066; }

/* Try-it section: the interactive drawing */
.try-band { padding: 80px var(--gutter) 88px; }
.try-grid {
  max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto;
  display: grid; gap: 28px 40px;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas: "intro intro" "proof fixes";
  align-items: start;
}
.try-intro { grid-area: intro; display: grid; gap: 12px; }
.try-intro h2 {
  font: 800 clamp(1.9rem, 1.3rem + 1.9vw, 2.9rem)/1.06 var(--display); letter-spacing: -.03em;
}
.try-intro p { font-size: 19px; max-width: 52ch; }
.try-band .fixes-list { grid-template-columns: minmax(0, 1fr); }

/* Waitlist form */
.waitlist { display: grid; gap: 14px; }
.field-label { font-weight: 650; font-size: 16px; }
.field-row { display: flex; gap: 8px; flex-wrap: wrap; }
.field {
  flex: 1 1 200px; min-width: 0; min-height: 46px;
  padding: 10px 14px; border-radius: 9px;
  border: 1px solid var(--hairline); background: #fff; color: #1b1515;
  font: 400 16px/1.2 var(--sans); caret-color: #c4271e;
}
.field::placeholder { color: #6b7076; opacity: 1; }
.field[aria-invalid="true"] { border-color: var(--error-red); box-shadow: 0 0 0 2px var(--error-red); }
.on-red .field { border-color: transparent; }
.on-red .field[aria-invalid="true"] { box-shadow: 0 0 0 3px #1b1515; }

.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice legend { padding: 0; margin-bottom: 8px; font-size: 15px; }
.optional { font-size: 14px; margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 8px 13px; border-radius: 8px;
  border: 1px solid var(--on-red-line); color: inherit;
  font-size: 15px; line-height: 1.2; cursor: pointer;
  transition: background-color 150ms, color 150ms, border-color 150ms;
}
.chip:hover span { background: rgba(255, 255, 255, .12); }
.chip input:checked + span { background: #fff; border-color: #fff; color: var(--red-deep); font-weight: 650; }
.chip input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 2px; }

.form-note { font-size: 14px; color: var(--on-red-soft); }
.form-status { font-size: 15px; font-weight: 600; padding: 9px 12px; border-radius: 8px; background: rgba(0, 0, 0, .2); }
.form-status:empty { display: none; }
.form-status.is-error::before { content: "Check this: "; }

/* Bands below the hero */
.band { background: var(--band); color: #fff; }
.band .sheet { color: var(--ink); }
/* Printer's color bar along the top and bottom edge of each charcoal band:
   the page red, the four lip shades and paper white, as on a proof sheet. */
.band { position: relative; }
.band::before, .band::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background: repeating-linear-gradient(90deg,
    #c4271e 0 36px, #a8343a 36px 72px, #7c2443 72px 108px,
    #a5503c 108px 144px, #6a3550 144px 180px, #f4eceb 180px 216px);
}
.band::before { top: 0; }
.band::after { bottom: 0; }
.who {
  max-width: var(--max); margin: 0 auto; padding: 80px var(--gutter) 88px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start;
}
.who h2, .faq h2, .join h2 {
  font: 800 clamp(1.9rem, 1.3rem + 1.9vw, 2.9rem)/1.06 var(--display);
  letter-spacing: -.03em;
}
.who p { font-size: 20px; line-height: 1.5; max-width: 52ch; padding-top: 6px; }

.sheet { background: var(--sheet); box-shadow: var(--shadow-sheet); }

.uses { padding: 80px var(--gutter) 96px; }
.uses-inner { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
.uses h2 {
  font: 800 clamp(1.9rem, 1.3rem + 1.9vw, 2.9rem)/1.06 var(--display);
  letter-spacing: -.03em; margin-bottom: 40px;
}
.prints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start; }
.print {
  position: relative; margin: 0; padding: 20px 20px 24px;
  background: #fff; color: #1b1515; box-shadow: var(--shadow-on-red);
}
.print:nth-child(1) { transform: rotate(-1.2deg); }
.print:nth-child(2) { transform: rotate(.8deg); margin-top: 28px; }
.print:nth-child(3) { transform: rotate(-.6deg); margin-top: 8px; }
.print .crop-tl { top: 6px; left: 6px; } .print .crop-br { bottom: 6px; right: 6px; }
.print-frame { position: relative; }
.print-frame svg { display: block; width: 100%; height: auto; }
.print .stamp { top: 8px; right: 8px; }
.mini-ring { fill: none; stroke: #d4302a; stroke-width: 2.5; stroke-linecap: round; }
.print h3 { font-size: 20px; font-weight: 750; letter-spacing: -.01em; margin: 18px 0 6px; }
.print p { font-size: 16px; }

.promises { max-width: var(--max); margin: 0 auto; padding: 80px var(--gutter); }
.promise {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: baseline;
  padding: 28px 0; border-top: 1px solid var(--hairline);
}
.promise:last-child { border-bottom: 1px solid var(--hairline); }
.promise h3 {
  font: 800 clamp(1.5rem, 1.1rem + 1.2vw, 2.2rem)/1.1 var(--display); letter-spacing: -.025em;
  color: var(--red-ink);
}
.promise p { max-width: 52ch; font-size: 18px; }

.faq-band { padding: 80px var(--gutter); }
.faq {
  max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; align-items: start;
}
.faq-sheet { padding: 4px 28px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-weight: 650; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--red-ink); border-bottom: 2px solid var(--red-ink);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 200ms;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq summary:hover { color: var(--red-ink); }
.faq details p { padding: 0 0 22px; max-width: 64ch; }

/* Closing waitlist on the red field */
.join { background: var(--red); color: var(--on-red); }
.join-inner { max-width: 720px; margin: 0 auto; padding: 80px var(--gutter) 88px; display: grid; gap: 16px; }
.join-inner > p { font-size: 19px; }
.join .waitlist { margin-top: 10px; }

.foot { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 40px; display: grid; gap: 6px; font-size: 15px; }
.foot-small { font-size: 13px; color: var(--muted); }

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) 320px; gap: 26px 32px; }
}

/* Tablets and phones: one column, form before the picture */
@media (max-width: 820px) {
  :root { --gutter: 16px; }
  .hero {
    padding-top: 32px; padding-bottom: 52px; gap: 24px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "panel" "proof";
  }
  .proof { padding: 16px 16px 12px; }
  .try-band { padding: 56px var(--gutter) 64px; }
  .try-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "proof" "fixes"; }
  .crop-tl { top: 4px; left: 4px; } .crop-br { bottom: 4px; right: 4px; }
  .who { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 56px var(--gutter) 60px; }
  .uses { padding: 56px var(--gutter) 64px; }
  .prints { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .print:nth-child(n) { margin-top: 0; }
  .promises { padding: 48px var(--gutter); }
  .promise { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .faq-band { padding: 56px var(--gutter); }
  .faq { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .faq-sheet { padding: 4px 18px; }
  .join-inner { padding: 60px var(--gutter) 68px; }
}

@media (max-width: 560px) {
  .bar-note { display: none; }
  .bar .button { min-height: 40px; padding: 8px 14px; font-size: 15px; }
  .fixes-list { grid-template-columns: minmax(0, 1fr); }
  .field-row .button { flex: 1 1 100%; }
  .lede, .join-inner > p { font-size: 17px; }
  .who p { font-size: 18px; }
  .mark-ring { stroke-width: 7; }
  .zit-mark text { font-size: 48px; stroke-width: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zit-mark.is-on, .zit-mark.is-on .mark-ring { animation: none; }
  * { transition: none !important; }
}

.page-404 { min-height: 100vh; display: grid; align-items: center; }
