/* Gláma+Kím theme base and theme-only rules.
   Load order: normalize, tokens, effects (the old Breakdance custom stylesheets),
   components (the old gk-* selectors), then this file. */

/* --- Base: the Breakdance global settings this site ran on ---------------------
   Inter 18px on the page colour, black text, headings on a 1.25 scale from 16px.
   Like Breakdance's normalize, browser default margins are kept; the gk-* classes
   set their own where it matters. */
body {
	margin: 0;
	background-color: var(--bg-page);
	color: #000;
	font-family: var(--font-sans);
	font-size: 18px;
	line-height: 1.5;
	letter-spacing: -2%; /* a percentage, not em: it inherits as a percentage and scales with each element's own size */
}
h1, h2, h3, h4, h5, h6 { color: #000; font-family: var(--font-sans); }
h1 { font-size: 48.83px; }
h2 { font-size: 39.06px; }
h3 { font-size: 31.25px; }
h4 { font-size: 25px; }
h5 { font-size: 20px; }
h6 { font-size: 16px; }
body { font-weight: 400; }
a {
	color: #000;
	font-weight: 400;
	text-decoration: underline solid;
	text-decoration-thickness: 2px;
}
a:hover { color: #000; }

/* Breakdance's rich text (article body, text pages): no space above the first
   element or below the last. */
.gk-article-body > :first-child,
.gk-textpage-prose > :first-child { margin-top: 0; }
.gk-article-body > :last-child,
.gk-textpage-prose > :last-child { margin-bottom: 0; }
img { max-width: 100%; }

.gk-skip {
	position: absolute;
	left: -9999px;
	z-index: 100002;
}
.gk-skip:focus {
	left: 16px;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 16px);
	padding: 8px 12px;
	background: var(--bg-invert);
	color: var(--ink);
}

/* --- Header and menu --------------------------------------------------------
   The menu button and close button are real buttons now (they were divs), so the
   browser's button styling is cleared. Their SVGs fill the icon box, as the
   Breakdance icon element did. */
.gk-navtrigger,
.gk-navclose {
	appearance: none;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	letter-spacing: inherit;
}
.gk-navtrigger-icon,
.gk-navclose-icon {
	display: inline-flex;
}
.gk-navtrigger-icon > svg,
.gk-navclose-icon > svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* The language switch sits against the menu button (its 100px box gives the gap).
   effects.css carries the entrance animation for the header copy. */
.gk-header-lang {
	flex: 0 0 auto;
	margin-left: auto;
}

/* --- Splash loader (inc/loader.php) -------------------------------------------
   Full screen on the page colour, logo centred; fades out over 0.8s. The header
   waits for it only when it actually played (html.gk-loader-shown); on later visits
   the front page header settles in as fast as every other page's. */
.gk-loader { display: none; }
html.gk-loading .gk-loader {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	background: var(--bg-page);
	transition: opacity 800ms linear;
}
html.gk-loading.gk-loader-out .gk-loader { opacity: 0; }
html.gk-loading body { overflow: hidden; }

body.home { --gk-chrome-in-at: 160ms; }
html.gk-loader-shown body.home { --gk-chrome-in-at: 2900ms; }

/* =============================================================================
   Content blocks (template-parts/sections/*)
   Structure Breakdance gave every block, then each block's own spacing, taken
   from its element CSS (reference/breakdance/css/post-<block id>.css).
   ========================================================================== */

/* --- Block list ----------------------------------------------------------------
   One .gk-block per flexible-content row, stacked with no gap. Pages keep 60px
   under the last block (a full-width image as the last block drops it, see the
   "full-width-image-before-footer" rule in effects.css); project pages keep none. */
.gk-blocks { width: 100%; padding-bottom: 60px; }
.gk-blocks--flush { padding-bottom: 0; }
.gk-block { display: flex; flex-direction: column; gap: 20px; } /* the gap only shows in blocks with two parts: cards + "see all", category bar + articles */

/* --- Section: Breakdance's section element ------------------------------------
   A full-width box whose inner column is centred, 1440px wide and padded
   60px all round unless the block sets otherwise (the site's Breakdance section defaults). */
.gk-sec { position: relative; width: 100%; }
.gk-sec-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: 1440px;
	margin: 0 auto;
	padding: 60px;
	text-align: left;
}

/* --- Loop: Breakdance's repeater and post loops ------------------------------
   A grid of --gk-per-row equal columns, --gk-gap apart; each block sets both. */
.gk-loop {
	--gk-per-row: 1;
	--gk-gap: 20px;
	display: grid;
	grid-template-columns: repeat(var(--gk-per-row), minmax(0, 1fr));
	grid-auto-rows: auto;
	gap: var(--gk-gap);
}
.gk-loop-item { display: flex; flex-direction: column; gap: 20px; }
.gk-gallery-loop,
.gk-col-loop,
.gk-projects-grid,
.gk-teamgrid,
.gk-posts-loop { width: 100%; max-width: 100%; }

