/* "Семинар за родители" as a lesson for the parents (parts/seminar.php): the first sentence is written on the board
   in chalk word by word – the chalk moves along the words and goes back on the tray –, the teacher of the site stands
   beside the board, and the rest of the text is on notebook sheets held by clips. */

.sem { position: relative; padding: 50px 0 70px; overflow: hidden; }
.bg .sem .sem__chalk { font-family: 'Neucha', Arial, sans-serif; }

/* ---------- The board and the teacher ---------- */
.sem__class { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 34px; }
.sem__board { position: relative; flex: 1; max-width: 900px; min-height: 300px; padding: 46px 56px 74px; border: 16px solid #b9804a; border-radius: 12px; background: radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, .07), transparent 45%), radial-gradient(ellipse at 75% 70%, rgba(255, 255, 255, .05), transparent 50%), #2f5d46; box-shadow: inset 0 0 0 3px #9c6a3a, inset 0 0 40px rgba(0, 0, 0, .35), 0 24px 40px -24px rgba(40, 30, 20, .6); opacity: 0; transform: translateY(30px) scale(.97); transition: opacity .7s, transform .9s cubic-bezier(.34, 1.3, .64, 1); }
.sem__board.is-in { opacity: 1; transform: none; }
.sem .sem__chalk { margin: 0; font: 400 36px/1.45 'Cabin Sketch', Arial, sans-serif; color: rgba(255, 255, 255, .92); text-shadow: 0 0 1px rgba(255, 255, 255, .6), 0 0 6px rgba(255, 255, 255, .15); }
.sem__chalk .w { display: inline-block; opacity: 0; filter: blur(3px); transform: translateY(3px); transition: opacity .35s, filter .35s, transform .35s; }
.sem__chalk .w.is-on { opacity: 1; filter: none; transform: none; }
/* the chalk: it lies on the tray, follows the words while they are written (assets/js/seminar.js) and goes back */
.sem__stick { position: absolute; z-index: 2; left: calc(100% - 150px); top: calc(100% - 17px); width: 30px; height: 9px; border-radius: 3px 5px 5px 3px; background: linear-gradient(#fff, #e9ecef); box-shadow: 0 2px 2px rgba(0, 0, 0, .3); transform-origin: 0 50%; transition: transform .22s ease-out; }
/* (it is tilted inside the transform the script sets: a `rotate` would turn the way it moves as well) */
.sem__board.is-writing .sem__stick { animation: sem-scribble .17s linear infinite alternate; }
@keyframes sem-scribble { from { translate: 0 0; } to { translate: 2px -2px; } }
.sem__tray { position: absolute; left: 30px; right: 30px; bottom: -6px; height: 10px; border-radius: 3px; background: #8e5d2e; box-shadow: 0 3px 3px rgba(0, 0, 0, .25); }
.sem__eraser { position: absolute; left: 40px; bottom: 8px; width: 58px; height: 20px; border-radius: 4px; background: linear-gradient(#d29a62 0 45%, #6b7177 45%); box-shadow: 0 2px 2px rgba(0, 0, 0, .25); }
.sem__teacher { flex: none; width: 118px; height: 296px; margin-bottom: -6px; background: url('../images/teacher.svg') no-repeat center bottom / contain; transform-origin: 50% 100%; opacity: 0; transform: translateX(60px); transition: opacity .7s .4s, transform 1s cubic-bezier(.34, 1.3, .64, 1) .4s; }
.sem__board.is-in + .sem__teacher { opacity: 1; transform: none; animation: sem-sway 3.6s ease-in-out 1.4s infinite alternate; }
@keyframes sem-sway { from { rotate: -1.5deg; } to { rotate: 2deg; } }

/* ---------- The notebook sheets ---------- */
.sem__notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 46px 34px; margin-top: 70px; }
.sheet { position: relative; width: calc((100% - 68px) / 3); padding: 40px 28px 30px 58px; border-radius: 4px; background: linear-gradient(90deg, transparent 40px, rgba(255, 87, 54, .45) 40px 42px, transparent 42px), repeating-linear-gradient(transparent 0 31px, #d7e6f4 31px 32px) 0 33px, #fffef9; box-shadow: 0 18px 30px -18px rgba(40, 30, 20, .45); rotate: var(--r); opacity: 0; transform: translateY(50px) scale(.94); transition: opacity .7s calc(var(--k) * .15s), transform 1s cubic-bezier(.34, 1.3, .64, 1) calc(var(--k) * .15s), rotate .5s cubic-bezier(.34, 1.4, .64, 1); }
.sheet.is-in { opacity: 1; transform: none; }
.sheet:hover { rotate: 0deg; }
.sheet::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 0 0 4px 4px; background: var(--c); opacity: .8; }
.sem .sheet p { margin: 0; font-size: 17px; line-height: 32px; color: #3c4741; }
.sheet__clip { position: absolute; left: 34px; top: -30px; width: 30px; height: 64px; background: url('../images/paper-clip.svg') no-repeat center / contain; transform: rotate(8deg); }
.sheet:nth-child(2n) .sheet__clip { left: auto; right: 34px; background-image: url('../images/paper-clip-green.svg'); width: 40px; transform: rotate(-6deg); }

/* ---------- Smaller screens ---------- */
@media only screen and (max-width: 1100px) {
	.sem .sem__chalk { font-size: 31px; }
	.sheet { width: calc((100% - 34px) / 2); }
}
@media only screen and (max-width: 768px) {
	.sem { padding-top: 30px; }
	.sem__class { display: block; padding-bottom: 20px; }
	.sem__board { min-height: 0; padding: 26px 22px 60px; border-width: 12px; }
	.sem .sem__chalk { font-size: 24px; }
	.sem__teacher { position: absolute; right: 6px; bottom: -24px; width: 62px; height: 156px; margin: 0; }
	.sem__notes { gap: 40px; margin-top: 50px; }
	.sheet { width: 100%; padding: 36px 20px 26px 52px; }
	.sem .sheet p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.sem *, .sem *::before, .sem *::after { animation: none !important; transition: none !important; }
	.sem__board, .sem__teacher, .sheet, .sem__chalk .w { opacity: 1 !important; transform: none !important; filter: none !important; }
}
