/* ==========================================================
   InviteNest — Cute cartoon love theme (global)
   ========================================================== */
:root {
	--bg: #fffafc;
	--bg2: #fff0f5;
	--ink: #5b2644;
	--soft: #8d5b75;
	--rose: #ff6b9a;
	--rose-dark: #e0457a;
	--pink: #ffc9db;
	--lav: #e6dcff;
	--peach: #ffe2cf;
	--mint: #d8f5e6;
	--card: #fff;
	--line: #ffd3e2;
	/* kept for existing pages that use these names */
	--grad-start: #ff6b9a;
	--grad-end: #b9a2ff;
}

html { scroll-behavior: smooth; }

body {
	font-family: 'Nunito', system-ui, sans-serif;
	font-weight: 600;
	color: var(--ink);
	background: var(--bg);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
	font-family: 'Fredoka', 'Trebuchet MS', sans-serif;
	font-weight: 600;
	color: var(--ink);
}

a { color: var(--rose); }
a:hover { color: var(--rose-dark); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }

/* ---------- Bootstrap overrides ---------- */
.text-secondary { color: var(--soft) !important; }
.bg-light { background: var(--bg2) !important; }
.border-secondary { border-color: var(--line) !important; }

.text-gradient {
	background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.text-gradient-icon { color: var(--rose); }

.btn {
	font-family: 'Fredoka', sans-serif;
	font-weight: 600;
	border-radius: 999px;
	border: 0;
	transition: transform .15s, box-shadow .15s;
}
.btn:hover { animation: ch-wig .5s; }
.btn:active { transform: translateY(4px); }
.btn-gradient {
	background: var(--rose);
	color: #fff;
	box-shadow: 0 5px 0 var(--rose-dark);
}
.btn-gradient:hover { background: var(--rose); color: #fff; opacity: 1; }
.btn-gradient:active { box-shadow: 0 1px 0 var(--rose-dark); }
.btn-outline-dark, .btn-outline-secondary, .btn-light {
	background: var(--card);
	color: var(--ink);
	border: 0;
	box-shadow: 0 5px 0 var(--line);
}
.btn-outline-dark:hover, .btn-outline-secondary:hover, .btn-light:hover {
	background: var(--card);
	color: var(--ink);
}
.btn-sm.btn-gradient { box-shadow: 0 4px 0 var(--rose-dark); }
.btn-sm.btn-outline-secondary { box-shadow: 0 4px 0 var(--line); }

.card {
	background: var(--card);
	border-radius: 26px;
	border: 2px solid var(--line);
}
.form-control, .form-select {
	border-radius: 14px;
	border: 2px solid var(--line);
	background-color: var(--bg);
	color: var(--ink);
	font-weight: 600;
	padding: .65rem .9rem;
}
.form-control:focus, .form-select:focus {
	border-color: var(--rose);
	box-shadow: 0 0 0 .2rem rgba(255, 107, 154, .2);
	background-color: var(--bg);
}
.form-label { color: var(--soft); font-size: .9rem; }
.alert { border-radius: 18px; border-width: 2px; font-weight: 600; }
.table { color: var(--ink); }
.badge { border-radius: 999px; font-family: 'Fredoka', sans-serif; }
.pagination .page-link { color: var(--ink); border-radius: 999px; margin: 0 2px; border: 2px solid var(--line); }
.pagination .active > .page-link { background: var(--rose); border-color: var(--rose); color: #fff; }

/* ---------- Navbar ---------- */
.ch-nav {
	background: var(--bg);
	border-bottom: 2px solid var(--line);
	padding: 12px 0;
}
.ch-logo {
	font-family: 'Fredoka', sans-serif;
	font-weight: 700;
	font-size: 26px;
	color: var(--ink);
	display: flex;
	gap: 8px;
	align-items: center;
}
.ch-logo:hover { color: var(--ink); }
.ch-logo i {
	font-style: normal;
	display: inline-block;
	animation: ch-beat 1.2s infinite;
}
.ch-nav .nav-link {
	font-family: 'Fredoka', sans-serif;
	font-size: 17px;
	color: var(--soft);
	padding: 8px 14px;
	border-radius: 999px;
	transition: background .2s, color .2s;
}
.ch-nav .nav-link:hover { background: var(--bg2); color: var(--rose); }
.ch-nav .navbar-toggler {
	border: 2px solid var(--line);
	border-radius: 14px;
	padding: 6px 10px;
}
.ch-nav .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255, 107, 154, .25); }
@media (max-width: 991px) {
	.ch-nav .navbar-nav { text-align: center; padding: 14px 0 6px; gap: 8px; }
}

/* ---------- Footer ---------- */
.ch-foot {
	background: var(--bg2);
	border-top: 2px solid var(--line);
	color: var(--soft);
	padding: 46px 0 22px;
}
.ch-foot a { color: var(--soft); text-decoration: none; transition: color .2s; }
.ch-foot a:hover { color: var(--rose); }
.ch-foot h6 { font-size: 20px; color: var(--ink); margin-bottom: 10px; }
.ch-foot-logo {
	font-family: 'Fredoka', sans-serif;
	font-weight: 700;
	font-size: 26px;
	color: var(--ink);
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 8px;
}
.ch-foot-logo i { font-style: normal; display: inline-block; animation: ch-beat 1.2s infinite; }
.ch-foot-bar {
	margin-top: 34px;
	padding-top: 18px;
	border-top: 2px dashed var(--line);
	text-align: center;
	font-size: 14px;
}

/* ---------- Existing component classes (restyled) ---------- */
.hero { background: var(--bg); }

.region-card, .region-catalog-card, .template-card {
	transition: transform .25s, box-shadow .25s;
}
.region-card:hover, .region-catalog-card:hover, .template-card:hover {
	transform: translateY(-6px) rotate(-1deg);
	box-shadow: 0 12px 24px rgba(255, 107, 154, .18) !important;
}

.step-icon {
	width: 64px; height: 64px;
	border-radius: 50%;
	background: var(--pink);
	color: var(--rose-dark);
	display: flex; align-items: center; justify-content: center;
	font-size: 1.5rem;
	animation: ch-bob 3s ease-in-out infinite;
}

.cta-box { background: var(--rose); box-shadow: 0 8px 0 var(--rose-dark); }
.border-gradient { border: 2px solid var(--rose) !important; }

.template-thumb { height: 160px; }
.template-thumb-placeholder {
	height: 100%;
	background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
}

/* Preview frame */
.preview-toolbar { background: var(--card); border-bottom: 2px solid var(--line); }
.preview-viewport {
	background: var(--bg2);
	min-height: 70vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 0;
	transition: padding .2s ease;
}
.preview-frame-inner {
	width: 100%;
	height: 78vh;
	border: 0;
	background: #fff;
	box-shadow: 0 8px 30px rgba(91, 38, 68, .12);
	transition: width .25s ease, height .25s ease, border-radius .25s ease;
}
.preview-viewport.is-mobile .preview-frame-inner { width: 375px; border-radius: 24px; }

/* ---------- Keyframes ---------- */
@keyframes ch-beat { 0%,100%{transform:scale(1)} 15%{transform:scale(1.25)} 30%{transform:scale(1)} 45%{transform:scale(1.18)} }
@keyframes ch-wig  { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-4deg)} 75%{transform:rotate(4deg)} }
@keyframes ch-bob  { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-9px)} }
@keyframes ch-blink{ 0%,92%,100%{transform:scaleY(1)} 95%{transform:scaleY(.1)} }
@keyframes ch-drift{ from{transform:translateX(-120px)} to{transform:translateX(110vw)} }
@keyframes ch-rise { 0%{transform:translateY(0) rotate(0);opacity:0} 10%{opacity:.8} 100%{transform:translateY(-110vh) rotate(25deg);opacity:0} }
@keyframes ch-pop  { 0%{transform:scale(.6);opacity:0} 70%{transform:scale(1.08)} 100%{transform:scale(1);opacity:1} }

