/* ============================================================================
   FieldOpt Website CSS - APP COLOR THEME
   Mobile-first, responsive, light theme matching the app aesthetic
   ============================================================================ */

/* CSS Variables - Matched to FieldOpt App */
:root {
	--primary: #4a9eff;
	--primary-dark: #2d6fb5;
	--success: #4caf6a;
	--warning: #e5a834;
	--danger: #e05555;
	--info: #5b9bd5;
	--purple: #9b7ed8;
	
	--text: #1a1a1a;
	--text-secondary: #666;
	--text-light: #999;
	
	--bg: #f5f6f7;
	--bg-white: #fff;
	--bg-light: #fafbfc;
	
	--border: #e0e1e3;
	--border-light: #efefef;
	
	--spacing-xs: 0.5rem;
	--spacing-sm: 1rem;
	--spacing-md: 1.5rem;
	--spacing-lg: 2rem;
	--spacing-xl: 3rem;
	--spacing-2xl: 4rem;
	
	--radius-sm: 0.5rem;
	--radius-md: 0.75rem;
	--radius-lg: 1rem;
	--radius-xl: 2rem;
	
	--transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	overflow-x: hidden;
}

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

a:hover {
	color: var(--primary-dark);
}

/* Container */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--spacing-md);
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

.header {
	background: var(--bg-white);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--spacing-md) 0;
	max-width: 1200px;
	margin: 0 auto;
	padding-left: var(--spacing-md);
	padding-right: var(--spacing-md);
}

.logo {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--primary);
	text-decoration: none;
}

.logo-icon {
	width: 32px;
	height: 32px;
}

.nav-links {
	display: none;
	list-style: none;
	gap: var(--spacing-lg);
}

.nav-links a {
	color: var(--text-secondary);
	font-size: 0.9rem;
	font-weight: 500;
	transition: color var(--transition);
}

.nav-links a:hover {
	color: var(--primary);
}

/* GitHub Nav Button */
.nav-github {
	display: inline-flex;
	align-items: center;
	transform: translateY(-5px);
	gap: 6px;
	padding: 6px 12px;
	background: rgba(74, 158, 255, 0.15);
	color: var(--primary);
	border-radius: var(--radius-sm);
	border: 1px solid var(--primary);
	font-weight: 600;
	font-size: 0.9rem;
	transition: all var(--transition);
}

.nav-github:hover {
	background: rgba(74, 158, 255, 0.25);
	box-shadow: 0 0 6px rgba(74, 158, 255, 0.4);
	transform: translateY(-0.5px);
}

.nav-github svg {
	width: 18px;
	height: 18px;
	display: inline-block;
}

@media (min-width: 768px) {
	.nav-links {
		display: flex;
	}
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
	background: linear-gradient(135deg, #4a9eff 0%, #2d6fb5 100%);
	color: var(--bg-white);
	padding: clamp(4rem, 10vh, 8rem) var(--spacing-md);
	text-align: center;
	position: relative;
	overflow: hidden;
}

.hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: 
		radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
		radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
	pointer-events: none;
}

.hero .container {
	position: relative;
	z-index: 1;
}

