/* ExpertGigs — editorial redesign. Fonts are self-hosted (SIL Open Font License). */
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --paper: #F2EEE6;
  --paper-deep: #E8E2D6;
  --ink: #17150F;
  --ink-soft: #4B463C;
  --ink-mute: #7A7365;
  --rule: #D3CBBB;
  --accent: #B8432A;
  --accent-ink: #8F3220;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

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

/* ---------- Masthead ---------- */
.masthead { border-bottom: 1px solid var(--ink); }
.masthead .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.brand-name em { font-style: italic; font-weight: 400; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav a {
  font-size: 0.92rem; font-weight: 500; text-decoration: none; position: relative; padding: 0.25rem 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav .nav-x { display: inline-flex; align-items: center; gap: .4rem; }
.nav .nav-x svg { width: 13px; height: 13px; fill: currentColor; }

.dateline {
  border-bottom: 1px solid var(--rule);
  font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute);
}
.dateline .container { display: flex; justify-content: space-between; gap: 1rem; padding-top: .55rem; padding-bottom: .55rem; }

/* ---------- Type ---------- */
.kicker {
  font-family: var(--sans); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-ink); margin: 0 0 1.25rem;
  display: flex; align-items: center; gap: .75rem;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; margin: 0; }
.display {
  font-size: clamp(2.9rem, 7.2vw, 6.4rem); line-height: 0.98; letter-spacing: -0.035em;
  font-variation-settings: "opsz" 72;
}
.display em { font-style: italic; color: var(--accent); }
.lede { font-family: var(--serif); font-size: clamp(1.3rem, 2.1vw, 1.65rem); line-height: 1.38; color: var(--ink); font-variation-settings: "opsz" 24; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .95rem 1.4rem; border-radius: 2px; border: 1px solid var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.btn .arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover .arrow { transform: translateX(4px); }
.text-link { font-weight: 500; font-size: .95rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--ink); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
.hero-copy .display { margin-bottom: 2rem; }
.hero-sub { max-width: 34rem; color: var(--ink-soft); font-size: 1.08rem; margin: 0 0 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }
.hero-figure { margin: 0; position: relative; }
.hero-figure .frame { overflow: hidden; border-radius: 2px; background: var(--paper-deep); aspect-ratio: 752 / 864; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: settle 1.8s var(--ease) .1s forwards; }
.hero-figure figcaption {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: .7rem;
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}
@keyframes settle { to { transform: scale(1); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 5vw, 4rem); }
.label {
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute);
  padding-top: .55rem; border-top: 1px solid var(--ink); align-self: start;
}
.label .n { font-family: var(--serif); font-style: italic; font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--accent-ink); margin-right: .45rem; }
.section h2.title { font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.05; margin-bottom: 1.5rem; }
.body-copy { color: var(--ink-soft); max-width: 40rem; }

/* Fields: typographic index, not pills */
.field-index { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--ink); }
.field-index li {
  display: grid; grid-template-columns: 3rem 1fr auto; align-items: baseline;
  border-bottom: 1px solid var(--rule); padding: .9rem 0;
  font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em;
  transition: padding .35s var(--ease), color .35s var(--ease);
}
.field-index li .i { font-family: var(--sans); font-size: .78rem; letter-spacing: .1em; color: var(--ink-mute); }
.field-index li .go { font-family: var(--sans); font-size: .85rem; letter-spacing: 0; }
.field-index li .go a { text-decoration: none; color: var(--ink-mute); }
.field-index li:hover { padding-left: .5rem; }
.field-index li:hover .go a { color: var(--accent-ink); }
.field-index li.more { font-style: italic; color: var(--ink-mute); }

