/* =========================================================================
   Fundapol Mobile — fundapol.pl (m.fundapol.pl)
   Mobile-first stylesheet. Optimised for 320–480px viewports.
   Independent from desktop fundapol.css.

   Sections:
     1. Tokens
     2. Reset + base typography
     3. Primitives (.eyebrow, .btn …)
     4. Brand mark (Logo 03)
     5. Header + drawer
     6. Hero
     7. Standards
     8. Calculator
     9. Process
    10. Contact
    11. Footer
   ========================================================================= */


/* 1. Tokens
   ------------------------------------------------------------------------- */
:root {
  --concrete:   #1B1C1E;
  --concrete-2: #2A2C2F;
  --cream:      #ECE7DC;
  --cream-2:    #F6F2E8;
  --paper:      #FBF8F1;
  --ink:        #1B1C1E;
  --ink-soft:   #3A3B3E;
  --ink-mute:   #6B6D72;
  --amber:      #D89432;
  --amber-soft: #F4DCAC;

  --rule:        rgba(42, 44, 47, 0.10);
  --rule-strong: rgba(42, 44, 47, 0.18);
  --rule-dark:   rgba(255, 255, 255, 0.10);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body:    "DM Sans", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --gutter:       20px;
  --gutter-lg:    24px;

  --ease: cubic-bezier(.2, .8, .2, 1);
}


/* 2. Reset + base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -0.03em; line-height: 0.95; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }


/* 3. Primitives
   ------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--amber);
  flex-shrink: 0;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 36px;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  min-height: 48px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn--primary { background: var(--ink);   color: var(--cream); }
.btn--amber   { background: var(--amber); color: var(--ink); }
.btn--ghost   { background: transparent;  color: var(--ink); border-color: var(--ink); }
.btn--block   { width: 100%; }


/* 4. Brand mark — Logo 03 (wordmark + slab + two dots)
   ------------------------------------------------------------------------- */
.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.045em;
  line-height: 0.95;
  padding: 0 4px 4px;
}
.brand-mark__slab {
  height: 6px;
  background: currentColor;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.brand-mark__dots {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  width: 12px;
  height: 4px;
  margin-right: 4px;
}
.brand-mark__dots::before,
.brand-mark__dots::after {
  content: "";
  display: block;
  height: 100%;
  aspect-ratio: 1;
  background: var(--amber);
  border-radius: 50%;
}

.brand-mark--lg .brand-mark__word { font-size: 32px; padding-bottom: 6px; }
.brand-mark--lg .brand-mark__slab { height: 10px; }
.brand-mark--lg .brand-mark__dots { width: 20px; height: 6px; margin-right: 6px; }

.brand-mark--inverted { color: var(--cream); }


/* 5. Header + mobile drawer
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
}

.burger {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  display: none;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 8px var(--gutter) 24px;
}
.drawer[data-open="true"] {
  display: block;
  animation: drawer-down 0.25s var(--ease);
}
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.drawer__nav a:last-child { border-bottom: 0; }
.drawer__cta {
  margin-top: 20px;
  width: 100%;
}
@keyframes drawer-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* 6. Hero
   ------------------------------------------------------------------------- */
.hero { border-bottom: 1px solid var(--rule); }

.hero__copy { padding: 36px var(--gutter) 44px; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 11vw, 56px);
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin: 22px 0 0;
}
.hero__lede {
  font-size: 15px;
  line-height: 1.55;
  margin-top: 20px;
  color: var(--ink-soft);
}
.hero__actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Dark stat tile beneath the copy */
.hero__panel {
  background: var(--concrete);
  color: var(--cream);
  padding: 36px var(--gutter);
  min-height: 320px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}
.hero__panel-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.hero__panel > *:not(.hero__panel-grid) { position: relative; }

.hero__panel-stat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.hero__panel-big {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 92px;
  letter-spacing: -0.05em;
  line-height: 0.85;
}
.hero__panel-big span { color: var(--amber); }
.hero__panel-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 10px;
  max-width: 28ch;
}


/* 7. Standards
   ------------------------------------------------------------------------- */
.standards { border-bottom: 1px solid var(--rule); }
.standards__head {
  padding: 56px var(--gutter) 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.standards__head p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.standards__grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}

.tier {
  position: relative;
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--paper);
}
.tier:last-child { border-bottom: 0; }
.tier--highlight { background: var(--cream-2); }
.tier--highlight::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--amber);
}
.tier__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.tier--highlight .tier__tag { color: var(--amber); }
.tier__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.tier__lede {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.tier__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  margin-top: 4px;
}
.tier__list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
}
.tier__list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 7px;
  background: var(--ink);
}
.tier--highlight .tier__list li::before { background: var(--amber); }
.tier__list-item--neg::before { background: transparent !important; border: 1px solid var(--ink-mute); }


/* 8. Calculator
   ------------------------------------------------------------------------- */
