/* Mellifer – strona główna (motyw mellifer-main 2.1).
   Tylko tokeny --mel-* z mellifer-tokens.css. Pole miodu (--mel-field) otwiera i zamyka stronę.
   Jedyny odważny element: ul w hero. Jedyna animacja: składanie ula. */

html {
  --mel-field: var(--mel-honey);
  --mel-on-field: var(--mel-text);
  --mel-deep: var(--mel-olive);
  --mel-on-deep: #EEF0E6;
  --mel-on-deep-2: #C9CDBD;
  --mel-bar-main: var(--mel-primary);
  --mel-bar-soft: #9AA58A;
  scroll-behavior: smooth;
}
html[data-mel-theme="dark"] {
  --mel-field: var(--mel-surface);
  --mel-on-field: var(--mel-honey);
  --mel-deep: #0C0F08;
  --mel-bar-soft: var(--mel-faint);
}
@media (prefers-color-scheme: dark) {
  html:not([data-mel-theme]) { --mel-field: var(--mel-surface); --mel-on-field: var(--mel-honey); --mel-deep: #0C0F08; --mel-bar-soft: var(--mel-faint); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--mel-bg);
  color: var(--mel-text);
  font-family: var(--mel-font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--mel-focus); outline-offset: 3px; }
.mel-honeyfield :focus-visible { outline-color: var(--mel-on-field); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mel-skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; background: var(--mel-surface); color: var(--mel-text); border-radius: var(--mel-r); }
.mel-skip:focus { top: 16px; }
main:focus { outline: none; }

/* ── Przyciski ── */
.mel-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 30px;
  border-radius: var(--mel-pill);
  background: var(--mel-primary); color: var(--mel-on-primary);
  font: inherit; font-size: 19px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
}
.mel-cta:hover { filter: brightness(1.12); }
.mel-cta--sm { min-height: 48px; padding: 0 22px; font-size: 17px; font-weight: 650; }
.mel-cta--lg { min-height: 60px; padding: 0 34px; font-size: 20px; }
.mel-cta--line { background: transparent; color: inherit; border-color: currentColor; font-weight: 650; }
.mel-cta--line:hover { filter: none; background: var(--mel-active-bg); }
.mel-cta--honey { background: var(--mel-honey); color: var(--mel-olive); }

/* ── Pole miodu i nagłówek ── */
.mel-honeyfield { background: var(--mel-field); color: var(--mel-on-field); }
.mel-head {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  min-height: 76px; display: flex; align-items: center; gap: 28px;
}
.mel-head__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 22px; letter-spacing: -.02em; text-decoration: none; }
.mel-head__brand .mel-logo { display: block; }
.mel-head__nav { display: flex; gap: 24px; font-size: 17px; font-weight: 500; }
.mel-head__nav a { text-decoration: none; padding: 10px 0; }
.mel-head__nav a:hover { text-decoration: underline; }
.mel-head__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mel-head__login { padding: 10px 12px; font-weight: 600; text-decoration: none; }
.mel-head__login:hover { text-decoration: underline; }
.mel-theme-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid currentColor; background: transparent; color: inherit;
  display: grid; place-items: center; cursor: pointer;
}
.mel-theme-btn[aria-pressed="true"] { background: var(--mel-on-field); color: var(--mel-field); }
.mel-head .mel-user-button { color: var(--mel-on-field); }