.hero h1 {
	font-size: clamp(1.8rem, 6vw, 3.2rem);
	margin-bottom: var(--spacing-md);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.hero p {
	font-size: clamp(1rem, 2.5vw, 1.2rem);
	margin-bottom: var(--spacing-lg);
	opacity: 0.95;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

/* ============================================================================
   BUTTONS & CTA
   ============================================================================ */

.cta-buttons {
	display: flex;
	gap: var(--spacing-md);
	justify-content: center;
	flex-wrap: wrap;
	flex-direction: column;
	align-items: center;
}

@media (min-width: 640px) {
	.cta-buttons {
		flex-direction: row;
		align-items: center;
	}
}

.btn {
	display: inline-block;
	padding: var(--spacing-sm) var(--spacing-lg);
	border-radius: var(--radius-sm);
	font-size: 0.95rem;
	font-weight: 600;
	text-align: center;
	border: none;
	cursor: pointer;
	transition: all var(--transition);
	white-space: nowrap;
	min-width: 180px;
}

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

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(74, 158, 255, 0.3);
}

.btn-secondary {
	background: rgba(255, 255, 255, 0.15);
	color: var(--secondary);
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 8px rgba(74, 158, 255, 0.3);
}

.btn-large {
	padding: var(--spacing-md) var(--spacing-xl);
	font-size: 1rem;
	min-width: 200px;
}

/* ============================================================================
   IMAGE BREAK SECTIONS
   ============================================================================ */

.image-break {
	padding: clamp(2rem, 6vh, 4rem) var(--spacing-md);
	background: var(--bg);
}

.image-container {
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
	height: clamp(250px, 45vh, 450px);
}

.accent-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: saturate(0.95) contrast(1.05);
}

.image-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(74, 158, 255, 0.25) 0%, rgba(45, 111, 181, 0.25) 100%);
	pointer-events: none;
}

.image-break-right {
	background: var(--bg-white);
}

@media (max-width: 768px) {
	.image-container {
		height: clamp(200px, 40vh, 300px);
	}
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.section {
	padding: clamp(3rem, 8vh, 5rem) var(--spacing-md);
}

.section h2 {
	font-size: clamp(1.8rem, 5vw, 2.8rem);
	margin-bottom: var(--spacing-lg);
	text-align: center;
}

.section-intro {
	text-align: center;
	color: var(--text-secondary);
	margin-bottom: var(--spacing-xl);
	font-size: 1.05rem;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

/* Problem Section */
.problem-section {
	background: var(--bg);
}

.problem-card {
	border-left: 4px solid var(--primary);
}

.problem-card h3 {
	color: var(--primary);
	font-size: 1.1rem;
	margin-bottom: var(--spacing-sm);
}

/* Solution Section */
.solution-section {
	background: var(--bg-white);
}

.feature-card {
	border-top: 3px solid var(--primary);
}

.feature-card h3 {
	color: var(--primary);
	font-size: 1.1rem;
	margin-bottom: var(--spacing-sm);
}

/* Demo Section */
.demo-section {
	background: var(--bg);
}

.demo-wrapper {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-lg);
	align-items: center;
}

.browser-frame {
	width: 100%;
	max-width: 1000px;
	background: #1a1a1a;
	border-radius: var(--radius-md);
	overflow: hidden;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.browser-header {
	background: #2a2a2a;
	padding: var(--spacing-sm) var(--spacing-md);
	display: flex;
	gap: var(--spacing-xs);
	align-items: center;
	border-bottom: 1px solid #3a3a3a;
}

.dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.dot.red {
	background: #ff5f56;
}

.dot.yellow {
	background: #ffbd2e;
}

.dot.green {
	background: #27c93f;
}

.browser-url {
	color: #999;
	font-size: 0.85rem;
	margin-left: var(--spacing-sm);
}

.dashboard-mockup {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 16 / 9;
}

/* Moat Section */
.moat-section {
	background: var(--bg-white);
}

.moat-content {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--spacing-xl);
	align-items: center;
	max-width: 1000px;
	margin: 0 auto;
}

@media (min-width: 768px) {
	.moat-content {
		grid-template-columns: 1fr 1fr;
	}
}

.moat-text {
	background: var(--bg-light);
	padding: var(--spacing-lg);
	border-radius: var(--radius-md);
	border-left: 5px solid var(--primary);
}

.moat-text p {
	margin-bottom: var(--spacing-md);
	line-height: 1.8;
	color: var(--text-secondary);
}

.moat-text strong {
	color: var(--primary);
	font-weight: 600;
}

.moat-diagram {
	width: 100%;
	height: auto;
	max-width: 400px;
}

/* ============================================================================
   GRID LAYOUTS
   ============================================================================ */

.grid-3 {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--spacing-lg);
	margin-bottom: var(--spacing-lg);
}

