/* D8.2 Mostruário — inner pages. Loaded after site.css by the case pages (marcela, quintal-torra, taurifer),
   the privacy page and the 404. A case page is a home case section, expanded: the name on paper, the whole
   screens on the sand board, details in detail cards, the evidence in one white table, then the navy close. */

:root { --t-name: clamp(3rem, 1.95rem + 4.3vw, 6.5rem); --t-chapter: clamp(1.625rem, 1.37rem + 1.05vw, 2.375rem); }
@media (max-width: 359px) { :root { --t-name: 2.625rem; } }

.i-back { transform: rotate(180deg); }
.link-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.link-back .i { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) { .link-back .i { transition: transform 160ms ease-out; } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .link-back:hover .i { transform: rotate(180deg) translateX(3px); } }
.note { font-size: var(--t-meta); line-height: 1.45; font-weight: 500; color: var(--ink-2); }

/* ---------- Case head: name, tagline, the contextual question, four facts ---------- */
.case-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 4px; }
.case-head > * { min-width: 0; }
.case-intro .link-back { margin-bottom: 16px; }
.case-name { font-size: var(--t-name); line-height: .98; letter-spacing: -.02em; }
.case-intro .lead { margin-top: 20px; max-width: 32em; }
.concept-banner { margin-top: 20px; max-width: 40em; padding: 14px 18px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--white); line-height: 1.45; }
.concept-banner strong { color: var(--red-ink); }
.case-cta { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--hair); border-radius: var(--r); background: var(--white); box-shadow: var(--shadow-card); }
.case-cta p { font: 400 var(--t-pull)/1.25 var(--serif); font-variation-settings: "opsz" 48; letter-spacing: -.005em; text-wrap: balance; }
.case-cta .btn { width: 100%; white-space: normal; text-align: center; }
.ficha-case dd { font-size: 1.0625rem; }
@media (max-width: 359px) {
  .case-cta { padding: 16px; }
  .case-cta .btn { padding: 0 16px; }
}
/* S: one fact per row, the label beside its value, so a long address never leaves its column */
@media (max-width: 599px) {
  .ficha-case { grid-template-columns: minmax(0, 1fr); }
  .ficha-case > div, .ficha-case > div:nth-child(odd), .ficha-case > div:nth-child(even) { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; padding: 10px 0 11px; border-right: 0; }
  .ficha-case > div + div { border-top: 1px solid var(--line); }
  .ficha-case dt { padding-top: 2px; }
  .ficha-case dd { margin-top: 0; font-size: 1rem; overflow-wrap: anywhere; }
}
@media (max-width: 359px) {
  .ficha-case > div, .ficha-case > div:nth-child(odd), .ficha-case > div:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (min-width: 960px) {
  .case-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; align-items: end; padding-top: 32px; }
  .case-intro { grid-column: 1 / 8; }
  .case-intro .link-back { margin-bottom: 24px; }
  .case-intro .lead { margin-top: 24px; }
  .case-cta { grid-column: 8 / 13; padding: 28px 32px 32px; }
  .ficha-case { grid-column: 1 / 13; }
  .ficha-case dd { font-size: 1.125rem; }
}

