/* aednan.se — layout, rytm och rörelse ovanpå designsystemet
   (designsystem/css/aednan-core.css + aednan-theme.css). Inga egna färger
   här utöver tokens; en varumärkessida sätter --brand, --brand-text och
   --on-brand på <body> (App\Libraries\Aednan\AednanSite::brandStyle). */

:root {
  --pad: clamp(1rem, 5vw, 3.5rem);
  --brand: var(--accent);
  --brand-text: var(--accent);
  --brand-large: var(--accent);
  --on-brand: var(--on-accent);
}

html { -webkit-text-size-adjust: 100%; }
body { font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
a:hover { color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: var(--radius); }

.wrap { max-width: 72rem; padding: 0 var(--pad); }
.eyebrow { margin: 0; color: var(--accent-2); }

.skip { position: absolute; left: -999px; top: 0; padding: .6rem 1rem; background: var(--ink); color: var(--bg); z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- topp ---------- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  flex-wrap: wrap;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.top-nav { display: flex; gap: .4rem 1.4rem; flex-wrap: wrap; }
.top-nav a {
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.top-nav a:hover { color: var(--ink); border-color: var(--border-strong); }
.top-nav a[aria-current="page"] { color: var(--ink); border-color: var(--brand); }

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

.hero {
  padding-top: clamp(4rem, 14vw, 9.5rem);
  padding-bottom: clamp(4rem, 12vw, 8.5rem);
}
.hero--small { padding-bottom: clamp(5rem, 14vw, 10rem); }
.hero h1, .brand-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 6.2vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -.012em;
  max-width: 21ch;
  margin: 0;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.lede {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--body);
}
.lede strong { color: var(--ink); font-weight: 600; }

/* ---------- verksamheter ---------- */

.register-head {
  padding: 0 var(--pad) 1rem;
  margin-inline: calc(var(--pad) * -1);
  border-bottom: 1px solid var(--border);
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr) auto;
  gap: .5rem clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1.75rem, 4vw, 2.6rem) var(--pad);
  margin-inline: calc(var(--pad) * -1);
  border-bottom: 1px solid var(--border);
  transition: background .25s ease;
}
.row--live:hover { background: var(--row-hover); }

.kind {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .95rem;
  transition: color .25s ease;
}
/* Bolagets egen färg som en prick bredvid etiketten — aldrig en kant. */
.kind::before {
  content: "";
  flex: none;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--dot, var(--accent));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}
.row--soon .kind::before { opacity: .55; }
.row--live:hover .kind { color: var(--ink); }

.what h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 0;
}
.what h3 a { text-decoration: none; transition: color .25s ease; }
.what h3 a::after { content: ""; position: absolute; inset: 0; }
.row--live:hover .what h3 a { color: var(--accent-2); }
.what p {
  margin: .7rem 0 0;
  max-width: 46ch;
  color: var(--muted-2);
  transition: color .25s ease;
}
.row--live:hover .what p { color: var(--body); }
.row--soon .what h3 { color: var(--ink-soft); }
.more {
  display: inline-block;
  margin-top: 1rem;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.more .arrow { display: inline-block; transition: transform .25s ease; }
.row--live:hover .more .arrow { transform: translateX(4px); }

.links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  padding-top: .9rem;
}
.dom {
  font-size: .76rem;
  letter-spacing: .1em;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none;
  transition: color .25s ease;
}
a.dom:hover { color: var(--link); }
.dom .arrow { display: inline-block; transition: transform .25s ease; }
a.dom:hover .arrow { transform: translate(3px, -3px); }

.social {
  position: relative;
  z-index: 1;
  display: flex;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.social a {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--muted);
  transition: color .2s, background .2s, border-color .2s;
}
.social a:hover { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.social svg { width: 1rem; height: 1rem; display: block; }

/* ---------- vi som driver ---------- */

.people { padding-top: clamp(5rem, 14vw, 9rem); }
.people-grid {
  list-style: none;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2rem);
}
/* Tre per rad på desktop, två på en platta, en på telefon (Peder, 2026-11-10). */
@media (min-width: 30rem) { .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 52rem) { .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.person-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 723;
  object-fit: cover;
  background: var(--surface);
  border-radius: var(--radius);
}
.person h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 1rem 0 .2rem;
}
.person-role {
  margin: 0 0 .6rem;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.person-bio { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--body); }

/* ---------- kontakt ---------- */

.contact { padding: clamp(5rem, 14vw, 10rem) 0 clamp(3rem, 8vw, 5rem); }
.contact h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin: 1.1rem 0 0;
}
.contact p { margin: 1rem 0 0; max-width: 40ch; color: var(--body); }
.mail {
  display: inline-block;
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.8vw, 1.65rem);
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  transition: color .2s, border-color .2s;
}
.mail:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* ---------- varumärkessida ---------- */

