/* ============================================================================
   BROŠURA  ·  /na-kratko
   ----------------------------------------------------------------------------
   One-page, print-ready product brochure. Server-rendered Razor Page inside the
   public shell (_PublicLayout), so it paints instantly when someone scans a QR
   code on a phone - no WASM boot.

   IDENTICAL FILE IN BOTH APPS: Glog.Client/wwwroot/css/brosura.css and
   Glog.Lokacija.Client/wwwroot/css/brosura.css. Keep them in sync; per-app
   differences go behind .br--glog / .br--lok on the page root, never into one
   copy only.

   Colours come exclusively from the app tokens (--bg / --ink / --accent / …),
   so dark mode follows for free: dark.css redefines the tokens and wraps
   everything in @media screen, which is also why PRINT always gets the light
   sheet whatever theme the reader has on screen.

   Print budget: the page is designed to fold into ~4 A4 sides. Section
   break rules live in the @media print block at the bottom - after any content
   edit, print-preview it once before handing the link out.
   ============================================================================ */

.brosura {
    --br-max: 68rem;
    --br-gap: clamp(1.25rem, 3vw, 2.25rem);
    --br-pad: clamp(1.25rem, 4vw, 2.5rem);
    --br-card: var(--bg-elev);
    width: 100%;
    color: var(--ink);
}

.br-wrap { max-width: var(--br-max); margin: 0 auto; padding-left: var(--br-pad); padding-right: var(--br-pad); }

.br-section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.br-section + .br-section { border-top: 1px solid var(--line); }

.br-eyebrow {
    font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent); margin: 0 0 .7rem;
}
.br-h2 { font-family: var(--font-serif); font-size: clamp(1.5rem, 3.2vw, 2.15rem); line-height: 1.12; margin: 0 0 .9rem; }
.br-lead { font-size: clamp(1rem, 1.5vw, 1.1rem); line-height: 1.6; color: var(--ink-soft); margin: 0; max-width: 46rem; }
.br-note { font-size: .82rem; line-height: 1.55; color: var(--ink-mute); margin: 1rem 0 0; }
.br-note strong { color: var(--ink-soft); }

/* ---------- hero ---------- */
.br-hero {
    padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem);
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--br-gap); align-items: center;
}
.br-hero-copy { min-width: 0; }
.br-hero-title {
    font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.015em;
    font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.04; margin: 0 0 1rem;
}
.br-hero-title em { font-style: italic; font-weight: 400; color: var(--accent-ink); }
.br-hero-lead { font-size: clamp(1.02rem, 1.7vw, 1.18rem); line-height: 1.55; color: var(--ink-soft); margin: 0 0 1.4rem; }
.br-hero-price {
    display: inline-block; margin: 0 0 1.4rem;
    /* Not a 999px pill: on a phone this wraps to 2-3 lines and a full pill turns the ends into
       huge semicircles. A fixed radius still reads as a chip on one line. */
    padding: .5rem .9rem; border: 1px solid var(--line-strong); border-radius: 1.25rem;
    background: var(--bg-elev); font-size: .9rem; color: var(--ink-soft);
}
.br-hero-price b { font-size: 1.15rem; color: var(--ink); }
/* Each price + its label is one unbreakable unit, so a narrow column wraps at the separator
   instead of orphaning a word like "mesec" on its own line. */
.br-hero-price i { font-style: normal; white-space: nowrap; }

.br-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.br-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .72rem 1.15rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-elev); color: var(--ink); font: inherit; font-size: .95rem; font-weight: 600;
    cursor: pointer; transition: background .15s, border-color .15s, color .15s;
    border-bottom: 1px solid var(--line-strong);   /* beats the global a:hover underline */
}
.br-btn:hover { border-color: var(--ink-soft); }
.br-btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.br-btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.br-btn svg { flex: none; }

/* Hero art: the product's best single image, in a plate that reads as a photo on the page. */
.br-hero-art { min-width: 0; position: relative; }
.br-shot {
    display: block; width: 100%; height: auto; border-radius: 4px;
    border: 1px solid var(--line-strong); background: var(--bg-elev);
    box-shadow: 0 18px 40px -24px rgba(40, 30, 18, .55);
}
.br-shot-cap { margin: .6rem 0 0; font-size: .78rem; line-height: 1.45; color: var(--ink-mute); }

