/* Sapphire Services — site styles */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}

:root {
  --ink: #0f1b3d;
  --ink-soft: #3a4560;
  --stone: #5b6478;
  --sapphire: #1d3faf;
  --sapphire-hover: #15308a;
  --sapphire-deep: #0b1f5c;
  --facet: #6fa8ff;
  --ice: #eef2fb;
  --ice-strong: #dce6ff;
  --line: #d5dbe8;
  --paper: #ffffff;
  --ok: #17663a;
  --error: #a3202a;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-sm: 3px;
  --radius: 6px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--sapphire); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--sapphire-hover); text-decoration-thickness: 2px; }

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

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50;
}
.skip:focus { left: 8px; }

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

h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); margin: 0; }
h1 { font-size: clamp(2.375rem, 5.2vw, 4.25rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.028em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.3125rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--ink-soft); max-width: 38em; }

/* ---------- header ---------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 27px; flex: none; }
.brand span { font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.015em; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--sapphire); }
.nav .nav-cta { background: var(--sapphire); color: #fff; padding: 9px 16px; border-radius: var(--radius-sm); border: 0; }
.nav .nav-cta:hover { background: var(--sapphire-hover); color: #fff; }
.nav .nav-cta[aria-current="page"] { background: var(--sapphire-deep); }

.menu-toggle { display: none; }

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font: 500 .95rem var(--sans); color: var(--ink); padding: 8px 12px; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 76px; z-index: 20;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--sapphire); }
  .nav .nav-cta { margin-top: 16px; text-align: center; padding: 13px 16px; }
  .site-header { position: relative; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block; font: 600 1rem/1 var(--sans); text-decoration: none;
  padding: 15px 22px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--sapphire); color: #fff; }
.btn-primary:hover { background: var(--sapphire-hover); color: #fff; }
.btn-quiet { color: var(--ink); border-color: var(--line); background: var(--paper); }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--sapphire-deep); }
.btn-light:hover { background: var(--ice-strong); color: var(--sapphire-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- hero ---------- */

.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 12.5em; }
.hero .lead { margin-top: 28px; }
.hero-art { width: 100%; max-width: 460px; justify-self: end; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 300px; justify-self: start; order: -1; }
}

/* the one animated moment: the gem assembles on first load */
.gem .f { opacity: 0; animation: facet-in .7s cubic-bezier(.2,.7,.2,1) forwards; }
.gem .links line { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.1s ease-out forwards; animation-delay: 1s; }
.gem .links circle { opacity: 0; animation: facet-in .4s ease-out forwards; animation-delay: 1.7s; }
@keyframes facet-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .gem .f, .gem .links circle { animation: none; opacity: 1; }
  .gem .links line { animation: none; stroke-dashoffset: 0; }
}

/* ---------- sections ---------- */

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tint { background: var(--ice); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 64px; align-items: end; margin-bottom: 48px; }
.section-head p { margin: 0; color: var(--ink-soft); max-width: 34em; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* service index: a list of rows, not cards */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.service-list li { border-bottom: 1px solid var(--line); }
.service-list a {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr) 9.5rem; gap: 16px 48px;
  align-items: baseline; padding: 30px 0; color: var(--ink); text-decoration: none;
}
.service-list h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; }
.service-list p { margin: 0; color: var(--ink-soft); }
.service-list .more { color: var(--sapphire); font-weight: 600; white-space: nowrap; justify-self: end; }
.service-list a:hover h3 { color: var(--sapphire); }
.service-list a:hover .more { text-decoration: underline; }
@media (max-width: 760px) {
  .service-list a { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
}

/* process: a real sequence, so it is numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 28px 28px 8px 0; border-top: 1px solid var(--line); position: relative; }
.steps li::before {
  content: counter(step); display: block; font-weight: 700; font-size: 2.75rem; line-height: 1;
  color: var(--sapphire); margin-bottom: 18px; letter-spacing: -0.03em;
}
.steps li::after { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--sapphire); transform: rotate(45deg); }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* deep band */
.band { background: var(--sapphire-deep); color: #e7ecfa; position: relative; overflow: hidden; }
.band h2 { color: #fff; max-width: 15em; }
.band p { color: #c3cdea; max-width: 36em; }
.band a:not(.btn) { color: #fff; }
.band .wrap { position: relative; z-index: 1; }
.band-facets { position: absolute; right: -120px; top: -60px; width: 560px; opacity: .14; pointer-events: none; }
.band-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px 72px; align-items: start; }
.band-grid ul { list-style: none; margin: 6px 0 0; padding: 0; }
.band-grid li { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.16); color: #dbe2f6; }
.band-grid li:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; } .band-facets { display: none; } }

/* two-column prose + aside */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 72px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > .contact-aside { order: 2; } }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 1px solid var(--line); }
.plain-list strong { display: block; font-weight: 600; margin-bottom: 4px; }
.plain-list span { color: var(--ink-soft); }

