/* ==========================================================================
   Marcin Moska — konsultant e-commerce
   Design tokens: forest green + warm paper, Space Grotesk / Inter / IBM Plex Mono
   ========================================================================== */

:root {
  /* Color */
  --bg: #F7F7F1;
  --surface: #ECF1EA;
  --surface-2: #E2EAE1;
  --ink: #11201A;
  --ink-soft: #45564D;
  --line: #D7DED3;

  --green-900: #0E3B2E;
  --green-700: #155C41;
  --green-600: #1C7A52;
  --green-500: #269265;
  --green-400: #4FA47A;
  --green-100: #DCEBE1;

  --gold: #B9924A;
  --paper: #FFFFFF;

  --danger: #B3402F;

  /* Type */
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* Scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
  --space-7: 140px;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;

  --max-w: 1180px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--green-900);
}

h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-600);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--green-600);
  display: inline-block;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 54ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  min-height: 44px;
}

.btn:focus-visible {
  outline: 3px solid var(--green-400);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--green-700);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--green-900);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--green-900);
}

.btn-ghost:hover {
  border-color: var(--green-600);
  background: var(--surface);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-fast) var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 247, 241, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--green-900);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--green-700);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 2px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--green-600);
  transition: right var(--dur-fast) var(--ease-out);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  right: 0;
}

.main-nav a[aria-current="page"] {
  color: var(--green-900);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green-900);
  position: relative;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* Sections */
section {
  padding: var(--space-6) 0;
}

.section-tight {
  padding: var(--space-5) 0;
}

.surface {
  background: var(--surface);
}

.dark {
  background: var(--green-900);
  color: rgba(255,255,255,0.88);
}

.dark h1, .dark h2, .dark h3 {
  color: #fff;
}

.dark .lede { color: rgba(255,255,255,0.7); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hero */
.hero {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero-copy h1 {
  max-width: 12ch;
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-1);
}

.hero-actions .contact-line {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.hero-photo-wrap {
  position: relative;
  isolation: isolate;
}

.hero-chart {
  position: absolute;
  inset: -6% -10% auto -10%;
  height: 62%;
  z-index: 0;
  opacity: 0.9;
}

.hero-photo {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--green-100);
  box-shadow: 0 30px 60px -30px rgba(14, 59, 46, 0.45);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  right: -18px;
  bottom: -18px;
  z-index: 2;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 30px -14px rgba(14,59,46,0.3);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 0 rgba(38,146,101,0.6);
  animation: pulse 2.2s var(--ease-out) infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(38,146,101,0.5); }
  70% { box-shadow: 0 0 0 10px rgba(38,146,101,0); }
  100% { box-shadow: 0 0 0 0 rgba(38,146,101,0); }
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: var(--space-4) var(--space-2);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat:first-child { border-left: none; }

.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 500;
  color: var(--green-700);
}

.stat-label {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Cards / grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--green-400);
  box-shadow: 0 24px 40px -28px rgba(14,59,46,0.35);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--green-600);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg { width: 22px; height: 22px; }

.card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Process steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--green-500);
  display: block;
  margin-bottom: 14px;
}

.step h3 { margin-bottom: 10px; color: var(--green-900); }
.dark .step h3 { color: #fff; }
.step p { color: var(--ink-soft); }
.dark .step p { color: rgba(255,255,255,0.68); }
.dark .step { border-top-color: rgba(255,255,255,0.18); }
.dark .step-num { color: var(--green-400); }

/* Quote */
.quote {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
}

blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: var(--green-900);
  max-width: 40ch;
}
.dark blockquote { color: #fff; }

cite {
  display: block;
  font-style: normal;
  margin-top: var(--space-2);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.dark cite { color: rgba(255,255,255,0.6); }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-2) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--green-900);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-plus {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.faq-item[open] .faq-plus {
  transform: rotate(45deg);
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

.faq-item p {
  padding-bottom: var(--space-2);
  color: var(--ink-soft);
  max-width: 60ch;
}

/* CTA band */
.cta-band {
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.72);
  padding: var(--space-5) 0 var(--space-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer a {
  text-decoration: none;
  color: rgba(255,255,255,0.72);
  font-size: 0.95rem;
}

.site-footer a:hover { color: #fff; }

.footer-bottom {
  padding-top: var(--space-2);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* Page hero (subpages) */
.page-hero {
  padding: var(--space-5) 0 var(--space-4);
}

.page-hero .eyebrow { margin-bottom: var(--space-2); }

/* Forms */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: var(--space-2);
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-900);
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  min-height: 48px;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-100);
}

.field-hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.contact-method:last-child { border-bottom: none; }

.contact-method .card-icon { flex-shrink: 0; }

.contact-method strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--green-900);
}

.contact-method span {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Timeline (o mnie) */
.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline-year {
  font-family: var(--font-mono);
  color: var(--green-600);
  font-size: 0.95rem;
}

.timeline-item h3 { margin-bottom: 6px; }
.timeline-item p { color: var(--ink-soft); }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 640ms var(--ease-out), transform 640ms var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--green-900);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo-wrap { max-width: 420px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav ul { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    padding: var(--space-3);
    z-index: 39;
  }
  body.nav-open .main-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: none; }
  .stat { border-top: 1px solid var(--line); }
  .stat:first-child, .stat:nth-child(2) { border-top: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}