.brand-hero {
  padding-top: clamp(3rem, 10vw, 6.5rem);
  padding-bottom: clamp(3.5rem, 10vw, 6.5rem);
}
.crumb { margin: 0 0 clamp(2.5rem, 7vw, 4rem); font-size: .78rem; letter-spacing: .08em; color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.brand-logo { display: block; height: clamp(2.6rem, 6vw, 3.6rem); width: auto; max-width: 70vw; }
.brand-kind {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 1rem;
  font-size: .76rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-text);
}
.brand-hero h1 em { font-style: italic; color: var(--brand-large); }
.brand-actions {
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  margin-top: clamp(2rem, 5vw, 2.75rem);
}
.btn-brand {
  display: inline-block;
  padding: .85rem 1.4rem;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--font-ui);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: filter .2s;
}
.btn-brand:hover { color: var(--on-brand); filter: brightness(1.1); }

/* tre delar */
.pillars { padding: clamp(3rem, 8vw, 5rem) 0; border-top: 1px solid var(--border); }
.pillar-grid {
  list-style: none;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(2rem, 4vw, 3rem);
}
.pillar-num { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--brand-text); }
.pillar h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  line-height: 1.15;
  margin: .4rem 0 .7rem;
}
.pillar p { margin: 0; color: var(--body); font-size: 1rem; }

/* listor */
.listing { padding: clamp(3rem, 8vw, 5rem) 0 0; }
.listing-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.listing-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  line-height: 1.1;
  margin: 0;
}
.listing-more { font-size: .8rem; letter-spacing: .08em; color: var(--muted); text-decoration: none; white-space: nowrap; }
.listing-more:hover { color: var(--link); }
.listing-intro { margin: 1.25rem 0 .5rem; max-width: 52ch; color: var(--body); font-size: 1rem; }
.listing-empty { margin: 1.5rem 0 0; color: var(--muted); font-size: 1rem; }
.listing-empty a { color: var(--link); }

.items { list-style: none; margin: 0; padding: 0; }
.item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: 1rem clamp(1rem, 3vw, 2rem);
  align-items: start;
  padding: 1.35rem var(--pad);
  margin-inline: calc(var(--pad) * -1);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background .2s ease;
}
.item:hover { background: var(--row-hover); color: inherit; }
.item-date { display: flex; flex-direction: column; line-height: 1; padding-top: .15rem; }
.item-day { font-family: var(--font-display); font-size: 2rem; color: var(--ink); }
.item-month { margin-top: .35rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-text); line-height: 1.3; }
.item-body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.item-title { font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.2; color: var(--ink); }
.item-text { color: var(--body); font-size: .95rem; }
.item-meta { color: var(--muted); font-size: .85rem; }
.item-aside { display: flex; align-items: center; gap: 1rem; padding-top: .3rem; }
.item-tag {
  font-size: .72rem;
  letter-spacing: .06em;
  padding: .3rem .7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  white-space: nowrap;
}
.item-arrow { color: var(--muted); transition: transform .2s ease, color .2s ease; }
.item:hover .item-arrow { color: var(--brand-text); transform: translate(3px, -3px); }

/* bakgrund */
.story {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
  gap: 1rem clamp(1.25rem, 3vw, 2.5rem);
  margin-top: clamp(4rem, 10vw, 7rem);
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--border);
}
.story-body p { margin: 0 0 1rem; max-width: 60ch; color: var(--body); }
.story-links { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.story-links a { color: var(--link); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.story-links a:hover { color: var(--ink); }

/* ---------- sidfot ---------- */

.foot { background: var(--deep); color: var(--muted); }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  padding-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 3.5rem);
}
.foot-mark { font-size: 1.35rem; }
.foot-brands, .foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.foot a { text-decoration: none; transition: color .2s ease; }
.foot a:hover { color: var(--ink); }

/* ---------- rörelse ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.hero > *, .brand-hero > *, .register-head, .row { animation: rise .85s cubic-bezier(.2,.7,.2,1) both; }
.hero h1, .brand-hero .brand-logo { animation-delay: .08s; }
.hero .lede, .brand-hero .brand-kind { animation-delay: .2s; }
.brand-hero h1 { animation-delay: .28s; }
.brand-hero .lede { animation-delay: .36s; }
.brand-hero .brand-actions { animation-delay: .44s; }
.register-head { animation-delay: .38s; }
.row:nth-of-type(1) { animation-delay: .46s; }
.row:nth-of-type(2) { animation-delay: .54s; }
.row:nth-of-type(3) { animation-delay: .62s; }
.row:nth-of-type(4) { animation-delay: .70s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 46rem) {
  .row { grid-template-columns: 1fr; gap: 0; }
  .kind { padding-top: 0; padding-bottom: .6rem; }
  .links { align-items: flex-start; padding-top: 1.3rem; gap: 1.1rem; }
  .item { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .item-aside { grid-column: 2; padding-top: 0; justify-content: space-between; }
  .item-day { font-size: 1.6rem; }
  .story { grid-template-columns: 1fr; }
}
