/* ==========================================================================
   Starter flavor IPTV — Main Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
	/* Colors */
	--color-primary:       #6C5CE7;
	--color-primary-dark:  #5A4BD1;
	--color-primary-light: #A29BFE;
	--color-secondary:     #00CEC9;
	--color-accent:        #FD79A8;
	--color-dark:          #0B0E17;
	--color-dark-alt:      #131829;
	--color-surface:       #1A1F35;
	--color-surface-light: #242B45;
	--color-text:          #E4E6F0;
	--color-text-muted:    #9CA3C4;
	--color-white:         #FFFFFF;
	--color-success:       #00B894;
	--color-warning:       #FDCB6E;

	/* Typography */
	--font-heading: 'Outfit', sans-serif;
	--font-body:    'DM Sans', sans-serif;

	/* Spacing */
	--space-xs:  0.5rem;
	--space-sm:  1rem;
	--space-md:  2rem;
	--space-lg:  4rem;
	--space-xl:  6rem;
	--space-xxl: 8rem;

	/* Layout */
	--container-max: 1200px;
	--header-height: 72px;

	/* Borders */
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--radius-full: 50%;

	/* Shadows */
	--shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.15);
	--shadow-md:   0 4px 20px rgba(0, 0, 0, 0.25);
	--shadow-lg:   0 8px 40px rgba(0, 0, 0, 0.35);
	--shadow-glow: 0 0 30px rgba(108, 92, 231, 0.3);

	/* Transitions */
	--transition-fast: 0.2s ease;
	--transition-base: 0.3s ease;
	--transition-slow: 0.5s ease;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-height);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--color-text);
	background-color: var(--color-dark);
	overflow-x: hidden;
}

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

a {
	color: var(--color-primary-light);
	text-decoration: none;
	transition: color var(--transition-fast);
}

a:hover {
	color: var(--color-secondary);
}

/* --------------------------------------------------------------------------
   3. Accessibility
   -------------------------------------------------------------------------- */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	display: block;
	height: auto;
	left: 5px;
	top: 5px;
	width: auto;
	z-index: 100000;
	background: var(--color-primary);
	color: var(--color-white);
	padding: var(--space-xs) var(--space-sm);
	font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   4. Layout — Container
   -------------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--space-md);
	padding-right: var(--space-md);
}

/* --------------------------------------------------------------------------
   5. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.2;
	color: var(--color-white);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.125rem; }

.section-heading {
	margin-bottom: var(--space-lg);
}

.section-heading.text-center {
	text-align: center;
}

.section-title {
	margin-bottom: var(--space-xs);
}

.section-subtitle {
	color: var(--color-text-muted);
	font-size: 1.125rem;
	max-width: 640px;
}

.text-center .section-subtitle {
	margin-left: auto;
	margin-right: auto;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1;
	padding: 0.875rem 2rem;
	border: 2px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition:
		background var(--transition-fast),
		transform var(--transition-fast),
		box-shadow var(--transition-fast);
	text-decoration: none;
}

.btn:hover {
	transform: translateY(-2px);
}

.btn-primary {
	background: var(--color-primary);
	color: var(--color-white);
}

.btn-primary:hover {
	background: var(--color-primary-dark);
	box-shadow: var(--shadow-glow);
	color: var(--color-white);
}

.btn-secondary {
	background: transparent;
	border-color: var(--color-primary-light);
	color: var(--color-primary-light);
}

.btn-secondary:hover {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-white);
}

.btn-sm {
	padding: 0.625rem 1.25rem;
	font-size: 0.875rem;
}

.btn-lg {
	padding: 1.125rem 2.5rem;
	font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   7. Header
   -------------------------------------------------------------------------- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-height);
	z-index: 1000;
	background: rgba(11, 14, 23, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	transition: background var(--transition-base);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.site-branding .site-title {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--color-white);
	letter-spacing: -0.02em;
}

.site-branding .site-title:hover {
	color: var(--color-primary-light);
}

/* Navigation */
.primary-nav .nav-menu {
	list-style: none;
	display: flex;
	gap: var(--space-md);
}

.primary-nav .nav-menu a {
	font-family: var(--font-heading);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--color-text-muted);
	transition: color var(--transition-fast);
	padding: var(--space-xs) 0;
}

.primary-nav .nav-menu a:hover,
.primary-nav .nav-menu .current-menu-item > a {
	color: var(--color-white);
}

/* Mobile Toggle */
.mobile-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: var(--space-xs);
	z-index: 1001;
}

.hamburger-line {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-white);
	border-radius: 2px;
	transition: var(--transition-fast);
}

/* --------------------------------------------------------------------------
   8. Sections — Shared
   -------------------------------------------------------------------------- */
.site-main section {
	padding: var(--space-xl) 0;
}

.site-main section:nth-child(even) {
	background: var(--color-dark-alt);
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
	background: var(--color-dark-alt);
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: var(--space-lg);
	margin-bottom: var(--space-lg);
}

.footer-logo {
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--color-white);
}

.footer-tagline {
	color: var(--color-text-muted);
	margin-top: var(--space-xs);
	font-size: 0.9375rem;
}

.footer-heading {
	margin-bottom: var(--space-sm);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--color-text-muted);
}

.footer-menu {
	list-style: none;
}

.footer-menu li + li {
	margin-top: 0.5rem;
}

.footer-menu a {
	color: var(--color-text-muted);
	font-size: 0.9375rem;
}

.footer-menu a:hover {
	color: var(--color-white);
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: var(--space-md);
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	font-size: 0.875rem;
	color: var(--color-text-muted);
}

.footer-legal a {
	color: var(--color-text-muted);
}

.footer-legal a:hover {
	color: var(--color-white);
}

.footer-legal .sep {
	margin: 0 0.5rem;
	opacity: 0.4;
}

/* --------------------------------------------------------------------------
   10. Responsive
   -------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 992px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* Mobile */
@media (max-width: 768px) {

	/* Header */
	.primary-nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 80%;
		max-width: 320px;
		height: 100vh;
		background: var(--color-surface);
		padding: calc(var(--header-height) + var(--space-md)) var(--space-md) var(--space-md);
		transition: right var(--transition-base);
		box-shadow: var(--shadow-lg);
		z-index: 999;
	}

	.primary-nav.is-open {
		right: 0;
	}

	.primary-nav .nav-menu {
		flex-direction: column;
		gap: var(--space-sm);
	}

	.primary-nav .nav-menu a {
		font-size: 1.125rem;
		padding: var(--space-xs) 0;
		display: block;
	}

	.header-cta {
		display: none;
	}

	.mobile-toggle {
		display: flex;
	}

	/* Footer */
	.footer-grid {
		grid-template-columns: 1fr;
		gap: var(--space-md);
	}

	.footer-bottom {
		flex-direction: column;
		gap: var(--space-sm);
		text-align: center;
	}

	/* Sections */
	.site-main section {
		padding: var(--space-lg) 0;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.container {
		padding-left: var(--space-sm);
		padding-right: var(--space-sm);
	}

	h1 { font-size: 2rem; }
	h2 { font-size: 1.5rem; }
}
