/* Newsletter AGROSKŁAD – landing zapisu. Kolory i odstępy w zmiennych na górze. */

@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 400; src: url("../fonts/montserrat-latin-ext-400-normal.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: "Montserrat"; font-style: normal; font-display: swap; font-weight: 400; src: url("../fonts/montserrat-latin-400-normal.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; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 500; src: url("../fonts/montserrat-latin-ext-500-normal.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: "Montserrat"; font-style: normal; font-display: swap; font-weight: 500; src: url("../fonts/montserrat-latin-500-normal.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; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 600; src: url("../fonts/montserrat-latin-ext-600-normal.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: "Montserrat"; font-style: normal; font-display: swap; font-weight: 600; src: url("../fonts/montserrat-latin-600-normal.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; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 700; src: url("../fonts/montserrat-latin-ext-700-normal.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: "Montserrat"; font-style: normal; font-display: swap; font-weight: 700; src: url("../fonts/montserrat-latin-700-normal.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; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 800; src: url("../fonts/montserrat-latin-ext-800-normal.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: "Montserrat"; font-style: normal; font-display: swap; font-weight: 800; src: url("../fonts/montserrat-latin-800-normal.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; }

:root {
  --green-900: #1C3B2A;      /* tło hero, ciemne przyciski */
  --green-800: #234832;
  --brand: #83BC41;          /* zieleń logo */
  --primary: #4F7D25;        /* główny przycisk (kontrast AA z białym) */
  --primary-hover: #436B1F;
  --accent-light: #7DBB42;   /* przycisk w hero */
  --accent-rule: #8FD3CF;    /* kreska nad nagłówkiem */
  --ink: #1C2B22;
  --muted: #5B6A60;
  --line: #D6DED1;
  --field: #FFFFFF;
  --soft: #F2F4EF;
  --error: #B3261E;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 18px 50px rgba(15, 35, 24, .22);
  --wrap: 1180px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.5; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 26px; border: 0; border-radius: var(--radius); font: 700 14px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color .15s, transform .1s, box-shadow .15s; background: var(--primary); color: #fff; }
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--accent-rule); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-dark { background: var(--green-900); }
.btn-dark:hover { background: var(--green-800); }
.btn-light { background: var(--accent-light); color: var(--green-900); }
.btn-light:hover { background: #8CC852; }
.btn-ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.btn-ghost:hover { background: rgba(79, 125, 37, .08); }
.btn-block { width: 100%; }

/* Nagłówek */
.site-header { background: #fff; position: relative; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.logo img { height: 34px; width: auto; }
.main-nav { margin-left: auto; display: flex; gap: 40px; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.main-nav a:hover { color: var(--ink); }
.btn-header { min-width: 150px; }

/* Hero */
.hero { position: relative; background: var(--green-900); color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0 0 0 auto; width: 62%; background: url("../img/hero.jpg") right center / cover no-repeat; }
.hero-bg::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--green-900) 0%, rgba(28, 59, 42, .85) 18%, rgba(28, 59, 42, .25) 48%, rgba(28, 59, 42, 0) 70%); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 48px; align-items: center; padding-top: 44px; padding-bottom: 44px; min-height: 560px; }
.hero-copy { max-width: 520px; }
.hero-rule { display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--accent-rule); margin-bottom: 18px; }
.eyebrow { margin: 0 0 26px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(34px, 4.2vw, 48px); font-weight: 800; letter-spacing: -.01em; }
.hero-sub { margin: 10px 0 34px; font-size: clamp(20px, 2vw, 26px); font-weight: 500; }
.hero-lead { margin: 0 0 34px; font-size: 17px; max-width: 440px; color: rgba(255, 255, 255, .92); }
.hero-cta { min-width: 200px; }
.hero-note { margin: 18px 0 0; font-size: 13px; color: rgba(255, 255, 255, .8); }

/* Karta formularza */
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px 26px 20px; scroll-margin-top: 16px; }
.form-card h2 { font-size: 22px; font-weight: 700; color: var(--green-900); }
.form-intro { margin: 4px 0 18px; font-size: 13px; color: var(--muted); }
.signup { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > label, .field > legend { font-size: 13px; font-weight: 600; margin-bottom: 0; }
.field > legend { margin-bottom: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; align-items: start; }
.req { color: var(--error); }
input[type="email"], input[type="text"], input[type="tel"] { width: 100%; min-height: 44px; padding: 10px 14px; font: 500 15px var(--font); color: var(--ink); background: var(--field); border: 1.5px solid var(--line); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #9AA59D; font-weight: 400; }
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 125, 37, .18); }
.field.has-error input, .phone-input.has-error { border-color: var(--error); }
.field-hint { margin: 0; font-size: 12px; color: var(--muted); }
.field-error { margin: 0; font-size: 12.5px; color: var(--error); font-weight: 600; }
.field-error:empty { display: none; }

/* Typ klienta */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 6px 8px; font-size: 12px; font-weight: 600; line-height: 1.2; border: 1.5px solid var(--line); border-radius: 10px; color: var(--muted); transition: all .15s; }
.segmented input:checked + span { border-color: var(--primary); background: rgba(79, 125, 37, .08); color: var(--green-900); }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px rgba(79, 125, 37, .25); }

