/*
	«беба» — изделия ручной работы.
	Милый скрапбучный стиль: кремовая бумага, скруглённые формы,
	пастельные пилюли и россыпь сердечек. Один файл, без зависимостей.
*/

/* ---------- Шрифты (self-hosted, latin + cyrillic) ---------- */

/* Pacifico — рукописный акцент (лого, крупные заголовки) */
/* cyrillic */
@font-face { font-family:'Pacifico'; font-style:normal; font-weight:400; font-display:swap;
	src:url("../fonts/pacifico-400-cyrillic.woff2") format('woff2');
	unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
/* latin */
@font-face { font-family:'Pacifico'; font-style:normal; font-weight:400; font-display:swap;
	src:url("../fonts/pacifico-400-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; }

/* cyrillic */
@font-face { font-family:'Comfortaa'; font-style:normal; font-weight:700; font-display:swap;
	src:url("../fonts/comfortaa-700-cyrillic.woff2") format('woff2');
	unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
/* latin */
@font-face { font-family:'Comfortaa'; font-style:normal; font-weight:700; font-display:swap;
	src:url("../fonts/comfortaa-700-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; }

/* cyrillic */
@font-face { font-family:'Nunito'; font-style:normal; font-weight:400; font-display:swap;
	src:url("../fonts/nunito-400-cyrillic.woff2") format('woff2');
	unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
/* latin */
@font-face { font-family:'Nunito'; font-style:normal; font-weight:400; font-display:swap;
	src:url("../fonts/nunito-400-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; }
/* cyrillic */
@font-face { font-family:'Nunito'; font-style:normal; font-weight:700; font-display:swap;
	src:url("../fonts/nunito-700-cyrillic.woff2") format('woff2');
	unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
/* latin */
@font-face { font-family:'Nunito'; font-style:normal; font-weight:700; font-display:swap;
	src:url("../fonts/nunito-700-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; }
/* cyrillic */
@font-face { font-family:'Nunito'; font-style:normal; font-weight:800; font-display:swap;
	src:url("../fonts/nunito-800-cyrillic.woff2") format('woff2');
	unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
/* latin */
@font-face { font-family:'Nunito'; font-style:normal; font-weight:800; font-display:swap;
	src:url("../fonts/nunito-800-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 {
	--paper: #fdf6f1;
	--card: #ffffff;
	--ink: #5a4f52;
	--ink-soft: #a2969a;
	--accent: #f2849e;
	--accent-dark: #e86a89;

	/* пастельная палитра плиток/пилюль */
	--c-pink:  #f7cdd8;
	--c-blue:  #cfe1f2;
	--c-mint:  #ccebe0;
	--c-peach: #f8d9c2;
	--c-lilac: #ddd2f0;
	--c-honey: #f6e2b3;

	--script: 'Pacifico', 'Comfortaa', cursive;

	--radius: 22px;
	--radius-sm: 14px;
	--shadow: 0 10px 30px rgba(120, 90, 100, 0.12);
	--shadow-hover: 0 18px 44px rgba(120, 90, 100, 0.20);
	--maxw: 1040px;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: 'Nunito', -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	background-color: var(--paper);
	/* нежные пастельные пятна-разводы */
	background-image:
		radial-gradient(ellipse 55% 40% at 10% 6%, rgba(242,132,158,0.10), transparent 70%),
		radial-gradient(ellipse 45% 32% at 92% 22%, rgba(232,168,124,0.10), transparent 70%),
		radial-gradient(ellipse 50% 38% at 18% 92%, rgba(132,199,184,0.10), transparent 70%),
		radial-gradient(ellipse 45% 36% at 88% 88%, rgba(200,180,235,0.10), transparent 70%);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1, h2, h3 {
	font-family: 'Comfortaa', 'Nunito', sans-serif;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ink);
	margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--accent-dark); text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Шапка ---------- */

#header { padding: 26px 0 6px; }

.logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--ink);
}

.logo img {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(120,90,100,0.18);
	transition: transform 0.35s ease;
}

.logo .title {
	font-family: var(--script);
	font-weight: 400;
	font-size: 2rem;
	line-height: 1;
	color: var(--ink);
	padding-bottom: 0.12em;
}

.logo:hover img { transform: rotate(-8deg) scale(1.08); }

/* ---------- Герой ---------- */

.hero { text-align: center; padding: 30px 0 8px; position: relative; }

.hero h1 {
	font-family: var(--script);
	font-weight: 400;
	font-size: clamp(2.3rem, 6.5vw, 3.7rem);
	line-height: 1.25;
	color: var(--ink);
	margin-bottom: 0.4em;
}

.hero .lead {
	max-width: 40rem;
	margin: 0 auto 1.4em;
	color: var(--ink-soft);
	font-size: 1.1rem;
}

/* пилюли-теги */
.tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 0; margin: 0; list-style: none; }

.tag {
	display: inline-block;
	padding: 0.4em 1.05em;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 700;
	color: #6a5560;
	background: var(--c-pink);
}
.tag.b { background: var(--c-blue); }
.tag.m { background: var(--c-mint); }
.tag.p { background: var(--c-peach); }
.tag.l { background: var(--c-lilac); }
.tag.h { background: var(--c-honey); }

/* ---------- Галерея работ (главная) ---------- */

.gallery {
	list-style: none;
	padding: 0;
	margin: 34px 0 10px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 22px;
}

.card {
	position: relative;
	display: block;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--card);
	box-shadow: var(--shadow);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:nth-child(3n+1) { transform: rotate(-0.8deg); }
.card:nth-child(3n+2) { transform: rotate(0.5deg); }
.card:nth-child(3n)   { transform: rotate(-0.3deg); }

.card:hover {
	transform: translateY(-6px) rotate(0deg);
	box-shadow: var(--shadow-hover);
}

.card .photo {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
}

.card .photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.card:hover .photo img { transform: scale(1.06); }

/* мягкая цветная подложка-градиент понизу с подписью */
.card .cap {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 42px 16px 15px;
	background: linear-gradient(to top, rgba(60,45,52,0.72), transparent);
	color: #fff;
}

.card .cap h2 {
	font-size: 1.3rem;
	color: #fff;
	margin: 0 0 2px;
}

.card .cap span {
	font-size: 0.9rem;
	color: rgba(255,255,255,0.9);
	font-weight: 400;
}

/* пунктирная рамка-«шов» при наведении */
.card::after {
	content: '';
	position: absolute;
	inset: 10px;
	border: 2px dashed rgba(255,255,255,0.7);
	border-radius: calc(var(--radius) - 10px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}
.card:hover::after { opacity: 1; }

/* ---------- Секция «о мастерской» ---------- */

.about {
	margin: 46px 0 10px;
	background: var(--card);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 34px 34px 30px;
	position: relative;
}

.about::before {
	content: '';
	position: absolute;
	top: -14px; left: 50%;
	width: 84px; height: 26px;
	transform: translateX(-50%) rotate(-3deg);
	background: rgba(242,132,158,0.35);
	border-radius: 6px;
	box-shadow: 0 3px 8px rgba(120,90,100,0.14);
}

.about h2 { font-family: var(--script); font-weight: 400; color: var(--ink); font-size: 1.9rem; text-align: center; }
.about p { color: var(--ink); max-width: 46rem; margin-left: auto; margin-right: auto; text-align: center; }
.about p:last-child { margin-bottom: 0; }

/* ---------- Страница изделия ---------- */

.back-link {
	display: inline-block;
	margin: 6px 0 18px;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--ink-soft);
	transition: color 0.2s ease, transform 0.2s ease;
}
.back-link:hover { color: var(--accent-dark); transform: translateX(-4px); }

.product h1 {
	font-family: var(--script);
	font-weight: 400;
	font-size: clamp(2.1rem, 6vw, 3rem);
	color: var(--ink);
	text-align: center;
	margin-bottom: 0.5em;
}
.product h1::after { content: ' ♥'; color: var(--accent); font-size: 0.5em; vertical-align: 0.3em; }

/* сетка фото-полароидов */
.shots {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 26px 20px;
	margin: 8px 0 34px;
	justify-items: center;
	align-items: start;
}

.shots figure {
	margin: 0;
	background: #fff;
	padding: 12px 12px 16px;
	border-radius: 10px;
	box-shadow: var(--shadow);
	cursor: zoom-in;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
	max-width: 320px;
}
.shots figure:nth-child(odd)  { transform: rotate(-1.4deg); }
.shots figure:nth-child(even) { transform: rotate(1.4deg); }
.shots figure:hover {
	transform: rotate(0deg) scale(1.02);
	box-shadow: var(--shadow-hover);
	z-index: 2;
}
.shots figure img { border-radius: 4px; width: 100%; height: auto; }

.desc { max-width: 44rem; margin: 0 auto; text-align: center; }
.desc p { font-size: 1.08rem; }

/* характеристики — пилюли на нитке */
.specs {
	list-style: none;
	padding: 0;
	margin: 1.4em 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}
.specs li {
	padding: 0.42em 1.1em;
	background: #fff;
	border: 1.5px dashed rgba(242,132,158,0.55);
	border-radius: 999px;
	font-size: 0.92rem;
	color: #6e6468;
}

/* ---------- Подвал ---------- */

#footer {
	margin-top: 54px;
	padding: 30px 0 34px;
	text-align: center;
	background: linear-gradient(to bottom, transparent, rgba(247,205,216,0.35));
	border-top: 2px dashed rgba(242,132,158,0.35);
}

.tg-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0.55em 1.3em;
	background: #fff;
	border: 1.5px dashed rgba(242,132,158,0.6);
	border-radius: 999px;
	font-weight: 700;
	color: var(--accent-dark);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tg-btn:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(242,132,158,0.28); }
.tg-btn svg { width: 20px; height: 20px; fill: currentColor; }

.copyright { margin: 16px 0 0; color: var(--ink-soft); font-size: 0.92rem; }
.copyright .heart { color: var(--accent); }

/* ---------- Россыпь сердечек/плюсиков (декор) ---------- */
.sprinkle {
	position: absolute;
	color: rgba(242,132,158,0.5);
	font-size: 1.1rem;
	pointer-events: none;
	user-select: none;
	z-index: 0;
}

/* ---------- Лайтбокс ---------- */

#lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(50,38,44,0.9);
	cursor: zoom-out;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}
#lightbox.visible { opacity: 1; visibility: visible; }
#lightbox img {
	max-width: 100%;
	max-height: 100%;
	background: #fff;
	padding: 10px;
	border-radius: 8px;
	box-shadow: 0 24px 70px rgba(0,0,0,0.5);
	transform: scale(0.94);
	transition: transform 0.28s ease;
}
#lightbox.visible img { transform: scale(1); }

/* ---------- Появление ---------- */
@media (prefers-reduced-motion: no-preference) {
	.card, .about, .shots figure { animation: rise 0.6s both; }
	@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- Адаптив ---------- */
@media (max-width: 560px) {
	body { font-size: 16px; }
	.gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
	.about { padding: 26px 20px 22px; }
	.shots { gap: 22px 16px; }
}
