/* ==========================================================
   TOKENS
   Bytt aksentfargen i config.js, ikke her — den settes
   automatisk som --accent via script.js.
   ========================================================== */
:root {
  --bg: #121110;
  --bg-panel: #1a1815;
  --bg-panel-raised: #201d19;
  --ink: #f2ede4;
  --ink-muted: #a89e8f;
  --ink-faint: #6f6759;
  --line: rgba(242, 237, 228, 0.1);
  --line-strong: rgba(242, 237, 228, 0.18);
  --accent: #b98a52;
  --accent-ink: #171310;

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  --measure: 62ch;
  --container: 1180px;
  --gutter: clamp(24px, 5vw, 64px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: light) {
  :root { color-scheme: dark; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

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

section { padding-block: clamp(72px, 12vw, 152px); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }

p { margin: 0; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-muted);
  max-width: var(--measure);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head--wide { max-width: 760px; }

.kicker {
  display: block;
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

/* skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 20px;
  z-index: 200;
  border-radius: 4px;
}
.skip-link:focus {
  left: var(--gutter);
  top: 16px;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }

/* ==========================================================
   NAV
   ========================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 22px;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(18, 17, 16, 0.86);
  backdrop-filter: blur(10px);
  padding-block: 14px;
  border-bottom-color: var(--line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }

  .nav-mobile {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 150;
    display: flex;
    flex-direction: column;
    padding: 24px var(--gutter);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }
  .nav-mobile.is-open { transform: translateX(0); }
  .nav-mobile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
  }
  .nav-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .nav-mobile a {
    text-decoration: none;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.9rem;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  padding-top: clamp(48px, 8vw, 88px);
  padding-bottom: clamp(64px, 10vw, 120px);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.8fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero-eyebrow {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 20px;
  display: block;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
}
.hero .lede { margin-top: 26px; margin-bottom: 38px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, var(--bg-panel) 0 2px, var(--bg-panel-raised) 2px 4px);
  border: 1px solid var(--line);
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: cover;
}
.placeholder-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 22px;
}
.placeholder-tag {
  background: rgba(18, 17, 16, 0.75);
  border: 1px dashed var(--line-strong);
  color: var(--ink-muted);
  font-size: 0.82rem;
  padding: 10px 14px;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 380px; margin-inline: auto; width: 100%; }
}

/* ==========================================================
   PHILOSOPHY (editorial split)
   ========================================================== */
.philosophy .container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 90px);
}
.philosophy h2 { max-width: 11ch; }
.philosophy-body p + p { margin-top: 20px; }
.philosophy-body { max-width: var(--measure); color: var(--ink-muted); }
.philosophy-body strong { color: var(--ink); font-weight: 600; }

@media (max-width: 780px) {
  .philosophy .container { grid-template-columns: 1fr; }
}

/* ==========================================================
   GOALS
   ========================================================== */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.goal-tile {
  padding: 34px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.goal-tile:hover { background: var(--bg-panel); }
.goal-tile h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 10px; }
.goal-tile p { color: var(--ink-muted); font-size: 0.94rem; }

@media (max-width: 860px) {
  .goals-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .goals-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   PROCESS (this content genuinely is a sequence — numbering earned)
   ========================================================== */
.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: clamp(20px, 4vw, 48px);
  padding-block: 40px;
  border-top: 1px solid var(--line);
}
.process-list .process-item:last-child { border-bottom: 1px solid var(--line); }
.process-num {
  font-family: var(--font-display);
  color: var(--ink-faint);
  font-size: 1.4rem;
}
.process-item h3 { margin-bottom: 12px; }
.process-item p { color: var(--ink-muted); max-width: 58ch; }

/* ==========================================================
   FEATURES (what you get)
   ========================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature-card {
  background: var(--bg);
  padding: clamp(28px, 4vw, 40px);
}
.feature-card h3 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 12px; }
.feature-card p { color: var(--ink-muted); }

@media (max-width: 700px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   ABOUT
   ========================================================== */
.about .container {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about-portrait {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  background: repeating-linear-gradient(135deg, var(--bg-panel) 0 2px, var(--bg-panel-raised) 2px 4px);
  border: 1px solid var(--line);
  position: relative;
}
.about-name { font-size: 0.95rem; color: var(--ink-faint); margin-top: 16px; }
.about-body p + p { margin-top: 18px; }
.about-body { color: var(--ink-muted); max-width: var(--measure); }
.about-body strong { color: var(--ink); font-weight: 600; }

@media (max-width: 800px) {
  .about .container { grid-template-columns: 1fr; }
  .about-portrait { max-width: 320px; }
}

/* ==========================================================
   WHO THIS IS FOR
   ========================================================== */
.fit .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
}
.fit-card {
  padding: clamp(28px, 4vw, 40px);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.fit-card h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; margin-bottom: 22px; }
.fit-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.fit-card li { padding-left: 22px; position: relative; color: var(--ink-muted); }
.fit-card li::before {
  content: "";
  position: absolute; left: 0; top: 0.65em;
  width: 8px; height: 1px; background: var(--ink-faint);
}
.fit-card--yes li::before { background: var(--accent); }

@media (max-width: 760px) {
  .fit .container { grid-template-columns: 1fr; }
}

/* ==========================================================
   RESULTS
   ========================================================== */
.results-note {
  color: var(--ink-muted);
  margin-bottom: 40px;
  max-width: var(--measure);
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.result-card {
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  padding: 28px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.result-card span {
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.result-card p {
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-top: 20px;
}

@media (max-width: 860px) {
  .results-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   FAQ (accordion)
   ========================================================== */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink);
  text-align: left;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--ink-muted);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.faq-icon::before { top: 50%; left: 0; width: 100%; height: 1px; }
.faq-icon::after { left: 50%; top: 0; width: 1px; height: 100%; }
.faq-item[data-open="true"] .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s var(--ease);
}
.faq-answer p { color: var(--ink-muted); padding-bottom: 26px; max-width: 68ch; }

/* ==========================================================
   FINAL CTA
   ========================================================== */
.final-cta {
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.final-cta .container { max-width: 780px; }
.final-cta h2 { margin-bottom: 22px; }
.final-cta .lede { margin-bottom: 36px; }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer { padding-block: 48px; }
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.footer-links { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--ink-faint); transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--ink); }

/* ==========================================================
   SCROLL REVEAL (one quiet, consistent pattern)
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   LEGAL PAGES (personvern / vilkår)
   ========================================================== */
.legal-content { max-width: 720px; }
.legal-content h1 { margin-bottom: 8px; }
.legal-content .updated { color: var(--ink-faint); font-size: 0.88rem; margin-bottom: 32px; display: block; }
.legal-disclaimer {
  border: 1px solid var(--line-strong);
  background: var(--bg-panel);
  padding: 20px 24px;
  border-radius: 4px;
  margin-bottom: 44px;
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 44px;
  margin-bottom: 16px;
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p,
.legal-content li { color: var(--ink-muted); }
.legal-content p + p,
.legal-content ul + p,
.legal-content p + ul { margin-top: 14px; }
.legal-content ul { padding-left: 20px; margin: 0; }
.legal-content li { margin-bottom: 8px; }
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================
   APPLY PAGE
   ========================================================== */
.apply-hero { padding-bottom: 0; }
.apply-hero .container { max-width: 720px; }
.apply-hero .kicker { margin-bottom: 18px; }

.apply-form-section .container { max-width: 720px; }
.form-grid { display: grid; gap: 24px; }
.form-row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 600px) {
  .form-row-two { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.92rem; color: var(--ink-muted); }
.field .hint { font-size: 0.82rem; color: var(--ink-faint); }
.field input,
.field select,
.field textarea {
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 13px 16px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 1rem;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}
.field textarea { min-height: 110px; }
.form-submit { margin-top: 8px; }
.form-success {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--bg-panel);
  padding: 24px;
  border-radius: 4px;
  margin-top: 24px;
}
.form-success.is-visible { display: block; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: 32px;
}
.back-link:hover { color: var(--ink); }
.hidden-field { display: none; }