/* Breakdance headings and plain text boxes carried no margin of their own. */
.gk-intro-title,
.gk-title,
.gk-intro-text,
.gk-imgband-title,
.gk-imgband-above,
.gk-imgband-below { max-width: 100%; margin: 0; }

/* Text, paragraph and columns sit in the text column; the gallery and the team
   in the wider one. Vertical rhythm is --block-y (100 / 80 / 60 / 48px). */
.gk-intro > .gk-sec-inner,
.gk-paragraph > .gk-sec-inner {
	max-width: 100%;
	padding: var(--block-y) var(--inset-text);
}
.gk-intro > .gk-sec-inner { gap: 60px; }
.gk-intro-text { width: 100%; }
@media (max-width: 767px) {
	.gk-intro > .gk-sec-inner { gap: 40px; }
}

.gk-gallery > .gk-sec-inner {
	max-width: 100%;
	gap: 60px;
	padding: var(--block-y) var(--inset-wide);
}
.gk-gallery-loop > .gk-loop { --gk-gap: 60px; --gk-per-row: 2; }
@media (max-width: 1023px) {
	.gk-gallery-loop > .gk-loop { --gk-gap: 30px; }
}
@media (max-width: 479px) {
	.gk-gallery-loop > .gk-loop { --gk-per-row: 1; }
}

.gk-colsec > .gk-sec-inner {
	max-width: 100%;
	gap: 60px;
	padding: 80px var(--inset-text);
}
.gk-col-loop > .gk-loop { --gk-gap: 60px; --gk-per-row: 2; }
@media (max-width: 1023px) {
	.gk-colsec > .gk-sec-inner { padding-top: 60px; padding-bottom: 60px; }
	.gk-col-loop > .gk-loop { --gk-gap: 40px; }
}
@media (max-width: 767px) {
	.gk-colsec > .gk-sec-inner { padding-top: 48px; padding-bottom: 48px; }
}
@media (max-width: 479px) {
	.gk-col-loop > .gk-loop { --gk-per-row: 1; }
}

/* Image: no padding of its own; texts 10px apart, the one above at 1.25rem and
   the one below centred. */
.gk-imgband > .gk-sec-inner { max-width: 100%; gap: 10px; padding: 0; }
.gk-imgband-above { width: 100%; font-size: 1.25rem; }
.gk-imgband-below { width: 100%; text-align: center; }

.gk-projects-grid > .gk-loop { --gk-gap: 0px; }

.gk-posts-loop > .gk-loop { --gk-gap: 30px; --gk-per-row: 3; }
.gk-catbar-terms > .gk-loop { --gk-gap: 30px; }
@media (max-width: 1023px) {
	.gk-posts-loop > .gk-loop { --gk-per-row: 2; }
}
@media (max-width: 479px) {
	.gk-posts-loop > .gk-loop { --gk-per-row: 1; }
}
/* The category being shown keeps its drawn underline (was gk-current-term-underline). */
.gk-catbar-link.is-current::after { transform: scaleX(1); transform-origin: left center; }

/* People: the team box is Breakdance's div (a column) with its own padding. */
.gk-people > .gk-sec-inner { max-width: 100%; gap: 40px; padding: 0; }
.gk-team {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: 100%;
	padding: 60px var(--inset-wide);
}
.gk-teamgrid > .gk-loop { --gk-gap: 30px; --gk-per-row: 4; }
@media (max-width: 1119px) {
	.gk-teamgrid > .gk-loop { --gk-per-row: 3; }
}
@media (max-width: 1023px) {
	.gk-team { padding-top: 50px; padding-bottom: 50px; }
	.gk-teamgrid > .gk-loop { --gk-per-row: 2; }
}
@media (max-width: 767px) {
	.gk-team { padding-top: 40px; padding-bottom: 40px; }
}
@media (max-width: 479px) {
	.gk-teamgrid > .gk-loop { --gk-per-row: 1; }
}

/* --- Home hero slider (template-parts/sections/main-banner.php) ---------------
   Replaces Swiper with a crossfade of stacked slides, keeping Swiper's look:
   1.6s fade, white 30px chevrons 12px in from the edges, 8px white dots 14px
   apart, 18px off the bottom. Hover and caption motion live in effects.css. */
