/* ==========================================================================
   LUNA LABS - Page-Specific Styles
   Only page-specific layout/positioning. Common components (footer, etc.)
   are styled in their respective files (sections.css).

   Table of Contents:
   1. Shared Components (back-link)
   2. Coming Soon Page (think.html)
   3. Cases Index Page (cases/index.html)
   4. Case Study Page (cases/*.html)
   ========================================================================== */

/* ==========================================================================
   1. SHARED COMPONENTS
   ========================================================================== */
.back-link {
	display: inline-block;
	font-family: monospace;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--text-muted);
	text-decoration: none;
	letter-spacing: 0.1em;
	margin-bottom: 2rem;
	opacity: 0.6;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.back-link:hover {
	opacity: 1;
	color: var(--text);
}

/* ==========================================================================
   2. COMING SOON PAGE (think.html)
   Placeholder page for sections under construction
   ========================================================================== */
.coming-soon-page {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	padding: 6rem 2rem 2rem;
}

.coming-soon-page .back-link {
	position: absolute;
	top: 2rem;
	/* left: 3rem; */
}

.coming-soon-label {
	font-family: monospace;
	font-size: 0.625rem;
	font-weight: 500;
	color: var(--text-muted);
	letter-spacing: 0.25em;
	margin-bottom: 1.5rem;
	opacity: 0;
	animation: comingSoonFadeIn 0.4s ease-out 0.1s forwards;
}

.coming-soon-title {
	font-size: clamp(2.5rem, 8vw, 5rem);
	font-weight: 600;
	color: var(--text);
	letter-spacing: -0.03em;
	line-height: 1;
	margin-bottom: 1.5rem;
	opacity: 0;
	animation: comingSoonFadeInUp 0.5s ease-out 0.2s forwards;
}

.coming-soon-desc {
	font-size: 1rem;
	color: var(--text-muted);
	max-width: 400px;
	line-height: 1.6;
	margin-bottom: 3rem;
	opacity: 0;
	animation: comingSoonFadeInUp 0.5s ease-out 0.35s forwards;
}

.coming-soon-status {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: monospace;
	font-size: 0.6875rem;
	color: var(--text-muted);
	letter-spacing: 0.1em;
	opacity: 0;
	animation: comingSoonFadeIn 0.4s ease-out 0.5s forwards;
}

.status-dot {
	width: 6px;
	height: 6px;
	background: var(--accent);
	border-radius: 50%;
	animation: comingSoonPulse 2s ease-in-out infinite;
}

@keyframes comingSoonPulse {

	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}

	50% {
		opacity: 0.5;
		transform: scale(0.85);
	}
}

@keyframes comingSoonFadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes comingSoonFadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Footer positioning ONLY - padding comes from .site-footer in sections.css */
.coming-soon-footer {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}

/* ==========================================================================
   3. CASES INDEX PAGE (cases/index.html)
   ========================================================================== */
.cases-index-page {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	padding: 6rem 2rem 2rem;
}

/* Current Link */
.current-link {
	display: inline-block;
	margin-bottom: 2.5rem;
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--accent);
	text-decoration: none;
	letter-spacing: -0.01em;
	opacity: 0;
	animation: casesFadeInUp 0.3s ease-out 0.1s forwards;
	transition: color 0.2s ease;
}

.current-link:hover {
	color: var(--text);
}

.cases-index-page .back-link {
	position: absolute;
	top: 2rem;
}

.cases-list {
	padding-left: 0;
}

.cases-list-header {
	font-family: monospace;
	font-size: 0.625rem;
	font-weight: 500;
	color: var(--text-muted);
	letter-spacing: 0.2em;
	margin-bottom: 2rem;
	opacity: 0;
	transform: translateY(12px);
	animation: casesFadeInUp 0.3s ease-out 0.2s forwards;
}

.cases-list-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cases-list-item {
	opacity: 0;
	transform: translateX(-12px);
}

.cases-list-item:nth-child(1) {
	animation: casesFadeInLeft 0.3s ease-out 0.25s forwards;
}

.cases-list-item:nth-child(2) {
	animation: casesFadeInLeft 0.3s ease-out 0.32s forwards;
}

.cases-list-item:nth-child(3) {
	animation: casesFadeInLeft 0.3s ease-out 0.39s forwards;
}

.cases-list-item:nth-child(4) {
	animation: casesFadeInLeft 0.3s ease-out 0.46s forwards;
}

.cases-list-link {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	padding: 0.75rem 0;
	text-decoration: none;
	transition: all 0.2s ease;
}

