/* Dotclaim's web pages: the app's notebook page (Defter). Ruled paper, the red margin line,
   Caveat for headings, Patrick Hand for text, sticky notes and hand-drawn ink buttons. */

:root {
  --paper: #fbf7ec;
  --rule: rgba(76, 120, 200, 0.14);
  --margin: rgba(214, 80, 80, 0.32);
  --ink: #1f2a44;
  --ink2: #2e3a57;
  --faint: #5b6478;
  --blue: #2457c5;
  --card: #fffdf6;
  --note: #ffe98a;
  --note-sub: #4f4422;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    var(--rule) 31px,
    var(--rule) 32px
  );
  color: var(--ink);
  font-family: 'Patrick Hand', 'Comic Sans MS', system-ui, sans-serif;
  display: flex;
  justify-content: center;
}

.page {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 52px 24px 32px 56px;
  display: flex;
  flex-direction: column;
}

.page::before {
  content: '';
  position: absolute;
  left: 38px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--margin);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: 0 6px 12px -6px rgba(40, 40, 40, 0.45);
}

.brand span {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
}

h1 {
  margin: 28px 0 0;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 44px;
  line-height: 1.05;
}

p {
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink2);
}

.note {
  position: relative;
  margin: 30px 0 0;
  padding: 20px 18px 18px;
  background: var(--note);
  border-radius: 2px 2px 16px 2px;
  box-shadow: 0 10px 18px -10px rgba(60, 40, 0, 0.45);
  transform: rotate(-1.2deg);
  animation: slap 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}

.note::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -10px;
  width: 80px;
  height: 22px;
  margin-left: -40px;
  background: rgba(214, 200, 160, 0.65);
  transform: rotate(-3deg);
}

.note small {
  display: block;
  font-size: 16px;
  color: var(--note-sub);
}

.code {
  margin-top: 2px;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 56px;
  letter-spacing: 6px;
  line-height: 1.1;
}

.spacer {
  flex: 1;
  min-height: 28px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  margin-top: 12px;
  padding: 8px 16px;
  border: 2.4px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
}

.btn.primary {
  min-height: 60px;
  border-width: 2.6px;
  background: var(--blue);
  color: #fff;
  box-shadow: 4px 5px 0 var(--ink);
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 30px;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 3px 0 var(--ink);
}

.hint {
  margin-top: 14px;
  font-size: 16px;
  color: var(--faint);
  text-align: center;
}

.foot {
  margin-top: 24px;
  font-size: 15px;
  color: var(--faint);
  text-align: center;
}

@keyframes slap {
  0% {
    opacity: 0;
    transform: translateY(-24px) rotate(-1.2deg) scale(1.06);
  }
  60% {
    opacity: 1;
    transform: translateY(3px) rotate(-1.2deg);
  }
  100% {
    opacity: 1;
    transform: rotate(-1.2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .note {
    animation: none;
  }
}

/* Legal pages: the same notebook page, wider and set for reading. */

.page.doc {
  max-width: 680px;
}

.doc h1 {
  font-size: 46px;
}

.doc .updated {
  margin-top: 6px;
  font-size: 16px;
  color: var(--faint);
}

.doc h2 {
  margin: 30px 0 0;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
}

.doc p,
.doc li {
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink2);
}

.doc ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.doc b {
  color: var(--ink);
  font-weight: normal;
  text-decoration: underline;
  text-decoration-color: rgba(255, 214, 0, 0.9);
  text-decoration-thickness: 7px;
  text-underline-offset: -3px;
  text-decoration-skip-ink: none;
}

.doc a {
  color: var(--blue);
}

.doc .brand {
  color: var(--ink);
}

.doc .links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 36px;
  font-size: 17px;
}

nav.foot a {
  color: var(--faint);
}
