/* ==========================================================================
   Kynologic Sp. z o.o. — strona firmowa
   Design tokens i style wg handoffu (high-fidelity)
   ========================================================================== */

:root {
  /* Tła */
  --bg:            #f7f8fa;
  --surface:       #ffffff;
  --navy:          #12326e;
  --navy-deep:     #0c2450;
  --field-bg:      #0e2a5c;
  --field-border:  #33518f;

  /* Tekst */
  --text:          #0e1726;
  --text-2:        #4b5768;
  --text-nav:      #3b4657;
  --on-navy:       #c3d0ea;
  --on-navy-label: #9db4e4;
  --on-navy-foot:  #8fa5d4;

  /* Akcent */
  --accent:        #1d4ed8;
  --accent-hover:  #1741b8;
  --icon-bg:       #e3ebfb;

  /* Obramowania */
  --border:        #e6e9ef;
  --border-2:      #d8dde6;
  --border-3:      #c9d2df;

  /* Layout */
  --maxw:          1200px;
  --pad-x:         56px;
  --nav-h:         70px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Archivo', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Wrapper wyśrodkowujący treść na szerokich ekranach */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--light { color: var(--on-navy-label); }

/* --- Przyciski ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--outline {
  background: var(--surface);
  border-color: var(--border-3);
  color: var(--text);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

/* --- Nawigacja ------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand__mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}
.brand__name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
}
.nav__link {
  color: var(--text-nav);
  text-decoration: none;
  transition: color .15s ease;
}
.nav__link:hover { color: var(--accent); }

/* Przełącznik języka */
.langswitch {
  display: flex;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
}
.langswitch a {
  padding: 5px 10px;
  background: #fff;
  color: #64748b;
  text-decoration: none;
  line-height: 1.4;
}
.langswitch a[aria-current="true"] {
  background: var(--navy);
  color: #fff;
}

.nav__cta {
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 14px;
}

/* Hamburger (mobile) */
.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}
.nav__toggle svg { width: 22px; height: 22px; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

/* --- Sekcje ---------------------------------------------------------------- */
.section { padding-block: 72px; }
.section--white  { background: var(--surface); border-top: 1px solid var(--border); }
.section--light  { background: var(--bg);      border-top: 1px solid var(--border); }

.section__head h2 {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* --- Hero ------------------------------------------------------------------ */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 56px;
  align-items: center;
  padding-block: 84px 76px;
}
.hero__eyebrow { display: inline-block; margin-bottom: 20px; }
.hero h1 {
  font-size: 54px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.hero__lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-2);
  margin-top: 22px;
  max-width: 600px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.hero__actions .btn {
  padding: 14px 26px;
  border-radius: 8px;
  font-size: 15.5px;
}
.media {
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .media { height: 420px; }

/* --- Usługi ---------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
}
.card__num {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: var(--icon-bg);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
}
.card__title {
  font-size: 18px;
  font-weight: 700;
  margin-top: 18px;
}
.card__desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin-top: 10px;
}
.card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text-2);
}

/* --- Cyber band ------------------------------------------------------------ */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px;
  align-items: center;
}
.split h2 {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: pretty;
}
.split__lead {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
  margin-top: 16px;
  max-width: 540px;
}
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
  max-width: 560px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
}
.tile span {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}
.split .media {
  max-width: 460px;
  height: 460px;
  justify-self: center;
}