/* Tematy */
.section-label { font-size: 12px !important; font-weight: 700 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--green-900); }
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.topic { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all .15s; user-select: none; }
.topic input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.topic-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--topic); box-shadow: 0 0 0 3px color-mix(in srgb, var(--topic) 18%, transparent); transition: all .15s; }
.topic:has(input:checked) { border-color: var(--topic); background: color-mix(in srgb, var(--topic) 10%, #fff); }
.topic:has(input:checked) .topic-dot { width: 18px; height: 18px; background: var(--topic) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; box-shadow: none; }
.topic:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(79, 125, 37, .25); }

/* Zgody */
.consents { display: grid; gap: 10px; padding-top: 4px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; cursor: pointer; font-size: 13px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); cursor: pointer; }
.check strong { display: block; font-weight: 600; }
.check small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.consent-note { margin: 0 0 0 32px; font-size: 11.5px; color: var(--muted); }

/* Telefon */
.phone-input { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.phone-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 125, 37, .18); }
.phone-prefix { display: flex; align-items: center; padding: 0 12px; background: var(--soft); color: var(--muted); font-weight: 600; font-size: 15px; border-right: 1.5px solid var(--line); }
.phone-input input { border: 0 !important; box-shadow: none !important; border-radius: 0; letter-spacing: .03em; }
[data-phone-field]:not([hidden]) { animation: reveal .2s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.clause { margin: 0; font-size: 11px; line-height: 1.5; color: var(--muted); padding: 10px 12px; background: var(--soft); border-radius: 10px; }
.clause a { color: inherit; font-weight: 600; }
.form-foot { margin: -4px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.alert-error { background: #FCEBEA; color: var(--error); }

.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sukces */
.form-success { text-align: center; padding: 30px 8px 18px; outline: none; }
.form-success h2 { margin: 16px 0 10px; }
.form-success p { margin: 0 0 12px; font-size: 15px; }
.success-icon { width: 60px; height: 60px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(79, 125, 37, .12); color: var(--primary); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Działy */
.departments { background: var(--soft); padding: 34px 0 40px; }
.section-eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-900); }
.section-lead { margin: 0 0 22px; font-size: 14px; color: var(--muted); }
.dept-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dept { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; background: #fff; border: 1.5px solid #E2E8DE; border-radius: 14px; cursor: pointer; font-family: var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.dept:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 35, 24, .08); }
.dept:focus-visible { outline: 3px solid var(--topic); outline-offset: 2px; }
.dept-num { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: var(--topic); color: #fff; font-weight: 700; font-size: 13px; }
.dept-text { display: grid; gap: 3px; }
.dept-name { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--topic); }
.dept-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.dept-state { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); }
.dept[aria-pressed="true"] { border-color: var(--topic); box-shadow: inset 0 0 0 1px var(--topic); }
.dept[aria-pressed="true"] .dept-state { border-color: var(--topic); background: var(--topic) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.dept-hint { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

/* O nas / kontakt */
.about { padding: 48px 0; }
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about h2 { font-size: 24px; color: var(--green-900); margin-bottom: 12px; }
.about p { margin: 0 0 6px; color: var(--muted); }
.contact-card { padding: 22px; border: 1.5px solid #E2E8DE; border-radius: 14px; scroll-margin-top: 16px; }
.contact-card .contact-name { color: var(--ink); font-weight: 700; }

/* Stopka */
.site-footer { border-top: 1px solid #E5EAE1; padding: 20px 0 28px; font-size: 12px; color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 6px 0; }
.footer-inner nav > * + *::before { content: "•"; margin: 0 8px; color: #A8B2AB; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--ink); text-decoration: underline; }
.footer-inner strong { color: var(--green-900); }

/* Strony komunikatów (potwierdzenie, wypis) */
.page-message { background: var(--soft); min-height: 100vh; display: flex; flex-direction: column; }
.page-message .site-header { border-bottom: 1px solid #E5EAE1; }
.message-main { flex: 1; display: grid; place-items: start center; padding: 48px 16px; }
.message-card { width: 100%; max-width: 520px; background: #fff; border-radius: var(--radius-lg); padding: 32px; box-shadow: 0 10px 40px rgba(15, 35, 24, .08); }
.message-card h1 { font-size: 26px; color: var(--green-900); margin-bottom: 14px; }
.message-card p { margin: 0 0 14px; }
.summary { list-style: none; padding: 14px 16px; margin: 0 0 16px; background: var(--soft); border-radius: 12px; display: grid; gap: 8px; font-size: 14px; }
.summary span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.unsub-form { display: grid; gap: 12px; margin-top: 8px; }
.unsub-form .check { font-size: 15px; align-items: center; }

/* Tablet */
@media (max-width: 1040px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .main-nav { gap: 24px; }
}

/* Mobile: jedna kolumna, zdjęcie nad tekstem, formularz pod spodem */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .header-inner { min-height: 68px; }
  .logo img { height: 26px; }
  .main-nav { display: none; }
  .btn-header { margin-left: auto; min-width: 0; min-height: 40px; padding: 8px 16px; font-size: 12px; }

  .hero { background: var(--soft); color: var(--ink); }
  .hero-bg { position: relative; inset: auto; width: 100%; height: 300px; background-image: url("../img/hero-mobile.jpg"); background-position: 70% center; }
  .hero-bg::before { background: linear-gradient(90deg, rgba(28, 59, 42, .92) 0%, rgba(28, 59, 42, .6) 55%, rgba(28, 59, 42, .15) 100%); }
  .hero-inner { display: block; padding: 0 16px 28px; min-height: 0; }
  .hero-copy { position: relative; margin-top: -300px; height: 300px; display: flex; flex-direction: column; justify-content: center; color: #fff; max-width: none; padding: 0 4px; }
  .eyebrow { margin-bottom: 14px; font-size: 11px; }
  .hero-sub { margin: 6px 0 16px; }
  .hero-lead { font-size: 15px; margin: 0; }
  .hero-cta, .hero-note { display: none; }
  .form-card { margin-top: -14px; position: relative; padding: 22px 18px 18px; box-shadow: 0 8px 30px rgba(15, 35, 24, .12); }

  .field-row { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about { padding: 36px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .topics { grid-template-columns: 1fr 1fr; }
  .topic { font-size: 12px; padding: 8px 10px; gap: 8px; }
  .dept-grid { grid-template-columns: 1fr; }
  .segmented span { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
