/* ── PAGE HERO ── */
.page-hero {
	padding: 3.5rem 0 2.5rem;
	border-bottom: 1px solid var(--paper-3);
	overflow: hidden
}

.page-hero-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center
}

.page-hero-text {
	min-width: 0
}

.page-hero-art {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative
}

.page-hero-art svg {
	width: 100%;
	max-width: 520px;
	height: auto;
	display: block
}

.page-hero-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 1.5rem
}

.page-hero-eyebrow-line {
	width: 28px;
	height: 1px;
	background: var(--blue)
}

.page-hero h1 {
	font-size: clamp(2.2rem, 3.5vw, 3.4rem);
	margin-bottom: 1rem;
	max-width: 720px
}

.page-hero h1 em {
	font-style: italic;
	color: var(--blue)
}

.page-hero-sub {
	font-size: 1rem;
	color: var(--ink-2);
	line-height: 1.8;
	max-width: 600px;
	margin-bottom: 0
}

.page-hero-meta {
	display: flex;
	align-items: center;
	gap: 1.25rem 1.5rem;
	margin-top: 1.5rem;
	flex-wrap: wrap
}

.page-hero-meta-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.78rem;
	color: var(--ink-2);
	white-space: nowrap
}

.page-hero-meta-item svg {
	width: 14px;
	height: 14px;
	color: var(--forest);
	flex-shrink: 0
}

/* ── APP LAYOUT ── */
.app {
	padding: 2.5rem 0 5rem
}

.app-grid {
	display: grid;
	grid-template-columns: 380px 1fr;
	gap: 2rem;
	align-items: start
}

/* CONTROL PANEL */
.panel {
	background: var(--paper);
	border: 1px solid var(--paper-3);
	border-radius: var(--r-lg);
	padding: 0;
	overflow: hidden;
	position: sticky;
	top: 80px;
	max-height: calc(100vh - 100px);
	display: flex;
	flex-direction: column;
}

.panel-header {
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--paper-3);
	background: var(--paper-2);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.panel-header-title {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--heading);
	letter-spacing: 0.05em;
	text-transform: uppercase
}

.panel-header-step {
	font-size: 0.7rem;
	color: var(--ink-3);
	font-variant-numeric: tabular-nums
}

.panel-body {
	padding: 1.5rem;
	overflow-y: auto;
	flex: 1
}

.panel-footer {
	padding: 1.25rem 1.5rem;
	border-top: 1px solid var(--paper-3);
	background: var(--paper-2);
	display: flex;
	flex-direction: column;
	gap: 8px
}

/* DROPZONE */
.dropzone {
	display: block;
	border: 2px dashed var(--paper-3);
	border-radius: var(--r-lg);
	padding: 2rem 1.25rem;
	text-align: center;
	cursor: pointer;
	transition: all 0.15s;
	background: var(--paper-2);
}

.dropzone:hover,
.dropzone.drag-over {
	border-color: var(--blue);
	background: var(--blue-pale)
}

.dropzone-icon {
	display: block;
	width: 36px;
	height: 36px;
	margin: 0 auto 0.75rem;
	color: var(--ink-3);
	flex-shrink: 0
}

.dropzone-title {
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--ink);
	margin-bottom: 0.25rem
}

.dropzone-sub {
	font-size: 0.75rem;
	color: var(--ink-3)
}

.dropzone-sub strong {
	color: var(--blue);
	font-weight: 500
}

.dropzone input[type=file] {
	display: none
}

/* FILE PILL */
.file-pill {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0.75rem 0.85rem;
	background: var(--paper-2);
	border: 1px solid var(--paper-3);
	border-radius: var(--r);
}

.file-pill-icon {
	width: 32px;
	height: 32px;
	border-radius: var(--r);
	background: var(--blue-pale);
	color: var(--blue);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 0.75rem;
	font-weight: 600
}

.file-pill-info {
	flex: 1;
	min-width: 0
}

.file-pill-name {
	font-size: 0.82rem;
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 500
}

.file-pill-meta {
	font-size: 0.7rem;
	color: var(--ink-3)
}

.file-pill-clear {
	background: none;
	border: none;
	color: var(--ink-3);
	cursor: pointer;
	padding: 4px;
	border-radius: var(--r);
	transition: all 0.15s
}

.file-pill-clear:hover {
	color: var(--rose);
	background: var(--rose-pale)
}

