/*
 * SIDAS PZP – strona domowa.
 * Wartości (kolory, odstępy, breakpointy) odwzorowują dawny theme Chakra UI v1:
 * breakpointy: sm 30em, md 48em, lg 62em, xl 80em.
 */

/* ---------- Fonty (Inter variable, self-hosted, licencja OFL – assets/fonts/OFL.txt) ---------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Kolory ---------- */

:root {
  color-scheme: light;

  --primary-200: #ff9a7c;
  --primary-300: #ff8153;
  --primary-400: #ff6b29;
  --primary-500: #ff5800;
  --primary-600: #d64100;
  --primary-700: #ac2e00;

  --bg: #ffffff;
  --text: #1a202c;
  --border: #e2e8f0;
  --header-bg: #ffffff;
  --muted-bg: #f7fafc;
  --card-bg: #ffffff;
  --drawer-bg: #ffffff;

  --accent: var(--primary-500);
  --icon: var(--primary-600);
  --card-icon: var(--primary-500);

  --text-strong: #171923;
  --text-hero: #2d3748;
  --text-desc: #4a5568;
  --text-muted: #718096;
  --text-footer: #2d3748;
  --nav-link: #4a5568;
  --drawer-link: #2d3748;
  --drawer-icon: #718096;
  --link: #2b6cb0;
  --link-footer: #2c5282;

  --menu-border: #e2e8f0;
  --hover-bg: #f7fafc;
  --icon-btn-hover: #edf2f7;
  --icon-btn-active: #e2e8f0;

  --btn-solid-bg: var(--primary-500);
  --btn-solid-fg: #ffffff;
  --btn-solid-hover: var(--primary-600);
  --btn-solid-active: var(--primary-700);
  --btn-ghost-fg: var(--primary-600);
  --btn-ghost-hover: rgba(255, 88, 0, 0.08);
  --btn-ghost-active: rgba(255, 88, 0, 0.16);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #1a202c;
  --text: rgba(255, 255, 255, 0.92);
  --border: rgba(255, 255, 255, 0.16);
  --header-bg: #1a202c;
  --muted-bg: #2d3748;
  --card-bg: #4a5568;
  --drawer-bg: #2d3748;

  --accent: var(--primary-200);
  --icon: var(--primary-200);
  --card-icon: var(--primary-300);

  --text-strong: #ffffff;
  --text-hero: #cbd5e0;
  --text-desc: #cbd5e0;
  --text-muted: #e2e8f0;
  --text-footer: #ffffff;
  --nav-link: #cbd5e0;
  --drawer-link: #e2e8f0;
  --drawer-icon: #a0aec0;
  --link: #63b3ed;
  --link-footer: #90cdf4;

  --menu-border: #4a5568;
  --hover-bg: #2d3748;
  --icon-btn-hover: rgba(255, 255, 255, 0.08);
  --icon-btn-active: rgba(255, 255, 255, 0.16);

  --btn-solid-bg: var(--primary-200);
  --btn-solid-fg: #1a202c;
  --btn-solid-hover: var(--primary-300);
  --btn-solid-active: var(--primary-400);
  --btn-ghost-fg: var(--primary-200);
  --btn-ghost-hover: rgba(255, 154, 124, 0.12);
  --btn-ghost-active: rgba(255, 154, 124, 0.24);
}

/* ---------- Reset / baza ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border);
  overflow-wrap: break-word;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.2s;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-size: inherit;
  font-weight: inherit;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

img {
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
  padding: 0;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.6);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: currentColor;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0.5rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background: var(--btn-solid-bg);
  color: var(--btn-solid-fg);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.5rem;
}

.accent {
  color: var(--accent);
}

/* ---------- Przyciski ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  padding: 0 1rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn .icon {
  width: 1em;
  height: 1em;
}

.btn-lg {
  height: 3rem;
  min-width: 3rem;
  padding: 0 1.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  height: 2rem;
  min-width: 2rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

.btn-xs {
  height: 1.5rem;
  min-width: 1.5rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
}

.btn-solid {
  background: var(--btn-solid-bg);
  color: var(--btn-solid-fg);
}

.btn-solid:hover {
  background: var(--btn-solid-hover);
}

.btn-solid:active {
  background: var(--btn-solid-active);
}

.btn-ghost,
.btn-outline {
  color: var(--btn-ghost-fg);
}

.btn-ghost:hover,
.btn-outline:hover {
  background: var(--btn-ghost-hover);
}

.btn-ghost:active,
.btn-outline:active {
  background: var(--btn-ghost-active);
}

.btn-outline {
  border: 1px solid currentColor;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
}

.icon-btn .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.icon-btn:hover {
  background: var(--icon-btn-hover);
}

.icon-btn:active {
  background: var(--icon-btn-active);
}

/* ---------- Nagłówek ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  min-height: 42px;
  padding: 0.5rem;
  background: var(--header-bg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  width: 161px;
  height: 40px;
}

.logo-dark,
[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  padding-left: 1rem;
}

.main-nav__links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 600;
  color: var(--nav-link);
  transition: color 0.2s ease-in-out;
}

.nav-link:hover {
  color: var(--accent);
}

.dropdown__toggle {
  color: var(--nav-link);
  background: var(--header-bg);
}

.dropdown__toggle:hover,
.dropdown:focus-within .dropdown__toggle {
  color: var(--accent);
  background: var(--icon-btn-hover);
}

/* Panel rozwijany na całą szerokość nagłówka, bez "top" – zaczyna się pod przyciskiem. */
.dropdown__panel {
  position: absolute;
  left: 0;
  width: 100%;
  display: none;
}