/* ---------- Case plate: the whole screens, on the sand board ---------- */
.case-plate { margin-top: 40px; }
/* computer and phone captures at the same height: 1600×1000 next to 600×1298 */
.mat-cover { display: grid; grid-template-columns: minmax(0, 1600fr) minmax(0, 462fr); gap: clamp(12px, 3.2%, 40px); align-items: end; }
.shot-phone { border-radius: 12px; }
@media (max-width: 599px) {
  .mat-cover { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .mat-cover .shot-phone { width: 58%; }
}
/* Taurifer: the three renders as they are, phone bodies included */
.mat-renders { display: grid; grid-template-columns: repeat(3, minmax(0, 250px)); justify-content: center; gap: 0 clamp(4px, 3%, 48px); align-items: center; }
.mat-renders img { width: 100%; filter: drop-shadow(0 16px 20px rgba(23, 26, 58, .28)); }
@media (min-width: 960px) { .case-plate { margin-top: 56px; } }

/* ---------- Chapters: title left, text right; evidence across ---------- */
.chapters { padding-top: var(--sec); }
.chapter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 20px; border-top: 1.5px solid var(--ink); }
.chapter + .chapter { margin-top: 56px; }
.chapter > * { min-width: 0; }
.chapter .title { font-size: var(--t-chapter); }
.chapter-body { display: grid; gap: 16px; }
.chapter-body > * { min-width: 0; }
.chapter-body > p { max-width: 36em; }
.chapter-body > figure, .chapter-body > .evidence, .chapter-body > .lang { margin-top: 12px; }
@media (min-width: 960px) {
  .chapter { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-top: 28px; }
  .chapter + .chapter { margin-top: 96px; }
  .chapter > h2 { grid-column: 1 / 5; }
  .chapter-body { grid-column: 6 / 13; gap: 18px; padding-top: 4px; }
  .chapter-wide > h2 { grid-column: 1 / 9; }
  .chapter-wide .chapter-body { grid-column: 1 / 13; padding-top: 16px; }
}

.checks { display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; line-height: 1.45; max-width: 36em; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .36em; width: 12px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }

/* Detail card on a case page: the same card as the home (tag above, one sentence below), the section whole */
.detail { display: flex; flex-direction: column; gap: 12px; }
.detail figcaption { line-height: 1.45; max-width: 32em; }
.crop-view.crop-whole { display: block; aspect-ratio: auto; }
.crop-whole img { width: 100%; }
@media (min-width: 960px) { .detail .crop { padding: 12px 16px 16px; } .detail .crop-tag { margin-bottom: 10px; } }

/* A whole phone screen inside a chapter: a small plate */
.chapter-plate { width: min(100%, 320px); }
.mat-screen .shot { width: 100%; }

