/* Сайт-визитка cuspdent.com. Цвета и шрифт — бренд CuspDent (media/brand-pack/CuspDent-brand-guide.md):
   тёмно-синий — текст и важное, бирюза — графика и выделения, мята — фоны. Белый текст на бирюзе нечитаем,
   поэтому кнопки и ссылки — тёмная бирюза #00806A, как в программе. Скриптов и внешних ресурсов нет
   (CSP в deploy/site.caddy): шрифт Manrope (OFL) лежит рядом, стили — только этот файл. */

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("fonts/manrope-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("fonts/manrope-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
        U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
        U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #101c66;
    --navy-soft: #4a5482;
    --turquoise: #00c9a7;
    --teal: #00806a;
    --teal-dark: #006b58;
    --mint: #e7faf6;
    --mint-line: #c2f2e8;
    --white: #ffffff;
    --line: #dde3f0;
    --focus: rgba(0, 201, 167, 0.55);
    --page: 1160px;
    --gutter: 24px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--navy);
    font-family: "Manrope", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

img,
svg {
    display: block;
}

a {
    color: var(--teal);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--teal-dark);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 6px;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 800;
}

h3 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

.wrap {
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip {
    position: absolute;
    left: 16px;
    top: -60px;
    padding: 10px 16px;
    background: var(--navy);
    color: var(--white);
    border-radius: 8px;
    z-index: 10;
}

.skip:focus {
    top: 12px;
    color: var(--white);
}

/* Кнопки */
.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 999px;
    border: 2px solid var(--teal);
    background: var(--teal);
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    text-decoration: none;
}

.button:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    color: var(--white);
}

.button.quiet {
    background: transparent;
    color: var(--navy);
    border-color: var(--line);
}

.button.quiet:hover {
    border-color: var(--teal);
    color: var(--teal-dark);
    background: transparent;
}

.button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Шапка */
.top {
    border-bottom: 1px solid var(--line);
}

.top .wrap {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 76px;
}

.top .logo img {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.nav a {
    color: var(--navy);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}

.nav a:hover {
    color: var(--teal);
}

.languages {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: var(--mint);
}

.languages a {
    display: block;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.languages a[aria-current="page"] {
    background: var(--white);
    color: var(--teal-dark);
    box-shadow: 0 1px 2px rgba(16, 28, 102, 0.12);
}

.languages a:hover {
    color: var(--teal);
}

.top .button {
    min-height: 42px;
    padding: 9px 20px;
    font-size: 15px;
}

/* Первый экран: заголовок слева, справа — окно программы с календарём визитов над дугой «улыбки» */
.hero {
    overflow: hidden;
}

.hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 56px;
    padding-top: 72px;
    padding-bottom: 88px;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 68px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.02;
}

.hero .lead {
    margin-top: 24px;
    max-width: 30em;
    color: var(--navy-soft);
    font-size: 19px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

.visual {
    position: relative;
    container-type: inline-size;
    padding-bottom: 9%;
}

/* Дуга-улыбка из логотипа под окном */
.visual .smile {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: 0;
    width: 88%;
    height: auto;
}

/* Окно программы: все размеры — в em от ширины контейнера, макет масштабируется целиком */
.app {
    position: relative;
    display: grid;
    grid-template-columns: 3.4em 1fr;
    font-size: calc(100cqw / 50);
    line-height: 1.3;
    border-radius: 1.4em;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 0.2em 0.6em rgba(16, 28, 102, 0.08), 0 2.4em 4.8em -1.2em rgba(16, 28, 102, 0.28);
}

.app-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25em;
    padding: 1.2em 0;
    background: var(--navy);
    color: #8f9bd6;
}

.app-side img {
    width: 1.9em;
    height: auto;
    margin-bottom: 0.6em;
    filter: brightness(0) invert(1);
}

.app-side svg {
    width: 1.5em;
    height: 1.5em;
}

.app-side .active {
    padding: 0.35em;
    border-radius: 0.5em;
    background: var(--turquoise);
    color: var(--navy);
    box-sizing: content-box;
}

.app-main {
    padding: 1.3em 1.4em 1.4em;
    min-width: 0;
}

.app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}

.app-title {
    font-size: 1.45em;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.app-doctor {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.3em 0.7em;
    border: 1px solid var(--line);
    border-radius: 0.5em;
    font-size: 0.9em;
    font-weight: 600;
}

.app-doctor svg {
    width: 0.9em;
    height: 0.9em;
}

.week {
    display: grid;
    grid-template-columns: 3.2em repeat(5, minmax(0, 1fr));
    grid-template-rows: 2em repeat(12, 1.75em);
    column-gap: 0.35em;
    /* линия под днями и по линии на каждый час */
    background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px,
            transparent 3.5em);
    background-size: 100% calc(100% - 2em);
    background-repeat: no-repeat;
    background-position: 0 2em;
}

.day {
    grid-row: 1;
    align-self: center;
    text-align: center;
    font-size: 0.85em;
    font-weight: 700;
    color: var(--navy-soft);
}

.day.today {
    color: var(--teal);
}

.hour {
    grid-column: 1;
    font-size: 0.75em;
    color: var(--navy-soft);
    transform: translateY(-0.55em);
}

.ev {
    margin: 0.12em 0;
    padding: 0.25em 0.45em;
    border-radius: 0.45em;
    overflow: hidden;
    font-size: 0.78em;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: var(--mint);
    border-left: 0.3em solid var(--turquoise);
    color: var(--navy);
}

