/* Advokatbyrån Sandmark · A6 corporate-authority, grafitgrön gravitas
   Bas #1c2420 · panel #151b18 · elfenben #efece4 · stålsalvia #8fa896
   Libre Caslon Text (display) + Inter (brödtext och etiketter)
   Signatur: ärendetrappan. Indragna rader, tunn topplinje, tunt stigsteg. */

:root {
  --base: #1c2420;
  --panel: #151b18;
  --ivory: #efece4;
  --ivory-dim: rgba(239, 236, 228, 0.72);
  --ivory-faint: rgba(239, 236, 228, 0.58);
  --sage: #8fa896;
  --hair: rgba(143, 168, 150, 0.3);
  --hair-soft: rgba(143, 168, 150, 0.16);
  --frame: rgba(239, 236, 228, 0.26);
  --serif: "Libre Caslon Text", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --pad: clamp(20px, 4.5vw, 64px);
  --sec: clamp(88px, 11vw, 168px);
  --head: 62px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

@media (min-width: 900px) {
  :root { --head: 76px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--base);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dt, dd, li { overflow-wrap: break-word; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
}

::selection { background: rgba(143, 168, 150, 0.3); }

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--sage);
  outline-offset: 4px;
}

[id] { scroll-margin-top: calc(var(--head) + 28px); }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--ivory);
  color: var(--base);
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* ---------- Genomgående ---------- */

.label,
.tid,
.kontakt-row dt {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  line-height: 1.4;
}

.lead {
  color: var(--ivory-dim);
  font-size: 1.0625rem;
  max-width: 46ch;
}

.rule {
  display: block;
  height: 1px;
  background: var(--sage);
  opacity: 0.3;
  transform-origin: left center;
}

.sec > .container > .rule { margin-bottom: clamp(38px, 4.6vw, 70px); }

.link-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ivory);
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
}

.link-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 1px;
  background: rgba(239, 236, 228, 0.38);
  transition: background-color 0.5s ease;
}

.link-line:hover::after { background: var(--sage); }

.frame {
  border: 1px solid var(--frame);
  padding: clamp(8px, 1vw, 14px);
}

.frame img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: grayscale(0.55) contrast(1.03) brightness(1.03);
}

.sec { padding-block: var(--sec); }
.panel { background: var(--panel); }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(50px, 6.4vw, 96px);
}

.sec-head h2 { margin-top: 14px; }

h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  letter-spacing: -0.006em;
}

/* ---------- Header ---------- */

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  transition: background-color 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}

.site-head.scrolled {
  background: rgba(21, 27, 24, 0.94);
  border-bottom-color: var(--hair-soft);
  backdrop-filter: blur(10px);
}

.head-inner {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--pad);
  min-height: var(--head);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 0.9375rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ivory);
}

.site-nav ul { display: flex; }

.site-nav a,
.head-tel {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  transition: color 0.4s ease;
}

.site-nav a:hover,
.head-tel:hover { color: var(--ivory); }

.menu-btn { display: none; }

@media (min-width: 900px) {
  .site-nav { display: flex; align-items: center; }
  .site-nav ul { gap: clamp(18px, 2.4vw, 36px); }
  .site-nav .nav-tel { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--head) + clamp(46px, 7vw, 104px)) clamp(54px, 8vw, 116px);
}

.hero-inner { width: 100%; }

.hero-eyebrow {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(16px, 2vw, 24px);
}

.hero-eyebrow span {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
}

.hero-name { margin-block: clamp(22px, 3.6vw, 48px); }

.spread {
  display: flex;
  justify-content: space-between;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 11vw, 9.5rem);
  line-height: 0.9;
  color: var(--ivory);
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px clamp(24px, 5vw, 64px);
  margin-top: clamp(26px, 3.4vw, 46px);
}

.hero-line {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.9vw, 1.5rem);
  line-height: 1.45;
  max-width: 34ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 42px); }

