/*
 * What the Nytakt family shares on top of Vakna's site.css: the menu that is the same on every
 * start page (nytakt.se, Vakna, Lyssna, Dokumentera), the footer with four columns, and the parts a
 * product's start page is built from. Same tokens, same fonts, same square cards and pastel bands.
 */

/*
 * Header: the site's own logo, the family menu, and on a product's pages its one action. The menu
 * is the same list in the same order everywhere (family/nav.html); only the logo and the action
 * are the site's own.
 */
.family-header { flex-wrap: wrap; gap: 0 24px; }
/* No action block (nytakt.se: nobody signs in there), so the row keeps its side padding. */
.family-header--plain { padding-inline-end: 16px; }
.family-nav { display: flex; align-items: center; margin-inline-start: auto; }
.family-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 4px; margin: 0; padding: 0; }
.family-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 4px 12px 0; border-bottom: 4px solid transparent; color: var(--ink); font-weight: 700; text-decoration: none; }
.family-nav a:hover { color: var(--primary-hover); text-decoration: underline; }
/* --sun is a line here, not text. */
.family-nav a[aria-current="page"] { border-bottom-color: var(--sun); }
/* The other language: last in the menu, set apart from the products, and lighter than them. */
.family-nav__lang { margin-inline-start: 8px; padding-inline-start: 8px; border-inline-start: 1px solid var(--line-strong); }
.family-nav .family-nav__lang a { font-weight: 400; }
.family-header .site-header__action { min-height: 72px; }

/* The footer has four columns: about, the family, the site's own links, and the legal pages. */
@media (min-width: 861px) {
  .family-footer { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px 36px; }
}
/* One hero colour per product: the colour the product has in the suite. */
.hero--vakna { background: var(--band-1); }
.hero--lyssna { background: var(--band-3); }
.hero--signera { background: var(--band-2); }
.hero--dokumentera { background: var(--band-4); }
.hero__kind { margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 0 0 8px; }
.hero__actions .button--quiet { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.hero__actions .button--quiet:hover { color: var(--primary-hover); border-color: var(--primary-hover); text-decoration: underline; }
.button--primary:hover { text-decoration: underline; }

/* The start page has four cards, one for each product. */
.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card .card__kind { flex: none; margin: 0 0 4px; color: var(--muted); font-size: 0.9688rem; font-weight: 700; }
.card .card__kind + h2 { margin-top: 0; }

/* Cards further down a page, with nothing to overlap: the products this one belongs with. */
.cards--flat { margin-top: 0; }
.card h3 { font-size: 1.375rem; margin-bottom: 10px; }

.section__lead { max-width: 760px; margin: -4px 0 24px; color: var(--ink); }

/* The story: numbered steps, one under the other, in a white card. */
.story { list-style: none; counter-reset: step; margin: 0; padding: 4px 24px; background: var(--surface); border: 1px solid var(--line); }
.story li { counter-increment: step; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 20px; padding-block: 22px; border-top: 1px solid var(--line); }
.story li:first-child { border-top: 0; }
.story li::before { content: counter(step); grid-row: 1 / span 3; width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; line-height: 1; color: var(--ink); }
.story h3 { grid-column: 2; margin: 0; }
.story p { grid-column: 2; margin: 0; max-width: 72ch; }
.story .story__where { color: var(--muted); font-size: 0.9688rem; }
.story__note { max-width: 760px; margin: 16px 0 0; }

/* A plain note under a section, for what is not finished or not switched on. */
.note { max-width: 800px; margin: 20px 0 0; padding: 14px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ink); }
.note p { margin: 0; }

/* Narrower than the logo, the menu and the action side by side: the menu gets a row of its own. */
@media (max-width: 1080px) {
  .family-nav { order: 3; flex-basis: 100%; margin-inline-start: 0; border-top: 1px solid var(--line); }
  .family-header .family-nav { margin-inline-end: 16px; }
  .family-header--plain .family-nav { margin-inline-end: 0; }
  /* The first link of every row lines up with the logo. */
  .family-nav ul { margin-inline-start: -12px; }
}
@media (max-width: 1100px) {
  .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .cards--4 { grid-template-columns: 1fr; }
  .family-nav__lang { margin-inline-start: 0; padding-inline-start: 0; border-inline-start: 0; }
  .family-nav a { padding-inline: 8px; }
  .family-nav ul { margin-inline-start: -8px; }
}
@media (max-width: 480px) {
  /* A long name (Dokumentera) and the action still share the first row. */
  .family-header { gap: 0 12px; }
  .family-header .brand__logo { height: 30px; }
  .family-header .site-header__action { padding-inline: 18px; }
  .story { padding-inline: 16px; }
  .story li { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; }
  .story li::before { width: 40px; height: 40px; font-size: 1.125rem; }
}
