/* SBC "Start anywhere" modal - styled after the site's nectar-fancy-box tiles */

.sbc-start-modal {
	position: fixed;
	inset: 0;
	z-index: 100000; /* above #header-outer (9999) */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility 0s linear .35s;
}
.sbc-start-modal[hidden] { display: none; }
.sbc-start-modal.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity .35s ease;
}

/* Darker + blurred backdrop so the page clearly recedes behind the dialog. */
.sbc-start-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .86);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.sbc-start-modal__panel {
	position: relative;
	width: 100%;
	max-width: 760px;
	min-width: 0;
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow-y: auto;
	background: #161616;
	color: #fff;
	padding: 42px 40px 34px;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, .14);
	border-top: 4px solid #19975d; /* theme accent - frames the dialog as a separate element */
	box-shadow: 0 30px 80px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .6);
	transform: translateY(20px) scale(.98);
	transition: transform .45s cubic-bezier(.24, 1, .3, 1);
	outline: none;
	-webkit-overflow-scrolling: touch;
	/* Windows shows a permanent light scrollbar - match the dialog if scrolling is ever needed. */
	scrollbar-width: thin;
	scrollbar-color: #19975d #161616;
}
.sbc-start-modal.is-open .sbc-start-modal__panel { transform: none; }

.sbc-start-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	padding: 10px;
	margin: 0;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 100px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	line-height: 0;
	box-shadow: none;
	transition: background-color .25s ease, transform .25s ease, border-color .25s ease;
}
.sbc-start-modal__close:hover,
.sbc-start-modal__close:focus-visible {
	background: rgba(255, 255, 255, .12);
	border-color: rgba(255, 255, 255, .5);
	transform: rotate(90deg);
	outline: none;
}
.sbc-start-modal__close svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.sbc-start-modal__title {
	margin: 0;
	color: #fff;
	text-align: center;
	font-family: Roboto, 'Noto Sans KR', sans-serif; /* site forces Roboto globally */
	font-weight: 400;
	font-size: 34px;
	line-height: 1.2;
}
.sbc-start-modal__divider {
	width: 50px;
	height: 2px;
	margin: 16px auto;
	background: #19975d; /* theme accent color */
}
/* Explicit call to action above the tiles. */
.sbc-start-modal__lead {
	margin: 0 0 18px;
	padding: 0;
	text-align: center;
	font-family: 'Open Sans', Roboto, sans-serif;
	font-size: 12px;
	line-height: 16px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #2fc37d;
}

.sbc-start-modal__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* Tile - mirrors .nectar-fancy-box[data-style="default"] */
.sbc-start-box {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 180px;
	padding: 22px 24px;
	overflow: hidden;
	background: linear-gradient(135deg, #3c3c3c 0%, #1f1f1f 100%);
	color: #fff;
	text-decoration: none;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, .08);
	transition: border-color .35s ease, box-shadow .35s ease;
}
.sbc-start-box:hover,
.sbc-start-box:focus { color: #fff; }
.sbc-start-box:hover,
.sbc-start-box:focus-visible {
	border-color: #19975d;
	box-shadow: 0 0 0 1px #19975d, 0 12px 30px rgba(0, 0, 0, .5);
}
.sbc-start-box:focus-visible { outline: 2px solid #19975d; outline-offset: 2px; }

.sbc-start-box__bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100.2%;
	height: 100.2%;
	background-size: cover;
	background-position: center;
	z-index: 1;
	backface-visibility: hidden;
	transition: transform .6s cubic-bezier(.24, 1, .3, 1);
}
.sbc-start-box__bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background-color: rgba(51, 51, 51, .5);
	transition: background-color .6s cubic-bezier(.24, 1, .3, 1);
}
.sbc-start-box:hover .sbc-start-box__bg { transform: scale(1.13); }
.sbc-start-box:hover .sbc-start-box__bg::after { background-color: rgba(51, 51, 51, .2); }

/* SVG-based tiles (no PNG in the media library) */
.sbc-start-box__bg--icon svg {
	position: absolute;
	top: -6%;
	right: -6%;
	width: 62%;
	height: auto;
	fill: #565656;
}

.sbc-start-box__inner,
.sbc-start-box__link {
	position: relative;
	z-index: 10;
}
.sbc-start-box__inner { padding-bottom: 22px; }
.sbc-start-box__title {
	display: block;
	font-family: Roboto, 'Open Sans', sans-serif;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 500;
	color: #fff;
	margin-bottom: 4px;
}
.sbc-start-box__text {
	display: block;
	font-size: 14px;
	line-height: 20px;
	color: #fff;
}