/* Steps: ruled columns */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.75rem); }
.steps li { border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.steps .num { display: block; font-family: var(--serif); font-style: italic; font-size: 3.2rem; line-height: 1; color: var(--accent); margin-bottom: 1.4rem; font-variation-settings: "opsz" 72; }
.steps h3 { font-size: 1.55rem; line-height: 1.15; margin-bottom: .6rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* Disclosure: footnote style */
.note { background: var(--paper-deep); }
.note .split { align-items: start; }
.note .split > p:last-child { margin: 0; font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.45; color: var(--ink); max-width: 46rem; }
.note .split > p:last-child::before { content: "\2020"; color: var(--accent); margin-right: .45rem; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(2.75rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--ink); }
.page-head h1 { font-size: clamp(2.8rem, 6.5vw, 5.4rem); line-height: 1; letter-spacing: -.035em; font-variation-settings: "opsz" 72; }
.page-head h1 em { font-style: italic; color: var(--accent); }
.page-head .updated { margin: 1.25rem 0 0; color: var(--ink-mute); font-size: .9rem; }

/* ---------- Openings ---------- */
.openings-intro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid var(--rule); }
.openings-intro p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.openings-intro p:first-child { font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; color: var(--ink); }

.board { padding: 2rem 0 clamp(3rem, 6vw, 5rem); }
.filters { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; border-bottom: 1px solid var(--ink); margin-bottom: 0; }
.filters button {
  appearance: none; background: none; border: 0; cursor: pointer; color: var(--ink-mute);
  font: 500 .95rem/1 var(--sans); padding: .9rem 0; position: relative;
}
.filters button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease); }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); }
.filters button[aria-pressed="true"]::after { transform: scaleX(1); }

.openings-status { margin: 2rem 0; font-family: var(--serif); font-size: 1.3rem; color: var(--ink-soft); }
.openings-scroller-wrap { position: relative; }
.openings-scroller-wrap[hidden] { display: none; }
.openings-scroller { max-height: min(78vh, 820px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.openings-scroller-wrap::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(242,238,230,0), var(--paper)); transition: opacity .3s;
}
.openings-scroller-wrap.at-end::after { opacity: 0; }