.dropdown:hover .dropdown__panel,
.dropdown:focus-within .dropdown__panel {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.header-actions .btn-login {
  display: none;
}

[data-theme="dark"] .icon-moon,
.icon-sun {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

@media (min-width: 30em) {
  .site-header {
    padding: 0.5rem 1rem;
  }
}

@media (min-width: 48em) {
  .site-header {
    min-height: 70px;
    padding: 1rem;
  }

  .main-nav {
    display: inline-flex;
  }

  .header-actions .btn-login {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }
}

/* ---------- "Dołącz do nas" (dropdown i menu mobilne) ---------- */

.join-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 2;
  padding: 2rem 3rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--menu-border);
}

.join-list a {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease-in-out;
}

.join-list a:hover {
  background: var(--hover-bg);
}

.join-list .icon {
  color: var(--icon);
}

.join-list__title,
.join-list__desc {
  display: block;
}

.join-list__title {
  font-size: 0.875rem;
  font-weight: 700;
}

.join-list__desc {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- Menu mobilne (dialog) ---------- */

.drawer {
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  color: var(--text);
  background: var(--drawer-bg);
}

.drawer[open] {
  animation: drawer-in 0.2s ease-out;
}

.drawer::backdrop {
  background: rgba(0, 0, 0, 0.48);
}

@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .drawer[open] {
    animation: none;
  }
}

body:has(.drawer[open]) {
  overflow: hidden;
}

.drawer__header {
  padding: 1rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.drawer__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
}

.drawer__close .icon {
  width: 0.75rem;
  height: 0.75rem;
}

.drawer__body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 1.5rem 2rem;
}

.drawer__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--drawer-link);
  transition: color 0.2s ease-in-out;
}

.drawer__links a:hover {
  color: var(--accent);
}

.drawer__links .icon {
  color: var(--drawer-icon);
}

.drawer .join-list {
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0;
  background: transparent;
}

.divider {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  opacity: 0.6;
}

/* ---------- Sekcje ---------- */

main {
  overflow-x: hidden;
}

.section {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding: 0 0.75rem;
}

.section--band {
  max-width: 100%;
  background: var(--muted-bg);
}

.section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stack > * {
  max-width: 100%;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

@media (min-width: 48em) {
  .section {
    padding: 0 1.5rem;
  }

  .section-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 62em) {
  .section {
    margin-top: 6rem;
  }
}

@media (min-width: 80em) {
  .section {
    padding: 0;
  }
}

/* Hero */

.hero {
  margin-top: 7rem;
  padding-bottom: 0.5rem;
}

.hero__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.hero__title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.25;
}

.hero__title span {
  display: block;
}

.hero__title .accent {
  font-size: 1.5rem;
}

.hero__lead {
  font-size: 1rem;
  color: var(--text-hero);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding-top: 0.75rem;
}

@media (min-width: 48em) {
  .hero {
    margin-top: 10rem;
    padding-bottom: 4rem;
  }

  .hero__header {
    align-items: flex-start;
    text-align: start;
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__title .accent {
    font-size: 2.25rem;
  }

  .hero__lead {
    font-size: 1.125rem;
  }

  .hero__actions {
    flex-direction: row;
    align-items: flex-start;
  }
}

@media (min-width: 62em) {
  .hero {
    margin-top: 14rem;
    padding-bottom: 8rem;
  }

  .hero__lead {
    font-size: 1.25rem;
  }
}

/* Nagroda */

.award__grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 70px;
  padding: 3rem 0;
}

.award__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.award__title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.award__text p {
  color: var(--text-desc);
}

.award__image {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
}

.award__image img {
  width: 170px;
}

@media (min-width: 48em) {
  .award__text {
    align-items: flex-start;
    text-align: start;
  }

  .award__title {
    font-size: 1.5rem;
  }
}

@media (min-width: 62em) {
  .award__grid {
    grid-template-columns: 3fr 1fr;
    padding: 4rem 0;
  }

  .award__image {
    padding-top: 0;
  }
}

/* Rejestracja */