/* TABS for watermark type */
.tabs {
	display: flex;
	gap: 0;
	background: var(--paper-2);
	border: 1px solid var(--paper-3);
	border-radius: var(--r);
	padding: 3px;
	margin-bottom: 1.25rem
}

.tab {
	flex: 1;
	font-size: 0.78rem;
	font-weight: 500;
	padding: 7px 10px;
	border: none;
	background: transparent;
	color: var(--ink-2);
	cursor: pointer;
	border-radius: calc(var(--r) - 1px);
	transition: all 0.15s;
	font-family: var(--sans);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px
}

.tab.active {
	background: var(--paper);
	color: var(--heading);
	box-shadow: 0 1px 3px rgba(16, 25, 66, 0.06)
}

.tab:not(.active):hover {
	color: var(--ink)
}

/* SUB-TABS for image source (URL vs Upload) */
.subtabs {
	display: flex;
	gap: 14px;
	border-bottom: 1px solid var(--paper-3);
	margin-bottom: 0.95rem;
	padding-bottom: 0
}

.subtab {
	font-family: var(--sans);
	font-size: 0.78rem;
	font-weight: 500;
	padding: 6px 0 9px;
	border: none;
	background: transparent;
	color: var(--ink-3);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: all 0.15s
}

.subtab:hover {
	color: var(--ink-2)
}

.subtab.active {
	color: var(--heading);
	border-bottom-color: var(--blue)
}

/* HINT TEXT */
.hint {
	font-size: 0.72rem;
	color: var(--ink-3);
	line-height: 1.55;
	margin-top: 0.4rem
}

.hint-warning {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	background: var(--amber-pale);
	color: var(--amber);
	border: 1px solid #f4dfb8;
	padding: 0.6rem 0.75rem;
	border-radius: var(--r);
	font-size: 0.75rem;
	line-height: 1.5;
	margin-top: 0.75rem
}

.hint-warning::before {
	content: '!';
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--amber);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	margin-top: 1px
}

/* URL preview thumbnail */
.url-preview {
	margin-top: 0.6rem;
	padding: 0.6rem;
	background: var(--paper-2);
	border: 1px solid var(--paper-3);
	border-radius: var(--r);
	display: flex;
	align-items: center;
	gap: 10px
}

.url-preview-thumb {
	width: 48px;
	height: 48px;
	background: #fff;
	border: 1px solid var(--paper-3);
	border-radius: var(--r);
	flex-shrink: 0;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat
}

.url-preview-info {
	flex: 1;
	min-width: 0;
	font-size: 0.72rem;
	color: var(--ink-2)
}

.url-preview-info .domain {
	font-weight: 500;
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block
}

.url-preview-info .status {
	color: var(--forest);
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 2px
}

.url-preview-info .status.error {
	color: var(--rose)
}

/* SECTION DIVIDER */
.field-section {
	padding: 0 0 1.25rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid var(--paper-3)
}

.field-section:last-child {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0
}

.field-section-title {
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--ink-3);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 0.85rem;
	display: flex;
	align-items: center;
	gap: 8px
}

.field-section-title .icon {
	width: 14px;
	height: 14px;
	color: var(--blue)
}

/* FORM FIELDS */
.field {
	margin-bottom: 0.95rem
}

.field:last-child {
	margin-bottom: 0
}

.field-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--ink-2);
	margin-bottom: 0.4rem
}

.field-label-value {
	font-size: 0.72rem;
	color: var(--ink-3);
	font-variant-numeric: tabular-nums;
	font-family: var(--mono)
}

.input,
.select {
	width: 100%;
	font-family: var(--sans);
	font-size: 0.85rem;
	color: var(--ink);
	padding: 9px 11px;
	border: 1px solid var(--paper-3);
	border-radius: var(--r);
	background: var(--paper);
	transition: border-color 0.15s;
}

.input:focus,
.select:focus {
	outline: none;
	border-color: var(--blue)
}

.input::placeholder {
	color: var(--ink-4)
}

.select {
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%238a8fa8' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 28px
}

.color-row {
	display: flex;
	align-items: center;
	gap: 10px
}

.color-swatch {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: var(--r);
	border: 1px solid var(--paper-3);
	cursor: pointer;
	flex-shrink: 0;
	overflow: hidden;
}

