/*
Theme Name: Nordik
Theme URI: https://www.nordik.is
Author: Nordik lögfræðiþjónusta slf.
Description: Sérsniðið þema fyrir Nordik lögfræðiþjónustu. Stór forsíðumynd, ein forsíða og starfsmannasnið í sprettiglugga.
Version: 2.1.1
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nordik
*/

/* ---------- Leturgerðir (hýstar á eigin vefþjóni) ---------- */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }

/* ---------- Grunnur ---------- */
:root {
	--paper: #F5F3EF;
	--white: #FFFFFF;
	--ink: #0E1116;
	--ink-2: #171B22;
	--body: #3A3F47;
	--muted: #5E636B;
	--line: #DEDAD3;
	--line-dark: #2A2F38;
	--on-dark: #ECE9E3;
	--on-dark-muted: #A7ABB2;
	--accent: #D4A253;      /* gullinn, notaður á dökkum grunni. Breytanlegt í Sérsníða › Nordik */
	--accent-ink: #8A5A1B;  /* dekkri tónn sem stenst kröfur um læsileika á ljósum grunni */
	--display: "Space Grotesk", "Inter", system-ui, sans-serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 1320px;
	--gutter: 40px;
	--header-h: 96px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -0.025em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 200; width: auto; height: auto; clip: auto; padding: 12px 18px; background: var(--accent); color: var(--ink); }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.kicker::before { content: ""; width: 32px; height: 1px; background: currentColor; }

/* Hnappar */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 54px; padding: 0 28px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 16px; border: 1px solid currentColor; background: transparent; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.btn svg { transition: transform .3s var(--ease); }
.btn:hover svg, .btn:focus-visible svg { transform: translateX(4px); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn--accent:hover, .btn--accent:focus-visible { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--light { color: var(--white); border-color: rgba(255,255,255,.45); }
.btn--light:hover, .btn--light:focus-visible { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--ink:hover, .btn--ink:focus-visible { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--white); }
.btn--outline { color: var(--ink); border-color: var(--line); }
.btn--outline:hover, .btn--outline:focus-visible { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* Birtist við skrun (aðeins ef JavaScript er virkt og hreyfingar leyfðar) */
@media (prefers-reduced-motion: no-preference) {
	.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
	.js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Haus ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; color: var(--ink); background: rgba(245, 243, 239, 0.88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), height .4s var(--ease); }
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: height .4s var(--ease); }
.site-header.is-compact .wrap { height: 72px; }
.has-hero .site-header:not(.is-compact) { background: transparent; color: var(--white); border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-brand { display: block; color: inherit; text-decoration: none; }
.site-brand svg { display: block; height: 50px; width: auto; transition: height .4s var(--ease); }
.site-header.is-compact .site-brand svg { height: 40px; }
.site-brand img, .custom-logo { max-height: 48px; width: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 36px; }
.site-nav a { position: relative; display: inline-block; padding: 10px 0; font-size: 15px; text-decoration: none; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.site-nav .lang-item a, .site-nav .nordik-lang a { min-width: 44px; padding: 8px 12px; border: 1px solid currentColor; border-radius: 999px; text-align: center; font-size: 13px; letter-spacing: 0.08em; }
.site-nav .lang-item a::after, .site-nav .nordik-lang a::after { display: none; }
.menu-toggle { display: none; width: 48px; height: 48px; align-items: center; justify-content: center; background: none; border: 1px solid currentColor; border-radius: 999px; color: inherit; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s var(--ease), background .3s; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; } .menu-toggle span::after { top: 6px; }
.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

body:not(.has-hero) main { padding-top: var(--header-h); }

/* ---------- Forsíðumynd ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; color: var(--white); background: var(--ink); overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos, 50% 30%); }
@media (prefers-reduced-motion: no-preference) {
	.hero__media img { animation: hero-zoom 18s var(--ease) both; }
	@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
	linear-gradient(180deg, rgba(14,17,22,.55) 0%, rgba(14,17,22,0) 22%),
	linear-gradient(90deg, rgba(14,17,22,.78) 0%, rgba(14,17,22,.35) 45%, rgba(14,17,22,0) 70%),
	linear-gradient(0deg, rgba(14,17,22,.85) 0%, rgba(14,17,22,0) 45%); }
.hero__content { width: 100%; padding-top: calc(var(--header-h) + 64px); padding-bottom: 72px; }
.hero .kicker { color: var(--accent); }
.hero h1 { margin-top: 28px; max-width: 12ch; font-size: clamp(40px, 8.4vw, 128px); line-height: 0.95; letter-spacing: -0.045em; overflow-wrap: break-word; }
.hero__row { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: flex-end; justify-content: space-between; }
.hero__text { max-width: 520px; font-size: 19px; line-height: 1.55; color: rgba(255,255,255,.86); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__scroll { position: absolute; right: var(--gutter); bottom: 72px; display: none; writing-mode: vertical-rl; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,.7); text-decoration: none; }
.hero__scroll::after { content: ""; display: block; width: 1px; height: 64px; margin: 14px auto 0; background: linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,0)); }
@media (min-width: 1100px) { .hero__scroll { display: block; } .hero__row { padding-right: 64px; } }

/* ---------- Þjónusta ---------- */
.services { padding-top: 140px; padding-bottom: 140px; }
.services .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.services__intro { position: sticky; top: 120px; }
.services__intro .kicker { color: var(--accent-ink); }
.services__intro h2 { margin-top: 24px; font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.services__intro p { margin-top: 24px; max-width: 380px; color: var(--muted); }
.services__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 36px 0 40px; border-bottom: 1px solid var(--line); }
.service__num { font-family: var(--display); font-size: 15px; color: var(--accent-ink); padding-top: 10px; }
.service h3 { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; transition: transform .5s var(--ease); }
.service p { max-width: 560px; color: var(--muted); }
.service:hover h3 { transform: translateX(8px); }

/* ---------- Um okkur (dökkur kafli með mynd) ---------- */
.about { background: var(--ink); color: var(--on-dark); overflow: hidden; }
.about .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 80px; align-items: center; padding-top: 140px; padding-bottom: 140px; }
.about .kicker { color: var(--accent); }
.about__text { margin-top: 32px; font-family: var(--display); font-size: clamp(28px, 3.2vw, 46px); line-height: 1.2; letter-spacing: -0.025em; }
.about__place { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; gap: 8px 32px; color: var(--on-dark-muted); font-size: 15px; }
.about__place strong { color: var(--on-dark); font-weight: 500; }
.about__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; }
.about__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.6s var(--ease); }
.about__media.is-in img { transform: scale(1); }
.about__media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); border-radius: 4px; }