.ev b {
    display: block;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* визит на полчаса — имя и время в одну строку */
.ev.s1 b {
    display: inline;
    margin-right: 0.4em;
}

.ev.confirmed {
    background: var(--turquoise);
    border-left-color: var(--teal);
}

.ev.now {
    background: var(--navy);
    border-left-color: var(--turquoise);
    color: var(--white);
}

/* Расстановка визитов: колонка дня и строка получаса с 09:00 */
.d1 { grid-column: 2; }
.d2 { grid-column: 3; }
.d3 { grid-column: 4; }
.d4 { grid-column: 5; }
.d5 { grid-column: 6; }
.r1 { grid-row-start: 2; }
.r2 { grid-row-start: 3; }
.r3 { grid-row-start: 4; }
.r4 { grid-row-start: 5; }
.r5 { grid-row-start: 6; }
.r6 { grid-row-start: 7; }
.r7 { grid-row-start: 8; }
.r8 { grid-row-start: 9; }
.r9 { grid-row-start: 10; }
.r10 { grid-row-start: 11; }
.r11 { grid-row-start: 12; }
.s1 { grid-row-end: span 1; }
.s2 { grid-row-end: span 2; }
.s3 { grid-row-end: span 3; }
.h9 { grid-row: 2; }
.h10 { grid-row: 4; }
.h11 { grid-row: 6; }
.h12 { grid-row: 8; }
.h13 { grid-row: 10; }
.h14 { grid-row: 12; }

/* Одно движение на странице: визиты появляются в календаре при загрузке */
@media (prefers-reduced-motion: no-preference) {
    .ev {
        animation: book 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .ev:nth-of-type(3n + 1) { animation-delay: 0.25s; }
    .ev:nth-of-type(3n + 2) { animation-delay: 0.5s; }
    .ev:nth-of-type(3n) { animation-delay: 0.75s; }
}

@keyframes book {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
}

/* Разделы */
.section {
    padding: 96px 0;
}

.section.mint {
    background: var(--mint);
}

.section-head {
    max-width: 640px;
    margin-bottom: 56px;
}

.section-head p {
    margin-top: 16px;
    color: var(--navy-soft);
    font-size: 19px;
}

/* Коробочное решение: тёмно-синяя полоса — главное после первого экрана. Бирюза бренда на тёмно-синем читается */
.section.navy {
    background: var(--navy);
    color: var(--white);
}

.navy .section-head {
    max-width: 760px;
}

.navy .section-head p {
    color: #c5cbea;
}

.data-points {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.data-points svg {
    width: 34px;
    height: 34px;
    margin-bottom: 20px;
    color: var(--turquoise);
}

.data-points p {
    margin-top: 10px;
    color: #c5cbea;
    font-size: 16px;
}

.data-note {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    max-width: 760px;
    color: #a9b1dc;
    font-size: 14px;
}

/* Возможности: список в три колонки, без карточек — разделитель сверху у каждого пункта */
.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 48px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.features li {
    padding: 28px 0 40px;
    border-top: 1px solid var(--line);
}

.features svg {
    width: 30px;
    height: 30px;
    margin-bottom: 18px;
    color: var(--teal);
}

.features p,
.steps p,
.facts p {
    margin-top: 8px;
    color: var(--navy-soft);
    font-size: 16px;
}

/* Как идёт работа: настоящая последовательность — номера шагов на общей линии */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--turquoise);
    color: var(--navy);
    font-size: 20px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 26px;
    left: 52px;
    right: -32px;
    height: 2px;
    background: var(--mint-line);
}

/* Как устроена программа */
.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 64px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.facts li {
    padding-left: 22px;
    border-left: 3px solid var(--turquoise);
}

/* Контакты: визитка, как на брендборде */
.contact .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
}

.contact .section-head {
    margin-bottom: 0;
}

.card {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 40px 40px;
    border-radius: 28px;
    background: var(--white);
    box-shadow: 0 1.5em 3em -1.5em rgba(16, 28, 102, 0.25);
}

.card .mark {
    width: 104px;
    height: auto;
    flex-shrink: 0;
}

.card ul {
    margin: 0;
    padding: 0 0 0 32px;
    list-style: none;
    border-left: 2px solid var(--turquoise);
}

.card li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.card li svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    color: var(--turquoise);
}

.card a {
    color: var(--navy);
    text-decoration: none;
}

.card a:hover {
    color: var(--teal);
    text-decoration: underline;
}

/* Подвал */
.bottom {
    background: var(--navy);
    color: #c5cbea;
    font-size: 15px;
}

.bottom .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding-top: 40px;
    padding-bottom: 40px;
}

.bottom img {
    height: 32px;
    width: auto;
}

.bottom a {
    color: var(--white);
}

.bottom a:hover {
    color: var(--turquoise);
}

/* Планшет */
@media (max-width: 960px) {
    .nav {
        display: none;
    }

    .languages {
        margin-left: auto;
    }

    .hero .wrap {
        grid-template-columns: 1fr;
        gap: 48px;
        padding-top: 48px;
        padding-bottom: 64px;
    }

    .features,
    .data-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 32px;
    }

    .steps li::after {
        display: none;
    }

    .contact .wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Телефон */
@media (max-width: 600px) {
    :root {
        --gutter: 16px;
    }

    body {
        font-size: 16px;
    }

    .top .wrap {
        gap: 12px;
        min-height: 64px;
    }

    .top .logo img {
        height: 32px;
    }

    .top .button {
        display: none;
    }

    .hero .lead,
    .section-head p {
        font-size: 17px;
    }

    .section {
        padding: 64px 0;
    }

    .section-head {
        margin-bottom: 40px;
    }

    .features,
    .data-points,
    .steps,
    .facts {
        grid-template-columns: 1fr;
    }

    .data-note {
        margin-top: 40px;
    }

    .card {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        padding: 32px 24px;
    }

    .card .mark {
        width: 80px;
    }

    .card ul {
        padding-left: 20px;
    }

    .card li {
        font-size: 18px;
    }
}