.cases-list-link:hover {
	transform: translateX(8px);
}

.cases-list-link:hover .case-link-name {
	color: var(--text);
}

.cases-list-link:hover .case-link-tag {
	color: var(--accent);
}

.case-link-name {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 600;
	color: var(--text);
	opacity: 0.7;
	line-height: 1.1;
	letter-spacing: -0.02em;
	transition: all 0.2s ease;
}

.case-link-tag {
	flex-shrink: 0;
	font-family: monospace;
	font-size: 0.5625rem;
	color: var(--text-muted);
	letter-spacing: 0.15em;
	transition: all 0.2s ease;
}

/* Footer positioning for cases index */
.cases-footer {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}

@keyframes casesFadeInUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes casesFadeInLeft {
	from {
		opacity: 0;
		transform: translateX(-12px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ==========================================================================
   4. CASE STUDY PAGE (cases/*.html)
   ========================================================================== */
.case-study-page {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 6rem 2rem 2rem;
}

.case-study-page .back-link {
	position: absolute;
	top: 2rem;
}

/* Breadcrumb navigation */
.case-breadcrumb {
	position: absolute;
	top: 2rem;
	left: 2rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	z-index: 10;
	font-family: monospace;
	font-size: 0.6875rem;
	letter-spacing: 0.05em;
	opacity: 0;
	animation: caseFadeInUp 0.3s ease-out 0.1s forwards;
}

.case-breadcrumb a {
	color: var(--text-muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

.case-breadcrumb a:hover {
	color: var(--text);
}

.case-breadcrumb-sep {
	color: var(--text-muted);
	opacity: 0.4;
}

.case-breadcrumb-current {
	color: var(--text);
	opacity: 0.6;
}

/* Case pagination */
.case-pagination {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	display: flex;
	gap: 0.5rem;
	z-index: 100;
	opacity: 0;
	animation: caseFadeInUp 0.3s ease-out 0.2s forwards;
}

.case-pagination-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	font-family: monospace;
	font-size: 0.6875rem;
	color: var(--text-muted);
	text-decoration: none;
	letter-spacing: 0.05em;
	background: color-mix(in srgb, var(--bg) 80%, transparent);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid color-mix(in srgb, var(--text-muted) 20%, transparent);
	border-radius: 4px;
	transition: all 0.2s ease;
}

.case-pagination-link:hover {
	color: var(--text);
	border-color: color-mix(in srgb, var(--text-muted) 40%, transparent);
	transform: translateY(-2px);
}

.case-pagination-link.disabled {
	opacity: 0.3;
	pointer-events: none;
}

/* Case Content */
.case-content {
	flex: 1;
	padding: 6rem 3rem 3rem;
}

.case-content-inner {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.case-tag {
	font-family: monospace;
	font-size: 0.625rem;
	font-weight: 500;
	color: var(--accent);
	letter-spacing: 0.2em;
	margin-bottom: 1.5rem;
	opacity: 0;
	animation: caseFadeInUp 0.3s ease-out 0.15s forwards;
}

.case-name {
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 600;
	color: var(--text);
	line-height: 1;
	margin: 0 0 1.5rem 0;
	letter-spacing: -0.02em;
	opacity: 0;
	animation: caseFadeInUp 0.3s ease-out 0.2s forwards;
}

.case-description {
	font-size: 1.125rem;
	color: var(--text);
	opacity: 0;
	line-height: 1.6;
	margin: 0 0 2rem 0;
	max-width: 70%;
	animation: caseFadeInUp 0.3s ease-out 0.25s forwards;
}

.case-stats {
	display: flex;
	gap: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid color-mix(in srgb, var(--text-muted) 20%, transparent);
	margin-bottom: 2rem;
	opacity: 0;
	animation: caseFadeInUp 0.3s ease-out 0.3s forwards;
}

.case-stat {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.case-stat-value {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--text);
	line-height: 1;
}

.case-stat-label {
	font-family: monospace;
	font-size: 0.5625rem;
	color: var(--text-muted);
	letter-spacing: 0.15em;
}

.case-section {
	min-height: auto;
	display: block;
	margin-bottom: 1.5rem;
	padding: 0;
	opacity: 0;
	animation: caseFadeInUp 0.3s ease-out 0.35s forwards;
}

.case-section:nth-of-type(2) {
	animation-delay: 0.4s;
}

.case-section:nth-of-type(3) {
	animation-delay: 0.45s;
}

.case-section-label {
	font-family: monospace;
	font-size: 0.5625rem;
	font-weight: 500;
	color: var(--text-muted);
	letter-spacing: 0.2em;
	margin-bottom: 0.5rem;
}

.case-section-content {
	font-size: 1rem;
	color: var(--text);
	opacity: 0.8;
	line-height: 1.7;
}

.case-section-content p {
	margin: 0;
}

.tech-stack {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tech-item {
	font-family: monospace;
	font-size: 0.6875rem;
	color: var(--text);
	padding: 0.375rem 0.75rem;
	border: 1px solid color-mix(in srgb, var(--text-muted) 40%, transparent);
	transition: border-color 0.2s ease;
}

.tech-item:hover {
	border-color: var(--text);
}

.case-footer {
	flex-shrink: 0;
}

@keyframes caseFadeInUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   5. CURRENT PAGE (current.html)
   Linear-style vertical changelog timeline
   ========================================================================== */
.current-page {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 6rem 2rem 2rem;
}

.current-page .back-link {
	position: absolute;
	top: 2rem;
}

/* Header */
.current-header {
	margin-bottom: 4rem;
	opacity: 0;
	animation: changelogFadeIn 0.5s ease-out 0.1s forwards;
}

.current-title {
	font-size: clamp(2rem, 6vw, 3rem);
	font-weight: 600;
	color: var(--text);
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0 0 0.75rem 0;
}

.current-desc {
	font-size: 1rem;
	color: var(--text-muted);
	line-height: 1.5;
	margin: 0;
}

/* Changelog Timeline Container */
.changelog-timeline {
	position: relative;
	flex: 1;
}

/* Individual Entry */
.changelog-entry {
	display: grid;
	grid-template-columns: 90px 24px 1fr;
	gap: 0;
	position: relative;
	opacity: 0;
	animation: changelogFadeIn 0.4s ease-out forwards;
}

.changelog-entry:nth-child(1) { animation-delay: 0.15s; }
.changelog-entry:nth-child(2) { animation-delay: 0.2s; }
.changelog-entry:nth-child(3) { animation-delay: 0.25s; }
.changelog-entry:nth-child(4) { animation-delay: 0.3s; }
.changelog-entry:nth-child(5) { animation-delay: 0.35s; }
.changelog-entry:nth-child(6) { animation-delay: 0.4s; }
.changelog-entry:nth-child(7) { animation-delay: 0.45s; }
.changelog-entry:nth-child(8) { animation-delay: 0.5s; }
.changelog-entry:nth-child(9) { animation-delay: 0.55s; }
.changelog-entry:nth-child(10) { animation-delay: 0.6s; }
.changelog-entry:nth-child(11) { animation-delay: 0.65s; }

/* Date Column */
.changelog-date-col {
	padding-top: 1.5rem;
	text-align: right;
	padding-right: 1.5rem;
}

.changelog-date {
	font-family: monospace;
	font-size: 0.75rem;
	color: var(--text-muted);
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* Line Column - Vertical line with dots */
.changelog-line-col {
	position: relative;
	display: flex;
	justify-content: center;
}

/* The vertical line */
.changelog-line-col::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 1px;
	background: color-mix(in srgb, var(--text-muted) 30%, transparent);
}

/* First entry - line starts from dot */
.changelog-entry:first-child .changelog-line-col::before {
	top: 1.75rem;
}

/* Last entry - line ends at dot */
.changelog-entry:last-child .changelog-line-col::before {
	bottom: calc(100% - 1.75rem);
}

/* The dot marker */
.changelog-dot {
	position: absolute;
	top: 1.5rem;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--accent);
	border: 2px solid var(--background);
	box-shadow: 0 0 0 1px var(--accent);
	z-index: 1;
}

.changelog-dot.dot-building {
	background: transparent;
	border: 2px solid var(--accent);
	box-shadow: none;
}

/* Content Column */
.changelog-content-col {
	padding: 1rem 0 2.5rem 1.5rem;
}

/* Card */
.changelog-card {
	background: transparent;
}

.changelog-meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.changelog-tag {
	font-family: monospace;
	font-size: 0.625rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.25rem 0.5rem;
	border-radius: 3px;
}

.changelog-tag.tag-live {
	background: color-mix(in srgb, #22c55e 15%, transparent);
	color: #22c55e;
}

.changelog-tag.tag-building {
	background: color-mix(in srgb, var(--accent) 15%, transparent);
	color: var(--accent);
}

.changelog-title {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--text);
	margin: 0 0 0.5rem 0;
	line-height: 1.3;
}

.changelog-body {
	font-size: 0.9375rem;
	color: var(--text-muted);
	line-height: 1.6;
	margin: 0;
	max-width: 520px;
}

/* Footer */
.current-footer {
	margin-top: auto;
	padding-top: 3rem;
}

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

/* Current Page Responsive */
@media (max-width: 768px) {
	.current-page {
		padding: 5rem 1.5rem 2rem;
	}

	.current-page .back-link {
		top: 1.5rem;
	}

	.changelog-entry {
		grid-template-columns: 70px 20px 1fr;
	}

	.changelog-date-col {
		padding-right: 1rem;
	}

	.changelog-date {
		font-size: 0.6875rem;
	}

	.changelog-content-col {
		padding-left: 1rem;
		padding-bottom: 2rem;
	}

	.changelog-title {
		font-size: 1rem;
	}

	.changelog-body {
		font-size: 0.875rem;
	}
}

@media (max-width: 480px) {
	.current-page {
		padding: 4rem 1.25rem 2rem;
	}

	.current-header {
		margin-bottom: 3rem;
	}

	.current-title {
		font-size: clamp(1.75rem, 6vw, 2.5rem);
	}

	.current-desc {
		font-size: 0.9375rem;
	}

	/* Stack layout on mobile */
	.changelog-entry {
		grid-template-columns: 16px 1fr;
	}

	.changelog-date-col {
		display: none;
	}

	.changelog-line-col {
		justify-content: flex-start;
		padding-left: 0;
	}

	.changelog-line-col::before {
		left: 4px;
	}

	.changelog-dot {
		left: 0;
		width: 8px;
		height: 8px;
	}

	.changelog-content-col {
		padding-left: 1.25rem;
		padding-bottom: 1.5rem;
	}

	/* Show date inline on mobile */
	.changelog-meta::before {
		content: attr(data-date);
		font-family: monospace;
		font-size: 0.625rem;
		color: var(--text-muted);
		margin-right: 0.5rem;
	}

	.changelog-tag {
		font-size: 0.5625rem;
	}

	.changelog-title {
		font-size: 0.9375rem;
	}

	.changelog-body {
		font-size: 0.8125rem;
	}
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
	.back-link {
		font-size: 0.6875rem;
		margin-bottom: 1.5rem;
	}

	/* Coming Soon */
	.coming-soon-page {
		padding: 5rem 1.5rem 2rem;
	}

	.coming-soon-page .back-link {
		top: 1.5rem;
	}

	.coming-soon-title {
		font-size: clamp(2rem, 7vw, 3.5rem);
	}

	.coming-soon-desc {
		font-size: 0.9375rem;
	}

	/* Cases Index */
	.cases-index-page {
		height: auto;
		min-height: 100vh;
		padding: 5rem 1.5rem 2rem;
		justify-content: flex-start;
	}

	.cases-index-page .back-link {
		top: 1.5rem;
	}

	.current-link {
		margin-bottom: 2rem;
		font-size: 1rem;
	}

	.cases-list {
		flex: 1;
	}

	.case-link-name {
		font-size: 2rem;
	}

	.cases-list-link {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}

	.cases-footer {
		position: relative;
		margin-top: auto;
		padding-top: 3rem;
	}

	/* Case Study */
	.case-study-page {
		padding: 5rem 1.5rem 2rem;
	}

	.case-breadcrumb {
		top: 1.5rem;
		left: 1.5rem;
	}

	.case-pagination {
		bottom: 1.5rem;
		right: 1.5rem;
	}

	.case-content {
		padding: 5rem 1.5rem 2rem;
	}

	.case-description {
		max-width: 100%;
	}

	.case-stats {
		flex-wrap: wrap;
		gap: 1.5rem;
	}

	.case-section {
		margin-bottom: 1.25rem;
	}
}

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

	/* Cases Index */
	.cases-index-page {
		padding: 4rem 1.25rem 2rem;
	}

	/* Case Study */
	.case-study-page {
		padding: 4rem 1.25rem 2rem;
	}

	/* Coming Soon */
	.coming-soon-page {
		padding: 4rem 1.25rem 2rem;
	}

	.coming-soon-label {
		font-size: 0.5625rem;
		margin-bottom: 1rem;
	}

	.coming-soon-title {
		font-size: clamp(1.75rem, 6vw, 2.5rem);
		margin-bottom: 1rem;
	}

	.coming-soon-desc {
		font-size: 0.875rem;
		margin-bottom: 2rem;
	}

	.coming-soon-status {
		font-size: 0.625rem;
	}
}