/* START rendered as a solid accent button - the "click here" signal. */
.sbc-start-box__link {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	padding: 9px 12px 9px 18px;
	border-radius: 100px;
	background: #19975d;
	font-family: 'Open Sans', Roboto, sans-serif;
	font-size: 12px;
	line-height: 14px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #fff;
	box-shadow: 0 0 0 0 rgba(25, 151, 93, .6);
	animation: sbc-start-pulse 2.4s ease-out infinite;
	transition: background-color .35s ease;
}
.sbc-start-box:hover .sbc-start-box__link,
.sbc-start-box:focus-visible .sbc-start-box__link {
	background: #1fb06e;
	animation: none;
}
@keyframes sbc-start-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(25, 151, 93, .6); }
	70%  { box-shadow: 0 0 0 10px rgba(25, 151, 93, 0); }
	100% { box-shadow: 0 0 0 0 rgba(25, 151, 93, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.sbc-start-box__link { animation: none; }
}
.sbc-start-box__arrow {
	position: relative;
	display: inline-block;
	width: 22px;
	height: 22px;
	margin-left: 10px;
	border: 2px solid rgba(255, 255, 255, .5);
	border-radius: 100px;
	box-sizing: border-box;
	transition: border-color .35s cubic-bezier(.12, .75, .4, 1);
}
.sbc-start-box__arrow svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 3px;
	box-sizing: border-box;
	fill: none;
	stroke: #fff;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .35s cubic-bezier(.12, .75, .4, 1);
}
.sbc-start-box__arrow::after {
	content: '';
	position: absolute;
	top: 8px;
	left: -6px;
	width: 22px;
	height: 1px;
	background: #fff;
	opacity: 0;
	transform: translateX(-23px);
	transition: all .35s cubic-bezier(.12, .75, .4, 1);
}
.sbc-start-box:hover .sbc-start-box__arrow { border-color: transparent; }
.sbc-start-box:hover .sbc-start-box__arrow svg { transform: translateX(7px); }
.sbc-start-box:hover .sbc-start-box__arrow::after { opacity: 1; transform: translateX(2px); }

.sbc-start-modal__footer {
	margin: 26px 0 0;
	padding: 0;
	text-align: center;
	font-family: Roboto, 'Noto Sans KR', sans-serif; /* site forces Roboto globally */
	font-size: 20px;
	line-height: 1.35;
	color: #fff;
}

body.sbc-start-modal-open { overflow: hidden; }

/* Short viewports (laptops at 100% zoom, landscape tablets): keep the whole dialog on screen. */
@media (max-height: 720px) and (min-width: 691px) {
	.sbc-start-modal__panel { padding: 32px 36px 26px; }
	.sbc-start-modal__title { font-size: 28px; }
	.sbc-start-modal__divider { margin: 12px auto; }
	.sbc-start-modal__lead { margin-bottom: 14px; }
	.sbc-start-box { min-height: 150px; padding: 18px 20px; }
	.sbc-start-box__inner { padding-bottom: 16px; }
	.sbc-start-modal__footer { font-size: 17px; margin-top: 18px; }
}

/* Very short viewports (Windows laptops at 125-150% scaling): avoid the inner scrollbar. */
@media (max-height: 600px) and (min-width: 691px) {
	.sbc-start-modal { padding: 12px; }
	.sbc-start-modal__panel { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 22px 32px 18px; }
	.sbc-start-modal__title { font-size: 24px; padding: 0 40px; }
	.sbc-start-modal__divider { margin: 8px auto; }
	.sbc-start-modal__lead { margin-bottom: 10px; }
	.sbc-start-modal__grid { gap: 12px; }
	.sbc-start-box { min-height: 112px; padding: 14px 18px; }
	.sbc-start-box__inner { padding-bottom: 10px; }
	.sbc-start-box__title { font-size: 19px; }
	.sbc-start-modal__footer { font-size: 15px; margin-top: 12px; }
}

@media (max-width: 690px) {
	.sbc-start-modal { padding: 12px; }
	.sbc-start-modal__panel { padding: 46px 16px 22px; }
	.sbc-start-modal__title { font-size: 24px; }
	.sbc-start-modal__divider { margin: 12px auto; }
	.sbc-start-modal__lead { font-size: 11px; margin-bottom: 14px; }
	.sbc-start-modal__grid { grid-template-columns: 1fr; gap: 10px; }
	/* Compact row tiles so all four fit on a phone screen. */
	.sbc-start-box {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		min-height: 0;
		padding: 14px 16px;
	}
	.sbc-start-box__inner { padding: 0 12px 0 0; }
	.sbc-start-box__title { font-size: 18px; margin-bottom: 2px; }
	.sbc-start-box__text { font-size: 13px; line-height: 18px; }
	.sbc-start-box__link { flex-shrink: 0; align-self: center; padding: 8px 10px 8px 14px; font-size: 11px; }
	.sbc-start-box__bg--icon svg { width: 40%; top: -20%; }
	.sbc-start-modal__footer { font-size: 16px; margin-top: 16px; }
}
