/*
Theme Name: Friik
Description: Friik OÜ veebileht — bränding, logod, graafiline disain.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: friik
*/

:root {
	--orange: #EF6647;
	--ink: #111111;
	--paper: #F3F1EC;
	--white: #FFFFFF;
	--rust: #B8381C;
	--grey: #55524C;
	--text-2: #3A3833;
	--line: #C9C4BA;
	--muted: #A8A399;
	--field: #1E1D1B;
	--field-line: #5A5750;
	--wrap: 1360px;
	--gutter: 40px;
	--section: 120px;
	--font: 'Archivo', system-ui, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, monospace;
}

@media (max-width: 720px) {
	:root { --gutter: 16px; --section: 64px; }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.5;
}

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

a { color: var(--ink); }
a:hover { color: var(--rust); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip-link {
	position: absolute; left: 16px; top: -100px; z-index: 100;
	background: var(--ink); color: var(--paper); padding: 12px 18px; font-weight: 700;
}
.skip-link:focus { top: 16px; color: var(--paper); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */

.display {
	margin: 0;
	font-weight: 900;
	font-stretch: 125%;
	text-transform: uppercase;
	line-height: 0.95;
	letter-spacing: -0.01em;
	overflow-wrap: break-word;
}
.h-section { font-size: clamp(36px, 4.4vw, 64px); }

.eyebrow {
	font-family: var(--mono);
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--grey);
	margin: 0 0 16px;
}
.eyebrow--ink { color: var(--ink); }
.eyebrow--light { color: var(--muted); }

.slash {
	display: inline-block; width: 10px; height: 22px;
	background: var(--ink); transform: skewX(-24deg); flex: none;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 56px; padding: 0 28px;
	font-family: var(--font); font-weight: 700; font-size: 17px;
	text-decoration: none; border: 2px solid var(--ink); cursor: pointer;
}
.btn svg { flex: none; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #2A2926; color: var(--paper); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--orange { background: var(--orange); color: var(--ink); border-color: var(--orange); font-weight: 800; }
.btn--orange:hover { background: #F27C61; color: var(--ink); }

/* ---------- Header ---------- */

.site-header { background: var(--orange); position: relative; z-index: 3; }

.site-nav {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 16px 32px; padding-block: 24px;
}
.site-logo { display: flex; align-items: center; min-height: 44px; }
.site-logo img { height: 34px; width: auto; filter: brightness(0) invert(1); }

.menu-toggle {
	display: none; width: 48px; height: 48px; padding: 0;
	background: var(--ink); color: var(--paper); border: 0; cursor: pointer;
	align-items: center; justify-content: center;
}

.menu {
	display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px;
	margin: 0; padding: 0; list-style: none; font-size: 16px; font-weight: 600;
}
.menu a { display: block; padding: 12px 0; text-decoration: none; }
.menu a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.menu .menu-cta a { padding: 12px 22px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.menu .menu-cta a:hover { background: #2A2926; color: var(--paper); }

@media (max-width: 720px) {
	.site-nav { padding-block: 16px; row-gap: 0; }
	.site-nav > nav { flex-basis: 100%; }
	.site-logo img { height: 28px; }
	.menu-toggle { display: inline-flex; }
	.menu { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 8px; font-size: 20px; }
	.menu a { padding: 14px 0; border-bottom: 1px solid rgba(17,17,17,.2); }
	.menu .menu-cta a { margin-top: 16px; text-align: center; border: 0; }
	.site-header.is-open .menu { display: flex; }
}

/* ---------- Hero ---------- */

.hero { background: var(--orange); position: relative; overflow: hidden; }
.hero .wrap {
	position: relative; z-index: 2;
	display: flex; flex-wrap: wrap; align-items: flex-end; gap: 48px;
	padding-top: 72px; padding-bottom: 88px;
}
.hero__main { flex: 999 1 640px; min-width: 0; }
.hero__side { flex: 1 1 340px; min-width: 0; padding-bottom: 8px; }
.hero .eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.hero__title { font-size: clamp(48px, 8.4vw, 132px); line-height: 0.9; letter-spacing: -0.02em; }
.hero__lead { margin: 0 0 32px; font-size: 21px; line-height: 1.45; font-weight: 500; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.bar {
	position: absolute; top: -40px; height: 900px; z-index: 1; pointer-events: none;
	transform: skewX(-28deg);
}
.bar--dark { right: -60px; width: 260px; background: rgba(17,17,17,.07); }
.bar--light { right: 240px; width: 60px; background: rgba(255,255,255,.14); }

@media (max-width: 720px) {
	.hero .wrap { padding-top: 40px; padding-bottom: 56px; gap: 28px; }
	.hero .eyebrow { font-size: 12px; margin-bottom: 20px; }
	.hero__lead { font-size: 18px; margin-bottom: 28px; }
	.hero__actions .btn { flex: 1 1 100%; justify-content: space-between; }
	.hero__actions .btn--line { justify-content: center; }
	.bar--dark { right: -70px; width: 120px; }
	.bar--light { display: none; }
}

/* ---------- Strip ---------- */

.strip {
	background: var(--ink); color: var(--orange);
	overflow: hidden; white-space: nowrap; padding: 22px 0;
	font-weight: 900; font-stretch: 125%; text-transform: uppercase;
	font-size: 40px; line-height: 1; letter-spacing: -0.01em;
}
.strip__track { display: flex; width: max-content; animation: strip 40s linear infinite; }
.strip:hover .strip__track { animation-play-state: paused; }
.strip__group { flex: none; padding-right: 0.3em; }
.strip i { font-style: normal; color: var(--paper); }
@keyframes strip { to { transform: translateX(-50%); } }
@media (max-width: 720px) { .strip { font-size: 24px; padding: 14px 0; } }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark a { color: var(--paper); }
.section--orange { background: var(--orange); position: relative; overflow: hidden; }

.section-head {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
	gap: 24px; margin-bottom: 64px;
}
.section-head p { margin: 0; max-width: 420px; font-size: 18px; color: var(--text-2); }
@media (max-width: 720px) { .section-head { margin-bottom: 32px; } }

/* Services */

.services {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	border-top: 3px solid var(--ink);
}
.service { padding: 40px 32px 40px 0; border-bottom: 1px solid var(--line); }
.service__num { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--rust); margin-bottom: 56px; }
.service h3 { margin: 0 0 16px; font-weight: 800; font-stretch: 115%; font-size: 34px; text-transform: uppercase; line-height: 1; }
.service p { margin: 0; color: var(--text-2); line-height: 1.55; }
@media (max-width: 720px) {
	.service { padding: 22px 0; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
	.service__num { margin: 4px 0 0; grid-row: span 2; }
	.service h3 { font-size: 24px; margin-bottom: 8px; }
	.service p { font-size: 16px; }
}

/* Work */

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
	min-height: 44px; padding: 0 18px;
	font-family: var(--font); font-size: 15px; font-weight: 700; cursor: pointer;
	background: transparent; color: var(--paper); border: 1.5px solid var(--field-line);
}
.filter:hover { border-color: var(--paper); }
.filter[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.filter:focus-visible { outline-color: var(--orange); }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 56px 40px; }
.project-card { display: block; text-decoration: none; color: var(--paper); }
.project-card[hidden] { display: none; }
.section--dark .project-card:hover { color: var(--paper); }
.project-card__img { overflow: hidden; margin-bottom: 20px; background: var(--field); aspect-ratio: 4 / 3; }
.project-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover .project-card__img img { transform: scale(1.03); }
.project-card__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.project-card h3 { margin: 0 0 10px; font-weight: 800; font-stretch: 115%; font-size: 30px; text-transform: uppercase; line-height: 1; }
.project-card__tags { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.project-card svg { flex: none; margin-top: 2px; color: var(--orange); transition: transform .2s ease; }
.project-card:hover svg { transform: translate(3px, -3px); }
@media (max-width: 720px) {
	.projects { gap: 36px; }
	.project-card h3 { font-size: 24px; }
}

/* Clients */

.clients { border-bottom: 1px solid var(--line); padding-block: 56px; }
.clients__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 24px; align-items: center; }
.clients__grid img { width: 100%; height: 120px; object-fit: contain; }
@media (max-width: 720px) {
	.clients { padding-block: 40px 8px; }
	.clients__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
	.clients__grid img { height: 84px; }
}

/* Process */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.step { background: var(--white); padding: 40px 32px; display: flex; flex-direction: column; gap: 16px; }
.step__num { display: flex; align-items: center; gap: 14px; }
.step__num span:first-child { font-weight: 900; font-stretch: 125%; font-size: 56px; line-height: 1; color: var(--orange); }
.step__num .slash { height: 40px; }
.step h3 { margin: 0; font-weight: 800; font-stretch: 115%; font-size: 26px; text-transform: uppercase; line-height: 1.05; }
.step p { margin: 0; color: var(--text-2); line-height: 1.55; }
.steps-cta { margin-top: 48px; }
@media (max-width: 720px) {
	.steps { gap: 12px; }
	.step { padding: 24px 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 6px; }
	.step__num { grid-row: span 2; align-self: start; }
	.step__num span:first-child { font-size: 40px; }
	.step__num .slash { display: none; }
	.step h3 { font-size: 20px; }
	.step p { font-size: 15px; }
	.steps-cta .btn { width: 100%; }
}

/* Contact */

.contact .bar--dark { left: -120px; right: auto; width: 200px; top: auto; bottom: -40px; height: 1100px; }
.contact .wrap { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 64px; }
.contact__intro { flex: 1 1 480px; min-width: 0; }
.contact__title { font-size: clamp(40px, 4.4vw, 64px); margin-bottom: 32px; }
.contact__lead { margin: 0 0 48px; font-size: 19px; max-width: 440px; font-weight: 500; }
.contact__links { display: flex; flex-direction: column; gap: 4px; font-size: 22px; font-weight: 700; }
.contact__links a { text-decoration: none; padding: 8px 0; align-self: flex-start; }
.social { display: flex; gap: 12px; margin-top: 24px; }
.social a { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ink); }
.social a:hover { background: var(--ink); color: var(--orange); }

.form {
	flex: 1.4 1 520px; min-width: 0;
	background: var(--ink); color: var(--paper); padding: 48px;
	display: flex; flex-direction: column; gap: 28px;
}
.form a { color: var(--paper); }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form legend, .form label.field-label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 12px; padding: 0; }
.form .req { color: #FF4D3D; font-weight: 700; margin-left: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
	position: relative; display: inline-flex; align-items: center;
	min-height: 44px; padding: 0 18px; font-size: 15px; cursor: pointer;
	border: 1.5px solid var(--field-line); color: var(--paper);
}
.pill:hover { border-color: var(--paper); }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pill:has(input:checked) { background: var(--orange); border-color: var(--orange); color: var(--ink); font-weight: 700; }
.pill:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }
.field { display: flex; flex-direction: column; }
.field label.field-label { margin-bottom: 8px; }
.field__hint { font-size: 14px; line-height: 1.45; color: var(--muted); margin: -2px 0 10px; }
.form input[type="text"], .form input[type="email"], .form textarea {
	width: 100%; padding: 0 16px; height: 52px;
	background: var(--field); border: 1.5px solid var(--field-line); border-radius: 0;
	color: var(--paper); font: inherit; font-size: 17px;
}
.form textarea { height: auto; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--orange); outline-offset: 2px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 16px 20px; font-weight: 600; border-left: 0; }
.notice--ok { background: var(--orange); color: var(--ink); }
.notice--err { background: #3A1A12; color: #FFD9CF; border: 1.5px solid var(--orange); }
@media (max-width: 720px) {
	.contact { padding-bottom: 0; }
	.contact .wrap { gap: 32px; }
	.contact__lead { margin-bottom: 0; font-size: 17px; }
	.form { padding: 24px 20px; gap: 24px; margin-inline: calc(var(--gutter) * -1); }
	.form__foot .btn { width: 100%; }
	.contact__links { font-size: 19px; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--muted); }
.site-footer .wrap {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 20px; padding-block: 40px; font-family: var(--mono); font-size: 14px;
}
.site-footer img { height: 24px; width: auto; filter: brightness(0) invert(1); }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--paper); text-decoration: none; padding: 12px 0; }
.site-footer a:hover { color: var(--orange); }
@media (max-width: 720px) {
	.site-footer { border-top: 1px solid #2A2926; }
	.site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 32px; }
}

