/*
Theme Name: Øjemål
Theme URI: https://oejemaal.dk
Author: Vitus
Description: Custom minimal portfolio theme for Øjemål Medier.
Version: 0.1.0
Requires PHP: 7.4
Text Domain: oejemaal
*/

/* -------------------------------------------------
   1. Reset / base
   ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #111;
	background: #fff;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

button, input, textarea { font: inherit; color: inherit; }

.container {
	width: 100%;
	max-width: 1320px;
	margin-inline: auto;
	/* Scales smoothly with viewport width instead of jumping at fixed
	   breakpoints, this is what makes wide screens feel used rather
	   than just centered in a narrow column. */
	padding-inline: clamp(20px, 5vw, 64px);
}

.section {
	padding-block: clamp(40px, 6vw, 96px);
}

.section-title {
	font-size: 1.5rem;
	margin: 0 0 24px;
}

/* -------------------------------------------------
   2. Header
   ------------------------------------------------- */
.site-header {
	padding-block: 20px;
	border-bottom: 1px solid #eee;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.site-title {
	font-size: 1.125rem;
	font-weight: 600;
}

.site-nav ul {
	display: flex;
	gap: 20px;
}

/* -------------------------------------------------
   3. Hero
   ------------------------------------------------- */
.hero {
	padding-block: clamp(48px, 8vw, 120px) clamp(32px, 5vw, 56px);
}

.hero h1 {
	font-size: clamp(2rem, 4vw + 0.5rem, 4rem);
	line-height: 1.15;
	margin: 0 0 12px;
	max-width: 20ch;
}

.hero p {
	max-width: 50ch;
	font-size: clamp(1rem, 0.6vw + 0.9rem, 1.25rem);
	color: #444;
}

/* -------------------------------------------------
   4. Work grid
   ------------------------------------------------- */
.work-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.work-filters button {
	border: 1px solid #ddd;
	background: #fff;
	padding: 6px 14px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 0.875rem;
}

.work-filters button.is-active {
	background: #111;
	color: #fff;
	border-color: #111;
}

.work-grid {
	display: grid;
	/* Auto-fill picks the number of columns that fit, so it adapts to
	   any screen width on its own rather than jumping at fixed
	   breakpoints, one column on a phone, more as the screen widens. */
	grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
	gap: clamp(20px, 3vw, 32px);
}

.work-item {
	display: block;
}

.work-item-thumb {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f2f2f2;
}

.work-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.work-item h3 {
	margin: 12px 0 4px;
	font-size: 1.0625rem;
}

.work-item .work-item-meta {
	font-size: 0.8125rem;
	color: #777;
}

/* -------------------------------------------------
   5. Clients
   ------------------------------------------------- */
.client-logos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
	gap: clamp(20px, 3vw, 32px);
	align-items: center;
}

.client-logos img {
	max-height: 40px;
	width: auto;
	margin-inline: auto;
	filter: grayscale(1);
	opacity: 0.7;
}

/* -------------------------------------------------
   6. About
   ------------------------------------------------- */
.about-content {
	max-width: 60ch;
}

/* -------------------------------------------------
   7. Contact
   ------------------------------------------------- */
.contact-form {
	display: grid;
	gap: 16px;
	max-width: 480px;
}

.contact-form label {
	display: block;
	font-size: 0.875rem;
	margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.contact-form button {
	justify-self: start;
	padding: 10px 24px;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.form-notice {
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 0.875rem;
}

.form-notice.success { background: #e6f4ea; color: #1e4620; }
.form-notice.error { background: #fbe9e7; color: #7f2d20; }

/* honeypot field, hidden from real users */
.hp-field {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

/* -------------------------------------------------
   8. Single project (case page)
   ------------------------------------------------- */
.case-hero img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.case-meta {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px 24px;
	margin: 24px 0;
	font-size: 0.875rem;
}

.case-meta dt {
	color: #777;
}

.case-meta dd {
	margin: 0;
	font-weight: 500;
}

.case-content {
	max-width: 65ch;
}

.case-content img {
	margin-block: 24px;
}

.back-link {
	display: inline-block;
	margin-top: 40px;
	font-size: 0.875rem;
	border-bottom: 1px solid #111;
}

/* -------------------------------------------------
   9. Footer
   ------------------------------------------------- */
.site-footer {
	padding-block: 32px;
	border-top: 1px solid #eee;
	font-size: 0.8125rem;
	color: #777;
}

/* -------------------------------------------------
   10. Reduced motion / accessibility
   (grid columns and hero type now scale fluidly via clamp() and
   auto-fill above, no fixed breakpoints needed for those anymore)
   ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}
