/* Start page: "the place carries it". A real place full-bleed, the headline split from the top edge to the bottom,
   the search as the one live thing; then the stadsplan close-up, the five groups as a row of pictures, the sources
   on a paper card, prices like a menu, questions beside a tall picture, and the back of a postcard.
   Five type steps: display, heading, lead, body, small. No lines, no shadows at rest. */
.home {
  --t-display: clamp(44px, min(8.2vw, 14vh), 150px); /* the height too: on a wide, low screen the second line went under the edge */
  --t-head: clamp(32px, 3.4vw, 50px);
  --t-lead: clamp(19px, 1.2vw + 12px, 22px);
  --t-body: 18px;
  --t-small: 16px;
  --m: clamp(16px, 2.4vw, 32px);
  --gap-sec: clamp(72px, 7vw, 120px); /* was up to 200 px: read as empty grey bands between sections (JP 9 Nov) */
  font-size: var(--t-body);
  background: var(--bg);
}
.home main { display: grid; gap: var(--gap-sec); }
.home img { height: auto; display: block; }
.home main > section { scroll-margin-top: 16px; }
.home h2 { font-size: var(--t-head); line-height: 1.02; letter-spacing: -0.02em; }
.home h3 { font-size: var(--t-lead); line-height: 1.2; }

/* The bar over the photograph */
.bar.on-photo { position: absolute; inset: 0 0 auto; background: transparent; padding: var(--m); z-index: 6; }
.bar.on-photo .wordmark, .bar.on-photo nav a, .bar.on-photo .menu-btn { color: #fff; }
.bar.on-photo .btn-small { background: #fff; color: #2f3a0c; } /* white button on the photo: light-mode ink in both themes */
@media (max-width: 760px) { .bar.on-photo.open nav { background: var(--ink); } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; color: #fff; overflow: hidden; isolation: isolate; }
.home .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; z-index: -2; animation: drift 24s var(--ease) both; }
/* Darker at the top (the menu and the lead) and the bottom (the headline), so the text reads on any part of the photo. */
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgb(20 24 16 / .66), rgb(20 24 16 / .58) 40%, rgb(20 24 16 / .5) 62%, rgb(20 24 16 / .72)); }
.hero h1 { grid-row: 2; max-width: none; margin: 0; padding: 0 var(--m) calc(var(--m) * .3); }
/* overflow: hidden is for the line rising in; the bottom padding keeps g and p's descenders inside it. */
.h-line { display: block; overflow: hidden; white-space: nowrap; font-family: var(--display); font-size: var(--t-display); line-height: .9; letter-spacing: -0.035em; padding-bottom: .34em; margin-bottom: -.16em; } /* Besley's g goes .27em below the baseline (measured): the clip leaves room for it, the margin keeps the lines where they were */
.h-line > span { display: inline-block; animation: lineUp .9s cubic-bezier(.16, 1, .3, 1) both; }
.h-1 { padding-left: 0; } /* only the left: the bottom padding keeps the g in "läget" */
.h-2 { padding-left: 20vw; margin-bottom: -.04em; } /* the last line keeps most of its room: the g in "visningen" clear of the photo's edge */
.h-2 > span { animation-delay: .11s; }
.hero-mid { grid-row: 1; align-self: center; position: relative; margin-top: 80px; margin-left: clamp(16px, 30vw, 520px); margin-right: var(--m); max-width: 680px; display: grid; gap: 16px; padding: 16px 0; animation: heroIn .3s var(--ease) both; } /* no delay: the search is the page's one action */
.hero-pitch { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 1.1rem + 1.1vw, 34px); line-height: 1.15; letter-spacing: -0.015em; max-width: 32ch; text-wrap: balance; }
.hero-lead { font-size: var(--t-lead); line-height: 1.45; max-width: 44ch; }
.hero .search { max-width: 640px; gap: 10px; margin-top: 6px; }
/* The page's one action, in the profile's own colours (docs/brand.md): a bone frame on the photo, the olive button inside
   it. Light values on purpose: the photo is the same in dark mode. Yellow is the "Titta närmare" signal, never a button. */
