/* v01: landing, level pages (torn notebook), the reveal note, between (the report fills up), the gate envelope. */

/* ---- landing ---- */
.screen--land { background: linear-gradient(180deg, rgba(12, 10, 6, 0) 0%, rgba(12, 10, 6, .1) 30%, rgba(40, 26, 10, .78) 62%, rgba(40, 26, 10, .92) 100%); }
.land { min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(16px + var(--safe-t)) 14px calc(14px + var(--safe-b)); }
.land__scrawl {
  margin: 0 0 auto; padding: 46px 0 0 6px; font-size: 27px; color: var(--paper); transform: rotate(-4deg);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .5); animation: rise .6s .5s var(--ease-out) both;
}
.land__board { animation: boardin .7s .1s var(--ease-out) both; margin-top: 26px; }
@keyframes boardin { from { opacity: 0; transform: translateY(60%) rotate(4deg); } to { opacity: 1; transform: rotate(-1deg); } }
.sheet__field { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--pencil); }
.sheet__blank { flex: 1; border-bottom: 2px dashed rgba(81, 76, 70, .45); font-size: 22px; color: rgba(81, 76, 70, .35); padding-left: 6px; position: relative; }
.sheet__blank::after { content: ''; position: absolute; left: 44px; bottom: 4px; width: 2px; height: 22px; background: var(--graphite); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.land__h1 { margin: 12px 0 6px; font-size: 44px; line-height: .98; color: var(--graphite); }
.land__p { margin: 0; font-size: 17px; line-height: 1.38; color: var(--pencil); }
.land__err { margin: 12px 0 0; color: var(--red); font-size: 16px; }

/* ---- level pages: a torn notebook page over the frozen first frame ---- */
.screen--intro { background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .25) 30%, rgba(20, 14, 6, .7) 100%); }
.intro { min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(70px + var(--safe-t)) 10px calc(10px + var(--safe-b)); }
.intro__pov { margin: 0 0 auto; padding: 0 60px 18px 8px; font-size: 30px; line-height: 1.05; color: var(--paper); transform: rotate(-2deg); text-shadow: 0 2px 0 rgba(0, 0, 0, .6), 0 0 16px rgba(0, 0, 0, .6); animation: rise .5s .3s var(--ease-out) both; }
.intro__pov small { display: block; font-size: 16px; font-weight: 400; margin-top: 4px; opacity: .9; }
.torn-wrap { filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .4)); }
.torn-wrap.is-torn { animation: tearoff .38s ease-in forwards; }
@keyframes tearoff { to { transform: translate(40px, -110%) rotate(9deg); opacity: 0; } }
.page {
  position: relative; padding: 26px 18px 18px 50px; border-radius: 0 0 4px 4px;
  background:
    linear-gradient(90deg, transparent 37px, var(--marginl) 37px 39px, transparent 39px),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px),
    var(--paper) var(--grain);
  background-position: 0 0, 0 14px, 0 0;
}
.torn { clip-path: var(--torn); padding-top: 30px; }
.page__tab { margin: 0; font-size: 13px; color: var(--pencil); display: flex; align-items: center; justify-content: space-between; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border: 2px solid var(--pencil); border-radius: 50%; }
.dots i.is-done { background: var(--pencil); }
.dots i.is-now { background: var(--red); border-color: var(--red); }
.page__h { position: relative; display: inline-block; margin: 2px 0 4px; font-size: 58px; line-height: 1; }
.page__under { position: absolute; left: -4px; right: -8px; bottom: -4px; width: calc(100% + 12px); height: 12px; }
.page__under path { fill: none; stroke: var(--red); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .55s .45s var(--ease-out) forwards; }
.page__how { margin: 6px 0 4px; font-size: 19px; line-height: 32px; }
.page__how b { color: var(--graphite); }
.page__meta { margin: 0 0 8px; font-size: 12px; color: var(--pencil); }
.rate { margin: 6px 0 14px; }
.rate__q { margin: 0 0 6px; font-size: 16px; line-height: 1.3; color: var(--pencil); }
.rate__row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px 6px; }
.rate__n { position: relative; min-height: 48px; border: 0; background: none; cursor: pointer; font-size: 30px; color: var(--graphite); border-radius: 50%; transition: transform .15s var(--ease-pop); }
.rate__n:active { transform: scale(.88); }
.rate__ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rate__ring path { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.rate__n.is-picked { color: var(--red); transform: scale(1.08); }
.rate__n.is-picked .rate__ring path { animation: draw .4s var(--ease-out) forwards; }
.rate__said { margin: 4px 0 0; min-height: 26px; font-size: 22px; color: var(--red); }

/* ---- the reveal: the scout's note under the taped-in clip ---- */
.screen--rev { pointer-events: none; overflow: hidden; }
.rev { position: absolute; inset: 0; }
.rev__cap {
  position: absolute; left: 22px; right: 22px; top: calc(74px + var(--safe-t) + (100vw - 36px) * .5625 + 18px); margin: 0;
  font-size: 21px; line-height: 1.1; color: var(--graphite); transform: rotate(-1deg); animation: rise .4s .3s var(--ease-out) both;
}
.rev__col {
  position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b));
  top: calc(74px + var(--safe-t) + (100vw - 36px) * .5625 + 76px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
}
.rev__verdict { padding: 0 8px; transform: rotate(-2deg); animation: scrawl .45s .15s var(--ease-pop) both; }
@keyframes scrawl { from { opacity: 0; transform: rotate(-6deg) scale(.85); } }
.rev__card { position: relative; padding: 16px; border-radius: 4px; pointer-events: auto; transform: rotate(.6deg); }
.rev__head { display: flex; align-items: center; gap: 8px; }
.rev__head h3 { margin: 0; font-size: 44px; line-height: .95; }
.rev__col.is-good h3 { color: var(--green); }
.rev__col.is-hmm h3 { color: var(--red); }
.rev__tick { width: 48px; height: 48px; flex: none; }
.rev__tick path { stroke-width: 5.5; }
.rev__hmm { font-size: 54px; line-height: 1; color: var(--red); width: 34px; text-align: center; }
.rev__sub { margin: 4px 0 0; font-size: 19px; line-height: 1.3; color: var(--graphite); }
.times { display: grid; gap: 6px; margin: 0 0 14px; }
.times__row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; }
.times__row span { font-size: 13px; color: var(--pencil); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.times__row i { height: 12px; width: var(--w); border-radius: 2px 6px 3px 5px; background: repeating-linear-gradient(-50deg, var(--graphite) 0 2px, transparent 2px 5px); border: 2px solid var(--graphite); transform-origin: 0 50%; animation: grow .7s .35s var(--ease-out) both; }
.times__row.is-pro i { background: repeating-linear-gradient(-50deg, var(--green) 0 2px, transparent 2px 5px); border-color: var(--green); }
.times__row i.is-none { width: 0; border: 0; }
.times__row b { font-size: 24px; line-height: 1; min-width: 54px; text-align: right; }
.times__row b small { font-size: 16px; font-weight: 400; color: var(--pencil); }
@keyframes grow { from { transform: scaleX(0); } }
.rev__saw { margin: 14px 0 0; font-size: 16px; line-height: 1.45; color: var(--graphite); transform: rotate(1.5deg); }
.rev__saw b { color: var(--graphite); font-weight: 400; }

/* ---- between: the clipboard comes back, notes write themselves ---- */
.screen--betw { background: radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0), rgba(40, 24, 8, .35)); }
.betw { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: calc(30px + var(--safe-t)) 12px calc(12px + var(--safe-b)); }
.betw__board { transform: rotate(-.6deg); }
.checks--sheet { margin: 0 0 10px; font-size: 15px; }
.sec { padding: 10px 0 8px; border-top: 2px dashed rgba(81, 76, 70, .25); }
.sec__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sec__h .typed { font-size: 14px; }
.sec__later { font-size: 14px; color: var(--faint); }
.sec.is-blank .sec__h .typed { color: var(--faint); }
.sec__score { position: relative; font-size: 28px; line-height: 1; color: var(--red); padding: 2px 10px; }
.sec__ring { position: absolute; inset: -6px -4px; width: calc(100% + 8px); height: calc(100% + 12px); }
.sec__ring path { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .5s .2s var(--ease-out) forwards; }
.sec__notes { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.sec__notes li { display: flex; align-items: flex-start; gap: 6px; font-size: 22px; line-height: 1.1; }
.sec__mk { flex: none; width: 26px; display: grid; place-items: center; }
.sec__mk b { color: var(--red); font-size: 24px; }
.sec__tick { width: 24px; height: 24px; }
.sec__sum { margin: 6px 0 0; font-size: 24px; line-height: 1.05; color: var(--red); }
.is-writing-in { clip-path: inset(-20% 100% -20% 0); animation: write .55s linear forwards; }
.betw__next { margin: 14px 0 14px; opacity: 0; animation: rise .45s var(--ease-out) forwards; }
.betw__h { margin: 0; font-size: 32px; line-height: 1; }
.betw__next .note { margin: 2px 0 0; font-size: 17px; color: var(--pencil); }

/* ---- the gate: the sealed envelope ---- */
.screen--gate { background: var(--kraft) var(--fibre); }
.gate { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: calc(64px + var(--safe-t)) 14px calc(16px + var(--safe-b)); }
.env { position: relative; width: 100%; max-width: 480px; margin: 0 auto; }
.env.is-shake { animation: jolt .3s linear 2; }
.env__letter { position: relative; z-index: 1; margin: 0 18px -70px; height: 210px; overflow: hidden; padding: 16px 16px 0; transform: rotate(-2deg); animation: letterin .8s .1s var(--ease-out) both; }
@keyframes letterin { from { transform: translateY(-50px) rotate(-6deg); opacity: 0; } }
.env__blur { filter: blur(3px); opacity: .8; pointer-events: none; }
.env__blur .is-writing-in { clip-path: none; animation: none; }
.env__score { position: absolute; right: 18px; top: 34px; margin: 0; font-size: 58px; color: var(--red); filter: blur(5px); }
.env__stamp { position: absolute; left: 50%; top: 56px; translate: -50% 0; font-size: 32px; animation: stampin .4s .7s var(--ease-pop) both; }
@keyframes stampin { from { opacity: 0; scale: 2.4; } 70% { scale: .94; } to { opacity: .92; scale: 1; } }
.env__front {
  position: relative; z-index: 2; padding: 86px 20px 18px; border-radius: 6px;
  background: #d8b57c var(--fibre); box-shadow: 0 18px 36px rgba(40, 24, 6, .4);
}
.env__front::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 70px; border-radius: 6px 6px 0 0;
  background: #c9a36a var(--fibre); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .1));
}
.env.is-open .env__letter { transition: transform .6s var(--ease-out); transform: translateY(-40px) rotate(0); }
.env.is-open .env__front { transition: transform .6s ease-in, opacity .6s; transform: translateY(60px); opacity: 0; }
.env__h { margin: 0; font-size: 40px; line-height: 1; }
.env__p { margin: 2px 0 12px; font-size: 19px; color: var(--pencil); }
.field { display: flex; align-items: baseline; gap: 10px; border-bottom: 2.5px solid var(--graphite); padding: 6px 0 2px; }
.field__k { flex: none; width: 92px; font-size: 13px; color: var(--pencil); }
.field__in { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 24px; line-height: 1.2; padding: 4px 0; color: var(--graphite); }
.field__in::placeholder { color: rgba(81, 76, 70, .38); }
.field:focus-within { border-bottom-color: var(--green); }
.field.is-bad { border-bottom-color: var(--red); }
.field__err { margin: 3px 0 8px; min-height: 22px; font-size: 15px; line-height: 1.3; color: var(--red); }
.env__fine { margin: 12px 0 0; font-size: 12px; text-align: center; color: rgba(45, 43, 40, .7); }
@keyframes jolt { 0%, 100% { translate: 0 0; } 25% { translate: -6px 0; } 75% { translate: 6px 0; } }

