/* ============================================
   Godek — Maker's Bento Box
   Plain CSS · CSS Grid · Light/Dark
   ============================================ */

/* ---------- Zmienne motywu ---------- */
:root {
  /* Kolory — jasny (domyślny) */
  --bg:            #ece8e0;
  --surface:       #faf8f4;
  --surface-2:     #f2eee7;
  --text:          #1f1c17;
  --text-muted:    #6b6459;
  --border:        rgba(31, 28, 23, 0.08);
  --accent:        #b8603a;
  --accent-soft:   rgba(184, 96, 58, 0.12);
  --shadow:        0 4px 14px rgba(31, 28, 23, 0.06),
                   0 12px 34px rgba(31, 28, 23, 0.07);
  --shadow-hover:  0 10px 24px rgba(31, 28, 23, 0.10),
                   0 22px 60px rgba(31, 28, 23, 0.12);

  /* Kształt i ruch */
  --radius:        24px;
  --radius-sm:     14px;
  --gap:           20px;
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Ciemny — system */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #14120f;
    --surface:      #201d18;
    --surface-2:    #2a251f;
    --text:         #f3efe8;
    --text-muted:   #a49b8d;
    --border:       rgba(243, 239, 232, 0.09);
    --accent:       #e08a5f;
    --accent-soft:  rgba(224, 138, 95, 0.16);
    --shadow:       0 4px 14px rgba(0, 0, 0, 0.35),
                    0 12px 34px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 10px 24px rgba(0, 0, 0, 0.45),
                    0 22px 60px rgba(0, 0, 0, 0.55);
  }
}

