/* Mood Lock website — the app's look: a dark-tinted woods photo, frosted
   glass for chrome, journal paper for content, handwriting for headings. */

:root {
  --ink: #2b3a55;
  --ink-soft: rgba(43, 58, 85, 0.65);
  --lavender-ink: #5e4a92;
  --green-ink: #4f8a5b;
  --paper: #fffdf6;
  --margin-rule: rgba(220, 120, 120, 0.55);
  --rule: rgba(43, 58, 85, 0.12);
  --on-photo: #ffffff;
  --on-photo-soft: rgba(255, 255, 255, 0.78);
  --glass: rgba(26, 26, 46, 0.35);
  --glass-edge: rgba(255, 255, 255, 0.35);
  --lavender-card: #e4dcf5;
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* strong ease-in-out for on-screen movement */
}

* { box-sizing: border-box; }

html, body { margin: 0; }
html { overflow-x: clip; } /* the full-width gallery is 100vw, which includes any scrollbar */

body {
  min-height: 100vh;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--on-photo);
  background: #1d2a22 url("assets/background.jpg") center / cover fixed no-repeat;
  -webkit-font-smoothing: antialiased;
}

/* The dark tint over the photo, as in the app */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 14, 0.45);
  z-index: -1;
}

a { color: inherit; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* Top bar: logo + name on the left, language switch on the right */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 20px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.brand img { width: 36px; height: 36px; border-radius: 9px; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

/* Language menu: the current language in a glass pill, the others in a
   glass panel underneath (a plain <details>, so it works without JavaScript) */
.lang-menu { position: relative; }

.lang-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.lang-menu summary::-webkit-details-marker { display: none; }

/* A small chevron that turns when the menu opens */
.lang-menu summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 200ms ease;
}

.lang-menu[open] summary::after { transform: translateY(1px) rotate(225deg); }

.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  background: rgba(26, 26, 46, 0.72); /* darker than the pill, so the list reads over the photo */
}

.lang-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 15px;
  text-decoration: none;
  color: var(--on-photo-soft);
}

.lang-menu a:hover, .lang-menu a:focus-visible { color: var(--on-photo); background: rgba(255, 255, 255, 0.12); }

.lang-menu a[aria-current] { color: var(--on-photo); font-weight: 600; }

/* Hero */
.hero {
  text-align: center;
  padding: 56px 0 24px;
}

.hero > img { width: 104px; height: 104px; border-radius: 24px; } /* the app icon, not the badge */

.hero h1 {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 56px;
  line-height: 1.05;
  margin: 18px 0 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.hero p {
  font-size: 18px;
  line-height: 1.5;
  color: var(--on-photo-soft);
  margin: 0 auto;
  max-width: 520px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* A sheet of the journal's paper */
.paper {
  position: relative;
  color: var(--ink);
  background: var(--paper) url("assets/paper-texture.png") repeat;
  border-radius: 6px;
  padding: 28px 24px 28px 64px;
  margin-top: 28px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* Red margin line */
.paper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 44px;
  width: 1.5px;
  background: var(--margin-rule);
}

.paper h1, .paper h2 {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 12px;
}

.paper h3 {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 26px;
  margin: 26px 0 6px;
}

.paper p, .paper li {
  font-size: 16px;
  line-height: 1.6;
}

.paper ul, .paper ol { padding-left: 20px; }

.paper h2 + p { margin-top: 0; }
.paper p + h2 { margin-top: 26px; }

.paper .meta { color: var(--ink-soft); font-size: 14px; }

/* Ticked checklist, as on the paywall */
.checklist { list-style: none; padding: 0; margin: 0; }

.checklist li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-family: "Caveat", cursive;
  font-size: 25px;
  line-height: 1.3;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}

.checklist li::before {
  content: "✓";
  color: var(--green-ink);
  font-weight: 700;
  font-size: 22px;
}

/* Journal-style button: a flat card with a dashed outline */
.journal-button {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  position: relative;
  margin: 28px auto 0;
  padding: 14px 22px;
  color: var(--ink);
  background: var(--lavender-card);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: 17px;
  border-radius: 2px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.22);
}

.journal-button::after {
  content: "";
  position: absolute;
  inset: -5px 5px 5px -5px;
  border: 1.5px dashed rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.center { text-align: center; }

/* App Store badge (Apple's artwork, unaltered) */
.store-badge { display: inline-block; margin-top: 24px; line-height: 0; }
.store-badge img { height: 52px; width: auto; }
.store-badge:hover img { filter: brightness(1.15); }

/* Screenshots on a drum: the cards sit around a cylinder that turns one card
   per step. The stage runs edge to edge, past the column. Card transforms are
   set per card in site.js (the radius depends on the card width). */
.shots { margin: 32px calc(50% - 50vw) 0; }

.drum {
  --card-w: min(84vw, 560px);
  position: relative;
  height: calc(var(--card-w) * 0.75 + 32px); /* 4:3 cards + room for the shadow */
  perspective: 1600px;
  overflow: hidden;
  outline: none;
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.gallery li {
  position: absolute;
  top: 8px;
  left: calc(50% - var(--card-w) / 2);
  width: var(--card-w);
  backface-visibility: hidden;
  transition: transform 700ms var(--ease-in-out), opacity 700ms var(--ease-in-out);
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.drum.is-instant .gallery li { transition: none; }

/* Reduced motion: no turning, the cards crossfade in place */
@media (prefers-reduced-motion: reduce) {
  .gallery li { transition: opacity 200ms ease; }
}

.gallery-nav { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }

.gallery-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--on-photo);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

/* Footer */
.footer {
  margin-top: 48px;
  text-align: center;
  font-size: 13px;
  color: var(--on-photo-soft);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }

.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .hero h1 { font-size: 44px; }
  .paper { padding: 24px 18px 24px 52px; }
  .paper::before { left: 36px; }
}