.hero-meta {
  --g: clamp(22px, 3vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px var(--g);
  margin-top: clamp(46px, 6.5vw, 96px);
}

.hero-meta li {
  position: relative;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}

.hero-meta li + li::before {
  content: "";
  position: absolute;
  left: calc(var(--g) / -2);
  top: 50%;
  width: 1px;
  height: 11px;
  background: var(--hair);
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .hero-meta { flex-direction: column; gap: 0; }
  .hero-meta li { border-top: 1px solid var(--hair-soft); padding-block: 13px; }
  .hero-meta li + li::before { display: none; }
}

/* ---------- Rättsområden ---------- */

.omr {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.omr::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--sage);
  opacity: 0.26;
  transform-origin: center top;
}

.omr-col:first-child { padding-right: clamp(24px, 5vw, 80px); }
.omr-col:last-child { padding-left: clamp(24px, 5vw, 80px); }

.omr-h {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  padding-bottom: clamp(16px, 2vw, 26px);
}

.omr-row {
  border-top: 1px solid var(--hair-soft);
  padding-block: clamp(20px, 2.4vw, 30px);
}

.omr-row dt {
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ivory);
  margin-bottom: 8px;
}

.omr-row dd {
  color: var(--ivory-dim);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 42ch;
}

@media (max-width: 820px) {
  .omr { grid-template-columns: 1fr; }
  .omr::before { display: none; }
  .omr-col:first-child { padding-right: 0; }
  .omr-col:last-child { padding-left: 0; padding-top: clamp(38px, 6vw, 56px); }
}

/* ---------- Ärendetrappan · signatur ---------- */

.trappa {
  --stepw: clamp(14px, 4vw, 62px);
  --gutter: clamp(14px, 1.6vw, 26px);
}

.step {
  position: relative;
  margin-left: calc(var(--i) * var(--stepw));
  padding: clamp(28px, 3.4vw, 54px) 0 clamp(28px, 3.4vw, 54px) calc(var(--stepw) + var(--gutter));
}

.step::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--sage);
  opacity: 0.34;
  transform-origin: left center;
}

.step::after {
  content: "";
  position: absolute;
  left: var(--stepw);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--sage);
  opacity: 0.22;
  transform-origin: center top;
}

.step-top {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 40px);
}

.step-top h3 { font-size: clamp(1.375rem, 2.6vw, 2rem); }

.tid { order: 2; margin-left: auto; flex: none; }

.step p {
  margin-top: clamp(12px, 1.4vw, 18px);
  color: var(--ivory-dim);
  font-size: 0.9375rem;
  max-width: 56ch;
}

.trappa .step-end { margin-left: calc(4 * var(--stepw)); }

@media (max-width: 640px) {
  .step-top { display: block; }
  .tid { display: block; margin: 0 0 10px; }
}

/* ---------- Band ---------- */

.band {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(340px, 44vw, 540px);
  overflow: hidden;
  background: var(--panel);
}

.band-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.86) brightness(0.58) contrast(1.06);
}

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(21, 27, 24, 0.93), rgba(28, 36, 32, 0.7) 52%, rgba(28, 36, 32, 0.54));
}

.band-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(38px, 6vw, 88px);
}

.band-line {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2.75rem);
  line-height: 1.2;
  max-width: 21ch;
  margin-top: 14px;
}

/* ---------- Byrån ---------- */

.byra-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.byra-grid .frame img { object-position: 50% 50%; }

.byra-copy h2 { margin-top: 14px; }

.byra-copy p {
  color: var(--ivory-dim);
  margin-top: clamp(18px, 2vw, 26px);
  max-width: 54ch;
}

.team-label {
  margin-top: clamp(60px, 8vw, 120px);
  padding-bottom: clamp(20px, 2.4vw, 30px);
}

.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.team li {
  border-top: 1px solid var(--hair);
  padding-top: clamp(22px, 2.6vw, 34px);
}

.frame-sm { max-width: 190px; padding: 8px; }

