/* Gmail Emails Extractor, the room. "The love letter": the back of an envelope in the red of the app's heart, a
   wax seal at the tip of the flap, envelope paper inside, and addresses typed onto a ruled sheet. */

@font-face {
  font-family: "Caslon GE";
  src: url("/assets/worlds/fonts/libre-caslon-display-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree GE";
  src: url("/assets/worlds/fonts/figtree-latin-wght.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime GE";
  src: url("/assets/worlds/fonts/courier-prime-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* the heart on the app's icon, and the wax that seals it */
  --seal: #c8203a;
  --wax: #a3132e;
  --blush: #ffeef0;
  --blush-2: #ffe1e6;
  /* the envelope: cool white paper, blue-grey folds */
  --paper: #f6f5f8;
  --sheet: #ffffff;
  --rule: #e4e6ed;
  --rule-2: #d3d7e1;
  /* fountain-pen ink */
  --ink: #231c2e;
  --ink-2: #5f5a6b;
  --red: #c11e38;
  --margin: rgba(200, 32, 58, 0.5);

  --serif: "Caslon GE", "Libre Caslon Display", Didot, Georgia, serif;
  --sans: "Figtree GE", system-ui, -apple-system, "Segoe UI", sans-serif;
  --type: "Courier Prime GE", "Courier New", Courier, monospace;

  --gut: clamp(20px, 5.5vw, 80px);
  --max: 1180px;
  --v: clamp(48px, 8vw, 116px);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --flip: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection { background: #fbd0d8; color: var(--ink); }
svg { display: block; }
h1, h2, h3, p, ol { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
h2 { font-size: clamp(27px, 2.8vw, 38px); line-height: 1.1; letter-spacing: -0.008em; color: var(--ink); }
h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
code { font-family: var(--type); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.ge-top :focus-visible, .ge-flap :focus-visible, .ge-close :focus-visible, .world-colophon :focus-visible { outline-color: #fff; }

/* ---------- Top bar, on the flap ---------- */
.ge-top {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px max(var(--gut), calc((100% - var(--max)) / 2)) 0;
  color: var(--blush);
  font-size: 15px;
}
.ge-top .world-exit { justify-self: start; transition: color 160ms ease; }
.ge-top .world-lang {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 44px;
  min-height: 44px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 160ms ease;
}
.ge-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.ge-mark { width: 24px; height: 24px; }
@media (hover: hover) and (pointer: fine) {
  .ge-top .world-exit:hover, .ge-top .world-lang:hover { color: #fff; }
}

/* ---------- The flap ---------- */
.ge-flap {
  position: relative;
  background: var(--seal);
  color: var(--blush);
  text-align: center;
  padding: clamp(96px, 7.6vw, 110px) var(--gut) clamp(16px, 1.6vw, 24px);
}
.ge-flap__in { max-width: var(--max); margin: 0 auto; }
.ge-flap h1 {
  max-width: 11.6em;
  margin: 0 auto;
  color: #fff;
  font-size: clamp(38px, 4.9vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.012em;
}
.ge-lead {
  max-width: 37em;
  margin: clamp(22px, 2.4vw, 32px) auto 0;
  font-size: clamp(17px, 1.3vw, 19.5px);
  line-height: 1.58;
}
.ge-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 26px; margin-top: clamp(26px, 2.6vw, 34px); }
.ge-note { margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--blush-2); }

.ge-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 8px;
  font: 600 16.5px/1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform 160ms var(--ease), opacity 200ms ease, background-color 200ms ease;
}
.ge-btn:active:not([disabled]) { transform: scale(0.97); }
.ge-btn--letter { background: #fff; color: var(--wax); box-shadow: 0 12px 26px -14px rgba(70, 0, 16, 0.6); }
.ge-btn--ink { background: var(--ink); color: #fff; }
.ge-btn--seal { background: var(--seal); color: #fff; }
.ge-btn[disabled] { opacity: 0.38; cursor: not-allowed; }
.ge-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: rgba(255, 255, 255, 0.55);
  transition: text-decoration-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .ge-btn--letter:hover { background: #fff7f8; }
  .ge-btn--ink:not([disabled]):hover { background: #34293f; }
  .ge-btn--seal:not([disabled]):hover { background: #b31b34; }
  .ge-link:hover { text-decoration-color: #fff; }
}

/* the V of the flap, and the seal on its tip */
.ge-v { position: relative; height: var(--v); margin-top: -1px; pointer-events: none; }
.ge-v__shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 14px rgba(70, 8, 24, 0.14)); }
.ge-v__flap, .ge-close__v polygon { fill: var(--seal); }
.ge-v__fold, .ge-close__v polyline { fill: none; stroke: rgba(255, 255, 255, 0.24); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.ge-seal {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(60px, 6vw, 84px);
  height: auto;
  transform: translate(-50%, 46%);
  filter: drop-shadow(0 6px 8px rgba(80, 6, 22, 0.32));
}
@keyframes ge-press { from { opacity: 0; transform: translate(-50%, 46%) scale(1.22); } }
html.is-arriving .ge-seal { animation: ge-press 620ms var(--ease) 520ms both; }

/* ---------- The desk: the signature ---------- */
.ge-desk { padding: clamp(68px, 6.5vw, 96px) var(--gut) 0; }
.ge-desk__head { max-width: 800px; margin: 0 auto; text-align: center; }

.ge-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  max-width: 1080px;
  margin: clamp(30px, 3.4vw, 44px) auto 0;
}

.ge-query { display: flex; align-items: center; gap: 10px; padding: 0 4px 16px; color: var(--ink-2); font-size: 15px; }
.ge-query svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; flex: none; }
.ge-query code { color: var(--ink); font-size: 15.5px; }
.ge-query span { margin-left: auto; }

.ge-mail { list-style: none; padding: 0; }
.ge-env {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: -4px;
  padding: 15px 16px 15px 18px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 1px 1px rgba(35, 28, 46, 0.04), 0 10px 22px -16px rgba(35, 28, 46, 0.4);
  transform: translateX(var(--x)) rotate(var(--r));
  transition: transform 360ms var(--ease) calc(var(--i) * 16ms);
}
.ge-env:first-child { margin-top: 0; }
.is-saving .ge-env, .is-saved .ge-env { transform: none; }

/* a name and the address behind it, on two faces of one flap */
.ge-who { display: grid; width: 22.4ch; font: 400 15px/1.3 var(--type); perspective: 520px; }
.ge-who > span {
  grid-area: 1 / 1;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 540ms var(--flip), color 300ms ease;
  white-space: nowrap;
}
.ge-who__name { font: 600 15.5px/1.3 var(--sans); color: var(--ink); }
.ge-who__addr { color: var(--ink); transform: rotateX(180deg); }
.is-flipped .ge-who__name { transform: rotateX(-180deg); }
.is-flipped .ge-who__addr { transform: rotateX(0deg); }
.is-sent .ge-who__addr { color: #77728a; }
.ge-subj { min-width: 0; overflow: hidden; color: var(--ink-2); font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
.ge-heart { width: 15px; height: 15px; fill: var(--seal); opacity: 0.9; }

.ge-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.ge-reset {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: 500 15px var(--sans);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule-2);
  cursor: pointer;
}

/* the sheet: ruled paper with a red margin, a tab between the columns */
.ge-sheet { padding-top: 37px; }
.ge-paper {
  position: relative;
  padding: 10px 18px 22px 54px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 22px 44px -30px rgba(35, 28, 46, 0.45);
}
.ge-paper::before { content: ""; position: absolute; top: 0; bottom: 0; left: 42px; width: 1px; background: var(--margin); }
.ge-row {
  position: relative;
  display: grid;
  grid-template-columns: 23ch minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  height: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font: 400 15px/1.2 var(--type);
  color: var(--ink);
}
.ge-row > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ge-row--head { color: var(--red); }
.ge-row:not(.ge-row--head)::before {
  content: "\0000D72";
  position: absolute;
  left: -46px;
  bottom: 8px;
  width: 34px;
  text-align: center;
  color: var(--red);
  font: 600 13px/1.2 var(--sans);
  opacity: 0;
  transform: rotate(-8deg) scale(1.4);
  transition: opacity 220ms ease, transform 420ms var(--ease);
}
.ge-row.is-dup::before { opacity: 1; transform: rotate(-8deg); }
.ge-paper__hint {
  position: absolute;
  left: 54px;
  right: 18px;
  top: 52%;
  text-align: center;
  color: var(--ink-2);
  font-size: 15px;
  transition: opacity 240ms ease;
}
.is-saving .ge-paper__hint, .is-saved .ge-paper__hint { opacity: 0; }
/* the sheet starts blank only when the demo can fill it (world.js adds .is-live for browsers without `scripting`) */
.is-live .ge-row:not(.ge-row--head):not(.is-in) > span { opacity: 0; }
@media (scripting: enabled) {
  .ge-row:not(.ge-row--head):not(.is-in) > .ge-row__a,
  .ge-row:not(.ge-row--head):not(.is-in) > .ge-row__n { opacity: 0; }
}
@media (scripting: none) {
  .ge-ctl, .ge-status, .ge-paper__hint { display: none; }
}
@keyframes ge-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.ge-row.is-in.is-typing > .ge-row__n { animation: ge-type 380ms steps(11, end) both; }
@keyframes ge-flash { 22% { background-color: #fde4e8; } }
.ge-row.is-flash { animation: ge-flash 900ms ease; }
.ge-fly {
  position: absolute;
  z-index: 3;
  margin: 0;
  color: var(--ink);
  font: 400 15px/1.3 var(--type);
  white-space: nowrap;
  pointer-events: none;
}
.ge-status { min-height: 1.6em; margin-top: 14px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.is-copied .ge-btn--seal::before {
  content: "";
  width: 12px;
  height: 7px;
  margin: -3px 10px 0 0;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

/* ---------- Questions ---------- */
.ge-faq { max-width: calc(var(--max) + 2 * var(--gut)); margin: 0 auto; padding: clamp(48px, 4.4vw, 64px) var(--gut) 0; }
.ge-faq__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 56px); margin-top: clamp(24px, 3vw, 36px); }
.ge-qa { padding: 20px 0 0; border-top: 1px solid var(--rule-2); }
.ge-qa h3 { color: var(--ink); font: 400 22px/1.24 var(--serif); }
.ge-qa p { margin-top: 8px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }

/* ---------- The envelope closes ---------- */
.ge-close { position: relative; margin-top: clamp(64px, 5.4vw, 78px); color: var(--blush); text-align: center; }
.ge-close__v { position: relative; height: var(--v); }
.ge-close__v .ge-v__shape { filter: none; }
.ge-close__in { margin-top: -1px; padding: clamp(24px, 3vw, 40px) var(--gut) clamp(48px, 5vw, 68px); background: var(--seal); }
.ge-close__seal {
  position: absolute;
  top: 0;
  left: 50%;
  width: clamp(52px, 5vw, 68px);
  height: auto;
  transform: translate(-50%, -46%);
  filter: drop-shadow(0 6px 8px rgba(80, 6, 22, 0.3));
}
.ge-close h2 { max-width: 13em; margin: 0 auto; color: #fff; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.04; }
.ge-close .ge-note { max-width: 40em; margin-inline: auto; }

.world-colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 24px;
  padding: 18px max(var(--gut), calc((100% - var(--max)) / 2)) 34px;
  background: var(--seal);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--blush-2);
  font-size: 14.5px;
}
.world-colophon p { margin: 0; }
.world-colophon a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.45); }
.world-colophon p a { display: inline; min-height: 0; }
@media (hover: hover) and (pointer: fine) { .world-colophon a:hover { color: #fff; } }

/* ---------- Narrower screens ---------- */
@media (max-width: 860px) {
  .ge-stage { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .ge-sheet { padding-top: 0; }
  .ge-faq__list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .ge-top { font-size: 14.5px; }
  .ge-brand { gap: 8px; font-size: 14px; }
  .ge-mark { width: 20px; height: 20px; }
  .ge-env { transform: translateX(calc(var(--x) * 0.45)) rotate(calc(var(--r) * 0.75)); }
  .ge-flap h1 { font-size: clamp(34px, 9.6vw, 44px); }
  .ge-cta { flex-direction: column; gap: 6px; }
  .ge-cta .ge-btn { width: 100%; max-width: 340px; }
  .ge-env { gap: 12px; padding: 13px 12px 13px 14px; }
  .ge-who { width: 22.4ch; font-size: 13.5px; }
  .ge-who__name { font-size: 15px; }
  .ge-subj { font-size: 14px; }
  .ge-paper { padding-left: 44px; padding-right: 12px; }
  .ge-paper::before { left: 34px; }
  .ge-row { font-size: 13.5px; grid-template-columns: 22.4ch minmax(0, 1fr); gap: 8px; }
  .ge-row:not(.ge-row--head)::before { left: -38px; width: 30px; }
  .ge-fly { font-size: 13.5px; }
  .world-colophon { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .ge-env, .ge-who > span, .ge-row::before, .ge-btn, .ge-paper__hint { transition: none; }
  .ge-who > span { -webkit-backface-visibility: visible; backface-visibility: visible; }
  .ge-who__addr { transform: none; opacity: 0; }
  .ge-who__name { transform: none; }
  .is-flipped .ge-who__name { transform: none; opacity: 0; }
  .is-flipped .ge-who__addr { transform: none; opacity: 1; }
  .ge-row.is-in.is-typing > .ge-row__n, .ge-row.is-flash { animation: none; }
  html.is-arriving .ge-seal { animation: none; }
}
@media (max-width: 370px) {
  .ge-brand span { display: none; }
  .ge-who, .ge-row, .ge-fly { font-size: 12.5px; }
}
