/* ═══════════════════════════════════════════
   CHAGO VPN — shared base styles
   Merged from landing.css + order.css design tokens
   ═══════════════════════════════════════════ */

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	background: var(--bg-dark);
	color: var(--text-main);
	font-family: var(--font-main);
}

body {
	min-height: 100vh;
	overflow-x: hidden;
	line-height: 1.6;
	background: var(--bg-dark);
	color: var(--text-main);
	font-family: var(--font-main);
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

img {
	max-width: 100%;
	height: auto;
}

/* ── Ambient Background ── */
.ambient-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	background: radial-gradient(ellipse at 50% -5%, #0d1a2e 0%, #07090e 65%);
	pointer-events: none;
}

.ambient-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(110px);
	opacity: 0.15;
	animation: orbDrift 18s ease-in-out infinite alternate;
}

.orb-1 {
	width: 55vw;
	height: 55vw;
	max-width: 600px;
	max-height: 600px;
	background: radial-gradient(circle, #00e676 0%, transparent 70%);
	top: -20%;
	left: -8%;
}

.orb-2 {
	width: 45vw;
	height: 45vw;
	max-width: 500px;
	max-height: 500px;
	background: radial-gradient(circle, #1a4de8 0%, transparent 70%);
	bottom: -10%;
	right: -8%;
	animation-direction: alternate-reverse;
	animation-duration: 22s;
}

.ambient-grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
	background-size: 60px 60px;
	mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 80%);
	-webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 80%);
}

@keyframes orbDrift {
	from { transform: translate(0, 0) scale(1); }
	to   { transform: translate(30px, 50px) scale(1.07); }
}

/* ═══════════════════════════════════════════
   Shared page chrome: logo header + footer note
   ═══════════════════════════════════════════ */

.main-logo {
	height: clamp(44px, 7vh, 72px);
	width: auto;
	object-fit: contain;
	filter: drop-shadow(0 0 20px rgba(0, 230, 118, 0.2));
	transition: filter 0.3s ease;
}

.main-logo:hover {
	filter: drop-shadow(0 0 32px rgba(0, 230, 118, 0.45));
}

.status-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: rgba(0, 230, 118, 0.07);
	border: 1px solid rgba(0, 230, 118, 0.2);
	border-radius: 100px;
	padding: 4px 13px;
	font-family: var(--font-mono);
	font-size: clamp(0.6rem, 1.5vw, 0.7rem);
	font-weight: 700;
	color: var(--emerald);
	letter-spacing: 0.07em;
	white-space: nowrap;
}

.pulse-dot {
	width: 6px;
	height: 6px;
	background: var(--emerald);
	border-radius: 50%;
	flex-shrink: 0;
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.5); }
	50%      { opacity: 0.7; box-shadow: 0 0 0 5px rgba(0, 230, 118, 0); }
}

.order-footer-note {
	text-align: center;
	margin-top: 28px;
	font-size: 0.78rem;
	color: var(--text-dim);
}

.order-footer-note a {
	color: var(--text-dim);
	text-decoration: underline;
}

/* ═══════════════════════════════════════════
   Shared form controls (field inputs, labels,
   toggle pills, count row, total preview)
   ═══════════════════════════════════════════ */

.field-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.field-label {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--text-dim);
	text-transform: uppercase;
}

.optional {
	font-weight: 400;
	color: var(--text-dim);
	text-transform: none;
	letter-spacing: 0;
	font-family: var(--font-main);
}

.field-input {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	padding: 12px 14px;
	font-family: var(--font-main);
	font-size: 0.95rem;
	color: var(--text-main);
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	width: 100%;
}

.field-input:focus {
	border-color: rgba(0, 230, 118, 0.4);
	box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.08);
}

.field-input.error {
	border-color: rgba(255, 30, 66, 0.5);
	box-shadow: 0 0 0 3px rgba(255, 30, 66, 0.07);
}

.field-input::placeholder {
	color: var(--text-dim);
}

.field-textarea {
	resize: vertical;
	min-height: 80px;
}