.frame-sm img {
  aspect-ratio: 4 / 5;
  filter: grayscale(0.92) contrast(1.08) brightness(1.02);
}

.team li:nth-child(1) .frame-sm img { object-position: 50% 50%; }
.team li:nth-child(2) .frame-sm img { object-position: 50% 0%; }
.team li:nth-child(3) .frame-sm img { object-position: 50% 100%; }

.team-name {
  font-family: var(--serif);
  font-size: 1.125rem;
  margin-top: clamp(18px, 2vw, 26px);
}

.team-role {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 8px;
}

.team-note {
  color: var(--ivory-dim);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-top: 14px;
  max-width: 34ch;
}

@media (max-width: 860px) {
  .byra-grid { grid-template-columns: 1fr; gap: clamp(30px, 6vw, 48px); }
  .byra-grid .frame { max-width: 420px; }
  .team { grid-template-columns: 1fr; gap: 0; }
  .team li { padding-block: clamp(24px, 4vw, 34px); }
  .team li:last-child { border-bottom: 1px solid var(--hair); }
  .frame-sm { max-width: 150px; }
  .team-note { max-width: 46ch; }
}

/* ---------- Principer ---------- */

.princip { margin-top: clamp(30px, 3.6vw, 52px); }

.princip-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
  gap: clamp(14px, 5vw, 80px);
  padding-block: clamp(32px, 4vw, 58px);
  border-top: 1px solid var(--hair-soft);
}

.princip-row:last-child { border-bottom: 1px solid var(--hair-soft); }

.princip-row h2 { font-size: clamp(1.5rem, 2.8vw, 2.25rem); }

.princip-row p {
  color: var(--ivory-dim);
  max-width: 52ch;
}

@media (max-width: 760px) {
  .princip-row { grid-template-columns: 1fr; gap: 12px; }
  .sec-head { grid-template-columns: 1fr; gap: clamp(16px, 3vw, 26px); }
}

/* ---------- Arvode ---------- */

.fee {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.24fr);
  gap: clamp(34px, 6vw, 96px);
}

.fee-fig {
  max-width: 190px;
  padding: 8px;
  margin-bottom: clamp(26px, 3vw, 38px);
}

.fee-fig img {
  aspect-ratio: 4 / 5;
  filter: grayscale(0.9) contrast(1.02) brightness(0.94);
}

.fee-num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  line-height: 1;
  margin-top: 16px;
}

.fee-unit {
  color: var(--ivory-dim);
  font-size: 0.9375rem;
  margin-top: 12px;
}

.fee-note {
  color: var(--ivory-dim);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-top: clamp(22px, 2.6vw, 32px);
  padding-top: clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--hair-soft);
  max-width: 42ch;
}

.fee-row {
  border-top: 1px solid var(--hair);
  padding-block: clamp(22px, 2.8vw, 34px);
}

.fee-row:last-child { border-bottom: 1px solid var(--hair); }

.fee-row h3 { font-size: 1.25rem; }

.fee-row p {
  color: var(--ivory-dim);
  font-size: 0.9375rem;
  line-height: 1.62;
  margin-top: 10px;
  max-width: 52ch;
}

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

/* ---------- Kontakt ---------- */

.sec-kontakt { padding-top: clamp(70px, 8vw, 120px); }

.kontakt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(38px, 6vw, 100px);
  align-items: start;
}

.kontakt-copy h2 { margin-top: 14px; }
.kontakt-copy .lead { margin-top: clamp(18px, 2vw, 24px); }

.kontakt-list { margin-top: clamp(30px, 4vw, 52px); }

.kontakt-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--hair-soft);
}

.kontakt-row:last-child { border-bottom: 1px solid var(--hair-soft); }

.kontakt-row dd {
  min-height: 52px;
  display: flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 1.0625rem;
}

.kontakt-note {
  margin-top: clamp(26px, 3vw, 38px);
  color: var(--ivory-faint);
  font-size: 0.875rem;
  line-height: 1.62;
  max-width: 46ch;
}