.calculator {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}
.calculator__head {
  padding: 56px var(--gutter) 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.calculator__head p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.calc-params {
  padding: 28px var(--gutter);
  background: var(--cream);
  border-top: 1px solid var(--rule-strong);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.calc-params__heading {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.field { display: flex; flex-direction: column; gap: 14px; }
.field__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.field__value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.03em;
}
.field__value-unit { font-size: 14px; color: var(--ink-mute); margin-left: 4px; }
.field__hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
}

/* Slider */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--amber) 0%, var(--amber) var(--range-fill, 0%), var(--ink-mute) var(--range-fill, 0%), var(--ink-mute) 100%);
  outline: none;
  border-radius: 2px;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  background: var(--ink);
  border: 4px solid var(--amber);
  border-radius: 50%;
  margin-top: -11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.range::-moz-range-thumb {
  width: 26px; height: 26px;
  background: var(--ink);
  border: 4px solid var(--amber);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Segmented control — vertical on mobile */
.segmented {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  padding: 14px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--ink);
  min-height: 56px;
}
.segmented label:last-of-type { border-bottom: 0; }
.segmented input:checked + label {
  background: var(--ink);
  color: var(--cream);
}
.segmented__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.segmented__desc {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Addon checkboxes */
.addons {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-strong);
}
.addon {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-strong);
  cursor: pointer;
  font-size: 14px;
  min-height: 56px;
}
.addon__label { font-weight: 500; }
.addon__price {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.addon input { position: absolute; opacity: 0; pointer-events: none; }
.addon__check {
  width: 24px; height: 24px;
  border: 1.5px solid var(--ink);
  position: relative;
  background: var(--paper);
}
.addon input:checked ~ .addon__check { background: var(--ink); }
.addon input:checked ~ .addon__check::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--amber);
}

/* Result panel — dark, full-width below params */
.calc-result {
  background: var(--concrete);
  color: var(--cream);
  padding: 28px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  overflow: hidden;
}
.calc-result__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right,  rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.calc-result > *:not(.calc-result__grid) { position: relative; }

.calc-result__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.calc-result__total { display: flex; flex-direction: column; gap: 6px; }
.calc-result__price-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.calc-result__price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 14vw, 64px);
  letter-spacing: -0.045em;
  line-height: 0.9;
}
.calc-result__price span { color: var(--amber); }

.calc-result__summary {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.calc-result__summary span { color: var(--cream); opacity: 0.95; }

.calc-result__breakdown {
  border-top: 1px solid var(--rule-dark);
  display: flex;
  flex-direction: column;
}
.calc-result__breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-dark);
  font-size: 13px;
}
.calc-result__breakdown li:last-child {
  border-bottom: 0;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}
.calc-result__breakdown .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.calc-result__breakdown .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}
.calc-result__breakdown li:last-child .value { font-size: 20px; }
.calc-result__breakdown .value--mute {
  color: var(--cream);
  opacity: 0.45;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
}

/* Lead form */
.lead {
  background: var(--paper);
  color: var(--ink);
  padding: 20px;
  border: 1px solid var(--rule-strong);
  margin-top: 6px;
}
.lead__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.lead__copy {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.5;
}
.lead__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.lead__input {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 14px 16px;
  font: 500 16px var(--font-body); /* 16px prevents iOS focus zoom */
  letter-spacing: 0.01em;
  min-height: 48px;
}
.lead__input:focus { outline: 2px solid var(--amber); outline-offset: -2px; }
.lead__status {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lead__status[data-state="ok"]  { color: #2F8A4B; }
.lead__status[data-state="err"] { color: #B23A2A; }


/* 9. Process — vertical timeline
   ------------------------------------------------------------------------- */
.process {
  padding: 64px var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.process__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}
.process__head p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.process__list {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 80px;
  gap: 32px;
}
.process__list::before {
  content: "";
  position: absolute;
  left: 31px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--ink);
}

.step { position: relative; }
.step__num {
  position: absolute;
  left: -80px;
  top: 0;
  width: 64px;
  height: 64px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step:first-child .step__num { background: var(--amber); color: var(--ink); }
.step__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.step__copy {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}


/* 10. Contact
   ------------------------------------------------------------------------- */
.contact {
  padding: 64px var(--gutter);
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 36px;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin-top: 16px;
}
.contact__copy {
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 20px;
  line-height: 1.6;
}
.contact__actions { margin-top: 24px; }
.contact__note {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 18px;
  line-height: 1.5;
}

.contact__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
}
.contact__info h3 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.contact__info p,
.contact__info a {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
}


/* 11. Footer
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--concrete);
  color: var(--cream);
  padding: 48px var(--gutter) 24px;
}
.site-footer__grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule-dark);
}
.site-footer__lede {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: #cfc8b8;
}
.site-footer__col h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfc8b8;
  margin-bottom: 12px;
}
.site-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #d8d2c2;
}
.site-footer__col a { text-decoration: none; color: inherit; }
.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8c8676;
}


/* Very small phones */
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .hero__title { font-size: 36px; }
  .hero__panel-big { font-size: 76px; }
  .tier__name { font-size: 32px; }
  .section-title { font-size: 30px; }
  .contact__info { grid-template-columns: 1fr; }
}

/* Integration with the desktop markup served at fundapol.pl. */
.site-nav,
.site-header__cta {
  display: none;
}
.site-header__inner.container {
  max-width: none;
}
.burger {
  display: flex !important;
  position: fixed;
  top: 12px;
  right: var(--gutter);
  z-index: 2;
}
.drawer[data-open="true"] {
  display: block !important;
}