/* ---- laptop ---- */
@media (min-width: 900px) {
  .land { flex-direction: row; align-items: center; justify-content: flex-end; padding: 40px 8vw; gap: 4vw; }
  .land__scrawl { margin: 0 auto 0 0; padding: 0; font-size: 40px; max-width: 520px; align-self: flex-start; margin-top: 12vh; }
  .land__board { width: 470px; margin: 0; }
  .land__h1 { font-size: 52px; }
  .screen--land { background: linear-gradient(90deg, rgba(12, 10, 6, 0) 30%, rgba(30, 20, 8, .55) 100%); }
  .intro { align-items: center; justify-content: center; padding: 40px; }
  .intro__pov { margin: 0 0 18px; padding: 0; font-size: 36px; text-align: center; }
  .torn-wrap { width: 560px; }
  .screen--intro { background: radial-gradient(ellipse at 50% 60%, rgba(20, 14, 6, .7), rgba(20, 14, 6, .25)); }
  .rev__cap { left: 5vw; right: auto; width: min(56vw, 820px); top: calc(50% + min(56vw, 820px) * .28125 + 22px); font-size: 26px; }
  .rev__col { left: auto; right: 5vw; bottom: auto; top: 50%; width: min(32vw, 440px); transform: translateY(-50%); justify-content: center; gap: 22px; }
  .rev__card { padding: 22px; }
  .rev__head h3 { font-size: 50px; }
  .betw__board { width: 560px; margin: 0 auto; }
}
