/* Cerwall Business Consulting AB — cerwall.se
   Stram och analytisk. En accentfärg. Inga beroenden. */

:root {
  --ink:        #14181c;
  --ink-soft:   #4a545e;
  --ink-faint:  #78838e;
  --rule:       #e2e6ea;
  --rule-soft:  #eff2f4;
  --paper:      #ffffff;
  --paper-alt:  #f7f9fa;
  --accent:     #0b4a6f;
  --accent-lit: #0f6396;

  --measure: 34rem;
  --wrap: 68rem;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 650; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.012em; }

p { margin: 0 0 1.15em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-lit); }

.lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.4rem;
}

.measure { max-width: var(--measure); }

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

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 76px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--ink-faint); font-weight: 400; }

.nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.nav a {
  font-size: 0.93rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Sections ---------- */

section { padding-block: clamp(3.5rem, 8vw, 6rem); }
section + section { border-top: 1px solid var(--rule-soft); }
.alt { background: var(--paper-alt); }

.hero { padding-block: clamp(4.5rem, 11vw, 8.5rem); }
.hero h1 { max-width: 22ch; }

/* ---------- Credential band ---------- */

.creds {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 2rem;
}
.creds ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.5rem 2rem;
}
.creds li { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; }
.creds b { display: block; color: var(--ink); font-size: 1.45rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 0.15rem; }

/* ---------- Cards / grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 2.5rem 3rem;
}

.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0.7em; }
.card .num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.9rem;
}

/* ---------- Service blocks ---------- */

.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1.5rem 3.5rem;
  padding-block: 2.75rem;
  border-top: 1px solid var(--rule);
}
.service:first-of-type { border-top: none; padding-top: 0; }
.service h3 { font-size: 1.35rem; letter-spacing: -0.018em; }
.service .body > :last-child { margin-bottom: 0; }
.service .deliver {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.service .deliver b { color: var(--ink-soft); font-weight: 600; }

/* ---------- Talks ---------- */

.talk {
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
  max-width: 46rem;
}
.talk:first-of-type { border-top: none; padding-top: 0; }
.talk h3 { margin-bottom: 0.35em; }
.talk p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  margin: 0 0.35rem 0.35rem 0;
}

/* ---------- Portrait ---------- */

.bio {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
  gap: 2.5rem 3.5rem;
  align-items: start;
}
.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  display: block;
}
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  padding: 1rem;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
  padding: 0.82rem 1.6rem;
  border: 1px solid var(--accent);
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-lit); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--paper-alt); color: var(--accent-lit); }

.btn-row { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 2.25rem; }

/* ---------- Misc ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 0.85rem;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.95rem;
}
.timeline li:first-child { border-top: none; }
.timeline .when { color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: 0.88rem; padding-top: 0.1rem; }
.timeline .what b { font-weight: 600; }
.timeline .what span { color: var(--ink-soft); }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding-block: 0.9rem; border-top: 1px solid var(--rule); font-size: 0.97rem; }
.contact-list li:first-child { border-top: none; }
.contact-list .label { display: block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.2rem; }

.todo {
  background: #fffbe8;
  border-left: 3px solid #d9a400;
  padding: 0.85rem 1.1rem;
  font-size: 0.85rem;
  color: #6b5300;
  margin: 1.5rem 0;
}
.todo b { color: #4d3c00; }

/* ---------- Typographic system ---------- */

/* Wordmark — letterspaced, no image asset needed */
.wordmark {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}
.wordmark .mk {
  display: inline-block;
  width: 1.5rem;
  height: 2px;
  background: var(--accent);
  transform: translateY(-0.28em);
}
.wordmark .sub {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  color: var(--ink-faint);
}

/* Oversized section index numeral */
.bignum {
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 200;
  line-height: 0.85;
  letter-spacing: -0.045em;
  color: var(--rule);
  display: block;
  margin: 0 0 0.15em;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.bignum.accent { color: var(--accent); opacity: 0.14; }

/* Section head: numeral + label on a heavy rule */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0.85rem;
  margin-bottom: 2.75rem;
}
.sec-head .idx {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.sec-head h2, .sec-head .t {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.022em;
  font-weight: 600;
}

/* Full-bleed typographic statement */
.statement {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
.statement p {
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  line-height: 1.22;
  letter-spacing: -0.028em;
  font-weight: 500;
  max-width: 20ch;
  margin: 0;
  color: var(--ink);
}
.statement .src {
  display: block;
  margin-top: 1.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

/* Service block gets an oversized numeral in the left rail */
.service .rail { display: flex; flex-direction: column; }
.service .rail .bignum { margin-bottom: 0.35rem; }

/* Heavy rule utility */
.rule-heavy { border: 0; border-top: 3px solid var(--ink); margin: 0 0 2.5rem; }

/* ---------- Stage photography ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.75rem;
}
.figure { margin: 0; }
.figure img,
.figure .ph {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
}
.figure .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  padding: 1rem;
  line-height: 1.5;
}
.figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  line-height: 1.45;
}
.figure.wide { grid-column: 1 / -1; }
.figure.wide img, .figure.wide .ph { aspect-ratio: 21 / 9; }

/* Portrait beside hero */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr);
  gap: 2.5rem 3.5rem;
  align-items: end;
}

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

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.75rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
  background: var(--paper);
}
.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
}
.site-foot a { color: var(--ink-soft); }
.site-foot p { margin: 0 0 0.35em; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-head .wrap { min-height: auto; padding-block: 1rem; gap: 0.75rem; }
  .nav { gap: 1.15rem; }
  .service, .bio, .hero-split { grid-template-columns: 1fr; gap: 1.1rem; }
  .service { padding-block: 2rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.2rem; }
  .bio .portrait { max-width: 260px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 0.4rem; margin-bottom: 1.75rem; }
  .service .rail .bignum { font-size: 3rem; }
  .wordmark .sub { display: none; }
}