/* ── Hero ── */
.mel-hero {
  max-width: 1280px; margin: 0 auto; padding: 56px 32px 0;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end;
}
.mel-hero__text { flex: 1 1 520px; min-width: 0; padding-bottom: 88px; }
.mel-hero__h {
  margin: 0 0 28px; font-size: var(--mel-fs-hero); line-height: .92;
  letter-spacing: -.045em; font-weight: 760; text-wrap: balance;
}
.mel-hero__lead { margin: 0 0 36px; max-width: 30em; font-size: 21px; line-height: 1.5; }
.mel-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Ul ── */
.mel-hive { flex: 0 1 440px; min-width: 300px; margin: 0 auto; display: flex; flex-direction: column; }
.mel-hive > * { animation: mel-hive-drop .5s cubic-bezier(.2,.8,.2,1) both; }
.mel-hive > :nth-child(1) { animation-delay: .05s; }
.mel-hive > :nth-child(2) { animation-delay: .15s; }
.mel-hive > :nth-child(3) { animation-delay: .25s; }
.mel-hive > :nth-child(4) { animation-delay: .35s; }
.mel-hive > :nth-child(5) { animation-delay: .45s; }
.mel-hive > :nth-child(6) { animation-delay: .55s; }
.mel-hive > :nth-child(7) { animation-delay: .6s; }
@keyframes mel-hive-drop { from { transform: translateY(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mel-hive > * { animation: none; } }

.mel-hive__roof {
  margin: 0 -20px; padding: 16px 24px;
  background: var(--mel-primary); color: var(--mel-on-primary);
  border-radius: 10px 10px 4px 4px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-weight: 700; font-size: 19px;
}
.mel-hive__roof small { font-weight: 500; font-size: 15px; }
.mel-hive__super {
  margin-top: 6px; min-height: 72px; padding: 0 22px;
  display: flex; align-items: center; gap: 16px;
  border: 2px solid var(--mel-on-field); border-radius: 6px;
  background: var(--mel-surface); color: var(--mel-text); text-decoration: none;
}
.mel-hive__super strong { font-size: 19px; }
.mel-hive__super.is-building { background: transparent; color: inherit; border-style: dashed; }
.mel-hive__super.is-building .mel-hive__handle { visibility: hidden; }
a.mel-hive__super:hover, a.mel-hive__body:hover { box-shadow: 0 0 0 4px var(--mel-active-bg); }
.mel-hive__handle { flex: 1; display: flex; justify-content: center; }
.mel-hive__handle::before { content: ""; width: 56px; height: 10px; border-radius: 6px; background: var(--mel-border); }
.mel-hive__status { font-size: 15px; }
.mel-hive__body {
  margin-top: 6px; min-height: 200px; padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  border: 2px solid var(--mel-on-field); border-radius: 6px;
  background-color: var(--mel-surface);
  background-image: repeating-linear-gradient(90deg, transparent 0 34px, var(--mel-border) 34px 36px);
  color: var(--mel-text); text-decoration: none;
}
.mel-hive__body-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mel-hive__body-top strong { font-size: 28px; letter-spacing: -.02em; background: var(--mel-surface); padding-right: 8px; }
.mel-hive__body-top .mel-hive__status { background: var(--mel-surface); padding-left: 8px; }
.mel-hive__body-desc { align-self: flex-start; max-width: 22em; font-size: 16px; line-height: 1.45; background: var(--mel-surface); padding: 6px 8px 6px 0; }
.mel-hive__floor {
  margin: 6px -10px 0; padding: 12px 20px;
  background: var(--mel-primary); color: var(--mel-on-primary);
  border-radius: 4px; display: flex; align-items: center; gap: 14px;
  font-weight: 650; font-size: 16px;
}
.mel-hive__entrance { width: 64px; height: 8px; border-radius: 4px; background: var(--mel-on-primary); opacity: .35; }
.mel-hive__legs { display: flex; justify-content: space-between; padding: 0 36px; }
.mel-hive__legs span { width: 14px; height: 36px; background: var(--mel-primary); }

/* ── Sekcje ── */
.mel-sec { max-width: 1280px; margin: 0 auto; padding: 112px 32px 104px; }
.mel-sec__head { display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: flex-end; margin-bottom: 48px; }
.mel-h2 { flex: 1 1 420px; margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; font-weight: 740; text-wrap: balance; }
.mel-sec__lead { flex: 1 1 360px; margin: 0; max-width: 30em; color: var(--mel-text-2); }
.mel-band--alt { background: var(--mel-surface-2); }
.mel-band--deep { background: var(--mel-deep); color: var(--mel-on-deep); }

/* ── Rok w pasiece ── */
.mel-season__scroll { overflow-x: auto; padding-bottom: 8px; }
.mel-season__scroll:focus-visible { outline-offset: 6px; }
.mel-season__grid {
  min-width: 860px;
  display: grid; grid-template-columns: 220px repeat(12, minmax(0, 1fr));
  row-gap: 14px; align-items: center;
}
.mel-season__label { grid-column: 1; font-size: 14px; color: var(--mel-text-2); align-self: end; padding-bottom: 8px; }
.mel-season__label--flows { grid-row: 3 / span 2; align-self: center; padding: 0; }
.mel-season__curve { grid-column: 2 / span 12; width: 100%; height: 160px; display: block; }
.mel-season__curve path { stroke: var(--mel-bar-main); stroke-width: 4; stroke-linejoin: round; }
.mel-season__months-gap { grid-column: 1; grid-row: 2; border-top: 2px solid var(--mel-text); align-self: stretch; }
.mel-season__month { grid-row: 2; font-size: 14px; color: var(--mel-text-2); border-top: 2px solid var(--mel-text); padding-top: 8px; }
.mel-season__flow {
  grid-column: calc(var(--s) + 1) / span var(--n);
  justify-self: start; min-width: calc(100% - 4px); width: max-content;
  margin-right: 4px; padding: 4px 10px; border-radius: 4px;
  background: var(--mel-honey); color: var(--mel-olive);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.mel-season__app { grid-column: 1; padding-right: 16px; }
.mel-season__app strong { display: block; font-size: 17px; }
.mel-season__app span { font-size: 14px; color: var(--mel-text-2); }
.mel-season__bar { grid-column: calc(var(--s) + 1) / span var(--n); height: 14px; border-radius: 7px; }
.mel-season__bar--main { background: var(--mel-bar-main); }
.mel-season__bar--soft { background: var(--mel-bar-soft); }
.mel-season__grid > .mel-season__app:first-of-type { margin-top: 20px; }
.mel-season__more { margin: 36px 0 0; max-width: 46em; font-size: 16px; color: var(--mel-text-2); }
.mel-season__more a { color: var(--mel-text); font-weight: 650; }

/* ── Waga ── */
.mel-scale { max-width: 1280px; margin: 0 auto; padding: 104px 32px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.mel-scale__media { flex: 1.2 1 460px; min-width: 0; margin: 0; }
.mel-scale__media img { display: block; width: 100%; border-radius: 6px; }
.mel-scale__text { flex: 1 1 380px; min-width: 0; }
.mel-scale__text .mel-h2 { margin-bottom: 18px; }
.mel-scale__text .mel-sec__lead { margin-bottom: 32px; }
.mel-steps { margin: 0 0 32px; padding: 0; list-style: none; display: grid; gap: 20px; }
.mel-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: baseline; }
.mel-steps__n { font-size: 36px; font-weight: 760; line-height: 1; }
.mel-scale--text .mel-scale__text { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 32px 96px; }
.mel-scale--text .mel-scale__intro { flex: 1 1 420px; }
.mel-scale--text .mel-scale__steps { flex: 1 1 380px; }

/* ── Stowarzyszenie ── */
.mel-assoc { max-width: 1280px; margin: 0 auto; padding: 112px 32px; display: flex; flex-wrap: wrap; gap: 64px; }
.mel-assoc__text { flex: 1 1 440px; min-width: 0; }
.mel-assoc__text p { margin: 0 0 32px; max-width: 28em; color: var(--mel-on-deep-2); }
.mel-assoc__h { margin: 0 0 24px; font-size: clamp(40px, 5.5vw, 76px); line-height: .95; letter-spacing: -.045em; font-weight: 760; color: var(--mel-honey); text-wrap: balance; }
.mel-plan { flex: 1 1 440px; min-width: 0; margin: 0; padding: 0; list-style: none; border-left: 2px solid rgba(238, 240, 230, .2); }
.mel-plan__step { position: relative; padding: 0 0 28px 32px; }
.mel-plan__step::before { content: ""; position: absolute; left: -9px; top: 6px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--mel-honey); background: var(--mel-deep); }
.mel-plan__step.is-done::before { background: var(--mel-honey); }
.mel-plan__step strong { display: block; font-size: 20px; }
.mel-plan__step > span:not(.screen-reader-text) { color: var(--mel-on-deep-2); font-size: 16px; }

/* ── Dołącz ── */
.mel-join__in { max-width: 1280px; margin: 0 auto; padding: 96px 32px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.mel-join__h { flex: 1 1 520px; margin: 0; font-size: clamp(36px, 5vw, 68px); line-height: .98; letter-spacing: -.045em; font-weight: 760; text-wrap: balance; }

/* ── Stopka ── */
.mel-foot { max-width: 1280px; margin: 0 auto; padding: 56px 32px 64px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; font-size: 16px; }
.mel-foot__brand { flex: 1 1 280px; }
.mel-foot__brand p { margin: 10px 0 0; color: var(--mel-text-2); max-width: 22em; }
.mel-foot__nav { display: flex; flex-wrap: wrap; gap: 56px; }
.mel-foot__nav > div { display: grid; gap: 8px; align-content: start; }
.mel-foot__nav a { text-decoration: none; }
.mel-foot__nav a:hover { text-decoration: underline; }

/* ── Zwykłe strony ── */
.mel-page { max-width: 760px; margin: 0 auto; padding: 72px 32px 112px; }
.mel-article + .mel-article { margin-top: 56px; }
.mel-article__h { margin: 0 0 24px; font-size: clamp(36px, 5vw, 56px); line-height: 1; letter-spacing: -.04em; font-weight: 740; }
.mel-article__h--list { font-size: 32px; }
.mel-article__h a { text-decoration: none; }
.mel-prose { max-width: 38em; }
.mel-prose h2 { font-size: 28px; letter-spacing: -.02em; line-height: 1.15; margin: 48px 0 12px; }
.mel-prose h3 { font-size: 21px; margin: 32px 0 8px; }
.mel-prose a { color: var(--mel-accent-text); font-weight: 600; }

/* ── Telefon ── */
@media (max-width: 640px) {
  .mel-season__scroll { overflow: visible; }
  .mel-season__grid { min-width: 0; grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 8px; }
  .mel-season__label, .mel-season__months-gap { display: none; }
  .mel-season__curve { grid-column: 1 / -1; height: 110px; }
  .mel-season__month { font-size: 12px; }
  .mel-season__flow { grid-column: var(--s) / span var(--n); font-size: 12px; padding: 3px 6px; }
  .mel-season__app { grid-column: 1 / -1; padding: 12px 0 0; }
  .mel-season__app strong { display: inline; font-size: 16px; }
  .mel-season__app span { margin-left: 6px; }
  .mel-season__bar { grid-column: var(--s) / span var(--n); height: 10px; }
  .mel-season__grid > .mel-season__app:first-of-type { margin-top: 12px; }
  .mel-hive__roof { margin: 0; padding: 14px 18px; font-size: 17px; }
  .mel-hive__roof small, .mel-hive__handle { display: none; }
  .mel-hive__super { padding: 0 16px; min-height: 60px; justify-content: space-between; }
  .mel-hive__super strong, .mel-hive__status { white-space: nowrap; }
  .mel-hive__body { min-height: 170px; padding: 18px 16px; }
  .mel-hive__body-top strong { font-size: 24px; }
  .mel-hive__floor { margin: 6px 0 0; }
  .mel-hive__legs { padding: 0 28px; }
}
@media (max-width: 860px) {
  .mel-head__nav { display: none; }
}
@media (max-width: 560px) {
  .mel-head, .mel-hero, .mel-sec, .mel-scale, .mel-assoc, .mel-join__in, .mel-foot, .mel-page { padding-left: 20px; padding-right: 20px; }
  .mel-head { gap: 12px; }
  .mel-head__login { display: none; }
  .mel-hero { padding-top: 32px; }
  .mel-hero__text { padding-bottom: 32px; }
  .mel-hero__lead { font-size: 19px; }
  .mel-hive { min-width: 0; flex-basis: 100%; padding: 0 20px; }
  .mel-sec { padding-top: 80px; padding-bottom: 72px; }
  .mel-cta { width: 100%; }
  .mel-head .mel-cta { width: auto; }
}
