/* ===========================================================
   SAMSUFI Sp. z o.o. — strona wizytówka
   Czysty CSS. Przełącznik języka PL/EN/FR bez JavaScriptu.
   =========================================================== */

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

* { margin: 0; }

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

body {
  min-height: 100vh;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --ink:      #1B1730;   /* atramentowy aubergine       */
  --ink-soft: #4A4560;   /* tekst drugorzędny           */
  --paper:    #EDECF2;   /* chłodna porcelana           */
  --card:     #FBFAFE;   /* jasne płótno                */
  --line:     #D6D3E0;   /* delikatne linie             */

  --violet:   #6A4BFF;   /* kolor marki                 */
  --violet-d: #4B2FE0;
  --coral:    #FF6A4D;
  --amber:    #FFC24B;
  --teal:     #16BFB0;

  --wrap: 1160px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 18px;
  --radius-lg: 26px;

  --shadow-sm: 0 2px 8px rgba(27, 23, 48, .06);
  --shadow-md: 0 18px 44px -20px rgba(27, 23, 48, .30);
  --shadow-lg: 0 40px 90px -40px rgba(27, 23, 48, .45);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ===========================================================
   PRZEŁĄCZNIK JĘZYKA — mechanika CSS
   Radia leżą na początku <body>, treść w .page (rodzeństwo).
   Domyślnie: polski.
   =========================================================== */
.lang-input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* każdy string ma 3 warianty, wszystkie ukryte poza aktywnym */
.t > [lang] { display: none; }

#lang-pl:checked ~ .page .t > [lang="pl"],
#lang-en:checked ~ .page .t > [lang="en"],
#lang-fr:checked ~ .page .t > [lang="fr"] { display: inline; }

/* aktywny chip w przełączniku */
#lang-pl:checked ~ .page label[for="lang-pl"],
#lang-en:checked ~ .page label[for="lang-en"],
#lang-fr:checked ~ .page label[for="lang-fr"] {
  background: var(--ink);
  color: var(--card);
  border-color: var(--ink);
}

/* fokus klawiaturą na radiu → widoczny ring na powiązanym chipie */
#lang-pl:focus-visible ~ .page label[for="lang-pl"],
#lang-en:focus-visible ~ .page label[for="lang-en"],
#lang-fr:focus-visible ~ .page label[for="lang-fr"] {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--violet-d);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .04em;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -.03em;
  color: var(--ink);
  text-decoration: none;
}
.brand .dot { color: var(--violet); }

.switch {
  display: inline-flex;
  gap: .35rem;
  padding: .28rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.switch label {
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .08em;
  padding: .34rem .6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.switch label:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5.5rem);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy > * + * { margin-top: 1.4rem; }

.hero h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: .98;
  letter-spacing: -.035em;
  color: var(--ink);
}
.hero h1 .accent { color: var(--violet); }
.hero h1 .line2 { display: block; color: var(--ink-soft); }

.hero p.lede {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  padding: .95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease);
}
.btn-primary {
  background: var(--ink);
  color: var(--card);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--card); transform: translateY(-2px); }

/* ---------- Sygnatura: płótno z kafelkami ---------- */
.canvas {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  background:
    radial-gradient(120% 120% at 15% 10%, #fff 0%, var(--card) 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
/* subtelna siatka „projektowa” na płótnie */
.canvas::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  opacity: .35;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 60%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 40%, #000 60%, transparent);
}

.tile {
  position: absolute;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  color: #fff;
  transition: transform .4s var(--ease);
}
.tile:hover { transform: translateY(-6px) rotate(0deg) !important; }

.tile--type {
  top: 12%; left: 10%;
  width: 34%; height: 34%;
  background: var(--violet);
  font-size: clamp(2rem, 6vw, 3.2rem);
  transform: rotate(-6deg);
}
.tile--code {
  bottom: 12%; left: 16%;
  width: 30%; height: 22%;
  background: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: .05em;
  transform: rotate(4deg);
}
.tile--canva {
  top: 26%; right: 8%;
  width: 40%; height: 18%;
  background: var(--teal);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(.8rem, 2.2vw, 1.05rem);
  letter-spacing: .12em;
  transform: rotate(3deg);
}
.tile--coral {
  bottom: 16%; right: 12%;
  width: 22%; height: 22%;
  background: var(--coral);
  border-radius: 50% 50% 50% 12px;
  transform: rotate(-3deg);
}
.tile--amber {
  top: 8%; right: 30%;
  width: 12%; height: 12%;
  background: var(--amber);
  border-radius: 8px;
  transform: rotate(9deg);
}

/* ---------- Sekcje ogólne ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-top: .7rem;
}

.divider { border: 0; border-top: 1px solid var(--line); }

/* ---------- Usługi ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.service {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service .num {
  font-family: "JetBrains Mono", monospace;
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--violet-d);
}
.service h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  letter-spacing: -.02em;
  margin: .9rem 0 .6rem;
  color: var(--ink);
}
.service p { color: var(--ink-soft); }
.service .bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
}
.service--canva .bar { background: var(--teal); }
.service--custom .bar { background: var(--coral); }

/* ---------- Realizacje ---------- */
.work-feature {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3.25rem);
  box-shadow: var(--shadow-sm);
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.4rem;
}
.chip {
  font-family: "JetBrains Mono", monospace;
  font-size: .7rem;
  letter-spacing: .08em;
  padding: .34rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip--brand { background: var(--ink); color: var(--card); border-color: var(--ink); }
.work-feature h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  color: var(--ink);
}
.work-feature h3 .accent { color: var(--violet); }
.work-feature p { color: var(--ink-soft); margin-top: 1rem; max-width: 44ch; }
.work-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--violet-d);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease), gap .2s var(--ease);
}
.work-link:hover { border-color: var(--violet); gap: .8rem; }

