/* mobile.css: the phone version (≤ 760 px), loaded last on every page (Nora, 10 Nov).
   - The side menu is replaced by a top bar: logo + name on the left, a hamburger button on the right.
     The button opens the menu as a full screen with big links and the language button.
   - One mobile grid for every section: 20 px side margins, content starts under the 64 px top bar. */
.menu-toggle { display: none; }
@media (max-width: 760px) {
  :root { --rail: 0px; --mtop: 64px; --gutter: 20px; }

  /* Top bar */
  .site-header { inset: 0 0 auto 0 !important; width: 100% !important; height: var(--mtop) !important; box-sizing: border-box;
    flex-direction: row !important; flex-wrap: wrap; justify-content: space-between !important; align-items: center !important;
    align-content: flex-start; gap: 0 !important; padding: 0 var(--gutter) !important;
    background: color-mix(in srgb, var(--hdr-bg, var(--yellow)) 92%, transparent); }
  .site-header::after { left: var(--gutter) !important; right: var(--gutter) !important; top: auto !important; bottom: 0 !important;
    width: auto !important; height: 1px !important; }
  .site-header.is-hidden { transform: translateY(-100%) !important; }
  .site-header .brand { height: var(--mtop); }
  .site-header .brand img { width: 30px; height: 30px; }
  .site-header .brand span { display: inline !important; font-size: 15px; }
  .site-header .site-nav, .site-header .lang-toggle { display: none !important; }

  /* Hamburger button: three lines that turn into an X */
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; margin-right: -10px;
    padding: 0 10px; background: none; border: 0; color: inherit; cursor: pointer; }
  .menu-toggle span { display: block; height: 2px; width: 24px; background: currentColor; border-radius: 2px;
    transition: transform .3s var(--ease-soft, ease), opacity .2s ease; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Open menu: full screen, yellow, big links */
  .site-header.menu-open { height: 100svh !important; background: var(--yellow) !important; color: var(--black) !important; transform: none !important; }
  .site-header.menu-open a { color: var(--black) !important; }
  .site-header.menu-open::after { top: var(--mtop) !important; bottom: auto !important; background: var(--black) !important; }
  .site-header.menu-open .site-nav { display: flex !important; flex-direction: column !important; align-items: stretch !important;
    width: 100% !important; order: 3; margin-top: 24px; gap: 0 !important; }
  .site-header.menu-open .site-nav a { display: flex !important; align-items: center; justify-content: flex-start !important; text-align: left !important;
    min-height: 56px; padding: 0 !important; font: 700 30px/1.15 var(--font-heading) !important; text-decoration: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, .15) !important; }
  .site-header.menu-open .site-nav a[aria-current="page"] { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 6px; }
  .site-header.menu-open .site-nav a.nav-soon { opacity: .45; }
  .site-header.menu-open .lang-toggle { display: inline-flex !important; order: 4; margin-top: 28px; color: var(--black); border-color: var(--black); }
  body.menu-is-open { overflow: hidden; }

  /* One grid for all sections: 20 px side margins, first section starts under the top bar */
  .hello-section, .bk, .book-section, .latest-section, .svc, .services-section, .rf, .references-section,
  .screen-1, .wt, .case, .board-section, .about, .site-footer {
    padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; }
  main > section:first-child { padding-top: calc(var(--mtop) + 28px) !important; }
}
@media (max-width: 760px) {
  .site-header.menu-open .lang-toggle { margin: 28px auto 0 0 !important; height: 40px; min-width: 64px; padding: 0 18px;
    align-items: center; justify-content: center; line-height: 1; }
}

/* "Mina fyra ess i rockärmen" on mobile (Nora, 10 Nov): the cards keep the playing-card shape
   (same 320 × 470 proportions as on desktop), two by two in a grid, so the four look like a hand of cards.
   Icon and text sit in the same place in every card, like on desktop (icon a third down, text under it). */