.field-error {
	font-size: 0.78rem;
	color: var(--red);
	min-height: 1em;
}

.field-hint {
	font-size: 0.78rem;
	color: var(--text-dim);
}

select.field-input {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c9ba5' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px;
	padding-right: 36px;
	cursor: pointer;
}

select.field-input option {
	background: #0e1422;
	color: var(--text-main);
}

/* Toggle pills (account type) */
.toggle-row {
	display: flex;
	gap: 10px;
}

.toggle-option {
	flex: 1;
}

.toggle-option input {
	display: none;
}

.toggle-pill {
	display: block;
	text-align: center;
	padding: 10px 16px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	color: var(--text-muted);
}

.toggle-option input:checked + .toggle-pill {
	background: rgba(0, 230, 118, 0.1);
	border-color: rgba(0, 230, 118, 0.35);
	color: var(--emerald);
}

.toggle-pill:hover {
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--text-main);
}

/* Count row (+/- stepper) */
.count-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.count-btn {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.05);
	color: var(--text-main);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
}

.count-btn svg {
	width: 16px;
	height: 16px;
}

.count-btn:hover {
	background: rgba(0, 230, 118, 0.1);
	border-color: rgba(0, 230, 118, 0.3);
	color: var(--emerald);
}

.count-display {
	width: 64px;
	text-align: center;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	padding: 10px 8px;
	font-family: var(--font-mono);
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--text-main);
	outline: none;
	-moz-appearance: textfield;
}

.count-display::-webkit-inner-spin-button,
.count-display::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

/* Total preview box */
.total-preview {
	background: rgba(0, 230, 118, 0.04);
	border: 1px solid rgba(0, 230, 118, 0.15);
	border-radius: 12px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.total-label {
	font-size: 0.85rem;
	color: var(--text-muted);
}

.total-value {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-main);
}

.total-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.07);
}

.total-final .total-label {
	font-weight: 700;
	color: var(--text-main);
}

.total-big {
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--emerald);
	font-family: var(--font-mono);
	text-shadow: 0 0 16px rgba(0, 230, 118, 0.3);
}

.total-note {
	font-size: 0.75rem;
	color: var(--text-dim);
	margin-top: 2px;
}

/* Emerald gradient button (submit / place order) */
.btn-emerald {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: linear-gradient(135deg, #00e676, #00b359);
	color: #001a0d;
	font-family: var(--font-main);
	font-size: 1rem;
	font-weight: 800;
	border: none;
	border-radius: 12px;
	padding: 15px 24px;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
	box-shadow: 0 4px 20px rgba(0, 230, 118, 0.35);
	width: 100%;
	letter-spacing: 0.01em;
	text-decoration: none;
}

.btn-emerald svg {
	width: 18px;
	height: 18px;
}

.btn-emerald:hover {
	transform: scale(1.02);
	box-shadow: 0 6px 28px rgba(0, 230, 118, 0.5);
	color: #001a0d;
}

.btn-emerald:active {
	transform: scale(0.98);
}

.btn-emerald:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Glass card panel used by order form + checkout */
.form-card {
	background: var(--card-bg);
	border: 1px solid var(--border-glass);
	border-radius: 20px;
	padding: 36px 32px;
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	animation: slideUp 0.5s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}

@keyframes slideUp {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   Generic page layout (index.php fallback)
   ═══════════════════════════════════════════ */

.page-wrap {
	position: relative;
	z-index: 1;
	max-width: 760px;
	margin: 0 auto;
	padding: 48px 24px 80px;
}

.page-card {
	margin-bottom: 28px;
}

.page-title {
	font-size: 1.8rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	margin-bottom: 20px;
}

.page-content {
	color: #d0dbe5;
}

.page-content h2,
.page-content h3 {
	color: var(--text-main);
	margin: 24px 0 10px;
}

.page-content p {
	margin-bottom: 14px;
}

.page-content a {
	color: var(--emerald);
}

.page-content ul,
.page-content ol {
	margin: 0 0 14px 22px;
}

/* Screen-reader-only */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
