/* Сайт EskeSal: те же цвета и шрифты, что в приложении («отрывной календарь»). Шрифты — с этого же сайта
   (OFL, fonts/), внешних ресурсов нет. */
@font-face { font-family: "Onest"; src: url("/site/fonts/Onest-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("/site/fonts/Oswald-Variable.ttf") format("truetype"); font-weight: 200 700; font-display: swap; }

:root {
  --paper: #F6F7F4; --leaf: #FFFFFF; --line: #DCDED7; --ink: #18202B; --graphite: #59616E;
  --blue: #2443C4; --on-blue: #FFFFFF; --red: #C2302B; --moss: #2E6E4E; --warn: #FFF4E0;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #10151D; --leaf: #1A212C; --line: #2C3542; --ink: #ECEDE8; --graphite: #A0A7B2;
    --blue: #91A6FF; --on-blue: #10151D; --red: #FF6F61; --moss: #72C79C; --warn: #3A2A10; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 "Onest", system-ui, sans-serif; }
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
main { max-width: 34rem; margin: 0 auto; padding: 40px 16px 64px; }
.wide { max-width: 68rem; padding: 0 16px; margin: 0 auto; }

/* Листок календаря — главный знак сайта. */
.leaf { position: relative; display: inline-block; width: 64px; border: 1px solid var(--line); border-radius: 10px; background: var(--leaf); text-align: center; overflow: hidden; margin-bottom: 20px; }
.leaf::before { content: ""; display: block; height: 14px; background: var(--ink); }
.leaf b { display: block; font: 600 30px/1.1 "Oswald", sans-serif; padding: 6px 0 8px; }

h1 { font-weight: 700; font-size: clamp(32px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 16px; }
h2 { font-weight: 700; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; margin: 0 0 14px; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--graphite); max-width: 34rem; }
.muted { color: var(--graphite); font-size: 15px; }
ol { padding-left: 1.3em; margin: 0 0 18px; }
li { margin-bottom: 8px; }
label { display: block; font-weight: 600; margin: 18px 0 6px; }
input { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--leaf); color: var(--ink); }
input:focus { outline: none; border-color: var(--blue); }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 16px; font: 600 17px/1.2 "Onest", sans-serif; padding: 16px 20px; border: 0; border-radius: 14px; background: var(--blue); color: var(--on-blue); cursor: pointer; text-decoration: none; }
button.danger { background: var(--red); color: #fff; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.msg { margin-top: 14px; font-weight: 500; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--moss); }
[hidden] { display: none !important; }

/* --- Главная ------------------------------------------------------------------------------------------- */
.top { display: flex; align-items: center; gap: 10px; padding-block: 20px; font-weight: 700; font-size: 19px; }
.top .mark { width: 26px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--leaf); overflow: hidden; }
.top .mark::before { content: ""; display: block; height: 8px; background: var(--red); }

.hero { display: grid; gap: 40px; align-items: center; padding-block: 28px 56px; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.3fr 1fr; padding-block: 56px 88px; } }
.cta { max-width: 34rem; }
.cta .button { max-width: 26rem; }
.cta .button { margin-top: 22px; }
.cta .facts { margin: 10px 0 0; font-size: 15px; color: var(--graphite); }

/* Отрывной календарь: верхний листок (сегодня) отрывается и открывает дату через полгода. */
.pad { position: relative; width: min(330px, 78vw); aspect-ratio: 4 / 4.4; margin: 0 auto; }
.sheet { position: absolute; inset: 0; background: var(--leaf); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 0 var(--line), 0 6px 0 -1px var(--leaf), 0 6px 0 0 var(--line), 0 12px 0 -1px var(--leaf), 0 12px 0 0 var(--line); }
.sheet .strip { height: 18%; background: var(--ink); position: relative; }
.sheet .strip::before, .sheet .strip::after { content: ""; position: absolute; top: 34%; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); }
.sheet .strip::before { left: 28%; } .sheet .strip::after { right: 28%; }
.sheet.next .strip { background: var(--moss); }
.sheet .day { font: 600 clamp(120px, 34vw, 170px)/0.9 "Oswald", sans-serif; text-align: center; margin-top: 8%; }
.sheet .month { text-align: center; font-weight: 600; font-size: 22px; color: var(--graphite); }
.sheet .what { margin: auto 18px 18px; padding-top: 12px; border-top: 1px dashed var(--line); font-weight: 600; font-size: 17px; text-align: center; }
.sheet.top-sheet { transform-origin: 50% 0; z-index: 2; }
.torn .sheet.top-sheet { animation: tear 1.1s cubic-bezier(.5, 0, .75, 0) .9s forwards; }
@keyframes tear {
  0% { transform: rotate(0) translateY(0); opacity: 1; }
  35% { transform: rotate(-4deg) translateY(4px); }
  100% { transform: rotate(-16deg) translate(-30px, 130%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .torn .sheet.top-sheet { animation: none; display: none; } }

/* Список как в приложении: настоящие примеры сроков. */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.cols { display: grid; gap: 32px; }
@media (min-width: 880px) { .cols { grid-template-columns: 1fr 1fr; gap: 64px; } }
.rows { list-style: none; padding: 0; margin: 0; }
.rows li { display: flex; align-items: center; gap: 14px; padding: 10px 0; margin: 0; }
.mini { flex: none; width: 50px; border: 1px solid var(--line); border-radius: 8px; background: var(--leaf); text-align: center; overflow: hidden; }
.mini::before { content: ""; display: block; height: 9px; background: var(--ink); }
.mini.overdue::before { background: var(--red); }
.mini.today::before { background: var(--blue); }
.mini b { display: block; font: 600 22px/1.05 "Oswald", sans-serif; padding-top: 3px; }
.mini span { display: block; font-size: 12px; color: var(--graphite); padding-bottom: 4px; }
.rows .t { font-weight: 600; }
.rows .w { font-size: 15px; color: var(--graphite); }
.rows .w.overdue { color: var(--red); font-weight: 600; }

.points { display: grid; gap: 26px; margin: 0; padding: 0; list-style: none; }
.points li { margin: 0; }
.points b { display: block; font-size: 19px; margin-bottom: 4px; }

details { border: 1px solid var(--line); border-radius: 12px; background: var(--leaf); padding: 12px 16px; margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; }
code { font: 13px/1.5 ui-monospace, "SFMono-Regular", Menlo, monospace; word-break: break-all; }
footer { border-top: 1px solid var(--line); padding-block: 28px 48px; font-size: 15px; color: var(--graphite); }
footer a { margin-right: 18px; }

/* Переключатель языка: казахский первым. */
.lang { margin-left: auto; display: flex; gap: 14px; font-size: 15px; font-weight: 500; }
.lang b { color: var(--ink); }
.lang a { color: var(--graphite); text-decoration: none; }
.lang a:hover { color: var(--blue); }
.download-notes { margin: 10px 0 0; font-size: 15px; color: var(--ink); }
.soon { padding: 14px 16px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--graphite); margin-top: 22px; }
.qr { display: none; align-items: center; gap: 18px; margin-top: 22px; }
.qr img { width: 112px; height: 112px; padding: 8px; background: #FFFFFF; border-radius: 10px; border: 1px solid var(--line); }
.qr p { margin: 0; font-size: 15px; color: var(--graphite); max-width: 16rem; }
/* Код — только на больших экранах: с телефона проще нажать кнопку. */
@media (min-width: 880px) and (hover: hover) { .qr { display: flex; } }
main > .lang { justify-content: flex-end; margin: 0 0 16px; }