@media (max-width: 760px) {
  .svc { padding-top: 56px !important; padding-bottom: 56px !important; }
  .svc-title { font-size: clamp(34px, 10vw, 44px) !important; line-height: 1.05 !important; margin: 0 0 24px !important; }
  .svc-cards { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .svc-card { aspect-ratio: 320 / 470; padding: 0 10px !important; border-radius: 12px !important;
    display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start;
    padding-top: 30% !important; gap: 14px !important; box-sizing: border-box; }
  .svc-icon { width: 32px !important; height: 32px !important; }
  .svc-card p { font-size: 14px !important; line-height: 19px !important; font-weight: 600; text-align: center;
    hyphens: manual; overflow-wrap: normal; }
  .svc-note { margin-top: 24px !important; font-size: 16px !important; line-height: 1.5 !important; }
}
@media (max-width: 360px) { .svc-card p { font-size: 13px !important; line-height: 17px !important; } .svc-card { padding-top: 24% !important; } }

/* References on mobile (Nora, 10 Nov): no lines around the logos (less tight), and the quotes use the
   full width of the mobile grid, with the same 20 px edge on the left and the right. */
@media (max-width: 760px) {
  .rf-band { border-top: 0 !important; border-bottom: 0 !important; padding: 0 !important; }
  .rf-label { margin-bottom: 20px !important; }
  .rf-logos { justify-content: space-between; gap: 24px !important; }
  .rf-logo { width: calc(50% - 12px) !important; height: 110px !important; }
  .rf-quotes { width: 100% !important; margin-top: 48px !important; gap: 48px !important; }
  .rf-quote, .rf-quote blockquote { width: 100%; max-width: none !important; }
  .rf-quote blockquote { font-size: 17px !important; line-height: 1.6 !important; }
}

/* Footer on mobile (Nora, 10 Nov): Solved-IT.se first, then Kontakt, then Juridiskt, social media last,
   all on the same 20 px grid. */
@media (max-width: 760px) {
  .ft-cols { display: flex !important; flex-direction: column; gap: 32px !important; padding: 40px 0 0 !important; }
  .ft-cols > .ft-col:nth-child(1) { order: 1; }   /* Solved-IT.se */
  .ft-cols > .ft-col:nth-child(3) { order: 2; }   /* Kontakt */
  .ft-cols > .ft-col:nth-child(2) { order: 3; }   /* Juridiskt */
  .ft-cols > .ft-follow { order: 4 !important; }  /* sociala medier */
  .ft-made { text-align: left !important; margin: 32px 0 16px !important; }
  .ft-bar { padding: 20px 0 28px !important; gap: 10px !important; }
  .ft-bar p { gap: 4px 12px !important; }
}

/* Start screen text on mobile (Nora, 10 Nov): "…mellan roller som" ends its line, the bold roles
   "UX-designer, UX writer, UX researcher och användartestare," are one block of their own, and the
   thin line "även känd som en klassisk IT-konsult." is its own paragraph after it, no indent. */
@media (max-width: 760px) {
  .hello-text { max-width: none !important; }
  .hello-l1, .hello-l2, .hello-l3 { display: block; }   /* same font, sizes and weights as before – only the line structure changes */
  .hello-l3 { margin-top: 2px; }
  .hello-br { display: none !important; }
  .hello-light { display: block !important; margin-top: 20px !important; padding-left: 0 !important;
    font-weight: 400; }
}
@media (max-width: 760px) { .hello-strong > br { display: none !important; } .hello-l1 { margin-bottom: 4px; } }

/* Start screen on mobile, from Nora's Figma "start / mobile" (390 wide, 10 Nov):
   1) hello text at the top, 2) the "Who / Solved-IT?" box under it (both words the same width),
   3) the photo right-aligned under the title, ending above the bottom of the first screen. */
@media (max-width: 760px) {
  .hello-section { display: flex !important; flex-direction: column; padding-bottom: 40px !important; }
  .hello-section > .hello-grid { display: contents !important; }
  .hello-text { order: 1; margin: 0 !important; }
  .hello-l1 { margin-bottom: 6px !important; }
  .hello-l3 { margin-top: 6px !important; }
  .hello-light { margin-top: 10px !important; }
  .hello-title { order: 2; margin: 40px 0 0 !important; line-height: 1 !important; font-size: 28px; width: max-content; }
  .hello-title .hello-title-line { display: block; white-space: nowrap; }
  .hello-title .hello-title-line:first-child { line-height: .95; }
  .hello-media { order: 3; align-self: flex-end; width: 62.9% !important; max-width: 220px !important; height: auto !important;
    aspect-ratio: 900 / 1479 !important; margin: 16px 0 0 !important; }
  .hello-media img { width: 100%; height: 100%; object-fit: cover; }
}
@media (max-width: 760px) { .hello-title .hello-title-line:nth-child(2) { margin-top: 8px; } }

/* Booking titles on mobile (Nora, 10 Nov): clean left edge on the 20 px grid –
   "Ska vi fortsätta vårat samtal?" / small "eller" on its own line / "Vill du påbörja ett?". */
@media (max-width: 760px) {
  .bk { padding-top: 56px !important; }
  .bk-title { font-size: clamp(28px, 8.2vw, 34px) !important; line-height: 1.1 !important; margin: 0 !important; }
  .bk-or { display: block; margin: 8px 0 6px !important; font-size: 18px !important; line-height: 1.2; }
  .bk-sub { font-size: clamp(28px, 8.2vw, 34px) !important; line-height: 1.1 !important; margin: 0 0 24px !important; }
}
