/* PRIMIS – static site stylesheet
   Palette, type scale and breakpoints recovered from the original WordPress/Neve theme settings. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
/* Borna – the original body font of primis.is (also used on mitt.primis.is) */
@font-face { font-family: "Borna"; src: url("/assets/fonts/borna-medium.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Borna"; src: url("/assets/fonts/borna-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Borna"; src: url("/assets/fonts/borna-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face {
  font-family: "IBM Plex Serif";
  src: url("/assets/fonts/ibm-plex-serif-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal: #00beb9;          /* nv-primary-accent */
  --teal-dark: #007a76;     /* teal for text on white/light (WCAG AA: 5.2:1 / 4.8:1) */
  --orange: #ff960d;        /* nv-secondary-accent */
  --navy: #133942;          /* nv-dark-bg / text colour */
  --light: #e8f9ff;         /* nv-light-bg */
  --white: #ffffff;
  --slate: #414756;         /* header button */
  --border: #dddddd;

  --container: 748px;
  --gutter: 15px;
  --font-body: "Borna", "IBM Plex Sans", Arial, Helvetica, sans-serif;
  --header-h: 74px;
  --font-head: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  --body-size: 15px; --body-lh: 1.6;
  --h1: 39px; --h1-lh: 1.2;
  --h2: 30px;
  --h3: 20px;
  --section-pad: 56px;
  --header-logo: 130px;
}
@media (min-width: 576px) {
  :root { --container: 992px; --body-size: 16px; --h1: 55px; --h1-lh: 1.3; --h2: 35px; --h3: 20px; --section-pad: 72px; }
}
@media (min-width: 960px) {
  :root { --container: 1170px; --body-size: 17px; --body-lh: 1.7; --h1: 70px; --h2: 50px; --h3: 24px; --section-pad: 96px; --header-logo: 210px; --header-h: 100px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  color: var(--navy);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
h1, h2, h3, .h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.3; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: var(--h1); line-height: var(--h1-lh); }
h2 { font-size: var(--h2); }
h3, .h3 { font-size: var(--h3); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--teal-dark); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.hero :focus-visible, .cta :focus-visible { outline-color: var(--orange); }
#content { scroll-margin-top: var(--header-h); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

main { flex: 1 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--navy); color: var(--white); padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary   { background: var(--orange); color: var(--navy); }
.btn-primary:hover, .btn-primary:focus-visible { background: #ffab40; color: var(--navy); }
.btn-secondary { background: var(--navy); color: var(--white); }
.btn-secondary:hover, .btn-secondary:focus-visible { background: var(--teal); color: var(--navy); }
.btn-outline   { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--white); color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--light); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: block; padding: 10px 0; flex: 0 0 auto; }
.brand img { width: var(--header-logo); height: auto; }

.site-nav { display: flex; align-items: center; gap: 40px; }
.nav-list { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; }
.nav-list a { position: relative; display: block; padding: 6px 0; white-space: nowrap; color: var(--navy); font-weight: 600; text-decoration: none; }
.nav-list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .2s; }
.nav-list a:hover::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.btn-portal { padding: 8px 12px; border-radius: 3px; background: var(--slate); color: var(--white); }
.btn-portal:hover, .btn-portal:focus-visible { background: var(--teal); color: var(--navy); }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; color: var(--navy); font-weight: 600; font-size: .9rem; text-decoration: none; }
.lang-switch .flag { width: 22px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.lang-switch:hover { color: var(--teal-dark); }

.nav-toggle { display: none; align-items: center; gap: 8px; padding: 10px 15px; border: 1px solid var(--navy); border-radius: 3px; background: transparent; color: var(--navy); font: 600 1rem var(--font-body); cursor: pointer; }
.nav-toggle .icon { width: 20px; height: 20px; }
.btn-portal, .lang-switch { white-space: nowrap; }

@media (min-width: 960px) and (max-width: 1099.98px) {
  .site-nav, .nav-list { gap: 26px; }
  .brand img { width: 180px; }
}

@media (max-width: 959.98px) {
  .site-header { max-height: 100vh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  .no-js .site-header { position: static; }
  .header-inner { flex-wrap: wrap; }
  .js .nav-toggle { display: inline-flex; }
  .site-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 20px; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { padding: 12px 0; border-bottom: 1px solid var(--light); }
  .nav-list a::after { display: none; }
  .nav-list a[aria-current="page"] { color: var(--teal-dark); }
  .btn-portal { margin-top: 16px; align-self: flex-start; }
  .lang-switch { margin-top: 16px; }
}

/* ---------- shared sections ---------- */
section { padding: var(--section-pad) 0; }
.section-title { text-align: center; margin-bottom: 1em; }

.icon-circle { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--teal); color: var(--white); margin-bottom: 20px; }
.icon-circle .icon { width: 26px; height: 26px; fill: currentColor; }

.page-title { background: var(--light); padding: calc(var(--section-pad) * .75) 0; position: relative; overflow: hidden; }
.page-title h1 { margin: 0; max-width: 50%; min-width: min(100%, 520px); }
.page-title::after { /* decorative "P" stroke echoing the logo mark */
  content: ""; position: absolute; right: -40px; top: 50%; width: 280px; height: 280px; transform: translateY(-50%);
  background: url("/assets/img/p-mark.svg") center / contain no-repeat; opacity: .14; pointer-events: none;
}
.page-title p { margin-top: 1em; }
.page-lead { font-size: 1.15em; max-width: 40em; }

/* ---------- home ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  padding: 120px 0 160px;
  color: var(--white);
  background:
    linear-gradient(100deg, rgba(19,57,66,.96) 0%, rgba(19,57,66,.86) 55%, rgba(19,57,66,.55) 100%),
    url("/assets/img/office-1600.jpg") center 60% / cover no-repeat,
    var(--navy);
}
.hero h1 { color: var(--white); max-width: 14em; }
.hero-lead { font-size: 1.15em; color: var(--light); margin-bottom: 32px; }
.hero-lead p { margin: 0; }

.services { padding: 0 0 var(--section-pad); }
.services-grid { display: grid; gap: 24px; margin-top: -90px; position: relative; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card { background: var(--white); padding: 40px 32px; text-align: center; box-shadow: 0 12px 40px rgba(19,57,66,.12); border-top: 4px solid var(--teal); }
.service-card p { margin: 0; }

.about { background: var(--light); }
.about-grid { display: grid; gap: 0; align-items: center; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-image img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.about-text { background: var(--white); padding: 48px 40px; }
@media (min-width: 960px) { .about-text { padding: 64px 56px; margin-left: -60px; position: relative; box-shadow: 0 12px 40px rgba(19,57,66,.10); } }
.about-text .btn { margin-top: 16px; }

.process-grid { display: grid; gap: 24px; }
@media (min-width: 576px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }
.process-card { background: var(--light); padding: 40px 28px; text-align: center; }
.process-icon { width: 48px; height: 48px; margin: 0 auto 20px; fill: var(--teal); }
.process-card p { margin: 0; }

.cta { background: var(--navy); color: var(--white); text-align: center; }
.cta h2 { color: var(--white); }
.cta p { color: var(--light); font-size: 1.1em; margin-bottom: 28px; }

/* ---------- company ---------- */
.company-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .company-grid { grid-template-columns: 5fr 7fr; gap: 72px; } }
.company-image img { width: 100%; max-height: 720px; object-fit: cover; }
.company-text .lead { font-size: 1.2em; font-weight: 500; margin-bottom: 1em; padding-left: 20px; border-left: 4px solid var(--orange); }

/* ---------- financing ---------- */
.finance-grid { display: grid; gap: 32px; }
@media (min-width: 960px) { .finance-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
.finance-card { padding: 40px 36px; background: var(--white); border: 1px solid #d6eef6; border-top: 4px solid var(--teal); }
.finance-card .tagline { color: var(--teal-dark); font-weight: 600; margin-bottom: 1em; }
.finance-cta { margin-top: 48px; text-align: center; }

/* ---------- contact ---------- */
.page-contact .page-title { padding-bottom: calc(var(--section-pad) * .75 + 90px); }
@media (min-width: 768px) { .page-contact .page-title::after { width: 360px; height: 360px; right: 4%; } }
.contact-info { padding-top: 0; }
.contact-grid { display: grid; gap: 24px; margin-top: -90px; position: relative; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  background: var(--white); padding: 44px 28px 40px; text-align: center;
  border-top: 4px solid var(--teal);
  box-shadow: 0 12px 40px rgba(19,57,66,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 20px 48px rgba(19,57,66,.18); }
.contact-card:focus-within { outline: 3px solid var(--navy); outline-offset: 3px; }
.contact-card .h3 { margin-bottom: .35em; }
.contact-card p { margin: 0; font-size: 1.15em; }
.contact-card a { color: var(--navy); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--orange); }
.contact-card a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.contact-card a:focus-visible { outline: none; }
.contact-card:hover a { color: var(--teal-dark); }
.contact-card .map-link { margin-top: 14px; font-size: .95rem; color: var(--teal-dark); border-bottom: 0; }
.contact-card .map-link span { display: inline-block; transition: transform .2s; }
.contact-card:hover .map-link span { transform: translateX(4px); }


/* ---------- 404 ---------- */
.notfound { min-height: 50vh; display: flex; align-items: center; }
.notfound h1 { max-width: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--teal); color: var(--navy); }
.footer-inner { padding: 20px var(--gutter); font-size: .95rem; }
.footer-inner p { margin: 0; }

.to-top {
  position: fixed; right: 20px; bottom: 30px; z-index: 99;
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 3px; background: var(--navy); color: var(--white);
  box-shadow: 0 0 0 2px rgba(255,255,255,.8);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.to-top .icon { width: 20px; height: 20px; }
.to-top:hover, .to-top:focus-visible { background: var(--teal-dark); color: var(--white); }
.to-top.is-visible { opacity: 1; visibility: visible; }
.no-js .to-top { display: none; }