/* post list */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 8px 40px; padding: 28px 0; text-decoration: none; color: var(--ink); }
.post-list time { color: var(--stone); font-size: .95rem; padding-top: 4px; }
.post-list h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; letter-spacing: -0.015em; margin-bottom: 8px; }
.post-list p { margin: 0; color: var(--ink-soft); max-width: 40em; }
.post-list a:hover h3 { color: var(--sapphire); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
@media (max-width: 680px) { .post-list a { grid-template-columns: 1fr; } }

/* closing call to action */
.closing { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.closing .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 48px; }
.closing h2 { max-width: 16em; }
.closing p { margin: 14px 0 0; color: var(--ink-soft); max-width: 34em; }

/* ---------- inner page header ---------- */

.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 14em; font-size: clamp(2.25rem, 4.6vw, 3.625rem); }
.page-head .lead { margin-top: 22px; }
.crumbs { font-size: .93rem; color: var(--stone); margin-bottom: 22px; }
.crumbs a { color: var(--stone); }
.crumbs a:hover { color: var(--ink); }

/* ---------- long-form prose ---------- */

.prose { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.7; color: #1d2744; max-width: 34em; }
.prose h2 { font-family: var(--sans); font-size: 1.625rem; margin: 2em 0 .6em; letter-spacing: -0.015em; }
.prose h3 { font-family: var(--sans); font-size: 1.25rem; margin: 1.7em 0 .5em; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; padding-left: .2em; }
.prose li::marker { color: var(--sapphire); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--sapphire); color: var(--ink); font-style: italic; }
.prose > :first-child { margin-top: 0; }

.article-meta { color: var(--stone); font-size: .98rem; margin-top: 22px; }
.article-body { padding: clamp(40px, 6vw, 72px) 0; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 64px; align-items: start; }
.article-aside { position: sticky; top: 24px; font-size: .97rem; border-top: 2px solid var(--ink); padding-top: 18px; }
.article-aside h2 { font-size: 1.0625rem; margin-bottom: 8px; }
.article-aside p { color: var(--ink-soft); }
@media (max-width: 960px) { .article-grid { grid-template-columns: 1fr; } .article-aside { position: static; max-width: 34em; } }

/* service page content */
.content { padding: clamp(48px, 7vw, 88px) 0; }
.content + .content { padding-top: 0; }
.included { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.included li { padding: 20px 0 20px 26px; border-top: 1px solid var(--line); position: relative; }
.included li::before { content: ""; position: absolute; left: 2px; top: 30px; width: 8px; height: 8px; background: var(--sapphire); transform: rotate(45deg); }
.included strong { display: block; font-weight: 600; margin-bottom: 4px; }
.included span { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 720px) { .included { grid-template-columns: 1fr; } }

.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-weight: 600; font-size: 1.125rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 1.5rem; font-weight: 400; color: var(--sapphire); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 22px; color: var(--ink-soft); max-width: 40em; }

/* ---------- contact form ---------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: .98rem; margin-bottom: 8px; }
label .opt { font-weight: 400; color: var(--stone); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink);
  padding: 13px 14px; border: 1px solid #b9c2d6; border-radius: var(--radius-sm); background: #fff;
}
textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: var(--stone); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sapphire); box-shadow: 0 0 0 3px rgba(29,63,175,.18); }
.field-error { color: var(--error); font-size: .93rem; margin-top: 6px; min-height: 0; }
[aria-invalid="true"] { border-color: var(--error) !important; }

.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 8px; }
.form-status { margin-top: 22px; padding: 16px 18px; border-radius: var(--radius-sm); display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #e7f4ec; color: var(--ok); border: 1px solid #b7dcc4; }
.form-status.err { background: #fbecee; color: var(--error); border: 1px solid #efc2c7; }
.btn[disabled] { opacity: .6; cursor: progress; }
.noscript-note { padding: 14px 16px; background: var(--ice); border-radius: var(--radius-sm); }

.contact-aside { font-size: 1rem; }
.contact-aside h2 { font-size: 1.25rem; margin-bottom: 10px; }
.contact-aside > div + div { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.contact-aside p { color: var(--ink-soft); }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: #c4cbdc; padding: 64px 0 36px; font-size: .97rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 36px 40px; }
.foot-grid h2 { font-size: 1rem; color: #fff; margin-bottom: 14px; font-weight: 600; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 9px; }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer .brand:hover { color: #fff; text-decoration: none; }
.foot-note { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #98a2ba; font-size: .9rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* 404 */
.notfound { padding: clamp(72px, 12vw, 160px) 0; }
.notfound h1 { max-width: 12em; }

.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--ice); padding: .1em .35em; border-radius: 3px; }
@media (max-width: 760px) { .service-list .more { justify-self: start; } }