/* Ciemny — ręczne wymuszenie (przełącznik) */
:root[data-theme="dark"] {
  --bg:           #14120f;
  --surface:      #201d18;
  --surface-2:    #2a251f;
  --text:         #f3efe8;
  --text-muted:   #a49b8d;
  --border:       rgba(243, 239, 232, 0.09);
  --accent:       #e08a5f;
  --accent-soft:  rgba(224, 138, 95, 0.16);
  --shadow:       0 4px 14px rgba(0, 0, 0, 0.35),
                  0 12px 34px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 10px 24px rgba(0, 0, 0, 0.45),
                  0 22px 60px rgba(0, 0, 0, 0.55);
}
:root[data-theme="light"] {
  --bg:           #ece8e0;
  --surface:      #faf8f4;
  --surface-2:    #f2eee7;
  --text:         #1f1c17;
  --text-muted:   #6b6459;
  --border:       rgba(31, 28, 23, 0.08);
  --accent:       #b8603a;
  --accent-soft:  rgba(184, 96, 58, 0.12);
  --shadow:       0 4px 14px rgba(31, 28, 23, 0.06),
                  0 12px 34px rgba(31, 28, 23, 0.07);
  --shadow-hover: 0 10px 24px rgba(31, 28, 23, 0.10),
                  0 22px 60px rgba(31, 28, 23, 0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: clamp(16px, 4vw, 48px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2 { line-height: 1.15; letter-spacing: -0.02em; }

/* ---------- Przełącznik motywu ---------- */
.theme-toggle {
  position: fixed;
  top: clamp(16px, 4vw, 28px);
  right: clamp(16px, 4vw, 28px);
  z-index: 10;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.theme-toggle:hover { transform: scale(1.08) rotate(-8deg); }
.theme-toggle:active { transform: scale(0.96); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Domyślnie (jasny motyw) pokazujemy księżyc = „przełącz na ciemny” */
.icon-sun  { display: none; }
.icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icon-sun  { display: block; }
  :root:not([data-theme]) .icon-moon { display: none; }
}
:root[data-theme="dark"]  .icon-sun  { display: block; }
:root[data-theme="dark"]  .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun  { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

/* ============================================
   BENTO GRID
   ============================================ */
.bento {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(120px, auto);
  grid-template-areas:
    "intro     intro     projects  projects"
    "intro     intro     partner   leather"
    "crmax     crmax     crmax     leather"
    "pobieracz pobieracz pobieracz leather"
    "pacjent   pacjent   pacjent   pacjent"
    "culinary  culinary  culinary  footer";
}

.tile--intro     { grid-area: intro; }
.tile--projects  { grid-area: projects; }
.tile--partner   { grid-area: partner; }
.tile--crmax     { grid-area: crmax; }
.tile--pobieracz { grid-area: pobieracz; }
.tile--pacjent   { grid-area: pacjent; }
.tile--leather   { grid-area: leather; }
.tile--culinary  { grid-area: culinary; }
.tile--footer    { grid-area: footer; }

/* ---------- Kafelek bazowy ---------- */
.tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 32px);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* Delikatne unoszenie kafelków (nie dotyczy stopki) */
.tile:not(.tile--footer):hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: var(--shadow-hover);
}

/* ---------- Typografia wspólna ---------- */
.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.tile__desc { color: var(--text-muted); }
.tile__more {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}
.tile--leather:hover .tile__more { transform: translateX(4px); }
.tile h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.5rem; }

/* ---------- 1. Intro ---------- */
.tile--intro { justify-content: center; }
.tile--intro h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
  background: linear-gradient(120deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tile--intro .lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-muted);
  max-width: 46ch;
}
.tile--intro strong { color: var(--text); font-weight: 650; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.2rem; }
.tag {
  font-size: 0.8rem;
  font-weight: 550;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- 2. Projekty ---------- */
.tile__head { display: flex; align-items: center; gap: 12px; margin-bottom: 0.4rem; }
.tile__badge {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.tile__badge svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.link-list { list-style: none; margin-top: auto; padding-top: 1rem; display: grid; gap: 10px; }
.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 600;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.link-item:hover { background: var(--accent-soft); transform: translateX(4px); }
.link-item__icon { color: var(--accent); flex-shrink: 0; }
.link-item__text { flex: 1; }
.link-item__arrow { color: var(--text-muted); transition: transform 0.25s var(--ease); }
.link-item:hover .link-item__arrow { transform: translate(2px, -2px); color: var(--accent); }
.link-item svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 3. Partner ---------- */
.tile--partner {
  justify-content: center;
  gap: 6px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 100% 0%, #d67a4e 0%, var(--accent) 55%, #96481f 100%);
  border: none;
}
.tile--partner__label { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.tile--partner__name  { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; }
.tile--partner__cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 0.4rem;
  font-weight: 600; font-size: 0.92rem;
}
.tile--partner__cta svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.tile--partner:hover .tile--partner__cta svg { transform: translate(3px, -3px); }

/* ---------- 4. Baner crmax ---------- */
.tile--crmax {
  justify-content: center;
  min-height: 220px;
  color: #fff;
  border: none;
  background: linear-gradient(120deg, #1e2a5a 0%, #2f4bd8 48%, #5b8bff 100%);
  isolation: isolate;
}
.tile--crmax__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(120,170,255,0.55) 0%, rgba(120,170,255,0) 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(30,20,90,0.6) 0%, rgba(30,20,90,0) 55%);
}
.tile--crmax__inner { display: flex; flex-direction: column; gap: 0.55rem; max-width: 60ch; }
.tile--crmax__badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
}
.tile--crmax__head { display: flex; align-items: center; gap: 12px; }
.tile--crmax__logo {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.tile--crmax__logo svg { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile--crmax h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; margin: 0; color: #fff; }
.tile--crmax__tld { font-weight: 500; opacity: 0.6; }
.tile--crmax__slogan { font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 650; }
.tile--crmax__desc { font-size: 0.92rem; line-height: 1.55; color: rgba(255,255,255,0.85); }
.tile--crmax__desc strong { color: #fff; font-weight: 650; }
.tile--crmax__cta {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 0.5rem;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: #23347a;
  font-weight: 700;
  font-size: 0.92rem;
}
.tile--crmax__cta svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.tile--crmax:hover .tile--crmax__cta svg { transform: translate(3px, -3px); }

/* ---------- 4b. Baner YT Pobieracz ---------- */
.tile--pobieracz {
  justify-content: center;
  min-height: 220px;
  color: #fff;
  border: none;
  background: linear-gradient(120deg, #1a0d0d 0%, #7a1414 46%, #d81f26 100%);
  isolation: isolate;
}
.tile--pobieracz__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(255,80,80,0.55) 0%, rgba(255,80,80,0) 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(60,10,10,0.65) 0%, rgba(60,10,10,0) 55%);
}
.tile--pobieracz__inner { display: flex; flex-direction: column; gap: 0.55rem; max-width: 60ch; }
.tile--pobieracz__badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
}
.tile--pobieracz__head { display: flex; align-items: center; gap: 12px; }
.tile--pobieracz__logo {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.tile--pobieracz__logo svg { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile--pobieracz h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; margin: 0; color: #fff; }
.tile--pobieracz__slogan { font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 650; }
.tile--pobieracz__desc { font-size: 0.92rem; line-height: 1.55; color: rgba(255,255,255,0.85); }
.tile--pobieracz__desc strong { color: #fff; font-weight: 650; }
.tile--pobieracz__cta {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 0.5rem;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: #a5111a;
  font-weight: 700;
  font-size: 0.92rem;
}
.tile--pobieracz__cta svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.tile--pobieracz:hover .tile--pobieracz__cta svg { transform: translateY(3px); }
.tile--pobieracz__note {
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.72);
}
.tile--pobieracz__note svg { flex-shrink: 0; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile--pobieracz__note strong { color: #fff; font-weight: 650; }

/* ---------- 4c. Baner Karta Zdrowia ---------- */
.tile--pacjent {
  justify-content: center;
  min-height: 220px;
  color: #fff;
  border: none;
  background: linear-gradient(120deg, #06231e 0%, #0d6f5b 48%, #2fc79d 100%);
  isolation: isolate;
}
.tile--pacjent__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(90,240,200,0.5) 0%, rgba(90,240,200,0) 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(5,45,40,0.65) 0%, rgba(5,45,40,0) 55%);
}
.tile--pacjent__inner { display: flex; flex-direction: column; gap: 0.55rem; max-width: 60ch; }
.tile--pacjent__badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
}
.tile--pacjent__head { display: flex; align-items: center; gap: 12px; }
.tile--pacjent__logo {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.tile--pacjent__logo svg { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile--pacjent h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; margin: 0; color: #fff; }
.tile--pacjent__slogan { font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 650; }
.tile--pacjent__desc { font-size: 0.92rem; line-height: 1.55; color: rgba(255,255,255,0.85); }
.tile--pacjent__desc strong { color: #fff; font-weight: 650; }
.tile--pacjent__cta {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 0.5rem;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: #0a5a49;
  font-weight: 700;
  font-size: 0.92rem;
}
.tile--pacjent__cta svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.tile--pacjent:hover .tile--pacjent__cta svg { transform: translate(3px, -3px); }
.tile--pacjent__note {
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.72);
}
.tile--pacjent__note svg { flex-shrink: 0; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile--pacjent__note strong { color: #fff; font-weight: 650; }

/* ---------- 5 & 6. Kafelki z obrazem ---------- */
.tile--leather, .tile--culinary { padding: 0; }
.tile__media { position: relative; overflow: hidden; flex: 1; min-height: 160px; }
.tile__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.tile:hover .tile__media img { transform: scale(1.06); }
.tile__body { padding: clamp(18px, 2.2vw, 28px); }

/* Culinary — obraz jako tło z nakładką tekstu */
.tile--culinary { min-height: 320px; }
.tile--culinary .tile__media { position: absolute; inset: 0; }
.tile--culinary .tile__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.30) 45%, rgba(0,0,0,0) 75%);
}
.tile--culinary .tile__body { position: relative; margin-top: auto; z-index: 1; color: #fff; }
.tile--culinary .tile__desc { color: rgba(255,255,255,0.88); }
.tile--culinary h2 { color: #fff; }
.tile--culinary strong { color: #fff; }
.tile--culinary .tag { background: rgba(255,255,255,0.16); color: #fff; }

/* ---------- 6. Stopka ---------- */
.tile--footer {
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  background: var(--surface-2);
}
.tile--footer p { font-size: 0.9rem; color: var(--text-muted); }
.tile--footer strong { color: var(--text); font-weight: 650; }
.tile--footer__meta { font-size: 0.8rem !important; opacity: 0.8; }

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */

/* Tablet — 2 kolumny */
@media (max-width: 860px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "intro     intro"
      "projects  partner"
      "crmax     crmax"
      "pobieracz pobieracz"
      "pacjent   pacjent"
      "leather   leather"
      "culinary  culinary"
      "footer    footer";
  }
  .tile--culinary { min-height: 280px; }
}

/* Telefon — 1 kolumna (graceful stacking) */
@media (max-width: 560px) {
  body { padding: 14px; }
  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    grid-template-areas:
      "intro"
      "projects"
      "partner"
      "crmax"
      "pobieracz"
      "pacjent"
      "leather"
      "culinary"
      "footer";
  }
  .tile--partner  { min-height: 150px; }
  .tile--leather  { min-height: 260px; }
  .tile--culinary { min-height: 340px; }
}

/* ---------- Dostępność ---------- */
:where(a, button):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