/* mockup panelu aplikacji (echo prawdziwego UI) */
.app-mock {
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 1.15rem;
}
.app-mock__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .3rem;
}
.app-mock__brand {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.02em;
  color: var(--ink);
}
.app-mock__dots { display: inline-flex; gap: 5px; }
.app-mock__dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line);
}
.app-mock__label {
  font-family: "JetBrains Mono", monospace;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: .9rem 0 .5rem;
}
.vrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  margin-top: .5rem;
}
.vrow.is-active {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 22%, transparent);
}
.avatar {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: .82rem;
}
.avatar--violet { background: var(--violet); }
.avatar--teal   { background: var(--teal); }
.vrow__meta { min-width: 0; flex: 1; }
.vrow__name {
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vrow__sub {
  font-family: "JetBrains Mono", monospace;
  font-size: .64rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
}
.vrow__play {
  flex: none;
  width: 26px; height: 26px;
  color: var(--ink);
  display: grid; place-items: center;
  font-size: .7rem;
}
.mock-pills { display: flex; gap: .4rem; margin-top: .8rem; }
.mock-pill {
  flex: 1;
  font-family: "JetBrains Mono", monospace;
  font-size: .64rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem .6rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-btn {
  margin-top: .9rem;
  width: 100%;
  background: var(--violet);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: .8rem;
  font-family: "JetBrains Mono", monospace;
  font-size: .74rem;
  letter-spacing: .04em;
}

/* wiele realizacji + naprzemienny rytm */
.work-feature + .work-feature { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.work-feature--reverse .work-copy { order: 2; }

/* przyciski sklepów */
.store-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.store-badge svg { width: 20px; height: 20px; flex: none; }
.store-badge__txt { display: flex; flex-direction: column; line-height: 1.12; }
.store-badge__txt small {
  font-family: "JetBrains Mono", monospace;
  font-size: .56rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .72;
}
.store-badge__txt b {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: -.01em;
}

/* zrzut ekranu aplikacji mobilnej w ramce telefonu */
.phone-shot {
  width: 100%;
  max-width: 250px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 34px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.phone-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 27px;
  background: var(--paper);
}

/* zrzut gry w ramce przeglądarki */
.browser-shot {
  width: 100%;
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.browser-shot__bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .75rem;
  background: color-mix(in srgb, var(--ink) 5%, var(--card));
  border-bottom: 1px solid var(--line);
}
.browser-shot__dots { display: inline-flex; gap: 5px; flex: none; }
.browser-shot__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser-shot__url {
  flex: 1;
  font-family: "JetBrains Mono", monospace;
  font-size: .66rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: .32rem .7rem;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-shot img { display: block; width: 100%; height: auto; background: var(--paper); }

/* ---------- Biura ---------- */
.offices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.office {
  background: var(--ink);
  color: var(--card);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3.4vw, 2.6rem);
  box-shadow: var(--shadow-md);
}
.office .flag {
  font-family: "JetBrains Mono", monospace;
  font-size: .74rem;
  letter-spacing: .18em;
  color: var(--amber);
}
.office h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -.02em;
  margin: .5rem 0 .3rem;
}
.office p { color: color-mix(in srgb, var(--card) 72%, transparent); }

/* ---------- Kontakt + dane spółki ---------- */
.contact .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-cta h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--ink);
}
.mailto {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: -.02em;
  color: var(--violet-d);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color .2s var(--ease);
}
.mailto:hover { border-color: var(--violet); }

.company {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
}
.company .legal-name {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.3;
}
.data-list {
  list-style: none;
  padding: 0;
  margin-top: 1.3rem;
  border-top: 1px solid var(--line);
}
.data-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.data-list dt, .data-list .k {
  font-family: "JetBrains Mono", monospace;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.data-list .v {
  font-family: "JetBrains Mono", monospace;
  font-size: .9rem;
  color: var(--ink);
  text-align: right;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: .85rem;
}
.site-footer .brand { font-size: 1.15rem; }

/* ---------- Animacja wejścia ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float-in {
  from { opacity: 0; transform: translateY(30px) scale(.92); }
  to   { opacity: 1; }
}
.reveal { animation: rise .8s var(--ease) both; }
.reveal-1 { animation-delay: .05s; }
.reveal-2 { animation-delay: .18s; }
.reveal-3 { animation-delay: .31s; }
.canvas { animation: float-in 1s var(--ease) .2s both; }

/* ---------- Responsywność ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .canvas { max-width: 360px; }
  .services,
  .offices,
  .contact .wrap { grid-template-columns: 1fr; }

  .work-feature { grid-template-columns: 1fr; }
  .app-mock, .phone-shot { order: -1; }
  .work-feature--reverse .work-copy { order: 0; }
}

@media (max-width: 460px) {
  .switch label { padding: .34rem .5rem; font-size: .7rem; }
  .brand { font-size: 1.25rem; }
}

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

/* ---------- Redukcja ruchu ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .tile:hover { transform: none !important; }
}