.color-swatch input[type=color] {
	position: absolute;
	inset: -2px;
	width: calc(100% + 4px);
	height: calc(100% + 4px);
	border: none;
	cursor: pointer;
	background: transparent;
	padding: 0;
}

/* RANGE SLIDER */
.range {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: var(--paper-3);
	outline: none;
	cursor: pointer;
}

.range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--blue);
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba(16, 25, 66, 0.2);
}

.range::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--blue);
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba(16, 25, 66, 0.2);
}

/* IMAGE PREVIEW */
.img-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0.6rem;
	background: var(--paper-2);
	border: 1px solid var(--paper-3);
	border-radius: var(--r);
	margin-bottom: 0.75rem;
}

.img-preview-thumb {
	width: 48px;
	height: 48px;
	background: #fff;
	border: 1px solid var(--paper-3);
	border-radius: var(--r);
	flex-shrink: 0;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
}

.img-preview-info {
	flex: 1;
	min-width: 0
}

.img-preview-name {
	font-size: 0.78rem;
	color: var(--ink);
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap
}

.img-preview-meta {
	font-size: 0.7rem;
	color: var(--ink-3)
}

/* PREVIEW PANE */
.preview-pane {
	background: var(--paper);
	border: 1px solid var(--paper-3);
	border-radius: var(--r-lg);
	overflow: hidden;
	height: calc(100vh - 100px);
	position: sticky;
	top: 80px;
	display: flex;
	flex-direction: column;
}

.preview-header {
	padding: 0.85rem 1.25rem;
	border-bottom: 1px solid var(--paper-3);
	background: var(--paper-2);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.preview-header-title {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--heading);
	letter-spacing: 0.05em;
	text-transform: uppercase
}

.preview-header-actions {
	display: flex;
	align-items: center;
	gap: 6px
}

.preview-body {
	flex: 1;
	position: relative;
	background: #f1f3f9;
	overflow: hidden
}

.preview-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 2rem;
	text-align: center;
}

.preview-empty-icon {
	width: 80px;
	height: 80px;
	margin-bottom: 1.25rem;
	color: var(--ink-4)
}

.preview-empty-title {
	font-family: var(--serif);
	font-weight: 700;
	font-size: 1.4rem;
	color: var(--heading);
	margin-bottom: 0.5rem
}

.preview-empty-sub {
	font-size: 0.88rem;
	color: var(--ink-2);
	max-width: 320px;
	line-height: 1.7
}

#viewer-container {
	width: 100%;
	height: 100%;
	display: none;
}

#viewer-container.active {
	display: block
}

/* LOADING OVERLAY */
.loading-overlay {
	position: absolute;
	inset: 0;
	background: rgba(244, 246, 253, 0.85);
	backdrop-filter: blur(2px);
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	z-index: 10;
}

.loading-overlay.active {
	display: flex
}

.spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--paper-3);
	border-top-color: var(--blue);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-bottom: 1rem;
}

@keyframes spin {
	to {
		transform: rotate(360deg)
	}
}

.loading-text {
	font-size: 0.85rem;
	color: var(--ink-2);
	font-weight: 500
}

.btn-white {
	background: #fff;
	color: var(--blue);
	border-color: #fff
}

.btn-white:hover {
	background: rgba(255, 255, 255, 0.92)
}

.btn-outline-white {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3)
}

.btn-outline-white:hover {
	border-color: #fff;
	transform: translateY(-1px)
}

/* RESPONSIVE */
@media(max-width:1000px) {
	.app-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem
	}

	.panel {
		position: static;
		max-height: none
	}

	.preview-pane {
		position: static;
		height: 70vh
	}

	.info-strip-grid {
		grid-template-columns: 1fr
	}

	.page-hero-grid {
		grid-template-columns: 1fr;
		gap: 2rem
	}

	.page-hero-art {
		order: -1;
		max-width: 380px;
		margin: 0 auto
	}
}

@media(max-width:900px) {

	.inner,
	.nav-inner,
	.breadcrumb-inner {
		padding: 0 1.5rem
	}

	.nav-links {
		display: none
	}

	.nav-menu-btn {
		display: block
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 2.5rem
	}
}

@media(max-width:600px) {
	.footer-grid {
		grid-template-columns: 1fr
	}

	.page-hero {
		padding: 2.5rem 0 2rem
	}

	.page-hero-art {
		max-width: 280px
	}

	.preview-pane {
		height: 60vh
	}
}