/* Quintal: the visual language, as a ficha with rows */
.lang { max-width: 36em; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.lang > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.lang > div + div { border-top: 1px solid var(--line); }
.lang dt { font: 600 var(--t-meta)/1.5 var(--sans); color: var(--red-ink); }
.lang dd { font-weight: 600; line-height: 1.4; }
.swatches { display: inline-flex; gap: 4px; margin-right: 10px; vertical-align: -3px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--hair); }
@media (max-width: 359px) { .lang > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Fact / decision / expectation: one white table, three columns from L */
.evidence { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--hair); border-radius: var(--r); background: var(--white); box-shadow: var(--shadow-card); }
.evidence > section { min-width: 0; padding: 20px; }
.evidence > section + section { border-top: 1px solid var(--line); }
.evidence h3 { padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); font: 650 var(--t-h3)/1.25 var(--sans); }
.evidence ul { display: grid; gap: 10px; margin-top: 14px; }
.evidence li { position: relative; padding-left: 20px; line-height: 1.45; }
.evidence li::before { content: ""; position: absolute; left: 2px; top: .58em; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.chapter-body > .note { margin-top: 4px; }
@media (min-width: 960px) {
  .evidence { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .evidence > section { padding: 28px; }
  .evidence > section + section { border-top: 0; border-left: 1px solid var(--line); }
}

/* ---------- Next case: one link card on the sand board ---------- */
.next-wrap { padding-top: var(--sec); }
.next-case { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center; padding: 20px; border-radius: var(--r); background: var(--board); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.next-case > * { min-width: 0; }
.next-text { display: grid; gap: 6px; }
.next-label { font: 600 var(--t-q)/1.3 var(--sans); color: var(--red-ink); }
.next-name { font: 400 var(--t-title)/1.1 var(--serif); font-variation-settings: "opsz" 48; letter-spacing: -.01em; text-wrap: balance; }
.next-name .i { width: .6em; height: .6em; margin-left: .3em; vertical-align: .02em; }
.next-note { font-size: var(--t-meta); line-height: 1.4; font-weight: 500; color: var(--ink-2); }
.next-shot { width: 100%; border-radius: 6px; box-shadow: var(--shadow); }
.next-render { justify-self: center; width: auto; max-height: 300px; border-radius: 0; box-shadow: none; filter: drop-shadow(0 14px 18px rgba(23, 26, 58, .28)); }
.next-case:focus-visible { outline-offset: 3px; }
@media (hover: hover) { .next-case:hover .next-name { text-decoration: underline 2px; text-underline-offset: 6px; } }
@media (prefers-reduced-motion: no-preference) { .next-name .i { transition: transform 160ms ease-out; } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .next-case:hover .next-name .i { transform: translateX(4px); } }
@media (min-width: 600px) {
  .next-case { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; padding: 28px; }
  .next-render { max-height: 340px; }
}
@media (min-width: 960px) { .next-case { padding: 40px 48px; } .next-render { max-height: 400px; } .next-shot:not(.next-render) { max-width: 560px; justify-self: end; } }

/* ---------- Closing contact: the home's navy block, without the ficha ---------- */
.page-close { padding: 64px max(var(--pad), calc((100% - 1240px) / 2)) 72px; }
.page-close .display { max-width: 13em; }
.close-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 24px; }
.close-actions .lead { flex-basis: 100%; margin-top: 0; }
.close-actions .btn { margin-top: 12px; }
.close-actions .link { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); }
.close-note { flex-basis: 100%; font-size: var(--t-meta); line-height: 1.4; font-weight: 500; color: var(--on-ink-2); }
@media (max-width: 599px) { .close-actions { gap: 4px 32px; } .close-note { margin-top: 8px; } }
@media (min-width: 960px) {
  .page-close { padding-block: 104px 112px; }
  .close-actions { margin-top: 28px; }
  .close-actions .btn { margin-top: 16px; }
  .close-note { margin-top: 4px; }
}

/* Short pages (privacy, 404): the footer sits at the bottom of the screen */
.page-short { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.page-short main { flex: 1 0 auto; }

/* ---------- Privacy ---------- */
.legal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 4px; padding-bottom: var(--sec); }
.legal > * { min-width: 0; }
.legal-head .link-back { margin-bottom: 16px; }
.legal-body { display: grid; gap: 14px; max-width: 38em; }
.legal-lead { font-size: var(--t-lead); line-height: 1.45; font-weight: 500; }
.legal-body h2 { margin-top: 18px; padding-top: 18px; border-top: 1.5px solid var(--ink); font: 650 var(--t-h3)/1.25 var(--sans); }
.legal-body .note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (min-width: 960px) {
  .legal { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-top: 40px; }
  .legal-head { grid-column: 1 / 6; }
  .legal-head .link-back { margin-bottom: 24px; }
  .legal-body { grid-column: 7 / 13; padding-top: 72px; }
}

/* ---------- 404: the hero's grammar, three link cards on the sun mat ---------- */
.notfound { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 4px; padding-bottom: var(--sec); }
.notfound > * { min-width: 0; }
.notfound .big { font: italic 400 var(--t-price)/.9 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: -.03em; color: var(--sun); font-feature-settings: "lnum"; }
.notfound-text { padding-top: 20px; }
.notfound h1 { margin-top: 12px; }
.notfound h1 em { white-space: nowrap; }
.notfound .lead { margin-top: 16px; }
.notfound .actions { margin-top: 24px; }
@media (min-width: 960px) {
  .notfound { grid-template-columns: minmax(0, 536fr) minmax(0, 680fr); column-gap: 24px; align-items: center; min-height: min(calc(100svh - var(--bar-h) - 48px), 720px); padding-top: 24px; }
  .notfound-text { padding-top: 0; }
}
