/* bästhemma.se. Image-led: big room scenes, one typeface, pine green as the only accent. */
:root {
  --paper: #ffffff;
  --ink: #1e2420;
  --mute: #646b66;
  --line: #e4e1da;
  --linen: #efece6;
  --pine: #2f4a3f;
  --text: 680px;
  --wide: 1100px;
  --gutter: 20px;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--font);
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(36px, 5.2vw, 64px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
figure { margin: 0; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 10; }
.masthead__inner { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 40px; height: 64px; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -0.04em; text-decoration: none; white-space: nowrap; margin: 0; }
.mainnav { display: flex; gap: 24px; min-width: 0; overflow-x: auto; scrollbar-width: none; font-size: 16px; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { text-decoration: none; white-space: nowrap; padding: 20px 0; border-bottom: 2px solid transparent; }
.mainnav a:hover { border-bottom-color: var(--ink); }

/* Article */
.article__head { max-width: var(--wide); margin: 0 auto; padding: 40px var(--gutter) 32px; }
.crumbs { font-size: 15px; color: var(--mute); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.article__head h1 { max-width: 15em; }
.article__meta { color: var(--mute); font-size: 15px; margin: 20px 0 0; }
.article__ad { color: var(--mute); font-size: 13px; margin: 4px 0 0; }
.hero { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.hero img { width: 100%; }
.article__body { max-width: calc(var(--text) + 2 * var(--gutter)); margin: 0 auto; padding: 48px var(--gutter) 0; }
.article__body > p:first-child { font-size: 22px; line-height: 1.5; }
.article__body p, .article__body ul, .article__body ol { margin: 0 0 1.1em; }
.article__body ul, .article__body ol { padding-left: 1.2em; }
.article__body li { margin-bottom: 0.5em; }
.article__body h2 { margin: 2.6em 0 0.6em; }
.article__body section > h2 { margin-top: 2.4em; }

.table-of-contents { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 20px 0 16px; margin: 40px 0; }
.table-of-contents strong { display: block; font-size: 15px; margin-bottom: 8px; }
.table-of-contents ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.table-of-contents li { margin: 0; break-inside: avoid; }
.table-of-contents a { display: block; padding: 6px 0; text-decoration: none; }
.table-of-contents a:hover { text-decoration: underline; }

/* A room scene breaks out of the text column */
.scene { --w: min(var(--wide), 100vw - 2 * var(--gutter)); width: var(--w); margin: 32px 0 48px calc((100% - var(--w)) / 2); }
.scene img { width: 100%; }

/* Products: the build-html listicle (big image, numbered paragraph, CTA). Shop photos on white sit on linen. */
.article__body section a:has(> img) { display: block; background: var(--linen); padding: clamp(16px, 4vw, 40px); margin: 40px 0 16px; }
.article__body section a > img { mix-blend-mode: multiply; margin: 0 auto; max-height: 560px; width: auto; }
.article__body section p strong:first-child { font-weight: 700; color: var(--pine); }
.article__body section p a { color: var(--pine); font-weight: 600; text-underline-offset: 3px; }
.article__body section p a:hover { text-decoration-thickness: 2px; }
.clickableProduct + .clickableProduct { border-top: 0; }

.schema-faq { border-top: 1px solid var(--ink); margin-top: 24px; }
.schema-faq-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.schema-faq-question { display: block; font-size: 20px; letter-spacing: -0.01em; margin-bottom: 8px; }
.schema-faq-answer { margin: 0 !important; }

.article__more { max-width: calc(var(--text) + 2 * var(--gutter)); margin: 48px auto 0; padding: 0 var(--gutter); font-weight: 600; }
.article__more a { color: var(--pine); text-underline-offset: 3px; }

/* Cards (guides) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px 24px; }
.card { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.card__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__title { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.card:hover .card__title { text-decoration: underline; text-underline-offset: 3px; }
.card--text { background: var(--linen); aspect-ratio: 3 / 2; padding: 24px; justify-content: flex-end; }
.more-guides, .guides, .popular, .index { max-width: 1320px; margin: 0 auto; padding: 96px var(--gutter) 0; }
.more-guides h2, .guides h2, .popular h2 { margin-bottom: 32px; }

/* Guides page */
.guides--page h1 { margin-bottom: 16px; }
.guides__lede { font-size: 20px; color: var(--mute); max-width: 36em; margin: 0 0 48px; }

/* Home */
.home-hero { position: relative; }
.home-hero__img img { width: 100%; height: clamp(420px, 60vh, 700px); object-fit: cover; object-position: 70% 60%; }
/* A soft light veil over the left of the scene lifts the contrast where the headline sits; the room stays visible. */
.home-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.74) 28%, rgba(255, 255, 255, 0.35) 46%, rgba(255, 255, 255, 0) 62%); }
.home-hero__text { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); left: max(var(--gutter), (100vw - 1320px) / 2 + var(--gutter)); width: min(36vw, 540px); }
.home-hero__text h1 { font-size: clamp(30px, 3.2vw, 50px); max-width: 11em; }
.home-hero__text p { margin: 18px 0 0; font-size: 18px; color: #3b423d; max-width: 30em; }
.home-hero__text .home-hero__from { font-size: 16px; color: var(--ink); margin-top: 24px; }
.home-hero__from a { color: var(--pine); font-weight: 600; text-underline-offset: 4px; }
.t-home .index { padding-top: 56px; }

/* The index: what you can furnish, set large, with the live number of products. */
.index h2 { font-size: 18px; letter-spacing: 0; font-weight: 600; color: var(--mute); margin-bottom: 16px; }
.index__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 0.45em; font-size: clamp(36px, 6vw, 84px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.12; }
.index__list a { text-decoration: none; }
.index__list a:hover { color: var(--pine); text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
.index__n { font-size: 0.22em; font-weight: 500; letter-spacing: 0; color: var(--mute); vertical-align: 2.6em; margin-left: 0.25em; font-variant-numeric: tabular-nums; }

.popular__cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px 24px; }
.popular h3 { font-size: 18px; margin-bottom: 8px; }
.popular h3 a { text-decoration: none; }
.popular ul { list-style: none; margin: 0; padding: 0; }
.popular li a { display: block; padding: 4px 0; color: var(--mute); text-decoration: none; }
.popular li a:hover { color: var(--ink); text-decoration: underline; }

.notfound { max-width: var(--text); margin: 0 auto; padding: 96px var(--gutter); }
.notfound p { margin-top: 16px; }

/* Footer */
.footer { margin-top: 120px; background: var(--linen); }
.footer__inner { max-width: 1320px; margin: 0 auto; padding: 56px var(--gutter); display: grid; grid-template-columns: 1fr 2fr; gap: 24px 48px; font-size: 16px; color: var(--mute); }
.footer .wordmark { color: var(--ink); }
.footer p { margin: 0; max-width: 36em; }
.footer nav { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer nav a { color: var(--ink); text-decoration: none; }
.footer nav a:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  .home-hero::after { display: none; }
  .home-hero__img img { height: clamp(240px, 42vh, 460px); object-position: 78% 60%; }
  .home-hero__text { position: static; transform: none; width: auto; max-width: 640px; padding: 24px var(--gutter) 0; }
  .home-hero__text p { font-size: 17px; margin-top: 12px; }
  .home-hero__text .home-hero__from { margin-top: 16px; }
  .t-home .index { padding-top: 40px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .masthead__inner { gap: 20px; height: 56px; }
  .mainnav a { padding: 16px 0; }
  .article__head { padding-top: 24px; }
  .article__body > p:first-child { font-size: 19px; }
  .table-of-contents ul { columns: 1; }
  .more-guides, .guides, .popular, .index { padding-top: 64px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer nav { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