/* --- O firmie + Kontakt (band granatowy) ----------------------------------- */
.band {
  background: var(--navy);
  color: #fff;
  padding-block: 72px;
}
.band__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: stretch;
}
.band .media {
  border-radius: 14px;
  width: 100%;
}
.band__photo {
  height: 100%;
  min-height: 360px;
}
.about h2 {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: pretty;
}
.about p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--on-navy);
  margin-top: 16px;
}
.about p + p { margin-top: 14px; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.stat__num {
  font-size: 26px;
  font-weight: 800;
}
.stat__label {
  font-size: 13px;
  color: var(--on-navy-label);
  margin-top: 2px;
}

/* Kontakt / formularz */
.contact {
  font-size: 14.5px;
  line-height: 2;
  color: var(--on-navy);
}
.contact .eyebrow { margin-bottom: 12px; }

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.form input,
.form textarea {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  width: 100%;
}
.form input::placeholder,
.form textarea::placeholder { color: #8fa5d4; }
.form input:focus,
.form textarea:focus { border-color: #5b7ac0; }
.form textarea { resize: vertical; min-height: 108px; }

.form button {
  padding: 13px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.form button:hover { background: var(--accent-hover); }
.form button:disabled { opacity: .6; cursor: default; }

.captcha-slot:not(:empty) { margin-bottom: 4px; }

/* --- Sekcja Kontakt (jasna) ------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
  margin-top: 34px;
}
.contact-info__lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 22px;
  max-width: 340px;
}
.contact-info__row {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.contact-info__row span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}
.contact-info__row a { color: inherit; text-decoration: none; }
.contact-info__row a:hover { color: var(--accent); }
.contact-info__reg {
  font-size: 13px;
  line-height: 1.7;
  color: #8a93a3;
  margin-top: 18px;
}

/* Formularz na jasnym tle */
.form--light input,
.form--light textarea {
  background: #ffffff;
  border: 1px solid var(--border-2);
  color: var(--text);
}
.form--light input::placeholder,
.form--light textarea::placeholder { color: #8a93a3; }
.form--light input:focus,
.form--light textarea:focus { border-color: var(--accent); }
.form--light .consent { color: var(--text-2); }
.form--light .consent a { color: var(--accent); }
.form--light .form__status--ok {
  background: #e7f6ed; color: #0a7d33; border: 1px solid #b7e3c6;
}
.form--light .form__status--err {
  background: #fdeaea; color: #b3261e; border: 1px solid #f3c2c2;
}

/* Honeypot — ukryte pole anti-spam */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__status {
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  display: none;
}
.form__status.is-visible { display: block; }
.form__status--ok {
  background: rgba(34,197,94,.14);
  color: #d7f5e2;
  border: 1px solid rgba(34,197,94,.4);
}
.form__status--err {
  background: rgba(239,68,68,.14);
  color: #ffd9d9;
  border: 1px solid rgba(239,68,68,.4);
}

.contact__lines { margin-top: 4px; }
.contact__lines > div { }
.contact__reg {
  font-size: 13px;
  color: var(--on-navy-foot);
  margin-top: 10px;
  line-height: 1.7;
}

/* --- Zgoda RODO w formularzu ----------------------------------------------- */
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--on-navy-label);
  font-weight: 400;
  margin: 2px 0 4px;
  cursor: pointer;
}
.consent input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent a { color: #bcd0f5; text-decoration: underline; }
.consent a:hover { color: #fff; }

/* --- Strona treści prawnej (polityka prywatności) -------------------------- */
.legal { padding-block: 64px; }
.legal .prose { max-width: 760px; }
.legal h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.legal .updated {
  font-size: 13.5px;
  color: var(--text-2);
  margin-top: 8px;
}
.legal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 36px;
}
.legal p,
.legal li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
}
.legal p { margin-top: 12px; }
.legal ul { margin-top: 12px; padding-left: 20px; }
.legal li { margin-top: 6px; }
.legal a { color: var(--accent); }
.legal strong { color: var(--text); }
.legal .backlink {
  display: inline-block;
  margin-top: 40px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

/* --- Stopka ---------------------------------------------------------------- */
.footer {
  background: var(--navy-deep);
  color: var(--on-navy-foot);
  font-size: 13px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding-block: 20px;
}

/* Kotwice pod sticky nav */
[id] { scroll-margin-top: var(--nav-h); }

/* --- Responsywność --------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --pad-x: 32px; }

  .nav__toggle { display: inline-flex; }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(14,23,38,.08);
    padding: 8px 0;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__inner { position: relative; }

  .nav__link {
    padding: 12px var(--pad-x);
    font-size: 16px;
  }
  .langswitch {
    margin: 8px var(--pad-x);
    align-self: flex-start;
  }
  .nav__cta {
    margin: 4px var(--pad-x) 8px;
    padding: 12px 20px;
    text-align: center;
  }

  .hero { padding-block: 56px 48px; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .hero__lead { font-size: 17px; }

  .section { padding-block: 56px; }
  .band { padding-block: 56px; }
  .section__head h2 { font-size: 26px; }

  .cards { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .band__grid { grid-template-columns: 1fr; gap: 40px; }
  .band__photo { min-height: 260px; max-height: 340px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 520px) {
  :root { --pad-x: 20px; }
  .hero h1 { font-size: 33px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .stats { gap: 20px 28px; }
  .footer__inner { flex-direction: column; }
}

/* Szacunek dla preferencji ruchu */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