/* ==========================================================
   Home page (.ch)
   ========================================================== */
.ch { position: relative; overflow-x: hidden; font-size: 17px; line-height: 1.6; }
.ch *, .ch *:before, .ch *:after { box-sizing: border-box; }
.ch a { text-decoration: none; }
.ch h1, .ch h2, .ch h3 { line-height: 1.1; margin: 0; }
.ch-wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

.ch-btn {
	display: inline-block;
	background: var(--rose);
	color: #fff;
	padding: 13px 28px;
	border-radius: 999px;
	font: 600 17px Fredoka, sans-serif;
	border: 0;
	cursor: pointer;
	box-shadow: 0 5px 0 var(--rose-dark);
	transition: transform .15s, box-shadow .15s;
}
.ch-btn:hover { color: #fff; animation: ch-wig .5s; }
.ch-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--rose-dark); }
.ch-btn.ghost { background: var(--card); color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.ch-btn.ghost:hover { color: var(--ink); }

#ch-hearts { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
#ch-hearts span { position: absolute; bottom: -40px; animation: ch-rise linear infinite; }
.ch-cloud { position: absolute; height: 34px; width: 90px; background: var(--card); border-radius: 40px; opacity: .9; animation: ch-drift linear infinite; z-index: 0; }
.ch-cloud:before, .ch-cloud:after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.ch-cloud:before { width: 44px; height: 44px; top: -20px; left: 12px; }
.ch-cloud:after { width: 34px; height: 34px; top: -14px; left: 46px; }

.ch-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; padding: 50px 0 70px; }
.ch-hero h1 { font-size: clamp(38px, 6vw, 64px); letter-spacing: -.01em; }
.ch-hero h1 b { color: var(--rose); display: inline-block; animation: ch-bob 2.4s ease-in-out infinite; }
.ch-hero p { color: var(--soft); max-width: 44ch; font-size: 19px; margin: 18px 0 28px; }
.ch-row { display: flex; gap: 14px; flex-wrap: wrap; }
.ch-couple { width: 100%; max-width: 420px; margin: 0 auto; display: block; overflow: visible; }
.ch-bride { animation: ch-bob 2.6s ease-in-out infinite; }
.ch-groom { animation: ch-bob 2.6s ease-in-out -1.3s infinite; }
.ch-eye { transform-box: fill-box; transform-origin: center; animation: ch-blink 4s infinite; }
.ch-mid { transform-box: fill-box; transform-origin: center; animation: ch-beat 1.3s infinite; }