/* ---------- stats strip ---------- */
.br-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--br-gap); }
.br-stat { min-width: 0; }
.br-stat-n {
    font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.02em;
    font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1; color: var(--accent-ink);
}
.br-stat-l { margin: .35rem 0 .3rem; font-size: .88rem; font-weight: 600; }
.br-stat-t { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--ink-soft); }

/* ---------- alternating feature rows ---------- */
.br-row {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: var(--br-gap); align-items: start;
}
.br-row + .br-row { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.br-row.is-flipped .br-row-copy { order: 2; }
.br-row.is-flipped .br-row-art { order: 1; }
.br-row-copy { min-width: 0; }
.br-row-art { min-width: 0; }

.br-ticks { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .55rem; }
.br-ticks li { position: relative; padding-left: 1.5rem; font-size: .93rem; line-height: 1.5; color: var(--ink-soft); }
.br-ticks li::before {
    content: ""; position: absolute; left: 0; top: .42em; width: .58rem; height: .58rem;
    border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent);
}
.br-ticks strong { color: var(--ink); font-weight: 600; }

/* ---------- chip cloud (what the report / project knows) ---------- */
.br-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.2rem 0 0; }
.br-chips span {
    display: inline-block; padding: .3rem .6rem; border: 1px solid var(--line);
    border-radius: 999px; background: var(--bg-elev);
    font-size: .78rem; line-height: 1.3; color: var(--ink-soft); white-space: nowrap;
}

/* ---------- small three-up card grid ---------- */
.br-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--br-gap); margin-top: 1.6rem; }
.br-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--br-gap); margin-top: 1.6rem; }
.br-card {
    min-width: 0; padding: 1.1rem 1.15rem; border: 1px solid var(--line);
    border-radius: 4px; background: var(--br-card);
}
.br-card h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; margin: 0 0 .4rem; }
.br-card p { margin: 0; font-size: .87rem; line-height: 1.55; color: var(--ink-soft); }
.br-card .br-shot { margin-bottom: .8rem; box-shadow: none; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }

/* ---------- pull quote ---------- */
.br-pull {
    margin: clamp(2rem, 5vw, 3rem) 0 0; padding: 1.3rem 1.5rem;
    border-left: 3px solid var(--accent); background: var(--bg-elev);
    font-family: var(--font-serif); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.35;
}
.br-pull span { display: block; margin-top: .55rem; font-family: var(--font-sans); font-size: .84rem; color: var(--ink-mute); }

/* ---------- pricing ---------- */
.br-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--br-gap); margin-top: 1.8rem; }
.br--lok .br-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 40rem; }
.br-plan {
    display: flex; flex-direction: column; min-width: 0;
    padding: 1.4rem 1.3rem; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--bg-elev);
}
.br-plan.is-best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.br-plan-badge {
    align-self: flex-start; margin-bottom: .6rem; padding: .18rem .55rem; border-radius: 999px;
    background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
}
.br-plan-name { font-size: .92rem; font-weight: 600; letter-spacing: .02em; }
.br-plan-price { font-weight: 700; letter-spacing: -0.02em; font-size: clamp(1.7rem, 3.5vw, 2.2rem); line-height: 1.1; margin: .3rem 0 .1rem; }
/* A quoted-on-request plan prints words where the others print a figure; at the numeral size they wrap. */
.br-plan-price-words { font-size: clamp(1.3rem, 2.6vw, 1.65rem); letter-spacing: -0.01em; }
.br-plan-per { font-size: .82rem; color: var(--ink-mute); }
.br-plan ul { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .4rem; }
.br-plan li { font-size: .85rem; line-height: 1.45; color: var(--ink-soft); padding-left: 1.1rem; position: relative; }
.br-plan li::before { content: "·"; position: absolute; left: .3rem; color: var(--accent); font-weight: 700; }