/* ---------- Fólkið ---------- */
.people { padding-top: 140px; padding-bottom: 140px; }
.people__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 64px; }
.people__head .kicker { color: var(--accent-ink); }
.people__head h2 { margin-top: 24px; font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.people__head p { color: var(--muted); max-width: 320px; }
.people__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; }
.person { display: block; text-decoration: none; color: var(--ink); }
.person__photo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--line); font-family: var(--display); font-size: 40px; color: #9AA0A7; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; filter: grayscale(1) contrast(1.05); transform: scale(1.01); transition: filter .6s var(--ease), transform .8s var(--ease); }
.person__photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(0deg, rgba(14,17,22,.55), rgba(14,17,22,0)); opacity: 0; transition: opacity .5s var(--ease); }
.person__cta { position: absolute; right: 16px; bottom: 16px; z-index: 1; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent); color: var(--ink); opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.person:hover .person__photo img, .person:focus-visible .person__photo img { filter: grayscale(0) contrast(1); transform: scale(1.05); }
.person:hover .person__photo::after, .person:focus-visible .person__photo::after { opacity: 1; }
.person:hover .person__cta, .person:focus-visible .person__cta { opacity: 1; transform: none; }
.person__name { display: block; margin-top: 18px; font-family: var(--display); font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; }
.person__role { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
@media (hover: none) { .person__cta { opacity: 1; transform: none; width: 40px; height: 40px; } }

/* ---------- Starfsmannasnið (sprettigluggi og sérsíða) ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--white); border-radius: 6px; overflow: hidden; }
.profile__photo { min-height: 420px; background: var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 64px; color: #9AA0A7; overflow: hidden; }
.profile__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.profile__body { padding: 56px 48px 48px; }
.profile__role { font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.profile__name { font-size: clamp(34px, 4vw, 48px); line-height: 1.02; letter-spacing: -0.035em; margin: 12px 0 24px; }
.profile__bio { color: var(--body); }
.profile__bio p + p { margin-top: 1em; }
.profile__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; margin: 32px 0 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }
.profile__facts dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.profile__facts dd { margin: 0; }
.profile__contact { display: flex; flex-direction: column; gap: 6px; margin-top: 28px; }
.profile__contact a { text-decoration-color: var(--line); text-underline-offset: 4px; }
.profile__contact a:hover { text-decoration-color: currentColor; }
.profile__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.profile__actions .btn { min-height: 48px; padding: 0 22px; font-size: 15px; }
.profile__actions .btn:first-child { background: var(--ink); border-color: var(--ink); color: var(--white); }
.profile__actions .btn:not(:first-child) { color: var(--ink); border-color: var(--line); }
.profile__actions .btn:hover, .profile__actions .btn:focus-visible { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--white); }

.profile-dialog { width: min(1040px, calc(100% - 40px)); max-height: calc(100% - 64px); padding: 0; border: 0; background: transparent; color: var(--ink); overflow: auto; }
.profile-dialog::backdrop { background: rgba(14, 17, 22, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (prefers-reduced-motion: no-preference) {
	.profile-dialog[open] { animation: dialog-in .45s var(--ease); }
	@keyframes dialog-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
}
.profile-dialog__inner { position: relative; }
.profile-dialog__close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--ink); cursor: pointer; transition: transform .3s var(--ease), border-color .3s; }
.profile-dialog__close:hover, .profile-dialog__close:focus-visible { transform: rotate(90deg); border-color: var(--ink); }
body.has-dialog { overflow: hidden; }

.single-person { padding-top: 64px; padding-bottom: 120px; }
.single-person .profile { border: 1px solid var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px; font-size: 15px; color: var(--muted); text-decoration: none; }

/* ---------- Almennar síður ---------- */
.page-content { max-width: 780px; padding-top: 96px; padding-bottom: 120px; }
.page-content h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1; margin-bottom: 40px; }
.page-content h2 { font-size: 30px; margin: 48px 0 16px; }
.page-content p, .page-content ul, .page-content ol { margin: 0 0 1.2em; color: var(--body); }
.page-content a { color: var(--accent-ink); }

