/* piccini.app project pages — paper editorial mode.
   Loaded last on /projects/ and /pt-br/projects/ pages, after the legacy
   styles.css, landing.css and showcase.css it overrides. Tokens mirror
   docs/BRAND_GUIDE.md §1 as implemented in /branding/homepage.css.
   Product screenshots, device mockups and embedded demos keep their own
   palettes: they show real product state. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/branding/font-1b08e7fc267a5c7e.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/branding/font-e7a1aaf7eda9f2fa.ttf') format('truetype'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400; font-display: swap; src: url('/branding/font-8ca4d603b02214e2.ttf') format('truetype'); }

:root {
  --bg: #F7F5EF;
  --surface: #EEEDE6;
  --surface-2: #E7E5DC;
  --surface-3: #E7E5DC;
  --edge: #D8DCD9;
  --edge-strong: #8C96A0;
  --ink: #17345C;
  --ink-soft: #3E5068;
  --ink-muted: #536171;
  --navy: #17345C;
  --navy-light: #3D5A9C;
  --navy-lighter: #58718E;
  --amber: #F5A623;
  --font-display: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --device-bg: #0D1B2A;
  color-scheme: light;
}

html.theme-dark, html.theme-dark body {
  --bg: #17345C;
  --surface: #1D406B;
  --surface-2: #234A78;
  --surface-3: #234A78;
  --edge: #58718E;
  --edge-strong: #8FA3BA;
  --ink: #F7F5EF;
  --ink-soft: #DCE2EA;
  --ink-muted: #CFD7E1;
  --navy-light: #8FA3BA;
  --navy-lighter: #8FA3BA;
  color-scheme: dark;
}

html, body { background: var(--bg); color: var(--ink); }
body { background: var(--bg) !important; font-family: var(--font-body); line-height: 1.6; }
body.bg-grid::before { display: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* Headlines move to the editorial serif */
.catalog-header h1, .showcase-hero h1, .product-hero h1,
.catalog-section__header h2, .showcase-section h2, .showcase-cta h2, .product-section h2, .product-cta h2,
.case-study h3, .project-card h3, .showcase-section h3, .validation-card h3, .build-steps h3, .engagement h3 {
  font-family: var(--font-serif); font-weight: 400;
}
.catalog-header h1, .showcase-hero h1, .product-hero h1 { letter-spacing: -.045em; line-height: 1.06; }
.catalog-section__header h2, .showcase-section h2, .showcase-cta h2, .product-section h2, .product-cta h2 { letter-spacing: -.03em; }
.case-study h3, .project-card h3 { letter-spacing: -.02em; }
.showcase-proof strong, .case-study__metrics strong, .metric-card strong, .proof-strip strong {
  font-family: var(--font-serif); font-weight: 400; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}

/* Eyebrows and kickers: slate small caps, one amber dot in the hero */
.catalog-eyebrow, .showcase-eyebrow, .showcase-kicker, .product-kicker, .engagement__number,
.case-study__anatomy dt, .project-card__status, .showcase-steps li > span, .build-steps li > span, .validation-card > span {
  color: var(--ink-muted); font-weight: 400; letter-spacing: .15em;
}
.catalog-eyebrow::before, .showcase-eyebrow::before, .product-hero .product-kicker:first-child::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%;
  background: var(--amber); vertical-align: 1px;
}
.showcase-lead, .product-lead, .catalog-header p { color: var(--ink-soft); }

/* Navigation and language switcher */
.showcase-nav a, .catalog-nav a { color: var(--ink); }
.language-switcher { background: var(--bg); border-color: var(--edge); box-shadow: none; backdrop-filter: none; }
.language-option { color: var(--ink-muted); font-weight: 600; }
.language-option:hover { background: var(--surface); }
.language-option[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: none; }
.language-flag { box-shadow: 0 0 0 1px var(--edge); }

/* Buttons: navy primary, outlined secondary (homepage pattern) */
.showcase-button, .product-button {
  border-radius: 3px; background: transparent; border-color: var(--edge-strong); color: var(--ink); font-weight: 600; box-shadow: none;
}
.showcase-button:hover, .product-button:hover { background: transparent; border-color: var(--ink); }
.showcase-button--primary, .product-button--primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.showcase-button--primary:hover, .product-button--primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); border-color: var(--ink); color: var(--bg); }
.showcase-status, .product-status { color: var(--ink-muted); }

