/*
 * Fixes on top of /site/a.css, which stays byte-for-byte what the generator emitted.
 * Each rule names the defect it corrects. Keep this file short; a growing list means the design
 * itself should change.
 */

/* 2026-09-27. Phone header over the home hero: the menu icon is the `≡` glyph drawn in
 * .burger::before, coloured by the button's own `color` (#1b2a20). The older rule that turns the
 * icon white over the hero (`.ov .hdr .burger span`) colours three spans that no longer render,
 * so the icon was dark green on the dark hero: an empty square with only its border visible.
 * White while the header is transparent; the solid header keeps the dark icon. */
.ov:not(.hdr-solid) .hdr .burger { color: #fff; }
/* Between 561px and 900px the button shows the WORD "Valikko" (span.vh) instead of the glyph, and
 * the same old rule painted that span's background white. It read as dark text in a white box;
 * with the white icon colour above it became white on white, a blank block (measured 27.9 at 720px,
 * which is 200 % zoom on a laptop). The label gets no background: white over the hero, dark on the
 * solid header. */
.ov .hdr .burger span.vh { background: transparent; }

/* The 25.9 "lighter" request lives in /site/vaalea.css. */

/* 2026-09-27. Header at browser zoom (Juha: their customers browse zoomed in). Between the phone
 * layout (burger, up to 900px) and a wide desktop, the header ran off the right edge and
 * "Pyydä tarjous" was cut or hidden: 920-1000px in the approved build, and 920-1140px with the
 * client's own logo, which is wider than the redesigned mark. 960px is 150 % zoom on a laptop.
 * "Pyydä tarjous" is now the only quote button, so it must always fit: at these widths the
 * "Oma asiointi" button leaves the header (Huoneistotieto stays linked in the footer) and the
 * gaps tighten. */
/* Measured 27.9 with the client's logo and the "Lomakkeet" menu item: at 920px the header needed
 * ~920px of content in 846px of room, at 1200px it was ~74px over. */
@media (min-width: 901px) and (max-width: 1300px) {
  .hdr .hdr-cta .btn-g { display: none; }
  .hdr .nav { gap: clamp(12px, 1.6vw, 22px); }
}
@media (min-width: 901px) and (max-width: 1040px) {
  .hdr .in { gap: 16px; }
  .hdr .mark img { height: 30px; width: auto; }
  .hdr .nav { gap: 10px; }
  .hdr .nav a { font-size: 14px; }
}

/* 2026-09-27. "Siihen väliin rivi kaksi": at zoom the small eyebrow line ran into the H1 (14px
 * apart at every zoom level). A clear line of space between them. */
.hero .hero-eyebrow { margin-bottom: clamp(20px, 1.9em, 30px); }

/* 2026-10-06. Client asked for the hero message to sit higher in the full-screen view. */
@media (min-width: 861px) {
  .hero-bleed .hero-in { padding-bottom: calc(clamp(28px, 5vh, 64px) + var(--isk-hero-shift, 0px)); }
  /* Safe editor presets: bounded movement only, with the approved layout and contrast intact. */
  .hero-bleed[data-hero-position="higher"] .hero-in { --isk-hero-shift: 24px; }
  .hero-bleed[data-hero-position="lower"] .hero-in { --isk-hero-shift: -20px; }
}

/* 2026-09-27. Phone header ran off the right edge: logo 214px + "Pyydä tarjous" + menu button
 * need 419px, so below ~420px the menu button was clipped (at 360px only 4px of it showed, at
 * 320px none). "Pyydä tarjous" has to stay (the call bar carries only Soita and Huoneistotieto),
 * so the logo scales down instead. Measured to fit at 320, 360, 390, 430 and 500px. */
@media (max-width: 440px) {
  .hdr .mark { flex: 0 1 auto; min-width: 0; }
  .hdr .mark img { width: 100%; height: auto; max-width: 214px; }
  .hdr .hdr-cta, .hdr .burger { flex-shrink: 0; }
}

/* 28.9: three hero path cards (the phone card is switched off by default, src/site/render.ts).
   Three across down to phone width, every card closed on both sides like the four were. */
.pathbar-g.pb-3 { grid-template-columns: repeat(3, 1fr); }
.pathbar-g.pb-3 a:nth-child(3) { border-right: 1px solid #dbe4dd; }
@media (max-width: 1000px) and (min-width: 561px) {
  .pathbar-g.pb-3 { grid-template-columns: repeat(3, 1fr); }
  .pathbar-g.pb-3 a:nth-child(n+3) { border-top: 0; }
  .pathbar-g.pb-3 a:nth-child(3) { border-left: 1px solid #dbe4dd; }
}

/* 28.9 Rasmus: the photo's mint frame (.fig::before, sized to the whole figure) ran its contour
   lines under the caption, so the caption sat on top of them. The frame now ends 22px below the
   photo and the caption starts below the frame. Phones hide the frame already (a.css). */
@media (min-width: 761px) {
  .fig:has(figcaption)::before { bottom: calc(1.4rem + 12px); }
  .fig:has(figcaption) figcaption { margin-top: 34px; line-height: 1.6; }
}

/* 28.9 Rasmus: .btn-w and .btn-o were the dark design's buttons (white text and border, and a
   hover that went transparent with white text). On the light site the outline button was
   invisible and the white one vanished on hover. Light-surface versions, site green on hover. */
.btn-w { background: #fff; color: #1b2a20; border-color: #cfe0d4; }
.btn-w:hover { background: #eef6f0; color: #133324; border-color: #2f7d58; }
.btn-o { background: transparent; color: #1a5c42; border-color: #9fbfab; }
.btn-o:hover { background: #fff; color: #133324; border-color: #2f7d58; }
/* Every .btn has a sliding fill on hover (.btn::before, dark #133324, a.css). On the light buttons
   that filled them dark green over dark text. Their sweep is the light mint instead. */
.btn-w::before, .btn-o::before { background: #eef6f0; }

/* 21.10 launch audit (mobile text sweep, Chromium and WebKit, 320 to 430 px):
   1. The three hero path cards stayed three across on phones (the 28.9 rule above has no width
      limit), so the grid needed 449px inside a 350px box and "Vuokraus" was cut off at 360 to
      430px. On phones they stack, like the four-card bar always did (a.css, 560px).
   2. A page title that is one long word ("Saavutettavuusseloste", "Tietosuojaseloste", the client's
      "Isännöintilomakkeet") is wider than a phone at the 40px minimum and ran off the screen,
      dragging the lede with it. The title steps down with the screen width (it fits at 320px),
      and a word that is still too long wraps instead of being cut.
   3. The email address broke mid-word at 320px. It steps down a little on the narrowest phones. */
@media (max-width: 560px) {
  .pathbar-g.pb-3 { grid-template-columns: 1fr; }
  .pathbar-g.pb-3 a, .pathbar-g.pb-3 a:nth-child(3) { border-left: 0; border-right: 0; }
  .pathbar-g.pb-3 a + a { border-top: 1px solid #dbe4dd; }
}
@media (max-width: 480px) {
  .phero .h1 { font-size: min(2.5rem, 8.6vw); }
}
.phero .h1 { overflow-wrap: break-word; hyphens: manual; }
@media (max-width: 380px) {
  a.bv-v[href^="mailto:"] { font-size: min(1.35rem, 5.6vw); }
}