.kontakt-fig { max-width: 400px; margin-left: auto; }

.kontakt-fig img {
  aspect-ratio: 4 / 5;
  object-position: 50% 50%;
  filter: grayscale(0.7) contrast(1.05) brightness(1.02);
}

@media (max-width: 860px) {
  .kontakt-grid { grid-template-columns: 1fr; }
  .kontakt-fig { max-width: 420px; margin-left: 0; }
}

/* ---------- Footer ---------- */

.site-foot {
  background: var(--panel);
  padding-block: clamp(46px, 5vw, 76px) clamp(30px, 3.4vw, 46px);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px clamp(24px, 4vw, 56px);
  margin-top: clamp(28px, 3.4vw, 48px);
}

.foot-brand {
  font-family: var(--serif);
  font-size: 0.9375rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.foot-nav ul { display: flex; flex-wrap: wrap; gap: 0 clamp(18px, 2.6vw, 34px); }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ivory-dim);
  transition: color 0.4s ease;
}

.foot-nav a:hover { color: var(--ivory); }

.foot-line {
  flex-basis: 100%;
  color: var(--ivory-faint);
  font-size: 0.875rem;
  max-width: 60ch;
}

.foot-demo {
  margin-top: clamp(28px, 3.4vw, 48px);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ivory-faint);
}

/* ---------- Mobilmeny ---------- */

@media (max-width: 899px) {
  .head-tel { display: none; }

  .menu-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 7px;
    width: 48px;
    height: 48px;
    margin-right: -10px;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
    z-index: 2;
  }

  .menu-btn span {
    width: 26px;
    height: 1px;
    background: var(--ivory);
    transition: transform 0.35s var(--ease), width 0.35s var(--ease);
  }

  .menu-btn span:nth-child(2) { width: 17px; }

  body.menu-open .menu-btn span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  body.menu-open .menu-btn span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); width: 26px; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: var(--base);
    padding: calc(var(--head) + 28px) var(--pad) 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(26px, 5vw, 44px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
  }

  body.menu-open .site-nav { opacity: 1; visibility: visible; }

  .site-nav ul { flex-direction: column; }

  .site-nav li { border-top: 1px solid var(--hair-soft); }
  .site-nav li:last-child { border-bottom: 1px solid var(--hair-soft); }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 60px;
    font-family: var(--serif);
    font-size: clamp(1.5rem, 6.4vw, 2rem);
    letter-spacing: 0;
    text-transform: none;
    color: var(--ivory);
  }

  .nav-tel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border: 1px solid var(--frame);
    font-family: var(--sans);
    font-size: 0.9375rem;
    letter-spacing: 0.08em;
    color: var(--ivory);
  }

  body.menu-open { overflow: hidden; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .js .reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease, transform 1s var(--ease);
  }

  .js .reveal.in { opacity: 1; transform: none; }

  .js .rule.anim { transform: scaleX(0); transition: transform 1.1s var(--ease); }
  .js .rule.anim.in { transform: scaleX(1); }

  .js .omr.anim::before { transform: scaleY(0); transition: transform 1.2s var(--ease); }
  .js .omr.anim.in::before { transform: scaleY(1); }

  .js .step.anim::before { transform: scaleX(0); transition: transform 1.1s var(--ease); }
  .js .step.anim.in::before { transform: scaleX(1); }

  .js .step.anim::after { transform: scaleY(0); transition: transform 0.9s var(--ease) 0.35s; }
  .js .step.anim.in::after { transform: scaleY(1); }

  .js .step.anim .step-top,
  .js .step.anim > p {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1s ease 0.2s, transform 1s var(--ease) 0.2s;
  }

  .js .step.anim.in .step-top,
  .js .step.anim.in > p { opacity: 1; transform: none; }

  .frame { transition: border-color 0.9s ease; }
  .frame:hover { border-color: rgba(239, 236, 228, 0.45); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