.ch-sec { padding: 70px 0; position: relative; }
.ch-alt { background: var(--bg2); }
.ch h2 { font-size: clamp(30px, 5vw, 48px); max-width: 20ch; }
.ch-lead { color: var(--soft); max-width: 50ch; margin: 12px 0 36px; }
.ch-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.ch-head .ch-lead { margin: 12px 0 0; }
.ch-link { color: var(--rose); font: 600 18px Fredoka, sans-serif; }
.ch-link:hover { color: var(--rose-dark); }

.ch-grid { display: grid; gap: 22px; }
.ch-steps { grid-template-columns: repeat(4, 1fr); }
.ch-feat { grid-template-columns: repeat(3, 1fr); }
.ch-themes { grid-template-columns: repeat(4, 1fr); }

.ch-card { background: var(--card); border-radius: 26px; padding: 26px; border: 2px solid var(--line); transition: transform .25s; }
.ch-card:hover { transform: translateY(-6px) rotate(-1deg); }
.ch-card h3 { font-size: 24px; margin: 10px 0 6px; }
.ch-card p { margin: 0; color: var(--soft); font-size: 16px; }
.ch-ic { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; animation: ch-bob 3s ease-in-out infinite; }
.ch-k0 .ch-ic { background: var(--pink); } .ch-k1 .ch-ic { background: var(--lav); }
.ch-k2 .ch-ic { background: var(--peach); } .ch-k3 .ch-ic { background: var(--mint); }
.ch-card:nth-child(2) .ch-ic { animation-delay: -.7s; }
.ch-card:nth-child(3) .ch-ic { animation-delay: -1.4s; }
.ch-card:nth-child(4) .ch-ic { animation-delay: -2s; }

.ch-t { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; border-radius: 120px 120px 24px 24px; padding: 44px 18px 24px; text-align: center; min-height: 210px; transition: transform .3s; color: var(--ink); }
.ch-t:hover { transform: scale(1.04) rotate(1.5deg); color: var(--ink); }
.ch-t span { font-size: 42px; display: block; animation: ch-bob 2.8s ease-in-out infinite; }
.ch-t h3 { font-size: 24px; }
.ch-t p { margin: 0; font-size: 15px; color: var(--soft); }
.ch-t0 { background: var(--pink); } .ch-t1 { background: var(--lav); }
.ch-t2 { background: var(--peach); } .ch-t3 { background: var(--mint); }

.ch-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.ch-inv { background: var(--card); border: 3px dashed var(--rose); border-radius: 28px; padding: 34px 22px; text-align: center; animation: ch-wig 3.5s ease-in-out infinite; transform-origin: top center; }
.ch-inv small { color: var(--soft); display: block; }
.ch-inv h3 { font-size: 38px; margin: 8px 0; color: var(--rose); }
.ch-inv .ch-btn { margin-top: 20px; font-size: 15px; padding: 10px 22px; }
.ch-cd { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.ch-cd div { background: var(--bg2); border-radius: 16px; padding: 8px 14px; min-width: 68px; }
.ch-cd b { display: block; font: 700 28px Fredoka, sans-serif; line-height: 1.1; }
.ch-cd span { font-size: 12px; color: var(--soft); }
.ch-rsvp { background: var(--card); border: 2px solid var(--line); border-radius: 26px; padding: 26px; }
.ch-rsvp label { display: block; font-size: 14px; color: var(--soft); margin: 14px 0 6px; }
.ch-rsvp label:first-child { margin-top: 0; }
.ch-rsvp input, .ch-rsvp select { width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font: 600 16px Nunito, sans-serif; }
.ch-rsvp .ch-btn { margin-top: 20px; width: 100%; }
#ch-ok { display: none; margin-top: 16px; color: var(--rose); font: 600 18px Fredoka, sans-serif; }
#ch-ok.show { display: block; animation: ch-pop .5s; }

.ch-cta { text-align: center; padding: 90px 0; }
.ch-cta h2 { margin: 0 auto 16px; max-width: 18ch; }
.ch-cta p { color: var(--soft); margin: 0 auto 26px; max-width: 40ch; }

@media (max-width: 991px) { .ch-steps, .ch-themes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 780px) {
	.ch-hero, .ch-demo, .ch-feat { grid-template-columns: 1fr; }
	.ch-sec { padding: 50px 0; }
	.ch-hero { padding-top: 30px; }
}
@media (max-width: 480px) {
	.ch-steps { grid-template-columns: 1fr; }
	.ch-themes { grid-template-columns: 1fr 1fr; }
	.ch-t { min-height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	#ch-hearts { display: none; }
}
