/* Shared styles for case study pages (labfolio.html, taskring.html).
   Mirrors the layout of the older project pages (e.g. dirtnow.html).
   Each page sets --accent, --tint and --tint-dark on :root. */

* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

body { font-family: 'Inter', sans-serif; transition: background-color 0.3s ease; }

.page-wrapper { max-width: 1600px; margin: 0 auto; display: flex; flex-direction: column; }
@media (min-width: 1024px) {
	.page-wrapper { flex-direction: row; height: 100vh; overflow: hidden; }
}

.content-sidebar { overflow-y: auto; }
.bento-visuals { overflow-y: auto; padding: 32px; background: #f4f4f5; }
.dark .bento-visuals { background: #09090b; }
@media (max-width: 640px) { .bento-visuals { padding: 16px; } }

.eyebrow {
	display: inline-block; padding: 4px 12px; border-radius: 999px;
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
	color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.section-title {
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
	font-style: italic; color: #000; margin-bottom: 16px;
}
.dark .section-title { color: #fff; }

/* Visual grid */
.visual-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1280px) { .visual-grid { grid-template-columns: repeat(2, 1fr); } }

.visual-card {
	position: relative; margin: 0;
	background: white; border-radius: 40px; overflow: hidden;
	border: 1px solid rgba(0,0,0,0.03);
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
	aspect-ratio: 1 / 1; cursor: zoom-in;
}
.dark .visual-card { background: #18181b; border-color: rgba(255,255,255,0.05); }
.visual-card img, .visual-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.visual-card:hover { transform: scale(1.02); box-shadow: 0 30px 60px rgba(0,0,0,0.12); }

.visual-card.wide { grid-column: 1 / -1; }

/* App screenshots: shown whole on a tinted backdrop */
.visual-card.phone {
	aspect-ratio: 4 / 5; background: var(--tint);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 32px 32px 20px;
}
.dark .visual-card.phone { background: var(--tint-dark); }
.visual-card.phone img {
	width: auto; height: auto; max-width: 100%; max-height: calc(100% - 36px);
	object-fit: contain; border-radius: 28px;
	box-shadow: var(--phone-ring, 0 20px 40px rgba(0,0,0,0.14));
}
.visual-card figcaption {
	margin-top: 16px; font-size: 11px; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.08em; color: var(--caption, #6b7280); text-align: center;
}
.dark .visual-card figcaption { color: var(--caption-dark, #a1a1aa); }

/* Wide screenshots (e.g. iPhone Duo unfolded) framed on the tint */
.visual-card.framed {
	background: var(--tint); aspect-ratio: 16 / 11;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 40px 40px 20px;
}
.dark .visual-card.framed { background: var(--tint-dark); }
.visual-card.framed img {
	width: auto; height: auto; max-width: 100%; max-height: calc(100% - 36px);
	object-fit: contain; border-radius: 24px; box-shadow: 0 24px 48px rgba(0,0,0,0.14);
}

/* Videos shown whole on the tint (portrait reels, etc.) */
.visual-card.media { background: var(--tint); aspect-ratio: 4 / 5; }
.dark .visual-card.media { background: var(--tint-dark); }
.visual-card.media video, .visual-card.media img { object-fit: contain; }

/* Section headings inside the visual grid */
.grid-heading {
	grid-column: 1 / -1; display: flex; align-items: center; gap: 10px;
	margin: 16px 0 -4px 8px;
	font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #111827;
}
.grid-heading:first-child { margin-top: 0; }
.dark .grid-heading { color: #f4f4f5; }
.grid-heading .pill {
	padding: 3px 10px; border-radius: 999px; font-size: 10px; letter-spacing: 0.08em;
	color: #fff; background: var(--accent);
}

/* App Store screenshots: already framed and captioned, shown whole on the same tint */
.visual-card.shot { background: var(--tint); aspect-ratio: 3 / 5; padding: 0; }
.visual-card.shot.duo { aspect-ratio: 2 / 3; }
.dark .visual-card.shot { background: var(--tint-dark); }
.visual-card.shot img { object-fit: contain; }

/* "Made by one person" stats strip */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: #f9fafb; border-radius: 20px; padding: 16px 18px; }
.dark .stat { background: #18181b; }
.stat b { display: block; font-size: 26px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; color: #111827; }
.dark .stat b { color: #fff; }
.stat span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; }

/* Pull quote for a personal moment */
.pull-quote {
	position: relative; margin: 0; padding: 20px 22px 20px 26px; border-radius: 20px;
	font-size: 17px; font-weight: 700; line-height: 1.45; font-style: italic; color: #111827;
	background: var(--tint);
	border-left: 4px solid var(--accent);
}
.dark .pull-quote { color: #fff; background: #18181b; }

/* End-to-end process timeline */
.timeline { position: relative; display: grid; gap: 28px; padding-left: 28px; }
.timeline::before {
	content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
	background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 15%, transparent));
}
.timeline li { position: relative; list-style: none; }
.timeline li::before {
	content: ''; position: absolute; left: -28px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
	background: #fff; border: 3px solid var(--accent);
}
.dark .timeline li::before { background: #09090b; }
.timeline .phase { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.timeline .phase strong { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.timeline .phase time { font-size: 11px; font-weight: 600; color: #9ca3af; }
.timeline h5 { font-size: 15px; font-weight: 800; color: #111827; margin-bottom: 4px; }
.dark .timeline h5 { color: #fff; }
.timeline p { font-size: 14px; line-height: 1.6; }

/* Non-clickable text card in the grid */
.note-card {
	cursor: default; background: var(--tint); aspect-ratio: 4 / 5;
	display: flex; flex-direction: column; justify-content: center; padding: 48px;
}
.dark .note-card { background: var(--tint-dark); }
.note-card:hover { transform: none; box-shadow: none; }
.note-card h4 { font-size: 28px; font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 24px; color: var(--note-text, #111827); }
.dark .note-card h4 { color: var(--note-text-dark, #f4f4f5); }
.note-card ul { display: grid; gap: 16px; }
.note-card li { font-size: 15px; line-height: 1.45; color: var(--note-body, #4b5563); padding-left: 20px; position: relative; }
.dark .note-card li { color: var(--note-body-dark, #a1a1aa); }
.note-card li::before { content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.note-card li b { color: var(--note-text, #111827); }
.dark .note-card li b { color: var(--note-text-dark, #f4f4f5); }

/* Buttons and links */
.nav-back-btn {
	display: inline-flex; align-items: center; padding: 14px 28px;
	background: #111827; color: white; border-radius: 100px;
	font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dark .nav-back-btn { background: white; color: #111827; }
.nav-back-btn:hover { transform: translateX(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.nav-back-btn svg { transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); margin-right: 10px; }
.nav-back-btn:hover svg { transform: scale(1.4) rotate(-360deg); }

.visit-btn {
	display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
	padding: 14px 24px; border-radius: 100px;
	font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
	color: var(--accent); border: 2px solid var(--accent);
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.visit-btn:hover { background: var(--accent); color: white; transform: translateY(-2px); }
.visit-btn svg { transition: transform 0.3s ease; }
.visit-btn:hover svg { transform: translate(2px, -2px); }

.next-link-wrap:hover .arrow-icon { transform: translateX(10px); color: var(--accent); }
.next-link-wrap:hover .next-title { color: var(--accent); }

/* Gallery modal (same look as index.html) */
.modal {
	display: none; position: fixed; z-index: 1000; inset: 0;
	background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px);
	opacity: 0; transition: opacity 0.3s ease;
}
.modal.active { display: flex; opacity: 1; align-items: center; justify-content: center; }
.modal-content-wrapper { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.modal-media { max-width: 85%; max-height: 85%; border-radius: 20px; transform: scale(0.9); transition: transform 0.3s ease; }
.modal.active .modal-media { transform: scale(1); }

.nav-arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	background: rgba(255,255,255,0.1); color: white; border: none;
	width: 60px; height: 60px; border-radius: 50%; font-size: 24px;
	cursor: pointer; transition: all 0.3s ease; z-index: 1010;
	display: flex; align-items: center; justify-content: center;
}
.nav-arrow:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.1); }
.prev-arrow { left: 40px; }
.next-arrow { right: 40px; }
@media (max-width: 640px) { .prev-arrow { left: 8px; } .next-arrow { right: 8px; } }
.close-modal { position: absolute; top: 30px; right: 40px; color: white; font-size: 40px; cursor: pointer; z-index: 1020; }

/* Small multi-language badge in the story text */
.lang-badge { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.lang-badge img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.lang-badge b { display: block; font-size: 13px; font-weight: 800; color: #111827; line-height: 1.3; }
.dark .lang-badge b { color: #fff; }
.lang-badge span { font-size: 13px; font-weight: 600; color: #6b7280; }