.gk-hero > .gk-sec-inner { max-width: 100%; gap: 0; padding: 0; }
.gk-hero-slider { position: relative; width: 100%; overflow: hidden; }
.gk-hero-track { display: grid; }
.gk-hero-item {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1600ms ease, visibility 0s linear 1600ms;
}
.gk-hero-item.is-active {
	z-index: 1;
	opacity: 1;
	visibility: visible;
	transition: opacity 1600ms ease;
}
.gk-hero-link { display: block; width: 100%; height: 100%; color: inherit; text-decoration: none; }
.gk-hero-prev,
.gk-hero-next {
	position: absolute;
	top: 50%;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(30px / 44 * 27);
	height: 30px;
	margin-top: -15px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: var(--gk-cursor-plus);
}
.gk-hero-prev { left: 12px; }
.gk-hero-next { right: 12px; }
.gk-hero-prev svg,
.gk-hero-next svg { width: 100%; height: 100%; object-fit: contain; }
.gk-hero-prev svg { transform: rotate(180deg); }
.gk-hero-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	z-index: 10;
	display: flex;
	justify-content: center;
}
.gk-hero-dot {
	appearance: none;
	width: 8px;
	height: 8px;
	margin: 0 7px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	opacity: var(--gk-dot-rest, 0.45);
	cursor: var(--gk-cursor-plus);
}
.gk-hero-dot.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
	.gk-hero-item,
	.gk-hero-item.is-active { transition: none; }
}

/* --- Gallery rows (blocks.js) --------------------------------------------------
   Rows of two and three photos, every row the same height; each photo fills its
   frame centred. Replaces the gk-gallery-rows sandbox snippet. */
.gk-gallery-loop > .gk-loop.gk-rows {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--gk-rows-gap);
	--gk-rows-gap: 32px;
}
.gk-gallery-loop > .gk-loop.gk-rows > .gk-loop-item { flex: none; min-width: 0; }
.gk-gallery-loop > .gk-loop.gk-rows .gk-gallery-img { aspect-ratio: auto; width: 100%; height: auto; object-fit: cover; object-position: center; }
@media (max-width: 1023px) { .gk-gallery-loop > .gk-loop.gk-rows { --gk-rows-gap: 24px; } }
@media (max-width: 767px) { .gk-gallery-loop > .gk-loop.gk-rows { --gk-rows-gap: 16px; } }

/* =============================================================================
   Page templates (step 4). Spacing from each Breakdance template's element CSS.
   ========================================================================== */

/* Work grid (Verkefnin and project categories): the bar spans the page; cards
   three-up, two-up from 1023px, one-up from 479px, 30px apart. */
.gk-workbar,
.gk-workgrid-loop { width: 100%; max-width: 100%; }
.gk-workgrid-loop > .gk-loop { --gk-gap: 30px; --gk-per-row: 3; }
@media (max-width: 1023px) {
	.gk-workgrid-loop > .gk-loop { --gk-per-row: 2; }
}
@media (max-width: 479px) {
	.gk-workgrid-loop > .gk-loop { --gk-per-row: 1; }
}
.gk-loadmore-button[aria-busy="true"] { pointer-events: none; }

/* Article: the section has no padding of its own (the article box has it). */
.gk-article-sec > .gk-sec-inner { max-width: 100%; padding: 0; }
.gk-article-title { max-width: 100%; margin: 0; }

/* Article category page: cards 50px apart (Greinar's block uses 30px). */
.gk-posts-section--archive .gk-posts-loop > .gk-loop { --gk-gap: 50px; }

/* 404: centred in a full-screen section, the code and lead at 30px, the title at
   100px; a solid button and a text link with an arrow that draws its circle on hover. */
.gk-404 > .gk-sec-inner {
	align-items: center;
	justify-content: center;
	gap: 50px;
	max-width: 100%;
	height: 100vh;
	text-align: center;
}
.gk-404-text { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.gk-404-code,
.gk-404-lead { margin: 0; font-size: 30px; }
.gk-404-title { max-width: 100%; margin: 0; font-size: 100px; font-weight: 500; line-height: 1.1; }
.gk-404-actions { display: flex; flex-direction: row; align-items: center; gap: 40px; }
@media (max-width: 479px) {
	.gk-404-actions { flex-direction: column; }
}
.gk-button,
.gk-button-text {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
}
.gk-button {
	padding: 14px 24px;
	border: 1px solid transparent;
	border-radius: 3px;
	background: #000;
	color: #fff;
	transition: background-color 300ms, color 300ms;
}
.gk-button:hover { color: #fff; }
.gk-button-text,
.gk-button-text:hover { color: #000; }
.gk-button-arrow {
	position: relative;
	top: -1px;
	width: 1.25em;
	height: 1.25em;
	margin-left: calc(4px + 0.2em);
	stroke: currentColor;
	vertical-align: middle;
	transition: transform 0.3s ease;
}
.gk-button-arrow-circle {
	stroke-dasharray: 95;
	stroke-dashoffset: 95;
	transition: stroke-dashoffset 0.3s ease;
}
.gk-button-text:hover .gk-button-arrow { transform: translate3d(3px, 0, 0); }
.gk-button-text:hover .gk-button-arrow-circle { stroke-dashoffset: 0; }

/* Project details row: with photo credits (client request 2026-11-10) the row can
   outgrow one line on narrower screens, so it may wrap instead of overflowing. */
.gk-projmeta { height: auto; min-height: 80px; }
.gk-projmeta-group { flex-wrap: wrap; }