/* ---------- Single project ---------- */

.project-hero { background: var(--orange); position: relative; overflow: hidden; }
.project-hero .wrap { position: relative; z-index: 2; padding-top: 48px; padding-bottom: 72px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; min-height: 44px; margin-bottom: 32px; }
.project-hero h1 { font-size: clamp(44px, 7vw, 112px); line-height: 0.9; letter-spacing: -0.02em; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.project-tags li { font-family: var(--mono); font-size: 14px; padding: 8px 14px; border: 1.5px solid var(--ink); }
.project-body { max-width: 760px; font-size: 20px; line-height: 1.6; margin-bottom: 64px; }
.project-body > *:first-child { margin-top: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 24px; align-items: start; }
.gallery-grid a { display: block; background: var(--white); cursor: zoom-in; }
.gallery-grid img { width: 100%; height: auto; }
.gallery-grid .is-wide { grid-column: 1 / -1; }
.project-next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.project-next h2 { font-size: clamp(32px, 4vw, 56px); }

/* Lightbox */

.lightbox {
	width: 100vw; height: 100vh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0; background: rgba(17,17,17,.96); color: var(--paper);
}
.lightbox::backdrop { background: rgba(17,17,17,.96); }
.lightbox[open] { display: grid; grid-template-columns: 72px 1fr 72px; grid-template-rows: 72px 1fr 56px; }
.lightbox__figure { grid-column: 2; grid-row: 2; margin: 0; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; }
.lightbox__figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox button {
	width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; align-self: center; justify-self: center;
	background: transparent; color: var(--paper); border: 1.5px solid var(--field-line); cursor: pointer;
}
.lightbox button:hover { border-color: var(--orange); color: var(--orange); }
.lightbox button[hidden] { display: none; }
.lightbox button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.lightbox__close { grid-column: 3; grid-row: 1; }
.lightbox__prev { grid-column: 1; grid-row: 2; }
.lightbox__next { grid-column: 3; grid-row: 2; }
.lightbox__count { grid-column: 2; grid-row: 3; align-self: center; text-align: center; font-family: var(--mono); font-size: 14px; color: var(--muted); }
@media (max-width: 720px) {
	.lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: 64px 1fr 72px; }
	.lightbox__figure { grid-column: 1 / -1; padding: 0 8px; }
	.lightbox__close { grid-column: 2; justify-self: end; margin-right: 8px; }
	.lightbox__prev { grid-column: 1; grid-row: 3; justify-self: start; margin-left: 16px; }
	.lightbox__next { grid-column: 2; grid-row: 3; justify-self: end; margin-right: 16px; }
	.lightbox__count { grid-column: 1 / -1; grid-row: 3; pointer-events: none; }
}
body.has-lightbox { overflow: hidden; }

/* ---------- Generic pages ---------- */

.page-content { max-width: 760px; }
.page-content h1 { font-size: clamp(36px, 5vw, 72px); margin-bottom: 32px; }
.page-content .entry { font-size: 18px; line-height: 1.65; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.strip__track { animation: none; }
	*, *::before, *::after { transition: none !important; }
}