/* ---------- Fótur ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer__cta { padding-top: 140px; padding-bottom: 96px; border-bottom: 1px solid var(--line-dark); }
.site-footer__cta .kicker { color: var(--accent); }
.site-footer__headline { margin-top: 28px; font-family: var(--display); font-size: clamp(44px, 7vw, 112px); line-height: 0.98; letter-spacing: -0.045em; }
.site-footer__email { display: inline-flex; align-items: center; gap: 20px; margin-top: 40px; font-family: var(--display); font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -0.02em; border-bottom: 1px solid var(--line-dark); padding-bottom: 8px; transition: color .3s var(--ease), border-color .3s var(--ease); overflow-wrap: anywhere; }
.site-footer__email:hover, .site-footer__email:focus-visible { color: var(--accent); border-color: var(--accent); }
.site-footer__email svg { flex: none; transition: transform .3s var(--ease); }
.site-footer__email:hover svg { transform: translate(4px, -4px); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.site-footer__logo { color: var(--white); }
.site-footer__logo svg { display: block; height: 54px; width: auto; }
.site-footer__label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 10px; }
.site-footer__grid address { font-style: normal; }
.site-footer__grid a:hover { color: var(--accent); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line-dark); font-size: 13px; color: var(--on-dark-muted); }
.site-footer__bottom ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }

/* ---------- Skjástærðir ---------- */
@media (max-width: 1100px) {
	.people__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.services .wrap, .about .wrap { grid-template-columns: 1fr; gap: 56px; }
	.services__intro { position: static; }
	.about__media { max-width: 520px; }
}
@media (max-width: 860px) {
	:root { --gutter: 22px; --header-h: 76px; }
	.menu-toggle { display: inline-flex; }
	.site-nav { position: fixed; inset: 0; z-index: -1; display: flex; align-items: center; background: var(--ink); color: var(--white); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; }
	.nav-open .site-nav { opacity: 1; visibility: visible; }
	.nav-open .site-header { color: var(--white) !important; background: transparent !important; border-color: transparent !important; backdrop-filter: none !important; }
	.site-nav ul { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 var(--gutter); }
	.site-nav a { font-family: var(--display); font-size: 40px; letter-spacing: -0.03em; }
	.site-nav .lang-item a, .site-nav .nordik-lang a { margin-top: 24px; font-family: var(--sans); font-size: 14px; }
	.site-brand svg { height: 40px; }
	.site-header.is-compact .wrap { height: 64px; }
	.site-header.is-compact .site-brand svg { height: 34px; }
	.hero__content { padding-bottom: 48px; }
	.hero .kicker { font-size: 11px; letter-spacing: 0.12em; gap: 10px; }
	.hero .kicker::before { width: 20px; }
	.hero__text { font-size: 17px; }
	.services, .people { padding-top: 88px; padding-bottom: 88px; }
	.about .wrap { padding-top: 88px; padding-bottom: 88px; }
	.service { padding: 28px 0 32px; }
	.people__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; }
	.person__name { font-size: 17px; }
	.person__role { font-size: 13px; }
	.profile { grid-template-columns: 1fr; }
	.profile__photo { min-height: 0; height: 340px; }
	.profile__body { padding: 36px 24px 32px; }
	.profile__facts { grid-template-columns: 1fr; }
	.site-footer__cta { padding-top: 88px; padding-bottom: 64px; }
	.site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
}
