/* Biennale — brand typeface (Latinotype webfont licence), same files as dom-ciepla-mono/web. */
@font-face {
  font-family: 'Biennale';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Biennale-Regular.woff2') format('woff2'),
       url('/fonts/Biennale-Regular.woff') format('woff');
}
@font-face {
  font-family: 'Biennale';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Biennale-Bold.woff2') format('woff2'),
       url('/fonts/Biennale-Bold.woff') format('woff');
}

/* Tokens — Figma "Dom Ciepła UI - Style" */
:root {
  --color-white: #fff;
  --font-sans: 'Biennale', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Fallback tint under the gradient while it loads (darkest top-right stop of gradient-v2). */
  --color-bg: #a70000;
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, p { margin: 0; }

/* ───────────── Desktop — "Zaślepka - desktop" 1440×900 ───────────── */
.page {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100svh;
  padding: 160px 120px 64px;
  overflow: hidden;
}

/* gradient/gradient-v2 — WebGPU mesh gradient (ShaderFill) on top of a pre-rendered JPG of the same shader (fallback without WebGPU). */
.shader-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-bg) url('/assets/gradient-v2-desktop.jpg') center / 100% 100% no-repeat;
}
.shader-bg__canvas {
  position: absolute;
  inset: 0;
}

/* "Treść" */
.content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

/* Desktop "Treść" = gap 64 between logo and "Nagłówek" */
.header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 64px;
  width: 100%;
}

.logo { position: relative; flex-shrink: 0; }

/* Logo/Biały instance — 380 × 49.828 */
.logo--full {
  width: 380px;
  height: 49.828px;
  overflow: clip;
}
.logo__group {
  position: absolute;
  inset: 0 0.07% 0 0;
  -webkit-mask: url('/assets/logo-group-mask.svg') 0 0 / 100% 100% no-repeat;
          mask: url('/assets/logo-group-mask.svg') 0 0 / 100% 100% no-repeat;
}
.logo__group img,
.logo--sygnet img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

/* Logo/Sygnet – biały instance — 62.772 × 58.115 (mobile only) */
.logo--sygnet {
  display: none;
  width: 62.772px;
  height: 58.115px;
}

/* "Nagłówek" (desktop) / "Tekst" (mobile) */
.text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 880px;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* heading/desktop/d1 — Biennale Bold 80 / 0.95 */
.title {
  width: 100%;
  font-weight: 700;
  font-size: 80px;
  line-height: 0.95;
  letter-spacing: 0;
}

/* body/xl — Biennale Regular 28 / 1.2 */
.lead {
  width: 100%;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

/* "Stopka prawna" — body/s — Biennale Regular 14 / 1.2 */
.legal {
  width: 100%;
  flex-shrink: 0;
}
.legal p {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* ───────────── Tablet — between the two designed frames ───────────── */
@media (max-width: 1199px) {
  .page { padding: 120px 64px 48px; }
  .title { font-size: 64px; }
  .lead { font-size: 24px; }
}

/* ───────────── Mobile — "Zaślepka - mobile" 390×844 ───────────── */
@media (max-width: 767px) {
  .shader-bg { background-image: url('/assets/gradient-v2-mobile.jpg'); }

  .page {
    padding: 32px 24px;
    padding: max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
             max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  }

  /* "Treść" — fills the height, header sits 128px below its top */
  .content {
    flex: 1 0 0;
    padding-top: 128px;
  }

  /* mobile "Nagłówek" — gap 40 between sygnet and "Tekst" */
  .header { gap: 40px; }

  .logo--full { display: none; }
  .logo--sygnet { display: block; }

  .text { width: 100%; }

  /* heading/mobile/h1 — Biennale Bold 40 / 0.95 */
  .title { font-size: 40px; }
  .title__break { display: none; }

  /* body/m — Biennale Regular 16 / 1.2 */
  .lead { font-size: 16px; }

  /* body/caption — Biennale Regular 12 / 1.2 */
  .legal p { font-size: 12px; }
}