@media (min-width: 640px) {
	.grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.grid-3 {
		grid-template-columns: repeat(3, 1fr);
	}
}

.grid-pricing {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--spacing-lg);
}

@media (min-width: 768px) {
	.grid-pricing {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.grid-pricing {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
	background: var(--bg-white);
	padding: var(--spacing-lg);
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
	transition: all var(--transition);
}

.card:hover {
	border-color: var(--primary);
	box-shadow: 0 8px 24px rgba(74, 158, 255, 0.1);
	transform: translateY(-4px);
}

.card h3 {
	font-size: 1.1rem;
	margin-bottom: var(--spacing-sm);
	color: var(--primary);
}

.card p {
	color: var(--text-secondary);
	line-height: 1.7;
}

.card ul {
	list-style: none;
	margin: var(--spacing-lg) 0;
}

.card li {
	padding: var(--spacing-xs) 0;
	color: var(--text-secondary);
	border-bottom: 1px solid var(--border-light);
	font-size: 0.95rem;
}

.card li:last-child {
	border-bottom: none;
}

/* Pricing Cards */
.pricing-card {
	display: flex;
	flex-direction: column;
	background: var(--bg-light);
}

.pricing-card.featured {
	background: var(--bg-white);
	border: 2px solid var(--primary);
}

.pricing-card .price {
	font-size: 2rem;
	font-weight: 800;
	color: var(--primary);
	margin: var(--spacing-md) 0;
}

.pricing-card .price span {
	font-size: 0.5em;
	font-weight: 600;
	color: var(--text-secondary);
}

.pricing-card ul {
	flex-grow: 1;
	margin-bottom: var(--spacing-lg);
}

.pricing-card .btn {
	width: 100%;
	margin-top: auto;
}

.badge {
	display: inline-block;
	background: var(--primary);
	color: var(--bg-white);
	padding: var(--spacing-xs) var(--spacing-md);
	border-radius: var(--radius-sm);
	font-size: 0.75rem;
	font-weight: 700;
	margin-bottom: var(--spacing-sm);
}

/* ============================================================================
   FINAL CTA SECTION
   ============================================================================ */

.final-cta {
	background: linear-gradient(135deg, #4a9eff 0%, #2d6fb5 100%);
	color: var(--bg-white);
	text-align: center;
	padding: clamp(3rem, 8vh, 5rem) var(--spacing-md);
}

.final-cta h2 {
	color: var(--bg-white);
	font-size: clamp(1.8rem, 5vw, 2.8rem);
	margin-bottom: var(--spacing-md);
}

.final-cta p {
	font-size: 1.1rem;
	margin-bottom: var(--spacing-xl);
	opacity: 0.95;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
	background: var(--text);
	color: var(--text-light);
	padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
}

.footer-content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: var(--spacing-xl);
	margin-bottom: var(--spacing-xl);
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.footer-section h4 {
	color: var(--bg-white);
	margin-bottom: var(--spacing-md);
	font-size: 0.95rem;
	font-weight: 600;
}

.footer-section ul {
	list-style: none;
}

.footer-section li {
	margin-bottom: var(--spacing-sm);
}

.footer-section a {
	color: var(--text-light);
}

.footer-section a:hover {
	color: var(--primary);
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: var(--spacing-lg);
	text-align: center;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	font-size: 0.9rem;
}

.footer-bottom a {
	color: var(--primary);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 640px) {
	.btn {
		min-width: auto;
		width: 100%;
	}
	
	.btn-large {
		width: 100%;
	}
	
	.grid-3 {
		gap: var(--spacing-md);
	}
	
	.moat-content {
		grid-template-columns: 1fr;
	}
	
	.footer-content {
		grid-template-columns: 1fr;
		gap: var(--spacing-lg);
	}
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@media (prefers-reduced-motion: no-preference) {
	.card {
		animation: fadeInUp 0.6s ease-out backwards;
	}
	
	@keyframes fadeInUp {
		from {
			opacity: 0;
			transform: translateY(20px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}
