/* Стили оформления «caps» — ktodarit.ru. Общие — /t/core.css. */
:is(.th-caps, .th-notebook, .th-diploma, .th-prom, .th-adult) .tt { --tt-l: 2; }
:is(.th-caps, .th-notebook, .th-diploma, .th-prom, .th-adult) .ph:has(.gift-img) { display: block; overflow: hidden; }
:is(.th-caps, .th-notebook, .th-diploma, .th-prom, .th-adult) .hero { position: relative; text-align: center; overflow: hidden; }
:is(.th-caps, .th-notebook, .th-diploma, .th-prom, .th-adult) h1 { position: relative; overflow-wrap: anywhere; }
:is(.th-caps, .th-notebook, .th-diploma, .th-prom, .th-adult) .greet { position: relative; max-width: 560px; margin: 18px auto 0; line-height: 1.55; white-space: pre-line; }
:is(.th-caps, .th-notebook, .th-diploma, .th-prom, .th-adult) .sec-sub { text-align: center; max-width: 580px; margin: 0 auto 40px; padding: 0 20px; line-height: 1.5; }
:is(.th-caps, .th-notebook, .th-prom, .th-adult) .list { max-width: 1120px; margin: 0 auto; padding: 0 20px 70px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 36px 26px; }
:is(.th-caps, .th-notebook, .th-prom, .th-adult) .card { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
:is(.th-caps, .th-notebook, .th-diploma, .th-prom, .th-adult) .card h3 { width: 100%; overflow-wrap: anywhere; }
:is(.th-caps, .th-notebook, .th-prom, .th-adult) .card .btn { margin-top: auto; }
:is(.th-caps, .th-notebook, .th-diploma, .th-prom, .th-adult) .taken .btn { padding-left: 16px; padding-right: 16px; white-space: nowrap; }
.th-caps { --gold: #d4af37; --gold2: #f3d27a; --ink: #f4f1ff; background: #0b1033; color: var(--ink); font-family: "Manrope", sans-serif; }
.th-caps .hero { min-height: 92vh; display: flex; align-items: center; justify-content: center; padding: 70px 20px; background: radial-gradient(ellipse at 50% 120%, #4a2f8f 0%, #23205f 40%, #0b1033 75%); }
.th-caps .stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; animation: bb-tw 3s ease-in-out infinite; animation-delay: calc(var(--d) * -1); }
.th-caps .year { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 900 clamp(150px, 34vw, 460px)/1 "Unbounded", sans-serif; color: transparent; -webkit-text-stroke: 2px rgba(243, 210, 122, .16); letter-spacing: -.04em; white-space: nowrap; pointer-events: none; }
.th-caps .flyers .cap { position: absolute; bottom: -120px; width: clamp(60px, 7vw, 100px); animation: cp-fly var(--t) linear infinite; animation-delay: calc(var(--d) * -1); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
@keyframes cp-fly { 0% { transform: translateY(0) rotate(var(--r)); opacity: 0; } 8% { opacity: 1; } 50% { transform: translateY(-62vh) rotate(calc(var(--r) * -1)); } 90% { opacity: 1; } 100% { transform: translateY(-125vh) rotate(var(--r)); opacity: 0; } }
.th-caps .cap .tas { transform-box: fill-box; transform-origin: 0 0; animation: cp-tas 1.2s ease-in-out infinite alternate; }
@keyframes cp-tas { to { transform: rotate(6deg); } }
.th-caps .foil i { position: absolute; top: -20px; width: 7px; height: 12px; background: var(--c); opacity: .85; animation: cp-foil var(--t) linear infinite; animation-delay: calc(var(--d) * -1); }
@keyframes cp-foil { 0% { transform: translateY(0) rotate(0) rotateY(0); } 100% { transform: translateY(110vh) rotate(540deg) rotateY(720deg); } }
.th-caps .in { position: relative; z-index: 1; width: 100%; max-width: 900px; }
.th-caps .in, .th-notebook .hero, .th-diploma .paper, .th-prom .hero, .th-adult .plate { container-type: inline-size; }
.th-caps .pre { margin: 0; font: 600 14px "Manrope", sans-serif; letter-spacing: .45em; text-transform: uppercase; color: var(--gold2); }
.th-caps h1 { margin: 14px 0 0; font: italic 900 min(calc(clamp(64px, 12vw, 150px) * max(var(--k, 1), .5)), calc(100cqi / var(--w, 1) / .7))/1.02 "Playfair Display", serif;
  background: linear-gradient(100deg, #b88a2a 0%, #f8e3a6 30%, #fff8dc 40%, #d4af37 55%, #f3d27a 75%, #a87a23 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(212, 175, 55, .35)); animation: cp-shine 5s ease-in-out infinite; }
@keyframes cp-shine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.th-caps .date { margin: 14px 0 0; font-size: 16px; letter-spacing: .3em; text-transform: uppercase; opacity: .85; }
.th-caps .greet { font-size: 17px; opacity: .9; }
.th-caps .cd { display: inline-block; margin: 22px 0 0; padding: 10px 24px; border: 1px solid var(--gold); border-radius: 999px; background: rgba(11, 16, 51, .55); color: var(--gold2); font-weight: 700; letter-spacing: .06em; backdrop-filter: blur(4px); }
.th-caps .sec { text-align: center; margin: 40px 0 8px; font: italic 900 clamp(36px, 5.6vw, 60px) "Playfair Display", serif; color: var(--gold2); }
.th-caps .sec-sub { opacity: .8; }
.th-caps .cp { padding: 30px 20px 24px; margin-top: 10px; border-radius: 18px; background: linear-gradient(180deg, #1a1f55, #121640); box-shadow: inset 0 0 0 1px rgba(212, 175, 55, .55), 0 20px 40px -20px rgba(0, 0, 0, .8); }
.th-caps .worn { position: absolute; top: -34px; left: -18px; width: 86px; z-index: 2; opacity: 0; transform: translateY(-60px) rotate(-40deg); transition: transform .7s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; pointer-events: none; }
.th-caps .taken .worn { opacity: 1; transform: rotate(-16deg); }
.th-caps .ph { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; font-size: 60px; background: radial-gradient(circle at 40% 35%, #2b3170, #151a4a); box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(212, 175, 55, .35); }
.th-caps .ph .gift-img { border-radius: 50%; padding: 12%; }
.th-caps .cp h3 { margin: 18px 0 0; font: 700 19px/1.25 "Manrope", sans-serif; }
.th-caps .pr { margin: 6px 0 16px; color: var(--gold2); font-weight: 600; }
.th-caps .btn { border: 0; background: linear-gradient(180deg, #f6dc8a, #c9992e); color: #1a1430; font: 800 15px "Manrope", sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: 12px 28px; border-radius: 999px; box-shadow: 0 8px 20px -8px rgba(212, 175, 55, .8), inset 0 1px 0 rgba(255, 255, 255, .6); }
.th-caps .taken .btn { background: #262b66; color: var(--gold2); box-shadow: inset 0 0 0 1px var(--gold); }
.th-caps .taken .ph { opacity: .5; }
.th-caps .tag { display: none; position: absolute; top: 106px; left: 50%; transform: translateX(-50%) rotate(-6deg); padding: 6px 16px; border-radius: 999px; background: var(--gold); color: #1a1430; font: 800 14px "Manrope", sans-serif; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6); }
.th-caps .taken .tag { display: block; animation: bb-pop .5s .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.th-caps footer:not(.ktd-foot) { text-align: center; padding: 10px 16px 40px; font: italic 900 30px "Playfair Display", serif; color: var(--gold2); }
@media (max-width: 640px) {
  .th-caps .sec, .th-prom .sec, .th-adult .sec { font-size: 30px; padding: 0 12px; }
  .th-caps .flyers .f1, .th-caps .flyers .f2, .th-caps .flyers .f4 { display: none; }
}