@media print {
  .site-head, .btn-row, .todo { display: none; }
  body { font-size: 11pt; }
}

/* Speaking: photo + video side by side */
.gallery.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gallery.two .figure img { aspect-ratio: 16 / 9; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--rule); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.media-list { list-style: none; padding: 0; margin: 1rem 0 0; max-width: 44rem; }
.media-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.media-list li span { color: var(--ink-faint); font-size: 0.9rem; }

/* ==========================================================
   Visual depth (Oct 2026): dark hero, tinted sections,
   accent statement band, dark footer
   ========================================================== */
:root { --navy: #0a2233; --navy-2: #0e3550; --tint: #eef3f7; }

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    url("assets/hero-network.svg") right center / cover no-repeat,
    radial-gradient(ellipse at 85% 20%, rgba(31,120,180,.45), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-bottom: 0;
}
.hero h1 { color: #fff; }
.hero .lede { color: #c9d6e0; }
.hero .eyebrow { color: #8fc3e6; }
.hero .btn { background: #fff; color: var(--navy); border-color: #fff; }
.hero .btn:hover { background: #dcecf7; color: var(--navy); }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.hero + section { border-top: 0; }

.alt { background: var(--tint); }
.alt .card, .alt .service { background: transparent; }

.statement {
  background: linear-gradient(135deg, var(--accent) 0%, #0d5c88 100%);
  border-top: 0; border-bottom: 0;
}
.statement p { color: #fff; }
.statement .src { color: #a9d2ec; }

.site-foot { background: var(--navy); color: #8ea3b3; border-top: 0; }
.site-foot a { color: #dce7ef; }
.site-foot b { color: #fff; }

.card { border-top: 2px solid var(--accent); padding-top: 1.2rem; }
.hero + section { padding-top: clamp(2.75rem, 6vw, 4rem) !important; }

/* Own photography (Oct 2026) */
.hero.hero-photo {
  background:
    linear-gradient(90deg, rgba(10,34,51,.94) 0%, rgba(10,34,51,.82) 40%, rgba(10,34,51,.25) 75%, rgba(10,34,51,.1) 100%),
    url("assets/hero-birches.jpg") center 60% / cover no-repeat,
    var(--navy);
}
.split { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 3rem; align-items: center; }
.split-img { width: 100%; max-width: 380px; aspect-ratio: 4/5; object-fit: cover; justify-self: end; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split-img { justify-self: start; max-width: 100%; aspect-ratio: 16/10; }
  .hero.hero-photo { background:
    linear-gradient(180deg, rgba(10,34,51,.92) 0%, rgba(10,34,51,.8) 100%),
    url("assets/hero-birches.jpg") center / cover no-repeat, var(--navy); }
}

.hero.hero-photo.hero-about {
  background:
    linear-gradient(90deg, rgba(10,34,51,.94) 0%, rgba(10,34,51,.8) 40%, rgba(10,34,51,.3) 75%, rgba(10,34,51,.15) 100%),
    url("assets/hero-about.jpg") center 85% / cover no-repeat, var(--navy);
}
.hero.hero-photo.hero-contact {
  background:
    linear-gradient(90deg, rgba(10,34,51,.94) 0%, rgba(10,34,51,.8) 40%, rgba(10,34,51,.3) 75%, rgba(10,34,51,.15) 100%),
    url("assets/hero-contact.jpg") center 50% / cover no-repeat, var(--navy);
}
@media (max-width: 760px) {
  .hero.hero-photo.hero-about, .hero.hero-photo.hero-contact {
    background-image: linear-gradient(180deg, rgba(10,34,51,.9), rgba(10,34,51,.78)), var(--hero-img);
  }
  .hero-about { --hero-img: url("assets/hero-about.jpg"); }
  .hero-contact { --hero-img: url("assets/hero-contact.jpg"); }
}

.hero.hero-photo.hero-services {
  background:
    linear-gradient(90deg, rgba(10,34,51,.94) 0%, rgba(10,34,51,.8) 40%, rgba(10,34,51,.3) 75%, rgba(10,34,51,.1) 100%),
    url("assets/hero-services.jpg") right 55% / cover no-repeat, var(--navy);
}
@media (max-width: 760px) {
  .hero.hero-photo.hero-services { background-image: linear-gradient(180deg, rgba(10,34,51,.9), rgba(10,34,51,.78)), url("assets/hero-services.jpg"); }
}

.service .rail-sub { margin: 0.3rem 0 0; font-size: 0.9rem; color: var(--ink-faint); line-height: 1.4; }