/* Flatten cards into hairline editorial blocks */
.showcase-proof, .showcase-steps li, .metric-card, .engagement, .validation-card, .build-steps li, .tool-demo__side, .demo-controls {
  background: transparent; box-shadow: none; border-color: var(--edge); border-radius: 3px;
}
.showcase-proof, .proof-strip { background: transparent; }
.case-study, .project-card { background: var(--bg); box-shadow: none; border-color: var(--edge); border-radius: 3px; }
.case-study:hover, .project-card:hover { border-color: var(--amber); }
.showcase-list li { border-top-color: var(--edge); }
.validation-card--done { border-color: var(--ink); }
.validation-card--done > span { color: var(--ink); }
.demo-pill--amber { border-color: var(--edge-strong); }
.demo-table tr[data-demo-row]:hover, .demo-table tr.is-selected { background: var(--surface); }
.demo-controls button:hover { background: var(--surface); }

/* Real product imagery keeps its own palette inside a quiet frame */
.showcase-visual, .showcase-demo, .preview-phone, .demo-phone, .preview-car {
  box-shadow: 0 1px 2px rgba(23, 52, 92, .08), 0 18px 40px -30px rgba(23, 52, 92, .45); border-color: var(--edge);
}
.showcase-visual, .showcase-demo { border-radius: 3px; }
.showcase-visual figcaption, .case-study__visual figcaption {
  background: var(--bg); color: var(--ink-muted); border-color: var(--edge); backdrop-filter: none;
  font-family: var(--font-body); font-weight: 400; letter-spacing: .02em;
}
.case-study__visual, .project-card__visual { background: var(--surface); }
.tree-card-preview { background: var(--surface); }
.showcase-demo__bar { background: var(--surface); color: var(--ink-muted); }
.preview-phone, .demo-phone { --bg: var(--device-bg); }
.evolution-map { background: var(--surface); }

.catalog-footer { border-top-color: var(--edge); color: var(--ink-muted); }
.catalog-footer a { color: var(--ink); }

/* Game Bench affiliation block (showcase page) */
.affiliation { display: grid; grid-template-columns: .85fr 1.15fr; gap: 72px; padding: 48px 0; border-top: 1px solid var(--edge); }
.affiliation .tela-logo { display: block; width: 112px; height: auto; margin: 0 0 22px; color: var(--ink); }
.affiliation h2 { margin: 0; font: 400 32px/1.2 var(--font-serif); letter-spacing: -.03em; }
.affiliation p { max-width: 640px; margin: 0 0 16px; color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.affiliation p:first-child { color: var(--ink); font-size: 19px; line-height: 1.6; }
.affiliation a { color: var(--ink); font-size: 14px; }
@media (max-width: 820px) { .affiliation { grid-template-columns: 1fr; gap: 24px; } }

/* Device mockups render the product's own dark UI */
.preview-phone, .demo-phone, .preview-car, .demo-auto {
  --bg: #0D1B2A; --surface: #142640; --surface-2: #1A2D52; --surface-3: #1E3158;
  --edge: #1E3158; --edge-strong: #2A3F66;
  --ink: #E8E8E8; --ink-soft: #A8B8D9; --ink-muted: #64748B;
  --navy-light: #3D5A9C; --navy-lighter: #7894C5;
  color-scheme: dark; color: var(--ink);
}
.preview-car, .demo-auto { background: #142640; }

/* Closing calls to action: flat soft-paper panel */
.showcase-cta, .product-cta { border: 0; border-radius: 3px; background: var(--surface); box-shadow: none; }
/* Theme toggle lives in the fixed language switcher on every project page */
.language-switcher .theme-toggle {
  margin-left: 4px; padding: 5px 10px; border: 1px solid var(--edge); border-radius: 3px;
  background: transparent; color: var(--ink); font: 600 11px/1.2 var(--font-body); letter-spacing: .02em; cursor: pointer;
}
.language-switcher .theme-toggle:hover { border-color: var(--ink); }
.language-switcher { display: flex; align-items: center; gap: 2px; grid-template-columns: none; }