.opening-list { display: block; }
.opening-card {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr) 15rem 10rem; gap: 1.5rem; align-items: center;
  padding: 1.6rem 0; border-bottom: 1px solid var(--rule);
  transition: background .3s var(--ease);
}
.opening-card:hover { background: linear-gradient(90deg, transparent, rgba(232,226,214,.7) 20%, rgba(232,226,214,.7) 80%, transparent); }
.opening-top { display: flex; flex-direction: column; gap: .25rem; }
.field-tag { margin: 0; font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.opening-posted { margin: 0; font-size: .82rem; color: var(--ink-mute); }
.opening-title { font-size: clamp(1.45rem, 2.4vw, 1.95rem); line-height: 1.12; margin: 0; }
.opening-details { margin: 0; display: flex; flex-direction: column; gap: .2rem; }
.opening-pay { font-family: var(--serif); font-size: 1.3rem; font-variant-numeric: lining-nums tabular-nums; }
.opening-meta { font-size: .8rem; color: var(--ink-mute); }
.opening-actions { margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.opening-actions .btn { padding: .75rem 1.1rem; font-size: .9rem; }
.referral-label { font-size: .78rem; color: var(--ink-mute); }
.opening-card.is-closed { opacity: .55; }
.opening-card.is-closed .btn { background: transparent; color: var(--ink); }

.closed-section { margin-top: 2.5rem; border-top: 1px solid var(--ink); }
.closed-section[hidden] { display: none; }
.closed-section summary { cursor: pointer; padding: 1rem 0; font-weight: 600; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Prose (contact / privacy) ---------- */
.prose-wrap { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.prose-section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1rem, 5vw, 4rem); padding: 2rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 2rem; }
.prose-section:first-child { border-top: 1px solid var(--ink); }
.prose-section h2 { font-size: 1.6rem; line-height: 1.15; }
.prose-section p { margin: 0 0 1rem; color: var(--ink-soft); max-width: 40rem; }
.prose-section p:last-child { margin-bottom: 0; }
.email-highlight { font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.6rem) !important; color: var(--ink) !important; letter-spacing: -.02em; }
.email-highlight a { text-decoration-thickness: 1px; text-underline-offset: .18em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D9D3C6; padding: clamp(3rem, 7vw, 5rem) 0 2rem; }
.site-footer a { color: #F2EEE6; text-decoration: none; }
.site-footer a:hover { color: #E7A08F; }
.footer-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; align-items: end; padding-bottom: 2.5rem; border-bottom: 1px solid #3A362D; }
.footer-word { font-family: var(--serif); font-size: clamp(3rem, 9vw, 7.5rem); line-height: .9; letter-spacing: -.045em; color: #F2EEE6; margin: 0; font-variation-settings: "opsz" 72; }
.footer-word em { font-style: italic; color: #E07A62; }
.footer-contact { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; justify-self: end; font-size: 1rem; }
.footer-contact .x-link { display: inline-flex; align-items: center; gap: .5rem; }
.footer-contact svg { width: 14px; height: 14px; fill: currentColor; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; font-size: .85rem; color: #A29B8C; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; }
.footer-nav a { color: #D9D3C6; }
.footer-nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: .25em; }
.copyright { margin: 0; }
.footer-fine { margin: 1.25rem 0 0; font-size: .8rem; color: #8C8575; max-width: 52rem; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.rise { animation: rise .9s var(--ease) both; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .18s; } .rise.d3 { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-figure img { transform: none; }
}

/* ---------- Consent banner (used by analytics.js) ---------- */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 1rem; margin: 0 auto; z-index: 50;
  width: min(760px, calc(100% - 2rem));
  background: var(--ink); color: #E9E4D8; border-radius: 3px;
  box-shadow: 0 18px 50px -20px rgba(23,21,15,.55);
  padding: 1rem 1.1rem; animation: rise .6s var(--ease) both;
}
.consent-banner[hidden] { display: none; }
.consent-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; }
.consent-banner p { margin: 0; font-size: .92rem; line-height: 1.5; flex: 1 1 320px; }
.consent-banner a { color: #fff; text-decoration: underline; }
.consent-actions { display: flex; gap: .6rem; }
.consent-accept, .consent-decline {
  appearance: none; cursor: pointer; font: 600 .88rem/1 var(--sans); padding: .75rem 1.15rem; border-radius: 2px;
}
.consent-accept { background: var(--paper); color: var(--ink); border: 1px solid var(--paper); }
.consent-accept:hover { background: #fff; }
.consent-decline { background: transparent; color: #E9E4D8; border: 1px solid #5A554A; }
.consent-decline:hover { border-color: #E9E4D8; }
.consent-accept:focus-visible, .consent-decline:focus-visible { outline: 2px solid #E07A62; outline-offset: 2px; }
body.consent-open { padding-bottom: 7rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .opening-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top top" "title title" "details actions"; gap: .6rem 1rem; }
  .opening-top { grid-area: top; flex-direction: row; gap: 1rem; align-items: baseline; }
  .opening-title { grid-area: title; }
  .opening-details { grid-area: details; }
  .opening-actions { grid-area: actions; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure .frame { aspect-ratio: 812 / 560; }
  .split, .prose-section { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .steps .num { font-size: 2.6rem; margin-bottom: .8rem; }
  .openings-intro { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-contact { justify-self: start; }
  .hero-figure figcaption span:last-child { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .masthead .container { min-height: 62px; }
  .brand svg { width: 28px; height: 28px; }
  .brand-name { font-size: 1.3rem; }
  .nav { gap: 1rem; }
  .nav .nav-x span { display: none; }
  .nav .nav-contact { display: none; }
  .display { font-size: clamp(2.7rem, 12.5vw, 3.6rem); }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .field-index li { grid-template-columns: 2.25rem 1fr auto; font-size: 1.75rem; }
  .opening-card { grid-template-areas: "top top" "title title" "details details" "actions actions"; }
  .opening-actions { flex-direction: row; align-items: center; justify-content: space-between; }
  .opening-actions .btn { flex: 1; justify-content: center; }
  .openings-scroller { max-height: none; overflow: visible; }
  .openings-scroller-wrap::after { display: none; }
  .consent-banner { bottom: 0; width: 100%; border-radius: 0; padding: .9rem 1rem calc(.9rem + env(safe-area-inset-bottom, 0px)); }
  .consent-actions { width: 100%; }
  .consent-accept, .consent-decline { flex: 1 1 auto; }
}
