/
Temochka
/
Kyrs
Обзор
Документация
Войти
/
Temochka
/
Kyrs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
css/style.css
498 строк
14 KB
Artem Drozdov
итоговый css
16 июн 2026, 16:44
16 июн 2026, 16:44
19096cb
Код
Авторство
О чём код?
/* ============================================================ Студия маникюра «Линия» — основные стили Чистый CSS, без библиотек. Адаптив: 3 брейкпоинта. ============================================================ */ :root { --bg: #fff6fa; --bg-soft: #fde4ef; --ink: #4a2533; --ink-soft: #8a5a6c; --accent: #e0628f; --accent-dark: #c23a6e; --gold: #d99bb3; --white: #ffffff; --line: #f5d4e2; --shadow: 0 10px 30px rgba(200, 70, 120, 0.16); --radius: 18px; --maxw: 1140px; --font-display: Georgia, "Times New Roman", serif; --font-body: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; } * { box-sizing: border-box; margin: 0; padding: 0; } html { scroll-behavior: smooth; } body { font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 17px; } img { max-width: 100%; display: block; height: auto; } a { color: var(--accent-dark); } .container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; } /* Доступность: видимый фокус и «скрытая» ссылка перехода к контенту */ :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; } .skip-link { position: absolute; left: -999px; top: 0; background: var(--accent-dark); color: #fff; padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0; } .skip-link:focus { left: 0; } .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* ---------------- Шапка ---------------- */ .site-header { position: sticky; top: 0; z-index: 100; background: rgba(253, 248, 244, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); } .header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; max-width: var(--maxw); margin: 0 auto; } .logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: bold; letter-spacing: 0.5px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; } .logo .mark { display: inline-block; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-dark)); box-shadow: inset 0 0 0 3px rgba(255,255,255,.5); } .logo span.sub { font-family: var(--font-body); font-size: .7rem; color: var(--ink-soft); font-weight: normal; letter-spacing: 2px; text-transform: uppercase; } .nav ul { list-style: none; display: flex; gap: 26px; align-items: center; } .nav a { text-decoration: none; color: var(--ink); font-size: .98rem; padding: 6px 2px; position: relative; } .nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--accent); transition: width .3s ease; } .nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="page"]::after { width: 100%; } .nav a[aria-current="page"] { color: var(--accent-dark); font-weight: bold; } .btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 12px 24px; border-radius: 40px; border: none; font-size: 1rem; cursor: pointer; transition: transform .25s ease, background .25s ease, box-shadow .25s ease; font-family: var(--font-body); } .btn:hover, .btn:focus-visible { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(143, 74, 89, 0.35); } .btn-ghost { background: transparent; color: var(--accent-dark); border: 2px solid var(--accent); } .btn-ghost:hover, .btn-ghost:focus-visible { background: var(--accent); color: #fff; } /* ---------------- Hero ---------------- */ .hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #fcd3e4 0%, #fde9f2 45%, var(--bg) 100%); } .hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding: 70px 20px; max-width: var(--maxw); margin: 0 auto; } .hero h1 { font-family: var(--font-display); font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; margin-bottom: 18px; color: var(--ink); } .hero h1 em { color: var(--accent-dark); font-style: italic; } .hero p.lead { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 28px; max-width: 30em; } .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; } .hero-figure { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 5; animation: floatIn 1s ease both; } .hero-figure img { width: 100%; height: 100%; object-fit: cover; } .hero-badge { position: absolute; bottom: 18px; left: 18px; background: rgba(255,255,255,.9); padding: 10px 16px; border-radius: 30px; font-size: .9rem; box-shadow: var(--shadow); } /* Анимации появления */ @keyframes floatIn { from { opacity: 0; transform: translateY(30px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } } .reveal { animation: fadeUp .8s ease both; } .reveal.d1 { animation-delay: .12s; } .reveal.d2 { animation-delay: .24s; } .reveal.d3 { animation-delay: .36s; } /* ---------------- Секции ---------------- */ .section { padding: 70px 0; } .section.alt { background: var(--bg-soft); } .section-head { text-align: center; max-width: 40em; margin: 0 auto 46px; } .section-head h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 12px; } .section-head .eyebrow { display: inline-block; color: var(--accent-dark); letter-spacing: 3px; text-transform: uppercase; font-size: .78rem; margin-bottom: 10px; } .section-head p { color: var(--ink-soft); } /* Карточки услуг */ .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; } .card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column; } .card:hover { transform: translateY(-6px); box-shadow: var(--shadow); } .card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; } .card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; } .card-body h3 { font-family: var(--font-display); font-size: 1.3rem; } .card-body p { color: var(--ink-soft); font-size: .96rem; flex: 1; } .price { font-weight: bold; color: var(--accent-dark); font-size: 1.05rem; } /* Галерея портфолио */ .gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; } .gallery figure { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 1/1; } .gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; } .gallery figure:hover img { transform: scale(1.08); } .gallery figcaption { position: absolute; inset: auto 0 0 0; background: linear-gradient(transparent, rgba(58,46,42,.75)); color: #fff; padding: 24px 12px 10px; font-size: .85rem; opacity: 0; transition: opacity .3s ease; } .gallery figure:hover figcaption, .gallery figure:focus-within figcaption { opacity: 1; } /* Видео */ .video-wrap { max-width: 820px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; } .video-wrap video { width: 100%; display: block; } /* Отзывы */ .reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; } .review { background: var(--white); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); } .review p { font-style: italic; color: var(--ink-soft); margin-bottom: 14px; } .review .who { font-weight: bold; color: var(--ink); } .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; } /* Форма */ .form-section { background: var(--bg-soft); } .booking-form { max-width: 640px; margin: 0 auto; background: var(--white); padding: 34px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); } .field { margin-bottom: 20px; } .field label { display: block; margin-bottom: 6px; font-weight: bold; font-size: .95rem; } .field label .req { color: var(--accent-dark); } .field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: var(--font-body); background: var(--bg); color: var(--ink); transition: border-color .2s ease; } .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; } .field textarea { resize: vertical; min-height: 90px; } .field .hint { font-size: .82rem; color: var(--ink-soft); margin-top: 4px; } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } fieldset { border: none; } legend { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 8px; } /* ---------------- Подвал ---------------- */ .site-footer { background: #5a2740; color: #fbe6f0; padding: 50px 0 26px; margin-top: 0; } .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; } .site-footer h4 { font-family: var(--font-display); margin-bottom: 14px; color: #fff; } .site-footer a { color: #fbe6f0; text-decoration: none; } .site-footer a:hover, .site-footer a:focus-visible { color: var(--gold); text-decoration: underline; } .site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; } .footer-bottom { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; color: #e7b9cf; text-align: center; } /* ---------------- Хлебные крошки / страница услуги ---------------- */ .breadcrumbs { padding: 18px 0; font-size: .9rem; color: var(--ink-soft); } .breadcrumbs a { text-decoration: none; } .breadcrumbs span[aria-current] { color: var(--ink); font-weight: bold; } .service-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 30px 0 60px; } .service-hero img { border-radius: var(--radius); box-shadow: var(--shadow); } .service-hero h1 { font-family: var(--font-display); font-size: clamp(2rem,4vw,3rem); margin-bottom: 16px; } .service-meta { display: flex; gap: 28px; flex-wrap: wrap; margin: 22px 0; } .service-meta div strong { display: block; font-size: 1.4rem; color: var(--accent-dark); font-family: var(--font-display); } .service-meta div span { font-size: .85rem; color: var(--ink-soft); } .steps { counter-reset: step; display: grid; gap: 18px; } .steps li { list-style: none; position: relative; padding-left: 56px; } .steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: grid; place-items: center; background: var(--accent); color: #fff; border-radius: 50%; font-family: var(--font-display); } /* ---------------- Анимация при наведении прайс-таблицы ---------------- */ .price-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); } .price-table caption { text-align: left; font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 12px; } .price-table th, .price-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); } .price-table th { background: var(--bg-soft); } .price-table tbody tr { transition: background .2s ease; } .price-table tbody tr:hover { background: var(--bg-soft); } /* ============================================================ АДАПТИВНОСТЬ — три контрольные точки ============================================================ */ /* Большие экраны: от 1280px — увеличиваем контейнер и отступы */ @media (min-width: 1280px) { :root { --maxw: 1240px; } .section { padding: 90px 0; } body { font-size: 18px; } } /* Планшет: до 900px */ @media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } .hero-figure { max-width: 460px; } .cards { grid-template-columns: repeat(2, 1fr); } .gallery { grid-template-columns: repeat(3, 1fr); } .reviews { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr 1fr; } .service-hero { grid-template-columns: 1fr; } } /* Мобильный: до 600px */ @media (max-width: 600px) { body { font-size: 16px; } .nav ul { gap: 14px; font-size: .9rem; flex-wrap: wrap; justify-content: center; } .header-inner { flex-direction: column; } .cards { grid-template-columns: 1fr; } .gallery { grid-template-columns: repeat(2, 1fr); } .form-row { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr; } .section { padding: 48px 0; } .hero-inner { padding: 44px 20px; } } /* Уважение к настройке «уменьшить движение» */ @media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } } /* ---------------- Вертикальное видео (9:16, мобильный формат) ---------------- */ .video-wrap--vertical { max-width: 380px; border-radius: 24px; box-shadow: 0 20px 60px rgba(200, 70, 120, 0.25); } .video-wrap--vertical video { border-radius: 24px; } /* ---------------- Валидация формы — визуальная обратная связь ---------------- */ .field input:invalid:not(:placeholder-shown), .field select:invalid:not(:placeholder-shown), .field textarea:invalid:not(:placeholder-shown) { border-color: #e05050; background: #fff5f5; } .field input:valid:not(:placeholder-shown), .field select:valid, .field textarea:valid:not(:placeholder-shown) { border-color: #50b050; background: #f5fff5; } /* подсказка ошибки телефона */ .field input[type="tel"]:invalid:not(:placeholder-shown) + .hint { color: #e05050; font-weight: bold; }