.hero .search-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 6px; background: #f6f5f1; }
.hero .search-row input { border: 0; height: 64px; font-size: var(--t-lead); background: #f6f5f1; color: #2f3a0c; padding: 0 16px; }
.hero .search-row input:focus-visible { outline: 3px solid #38450f; outline-offset: -3px; }
.hero .search-row input::placeholder { color: #535d34; }
.hero .search-row .btn { height: 64px; padding: 0 28px; font-size: var(--t-lead); font-weight: 700; background: #38450f; color: #ecebe7; border: 0; }
.hero .search-row .btn:hover { background: #2c360b; }
.hero .hint { color: rgb(255 255 255 / .9); font-size: .875rem; margin-top: -2px; }
.hero .err:empty { display: none; }
/* Street suggestions under the search (site/assets/suggest.js): the same bone and olive as the frame. */
.hero .search { position: relative; }
.adr-list { position: absolute; left: 0; right: 0; z-index: 6; margin: 0; padding: 0 6px 6px; list-style: none; background: #f6f5f1; color: #2f3a0c; }
.adr-list[hidden] { display: none; }
.adr-list li { display: grid; gap: 1px; padding: 10px 14px; cursor: pointer; border-top: 1px solid #e2e0d9; }
.adr-list li[aria-selected="true"], .adr-list li:hover { background: #e2e0d9; }
.adr-list b { font-weight: 600; }
.adr-list span { font-size: .875rem; color: #535d34; }
/* 3: the error eases in instead of pushing the line under it in one jump. Calm, no shake (docs/brand.md). */
.hero .err:not(:empty) { animation: errIn .16s var(--ease) both; }
/* 1: while the preview is fetched (a few seconds), a line runs along the bottom of the frame and the line under the
   search says what is being checked. It doesn't count steps it can't see. */
.hero .search-row { position: relative; overflow: hidden; }
.hero .search-row::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40%; height: 3px; background: #38450f; opacity: 0; transform: translateX(-100%); transition: opacity .2s var(--ease); pointer-events: none; }
.hero .search[aria-busy="true"] .search-row::after { opacity: 1; animation: busyRun 1.4s cubic-bezier(.65, 0, .35, 1) infinite; }
.hero .hint { display: grid; }
.hero .hint > span { grid-area: 1 / 1; transition: opacity .2s var(--ease); }
.hero .hint-busy { opacity: 0; }
.hero .search[aria-busy="true"] .hint-idle { opacity: 0; }
.hero .search[aria-busy="true"] .hint-busy { opacity: 1; }
.hero .err, .offer .err { color: #ffd98a; }
@media (max-width: 760px) {
  .h-line { font-size: 10.6vw; }
  .h-2 { padding-left: 0; }
  .hero-mid { margin-left: var(--m); padding: 24px 0; }
  .hero .search-row { grid-template-columns: 1fr; }
}

/* Preview: a paper field after the search */
.preview { background: var(--paper); padding: clamp(48px, 7vw, 96px) var(--m); margin-top: calc(var(--gap-sec) * -1); }
.preview[hidden] { display: none; }
.preview-in { max-width: 1240px; margin: 0 auto; display: grid; gap: 32px; }
.preview-head { display: grid; gap: 10px; max-width: 48ch; }
.preview-head h2 { font-size: var(--t-head); }
#preview-sub { color: var(--ink); font-size: var(--t-lead); }
.tally { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.tally p { padding: 20px; font-size: var(--t-body); }
.tally .n { font-size: clamp(40px, 4vw, 56px); }
.preview-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6px; align-items: stretch; }
@media (max-width: 900px) { .preview-split { grid-template-columns: 1fr; } }
.top { border: 0; background: var(--warn-bg); color: var(--ink); padding: clamp(24px, 3vw, 40px); align-content: start; gap: 16px; }
.top h3 { font-size: var(--t-lead); }
.top li b { font-size: var(--t-body); }
.top .small { font-size: var(--t-small); }
.offer { padding: clamp(24px, 3vw, 44px); }
.offer h3 { font-size: var(--t-head); }
@media (max-width: 600px) { .offer h3 { font-size: 26px; } }
.offer-body { gap: 20px; }
.proof-quote { margin: 0; background: color-mix(in srgb, var(--field) 80%, var(--field-ink)); padding: 18px 20px; display: grid; gap: 8px; }
.proof-quote blockquote { margin: 0; font-size: var(--t-body); line-height: 1.5; }
.proof-quote figcaption { font-size: var(--t-small); color: var(--field-ink); }
.proof-quote a { color: var(--field-ink); }
.consent { font-size: var(--t-small); color: var(--field-muted); }
.pay { font-size: var(--t-small); color: var(--field-muted); }
.all-points { display: grid; gap: 14px; }
.all-points > h3 { font-size: var(--t-lead); }
.all-points .r-groups { display: grid; gap: 6px; }
details.group { background: var(--bg); border: 0; padding: 0 20px; }
details.group > summary { padding: 18px 40px 18px 0; }
details.group > summary b { font-size: var(--t-lead); font-family: var(--display); }
details.group > summary span { font-size: var(--t-small); color: var(--ink); }
details.group > .rows { gap: 6px; padding-bottom: 20px; }
.home .row { background: var(--paper); border-bottom: 0; padding: 14px 16px; }
.home .row h4 { font-size: var(--t-body); }
.home .signal { font-size: var(--t-body); }
.home .lock { font-size: var(--t-small); }

/* The stadsplan close-up with the story card */
/* Straight after the hero (or the preview): two full-width pictures with the page's section gap between them read as an
   empty grey band. */
.plan-story { margin-top: calc(var(--gap-sec) * -1); position: relative; min-height: 100svh; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; padding: 0 var(--m); overflow: hidden; }
.home .plan-story > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 30%; }
.plan-card { position: relative; grid-column: 2 / span 2; max-width: 560px; min-height: 52svh; background: var(--ink); color: var(--paper); padding: clamp(28px, 3vw, 44px); display: grid; gap: 18px; align-content: center; }
.plan-card h2 { color: var(--paper); }
.plan-card p { font-size: var(--t-body); line-height: 1.55; }
.plan-card b { font-family: var(--display); font-size: var(--t-lead); }
.plan-card .plan-more { font-size: var(--step-small); opacity: .85; }
.plan-card .plan-more a { color: inherit; font-weight: 600; }
.btn-light { background: var(--paper); color: var(--ink); justify-self: start; }
.btn-light:hover { background: color-mix(in srgb, var(--paper) 85%, var(--ink)); }
@media (max-width: 900px) {
  .plan-story { display: block; min-height: 0; padding: 0; }
  .home .plan-story > img { position: static; height: 60svh; }
  .plan-card { min-width: 0; min-height: 0; margin: -18svh var(--m) 0; }
}

/* Five groups as a row of pictures */
.moments-row { display: grid; gap: 24px; }
.row-top { display: flex; justify-content: flex-start; align-items: end; gap: 48px; padding: 0 var(--m); flex-wrap: wrap; }
.row-top > div:first-child { display: grid; gap: 14px; max-width: 52ch; }
.row-top p { font-size: var(--t-lead); line-height: 1.45; }
.row-btns { display: flex; gap: 6px; }
.sq { width: 52px; height: 52px; border: 0; background: var(--ink); color: var(--paper); font-size: 22px; cursor: pointer; transition: transform .15s var(--ease), background-color .15s; }
.sq:hover { background: var(--accent); } .sq:active { transform: scale(.94); }
.row-track { height: 6px; background: var(--surface-2); margin: 0 var(--m); }
.row-track i { display: block; height: 100%; width: 20%; background: var(--ink); transition: width .2s linear; }
.row-cols { gap: 24px !important; list-style: none; margin: 0; padding: 0 var(--m) 8px; padding-inline: var(--m); scroll-padding-inline: var(--m); display: flex; gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.row-cols::-webkit-scrollbar { display: none; }
.row-cols li { flex: 1 1 0; min-width: 210px; scroll-snap-align: start; display: flex; flex-direction: column; }
.row-cols b { font-size: var(--t-body); font-weight: 600; }
.row-cols span { font-size: var(--t-small); line-height: 1.5; margin: 8px 0 24px; }
.row-cols img { margin-top: auto; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.row-cols .btn { align-self: start; }
.row-cols .col-moments { border-top: 6px solid var(--warn-mid); padding-top: 18px; }
@media (max-width: 760px) {
  .row-btns { display: none; }
  .row-cols { gap: 16px; }
  .row-cols li { flex-basis: 72vw; }
}

/* Sources on a paper card, cut by the section edge */
.sources-card { background: var(--field); overflow: hidden; display: grid; justify-items: center; padding-top: clamp(56px, 7vw, 96px); }
.card-paper { width: min(56vw, 760px); margin-bottom: -48px; background: var(--paper); transform: rotate(-1.5deg); padding: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) calc(clamp(28px, 4vw, 56px) + 48px); display: grid; gap: 28px; align-content: start; text-align: center; }
.card-paper img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-paper .names { font-size: var(--t-lead); line-height: 1.7; text-wrap: balance; }
.card-paper .card-foot { font-size: var(--t-small); max-width: 46ch; justify-self: center; }
@media (max-width: 760px) { .card-paper { width: 92%; transform: rotate(-1deg); } }

/* Prices like a menu */
.price { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px var(--m); padding: 0 var(--m); }
.price-left { grid-column: 1 / span 3; display: grid; gap: 28px; align-content: start; }
.price-left img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.price-list { grid-column: 5 / span 8; display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
.price-group { display: grid; gap: 8px; align-content: start; }
.price-group h3 { margin-bottom: 18px; }
.item { display: flex; justify-content: space-between; gap: 16px; font-size: var(--t-body); font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 14px; }
.desc { font-size: var(--t-small); max-width: 36ch; }
.home .ex-list { gap: 6px; }
.home .ex-list a { border: 0; background: var(--paper); padding: 16px 18px; display: grid; gap: 6px; text-decoration: none; transition: background-color .15s, transform .15s var(--ease); }
.home .ex-list a:hover { background: var(--surface); } .home .ex-list a:active { transform: scale(.99); }
.home .ex-list strong { font-family: var(--text); font-size: var(--t-body); font-weight: 600; letter-spacing: 0; }
.home .ex-sub { font-size: var(--t-small); color: var(--ink); }
@media (max-width: 900px) {
  .price-left { grid-column: 1 / -1; } .price-left img { width: 60%; }
  .price-list { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 40px; }
}

/* Questions beside a tall picture */
.faq-split { background: var(--surface); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--m); padding: 0 var(--m) 80px; }
.faq-left { grid-column: 1 / span 5; display: grid; gap: 28px; align-content: start; padding-top: clamp(56px, 7vw, 96px); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: var(--t-body); }
.home .faq { gap: 0; margin: 0; }
.home .faq details { border: 0; background: none; }
.home .faq summary { padding: 14px 40px 14px 0; font-size: var(--t-body); }
.home .faq summary:hover { text-decoration: none; color: var(--accent); }
.home .faq details > div { padding: 0 0 18px; font-size: var(--t-body); max-width: 60ch; }
.faq-act { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.faq-pics { grid-column: 7 / span 6; position: relative; }
.faq-pics .tall { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-top: -40px; display: block; }
.faq-pics .sq-pic { position: absolute; left: -40px; bottom: -40px; width: 34%; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 900px) {
  .faq-split { grid-template-columns: 1fr; padding-top: 0; }
  .faq-pics { grid-column: 1; order: -1; margin: 0 calc(var(--m) * -1); }
  .faq-pics .tall { aspect-ratio: 4 / 5; margin-top: 0; }
  .faq-pics .sq-pic { left: auto; right: var(--m); bottom: -32px; width: 38%; }
  .faq-left { grid-column: 1; padding-top: 64px; }
}

/* The back of a postcard */
.postcard { background: var(--field); padding: 96px var(--m) 64px; }
.pc { position: relative; max-width: 1180px; margin: 0 auto; background: var(--paper); color: var(--ink); padding: 72px clamp(24px, 5vw, 64px) 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 64px;
}
.pc::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 25px; background: var(--field);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='25'%3E%3Ccircle cx='25' cy='0' r='25'/%3E%3C/svg%3E") 0 0 / 50px 25px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='25'%3E%3Ccircle cx='25' cy='0' r='25'/%3E%3C/svg%3E") 0 0 / 50px 25px repeat-x; }
.pc-left { display: grid; gap: 16px; align-content: start; }
.pc-left p { font-size: var(--t-body); max-width: 40ch; }
.pc-right { position: relative; padding-right: 110px; }
.pc-right ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: var(--t-body); }
.stamp { position: absolute; top: 0; right: 0; width: 88px; aspect-ratio: 3 / 4; object-fit: cover; outline: 6px solid var(--paper); outline-offset: -6px; padding: 6px; background: var(--surface); }
.imprint { grid-column: 1 / -1; font-size: .75rem; line-height: 1.5; color: var(--muted); text-align: center; max-width: 80ch; justify-self: center; }
.imprint a { color: inherit; }
@media (max-width: 760px) {
  .pc { grid-template-columns: 1fr; }
  .pc-right { padding-right: 80px; } .stamp { width: 64px; }
}

.home main p, .postcard p:not(.imprint) { max-width: 68ch; }
@media (min-width: 1300px) { .row-btns, .row-track { display: none; } }

/* Motion */
@keyframes lineUp { from { transform: translateY(105%); } }
@keyframes heroIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes errIn { from { opacity: 0; transform: translateY(-4px); } }
@keyframes busyRun { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.btn, .sq, .ex-list a { transition: transform .15s var(--ease), background-color .15s; }
.btn:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .h-line > span, .hero-mid, .hero-img, .hero .err:not(:empty) { animation: none; }
  .hero .search[aria-busy="true"] .search-row::after { animation: none; transform: none; width: 100%; opacity: .5; }
}
