/* About + Portfolio page specifics; shared styles live in components.css */
.capability-links { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.capability-links a { color: var(--gold-light); text-decoration: none; }
.capability-links a:hover, .capability-links a:focus-visible { text-decoration: underline; }
.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { font-size: 0.8rem; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); }
.case-card { gap: 16px; padding-bottom: 26px; transition: transform .45s var(--ease, ease), border-color .3s, box-shadow .45s; }
.case-card .card-kicker { margin-top: 6px; }
.case-card h2 { margin: -4px 0 -2px; }
.case-card .btn, .case-card .btn-disabled { margin-top: 6px; }
.case-card:hover { border-color: rgba(201, 164, 92, .38); box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .95), 0 0 0 1px rgba(201, 164, 92, .08), 0 18px 50px -30px rgba(201, 164, 92, .35); }
/* Showcase frame: the screenshot sits inside a padded panel with depth, not edge to edge */
.case-showcase { padding: clamp(10px, 2.4%, 16px); background: radial-gradient(ellipse at 50% 0%, rgba(201, 164, 92, .22), transparent 65%), linear-gradient(180deg, #1a1a1d, #101012); box-shadow: inset 0 1px 0 rgba(232, 207, 152, .18), inset 0 -30px 50px -30px rgba(0, 0, 0, .8); }
.case-showcase img { border-radius: 8px; border: 1px solid rgba(244, 239, 230, .14); object-position: top center; box-shadow: 0 18px 34px -14px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: no-preference) {
  .case-showcase img { transition: transform .6s var(--ease, ease); }
  .case-card:hover { transform: translateY(-4px); }
  .case-card:hover .case-showcase img { transform: translateY(-3px) scale(1.015); }
}
.case-card .tag-list { margin-top: auto; }
.btn-disabled { align-self: flex-start; display: inline-block; padding: 10px 18px; border: 1px dashed var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 0.9rem; cursor: not-allowed; }

/* Portfolio: image-ready media area (fixed ratio prevents layout shift). Swap the CSS mockup for <img> via the "image" field. */
.case-media { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(ellipse at 70% 10%, rgba(201, 164, 92, 0.2), transparent 60%), var(--graphite); }
.case-media img { width: 100%; height: 100%; object-fit: cover; display: block; box-sizing: border-box; }
.mockup { position: absolute; inset: 9% 8% 0; border-radius: 10px 10px 0 0; overflow: hidden; background: #0d0d0f; border: 1px solid rgba(244, 239, 230, 0.14); border-bottom: 0; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.9); transition: transform .5s var(--ease); }
.case-card:hover .mockup { transform: translateY(-6px) scale(1.02); }
.mock-bar { display: flex; align-items: center; gap: 5px; height: 20px; padding: 0 9px; border-bottom: 1px solid var(--line); background: rgba(244, 239, 230, 0.03); }
.mock-bar i { width: 5px; height: 5px; border-radius: 50%; background: rgba(244, 239, 230, 0.25); }
.mock-bar span { margin-left: 8px; flex: 1; max-width: 40%; height: 6px; border-radius: 3px; background: rgba(244, 239, 230, 0.08); }
.mock-body { height: calc(100% - 20px); }
.mock-body svg { display: block; width: 100%; height: 100%; }
.motif-florist { background: radial-gradient(ellipse at 75% 20%, rgba(232, 207, 152, 0.2), transparent 60%), var(--graphite); }
.motif-clinic { background: radial-gradient(ellipse at 70% 40%, rgba(201, 164, 92, 0.22), transparent 62%), var(--graphite); }
.motif-market { background: radial-gradient(ellipse at 30% 0%, rgba(201, 164, 92, 0.18), transparent 60%), var(--graphite); }

/* Portfolio + About, tablet: the auto-fit grid is 2 columns up to ~1003px (3 from 1004px). A lone odd last card
   spans the row and is centred at single-column width instead of sitting alone in the left column. */
@media (700px <= width < 1004px) {
  .section:has(.case-card) .card-grid > .case-card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 10px); }
  .section:has(#diff-title, #cap-title) .card-grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 10px); }
}

/* About value/capability cards, 3-column range and up: 3 cards per row (each spans 2 of 6 tracks).
   With 5 cards the last-row pair starts at track 2, so it is centred under the first row at the same width. */
@media (min-width: 1004px) {
  .section:has(#diff-title, #cap-title) .card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .section:has(#diff-title, #cap-title) .card-grid > .card { grid-column: span 2; }
  .section:has(#diff-title, #cap-title) .card-grid > .card:nth-child(3n+1):nth-last-child(2) { grid-column: 2 / span 2; }
}

/* Portfolio, large desktop: centered content system, larger cards, tighter intro -> grid.
   Scoped with :has() so About/legal pages (which share this file) are unaffected. */
@media (min-width: 1200px) {
  .page-intro:has(#portfolio-h1) { padding: 120px 0 72px; }
  /* the intro glow (components.css) is clipped by the section edge; fade it out before that edge */
  .page-intro:has(#portfolio-h1)::before { -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 78%); mask-image: linear-gradient(180deg, #000 40%, transparent 78%); }
  body:has(#portfolio-h1) .site-header > .container,
  body:has(#portfolio-h1) .site-footer > .container,
  .page-intro:has(#portfolio-h1) > .container,
  .page-intro:has(#portfolio-h1) + .section > .container,
  .section:has(#pf-cta-title) > .container {
    max-width: 1480px;
    width: calc(100% - 40px);
    margin-left: auto;
    margin-right: auto;
  }
  .page-intro:has(#portfolio-h1) .eyebrow { font-size: 0.84rem; margin-bottom: 20px; }
  .page-intro:has(#portfolio-h1) h1 { font-size: 4.25rem; max-width: none; margin-bottom: 22px; }
  .page-intro:has(#portfolio-h1) .lead { font-size: 1.3rem; max-width: 56ch; }
  .section:has(.case-card) { padding-top: 28px; }
  .page-intro:has(#portfolio-h1) + .section { padding-bottom: 64px; }
  .section:has(.case-card) .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
  .case-card { padding: 34px 34px 32px; gap: 18px; border-radius: 18px; }
  .case-card .card-kicker { margin-top: 8px; font-size: 0.84rem; color: var(--muted); }
  .case-card h2 { font-size: 1.7rem; }
  .case-card .card-text { font-size: 1.06rem; }
  .case-card .tag-list { gap: 10px; }
  .case-card .tag-list li { font-size: 0.86rem; padding: 5px 14px; }
  .case-card .btn, .case-card .btn-disabled { margin-top: 10px; }
  .case-card .btn { align-self: flex-start; min-height: 48px; padding: 0 28px; font-size: 1rem; }
  /* larger project imagery: the frame sits closer to the card edges and its inner padding is tighter (16:10 ratio kept) */
  .case-card .case-media { margin-inline: -16px; padding: 8px; }
  .case-card .btn-disabled { padding: 14px 22px; font-size: 0.96rem; }

  /* Portfolio CTA: mirrors the approved Home final CTA (home.css is not loaded here) */
  .section:has(#pf-cta-title) { padding: 64px 0 114px; }
  .section:has(#pf-cta-title) .cta { margin-bottom: 0; padding: 88px 96px; border-radius: 30px; border-color: rgba(201, 164, 92, 0.28);
    background:
      radial-gradient(ellipse 75% 85% at 50% 100%, rgba(201, 164, 92, 0.085), transparent 72%),
      radial-gradient(ellipse at 50% 0%, rgba(201, 164, 92, 0.14), transparent 60%), var(--glass), var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 28px 56px -34px rgba(0, 0, 0, 0.7), 0 50px 110px -64px rgba(201, 164, 92, 0.45); }
  .section:has(#pf-cta-title) .cta::before { width: 120%; bottom: -72%; background: radial-gradient(ellipse, rgba(201, 164, 92, 0.16), transparent 68%); }
  .section:has(#pf-cta-title) .cta h2 { font-size: 3.2rem; margin-bottom: 22px; }
  .section:has(#pf-cta-title) .cta .lead { font-size: 1.18rem; max-width: 720px; margin-bottom: 44px; color: #b8b2a6; }
  .section:has(#pf-cta-title) .cta .btn { min-height: 60px; padding: 0 42px; font-size: 1.06rem; }
}

/* About: connected process steps with gold nodes */
.process-connected li { position: relative; border-top-color: rgba(201, 164, 92, 0.22); }
.process-connected li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(201, 164, 92, 0.12), 0 0 14px rgba(201, 164, 92, 0.7); }

/* Legal pages: narrow, readable text column */
.legal { padding-block: clamp(32px, 5vw, 64px) clamp(64px, 9vw, 112px); }
.legal-body { max-width: 720px; }
.legal-updated { color: var(--muted); font-size: 0.9rem; margin-top: 18px; }
.legal-body h2 { font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem); letter-spacing: -0.01em; margin: 2.4em 0 .7em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body p, .legal-body li { color: var(--muted); font-size: 1.02rem; line-height: 1.75; }
.legal-body p + p { margin-top: 1em; }
.legal-body ul { list-style: none; margin: 1em 0; display: grid; gap: .5em; }
.legal-body li { position: relative; padding-left: 22px; }
.legal-body li::before { content: ""; position: absolute; left: 4px; top: .8em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body a { color: var(--gold-light); text-decoration: underline; text-decoration-color: rgba(201, 164, 92, 0.4); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-body a:hover { color: var(--text); }

/* About: one subtle branded environment image (decorative, masked into the page) */
.about-visual { position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: min(42%, 540px); opacity: .5; right: 2%; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 50% 56% at 50% 50%, #000 28%, transparent 100%); mask-image: radial-gradient(ellipse 50% 56% at 50% 50%, #000 28%, transparent 100%); }
.about-visual img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; display: block; }
@media (min-width: 861px) { .about-visual + .container .lead { max-width: 52ch; } }
@media (max-width: 860px) { .about-visual { width: 100%; opacity: .2; } }

/* About intro, large desktop: centered content system matching the finalized pages.
   The visual is anchored to the text's left edge (not the viewport) so text -> visual spacing is constant. */
@media (min-width: 1200px) {
  body:has(#about-h1) .site-header > .container,
  body:has(#about-h1) .site-footer > .container,
  .page-intro:has(#about-h1) > .container,
  .section:has(#how-title, #diff-title, #cap-title, #about-cta-title) > .container {
    max-width: 1480px;
    width: calc(100% - 40px);
    margin-left: auto;
    margin-right: auto;
  }
  .page-intro:has(#about-h1) .eyebrow { font-size: 0.84rem; margin-bottom: 20px; }
  .page-intro:has(#about-h1) h1 { font-size: 4.25rem; margin-bottom: 22px; }
  .page-intro:has(#about-h1) .lead { font-size: 1.3rem; max-width: 54ch; }
  .page-intro:has(#about-h1) .about-visual { --about-text-left: calc(max(20px, (100% - 1480px) / 2) + var(--gutter));
    left: calc(var(--about-text-left) + 640px); right: auto; width: min(580px, calc(100% - var(--about-text-left) - 640px - var(--gutter))); opacity: .62; }

  /* About content sections (process, difference, capabilities; not the CTA): same wide system and h2 scale as Home */
  .section:has(#how-title, #diff-title, #cap-title) { padding-block: 64px; }
  .section:has(#how-title, #diff-title, #cap-title) .section-head { max-width: 920px; margin-bottom: 44px; }
  .section:has(#how-title, #diff-title, #cap-title) .section-head h2 { font-size: 3.3rem; }
  /* About value/capability cards at Home #om-oss card scale (grid placement lives in the min-width: 1004px block) */
  .section:has(#diff-title, #cap-title) .card-grid { gap: 24px; }
  .section:has(#diff-title, #cap-title) .card-grid > .card { padding: 34px 36px; gap: 14px; }
  .section:has(#diff-title, #cap-title) .card h3 { font-size: 1.5rem; }
  .section:has(#diff-title, #cap-title) .card-text { font-size: 1.06rem; }

  /* "Vad som gör BrandLift annorlunda" only: open editorial blocks (same language as Home "Varför BrandLift" and the
     process line): no card surface, a fading champagne hairline on top, natural row heights. 3x2 grid unchanged. */
  .section:has(#diff-title) .card-grid { row-gap: 56px; }
  .section:has(#diff-title) .card-grid > .card { padding: 34px 72px 0 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .section:has(#diff-title) .card-grid > .card::before { inset: 0 0 auto 0; height: 1px; border-radius: 0; opacity: 1; transition: none;
    background: linear-gradient(90deg, rgba(201, 164, 92, 0.5), rgba(201, 164, 92, 0.08)); }
  .section:has(#diff-title) .card-grid > .card:hover { transform: none; box-shadow: none; border-color: transparent; }
  .section:has(#diff-title) .card h3 { font-size: 1.7rem; }

  /* About CTA: same values as the approved Portfolio/Home final CTA */
  .section:has(#about-cta-title) { padding: 64px 0 72px; }
  .section:has(#about-cta-title) .cta { margin-bottom: 0; padding: 88px 96px; border-radius: 30px; border-color: rgba(201, 164, 92, 0.28);
    background:
      radial-gradient(ellipse 75% 85% at 50% 100%, rgba(201, 164, 92, 0.085), transparent 72%),
      radial-gradient(ellipse at 50% 0%, rgba(201, 164, 92, 0.14), transparent 60%), var(--glass), var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 28px 56px -34px rgba(0, 0, 0, 0.7), 0 50px 110px -64px rgba(201, 164, 92, 0.45); }
  .section:has(#about-cta-title) .cta::before { width: 120%; bottom: -72%; background: radial-gradient(ellipse, rgba(201, 164, 92, 0.16), transparent 68%); }
  .section:has(#about-cta-title) .cta h2 { font-size: 3.2rem; margin-bottom: 22px; text-wrap: balance; } /* longer heading wraps; avoid a lone "oss?" */
  .section:has(#about-cta-title) .cta .lead { font-size: 1.18rem; max-width: 720px; margin-bottom: 44px; color: #b8b2a6; }
  .section:has(#about-cta-title) .cta .btn { min-height: 60px; padding: 0 42px; font-size: 1.06rem; }

  /* About process: Home #process proportions. The wider gap would break the per-step border into separate
     segments, so the same-coloured line is drawn once across the row; the gold nodes are unchanged. */
  .section:has(#how-title) .process-connected { position: relative; gap: 24px; }
  .section:has(#how-title) .process-connected::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(201, 164, 92, 0.22); }
  .section:has(#how-title) .process-connected li { border-top: 0; padding-top: 38px; }
  .section:has(#how-title) .process-connected h3 { font-size: 1.58rem; }
  .section:has(#how-title) .process-connected .card-text { font-size: 1.08rem; line-height: 1.7; }
}