.signup {
  margin-top: 3rem;
  scroll-margin-top: 42px;
}

.signup .section__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 0 0.5rem;
  text-align: center;
}

.signup__lead {
  color: var(--text-desc);
}

.signup__cards {
  display: flex;
  flex-direction: column;
  padding-top: 1.5rem;
  text-align: start;
}

.signup__cell {
  display: flex;
  flex: 1 1 0;
  padding: 50px;
}

.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 300px;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  background: var(--card-bg);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 4rem;
  height: 4rem;
  margin-top: -3rem;
  border: 3px solid var(--card-icon);
  border-radius: 50%;
  color: var(--card-icon);
  background: var(--card-bg);
}

.card__badge .icon {
  width: 2rem;
  height: 2rem;
}

.card__title {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-strong);
}

.card__text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-desc);
}

[data-theme="dark"] .card__text {
  color: #e2e8f0;
}

.card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
}

.card__actions .btn {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

@media (min-width: 48em) {
  .signup__lead {
    font-size: 1rem;
  }

  .signup__cards {
    flex-direction: row;
  }

  .card {
    padding: 1rem 2rem;
  }

  .card__badge {
    align-self: flex-end;
  }

  .card__title {
    margin-top: 0;
    font-size: 1.5rem;
  }

  .card__text {
    font-size: 1rem;
  }

  .card__actions .btn {
    height: 2.5rem;
    padding: 0 1rem;
    font-size: 1rem;
  }
}

@media (min-width: 62em) {
  .signup {
    margin-top: 6rem;
    scroll-margin-top: 70px;
  }

  .signup .section__inner {
    padding: 5rem 0 3rem;
  }

  .signup__lead {
    font-size: 1.25rem;
  }

  .signup__cards {
    gap: 0.5rem;
  }
}

/* Funkcje */

.features {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  margin-top: 3.5rem;
}

.features__header {
  text-align: center;
}

.features__lead {
  max-width: 56rem;
  margin-top: 1rem;
  color: var(--text-desc);
}

.features__list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.feature {
  display: flex;
  flex-direction: column;
}

.feature__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: var(--icon);
}

.feature__icon .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.feature__body {
  margin-left: 1rem;
}

.feature__title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
}

.feature__text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-desc);
}

.feature__text a {
  color: var(--link);
}

@media (min-width: 48em) {
  .features__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }

  .feature {
    flex-direction: row;
  }

  .feature__title {
    font-size: 1.125rem;
  }

  .feature__text {
    font-size: 1rem;
  }
}

@media (min-width: 62em) {
  .features {
    margin-top: 6rem;
  }

  .features__lead {
    margin-inline: auto;
    font-size: 1.25rem;
  }
}

/* O platformie (pasek) */

.about2 .section__inner {
  padding: 3rem 0;
}

@media (min-width: 62em) {
  .about2 .section__inner {
    padding: 5rem 0;
  }
}

/* ---------- Podstrony (instrukcje, 404) ---------- */

.page {
  display: flex;
  margin-top: 7rem;
  margin-bottom: 7rem;
}

.page__box {
  width: 600px;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.page__title {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.page__text {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

@media (min-width: 48em) {
  .page {
    margin-top: 10rem;
    margin-bottom: 10rem;
  }

  .page__box {
    text-align: start;
  }

  .page__title {
    font-size: 2.25rem;
  }

  .page__text {
    font-size: 1.125rem;
  }
}

@media (min-width: 62em) {
  .page {
    margin-top: 14rem;
  }
}

/* ---------- Stopka ---------- */

.site-footer {
  margin: 0.75rem 0;
  padding: 0 0.75rem;
}

.site-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
}

.site-footer__inner > .divider:first-child {
  margin-bottom: 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 2rem;
}

.footer-logo {
  display: flex;
}

.footer-logo .logo-wrap {
  margin: 0 auto;
}

.footer-heading {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-footer);
}

.footer-list a {
  transition: color 0.2s ease-in-out;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-contact address {
  font-style: normal;
}

.footer-contact li {
  display: flex;
  gap: 0.75rem;
}

.footer-contact a {
  color: var(--link-footer);
}

.footer-bottom {
  margin-top: 2.5rem;
}

.footer-bottom__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.footer-bottom .btn .icon {
  width: 14px;
  height: 14px;
}

@media (min-width: 48em) {
  .site-footer {
    margin: 2.5rem 0;
    padding: 0 1.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-logo {
    grid-column: span 3;
  }
}

@media (min-width: 62em) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-logo {
    grid-column: span 1;
  }

  .footer-logo .logo-wrap {
    margin: 0;
  }

  .footer-heading {
    font-size: 1.25rem;
  }

  .footer-list {
    font-size: 1rem;
  }
}

@media (min-width: 80em) {
  .site-footer {
    margin: 4rem 0;
  }
}