/* ---------- share / QR band ---------- */
.br-share {
    margin-top: clamp(2.5rem, 6vw, 4rem);
    background: var(--ink); color: var(--bg);
}
.br-share .br-wrap { padding-top: clamp(2rem, 5vw, 3rem); padding-bottom: clamp(2rem, 5vw, 3rem); }
.br-share-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--br-gap); align-items: center; }
.br-share h2 { font-family: var(--font-serif); font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .6rem; color: var(--bg); }
.br-share p { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--bg); opacity: .78; max-width: 34rem; }
.br-share-url {
    display: inline-block; margin: 1rem 0 0; padding: .5rem .8rem; border-radius: var(--radius);
    background: rgba(255, 255, 255, .1); font-size: 1rem; font-weight: 600; letter-spacing: .01em; color: var(--bg);
}
.br-share-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.br-share-actions .br-btn {
    background: transparent; border-color: rgba(255, 255, 255, .3); color: var(--bg);
}
.br-share-actions .br-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); }

/* The QR is a PNG data: URI rendered server-side by QRCoder - no third-party image host, and it
   survives the CSP (img-src allows data:). Rendered crisp: no smoothing on the module grid. */
.br-qr { display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.br-qr-card { padding: .75rem; background: #fff; border-radius: 6px; line-height: 0; }
.br-qr-card img {
    display: block; width: 168px; height: 168px;
    /* Rendered well above display size (12 px per module) so the browser's smooth downscale stays
       scannable and print gets ~250 DPI. No image-rendering: pixelated - the downscale ratio is not
       integral and nearest-neighbour would eat module edges. */
}
.br-qr-cap { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--bg); opacity: .7; }

/* ---------- sources / fine print ---------- */
.br-fine { padding: 1.8rem 0 3rem; font-size: .76rem; line-height: 1.6; color: var(--ink-mute); }
.br-fine strong { color: var(--ink-soft); }
.br-fine a { color: inherit; border-bottom-color: currentColor; }

/* ---------- responsive ---------- */
@media (max-width: 62rem) {
    .br-hero { grid-template-columns: 1fr; }
    .br-hero-art { order: -1; }              /* the picture sells first on a phone */
    .br-row, .br-row.is-flipped .br-row-copy, .br-row.is-flipped .br-row-art { grid-template-columns: 1fr; order: 0; }
    .br-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .br-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .br-plans, .br--lok .br-plans { grid-template-columns: 1fr; }
    .br-share-in { grid-template-columns: 1fr; justify-items: start; }
    .br-qr { align-self: start; }
}
@media (max-width: 34rem) {
    .br-stats, .br-grid3, .br-grid2 { grid-template-columns: 1fr; }
    .br-chips span { white-space: normal; }
}

/* ---------- print: the brochure IS the flyer ----------------------------------
   dark.css is entirely inside @media screen, so print always renders the light
   palette. Here we drop the site chrome and the interactive bits, and keep each
   section from being split across a page break. */
@media print {
    @page { size: A4; margin: 12mm; }

    .lp-header, .app-footer, .loka-footer, .theme-toggle, .fb-fab, .fb-bubble { display: none !important; }
    .br-share-actions, .br-print-hide { display: none !important; }
    .br-actions .br-btn { display: none !important; }

    html, body { background: #fff !important; }
    .brosura { font-size: 10.5pt; }
    .br-wrap { max-width: none; padding: 0; }
    .br-section { padding: 7mm 0; border-top: 1px solid #ddd; }
    .br-hero { padding: 0 0 6mm; }
    .br-row + .br-row { margin-top: 8mm; }

    /* Never split a card, a plan or a screenshot - but DO let a section flow across a page break.
       Holding whole sections together left a third of every sheet blank and pushed the brochure from
       six pages to nine. */
    .br-row, .br-card, .br-plan, .br-qr, .br-pull, .br-stat { break-inside: avoid; page-break-inside: avoid; }
    .br-h2, .br-hero-title, .br-eyebrow { break-after: avoid; page-break-after: avoid; }

    .br-shot { box-shadow: none; max-height: 90mm; width: auto; max-width: 100%; }
    .br-share { background: #fff !important; color: #1a1a1a !important; border-top: 2px solid #1a1a1a; }
    .br-share h2, .br-share p, .br-share-url, .br-qr-cap { color: #1a1a1a !important; opacity: 1; }
    .br-share-url { background: #f2f2f2; }
    .br-qr-card { padding: 0; }

    /* Print the destination of every content link, so a paper copy stays usable. */
    .br-row-copy a[href^="http"]::after, .br-fine a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; }
}
