/* The "night globe" look of the app, for JoyJar's web pages. No grey. */

@font-face {
  font-family: 'Caveat';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/caveat-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Caveat';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/caveat-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/figtree-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/figtree-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/figtree-700.woff2') format('woff2');
}

:root {
  --indigo: #1b1440;
  --field: #261c57;
  --edge: #5a4fa0;
  --gold: #f6c453;
  --white: #ffffff;
  --lilac: #d6d0f2;
  --ink: #1b1440;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--indigo);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--indigo);
  color: var(--white);
  font-family: Figtree, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  justify-content: center;
}

.page {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 56px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wordmark {
  margin: 0;
  font-family: Caveat, cursive;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: var(--gold);
}

/* The page at the root: the wordmark and nothing else. */
.bare {
  align-items: center;
  justify-content: center;
  padding-top: 28px;
}
.bare .wordmark {
  font-size: 56px;
}

h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.lead {
  margin: 0;
  color: var(--white);
}

section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[hidden] {
  display: none !important;
}

form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.grow {
  flex: 1;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

label,
.count {
  font-size: 13px;
  font-weight: 600;
  color: var(--lilac);
}
.count {
  font-weight: 400;
}

input[type='text'] {
  height: 52px;
  width: 100%;
  border: 2px solid var(--edge);
  border-radius: 14px;
  background: var(--field);
  color: var(--white);
  padding: 0 16px;
  font-family: inherit;
  font-size: 17px;
}

textarea {
  flex: 1;
  width: 100%;
  min-height: 220px;
  resize: none;
  border: 0;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 18px 20px;
  font-family: Caveat, cursive;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
}

input[type='text']:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

button {
  height: 54px;
  width: 100%;
  border: 0;
  border-radius: 27px;
  background: var(--gold);
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: default;
}

.problem {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
}

.foot {
  margin: 0;
  font-size: 13px;
  color: var(--lilac);
  text-align: center;
}

/* A field people cannot see or reach. Only a robot fills it. */
.elsewhere {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The tap-to-open page: a joy someone sent as a link. */
.middle {
  flex: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 56px;
}

.jar {
  width: 100%;
  max-width: 300px;
  height: auto;
  padding: 0;
  border-radius: 28px;
  background: none;
  display: block;
  -webkit-tap-highlight-color: transparent;
}
.jar svg {
  display: block;
  overflow: visible;
}

.note {
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform-origin: top center;
  transform: scaleY(0.12) rotate(-2deg);
  opacity: 0;
}
.note.unfolded {
  transform: none;
  opacity: 1;
  transition: transform 0.6s ease-out, opacity 0.35s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .note.unfolded {
    transition: none;
  }
}

.words {
  margin: 0;
  font-family: Caveat, cursive;
  font-weight: 500;
  font-size: 29px;
  line-height: 1.2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.photos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.photos:empty {
  display: none;
}
.photos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--lilac);
}

.from {
  margin: 0;
  font-family: Caveat, cursive;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
  color: #3b2f8f;
  text-align: right;
  overflow-wrap: anywhere;
}

/* "Report this page", under an opened joy. */
.report {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.textlink {
  height: 44px;
  width: auto;
  align-self: center;
  padding: 0 12px;
  border-radius: 22px;
  background: none;
  color: var(--lilac);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}
.report h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.reasons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 0;
  margin: 0;
  padding: 0;
}
.reasons legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lilac);
}
.reason {
  height: 50px;
  background: none;
  border: 2px solid var(--white);
  border-radius: 25px;
  color: var(--white);
  font-size: 16px;
}
.reason[aria-pressed='true'] {
  background: var(--white);
  color: var(--ink);
}
.small {
  margin: 0;
  font-size: 13px;
  color: var(--lilac);
}
a {
  color: var(--white);
  font-weight: 600;
  text-underline-offset: 2px;
}
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* The landing page and the pages of words (privacy, terms, help, deleting
   an account): a wider column, read from the top. */
.page.wide {
  max-width: 680px;
  gap: 22px;
  padding-bottom: 40px;
}
.wordmark a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}
.wide h1 {
  font-size: 30px;
}
.wide h2 {
  margin: 14px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}
.wide h3 {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 700;
}
.wide p,
.wide li {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--lilac);
}
.wide ul,
.wide ol {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wide strong {
  color: var(--white);
  font-weight: 600;
}
.wide .lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--white);
}
.dated {
  font-size: 14px !important;
}
.card {
  background: var(--field);
  border: 2px solid var(--edge);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h2,
.card h3 {
  margin: 0;
}
.soon {
  align-self: flex-start;
  border: 2px solid var(--gold);
  border-radius: 27px;
  padding: 12px 22px;
  color: var(--gold) !important;
  font-weight: 700;
}
.price {
  font-family: Caveat, cursive;
  font-weight: 700;
  font-size: 34px !important;
  line-height: 1.1 !important;
  color: var(--gold) !important;
}
.wide .shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 6px 0;
  padding: 0;
  list-style: none;
}
.wide .shots li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  font-size: 14px !important;
  line-height: 1.35 !important;
}
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 2px solid var(--edge);
  background: var(--field);
}
@media (max-width: 520px) {
  .wide .shots {
    grid-template-columns: 1fr;
    max-width: 280px;
    align-self: center;
  }
}
.footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 2px solid var(--edge);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.footer p {
  font-size: 14px;
}
.wide .wordmark {
  font-size: 34px;
  line-height: 1;
  color: var(--gold);
}
