/* =========================================================
   ESQUERCUS Sp. z o.o. — stylesheet
   Tokens: ink #12182B, paper #F5F6F8, slate #5B6472,
           accent (teal) #2F6F5E, gold #C99A4B
   ========================================================= */

:root {
  --ink: #12182B;
  --ink-soft: #384154;
  --paper: #F5F6F8;
  --white: #FFFFFF;
  --slate: #5B6472;
  --accent: #2F6F5E;
  --accent-dark: #1F4E42;
  --gold: #C99A4B;
  --line: #D6D9E0;
  --line-soft: #E6E8ED;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --max-width: 1160px;
  --radius: 8px;
  --transition: 180ms ease;
}

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

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); letter-spacing: -0.005em; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

a {
  color: var(--accent);
  text-decoration: none;
}

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

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

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

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.75em;
}

.section-lead {
  max-width: 56ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

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

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-dark); }

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

.btn-small { padding: 9px 18px; font-size: 0.9rem; }
.btn-full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.logo-mark { color: var(--accent); display: flex; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.98rem;
  transition: color var(--transition);
}
.main-nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 88px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-lead { font-size: 1.08rem; }

.hero-cta {
  display: flex;
  gap: 14px;
  margin: 28px 0 40px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stats dt {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 4px;
}
.hero-stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

.hero-visual { width: 100%; }
.ledger-graphic { width: 100%; height: auto; }

/* ---------- About ---------- */
.about { padding: 96px 0; }

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.about-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-row {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-row:last-child { border-bottom: none; }

.panel-label {
  font-size: 0.78rem;
  text-transform: none;
  color: var(--slate);
  font-family: var(--font-display);
  font-weight: 500;
}
.panel-value {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}

/* ---------- Services ---------- */
.services {
  padding: 96px 0;
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-head { max-width: 640px; margin-bottom: 48px; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-card {
  background: var(--white);
  padding: 32px 28px;
  transition: background var(--transition);
}
.service-card:hover { background: var(--paper); }

.service-icon {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: 16px;
}
.service-icon svg { width: 34px; height: 34px; }

.service-card h3 { margin-bottom: 0.4em; }
.service-card p { font-size: 0.96rem; margin-bottom: 0; }

/* ---------- Why choose us ---------- */
.why { padding: 96px 0; }

.why-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 32px;
}
.benefit-list li {
  padding-left: 22px;
  border-left: 2px solid var(--accent);
}
.benefit-list h3 { margin-bottom: 0.3em; }
.benefit-list p { margin-bottom: 0; font-size: 0.97rem; }

.why-graphic { width: 100%; height: auto; }

/* ---------- Contact ---------- */
.contact {
  padding: 96px 0 104px;
  background: var(--ink);
  color: var(--white);
}

.contact .eyebrow { color: var(--gold); }
.contact h2 { color: var(--white); }
.contact .section-lead { color: #C4C9D6; }

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}

.company-address {
  font-style: normal;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.15);
  color: #C4C9D6;
  line-height: 1.7;
}
.company-address strong { color: var(--white); font-family: var(--font-display); }
.company-address a { color: var(--gold); }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
}

.form-row { margin-bottom: 20px; display: flex; flex-direction: column; }
.form-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  font-family: var(--font-display);
}
.form-row .optional { font-weight: 400; color: var(--slate); }

.form-row input,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--transition);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row.has-error input,
.form-row.has-error textarea {
  border-color: #B3492E;
}

.form-error {
  display: block;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: #B3492E;
  margin-top: 5px;
}

.form-status {
  margin: 14px 0 0;
  font-size: 0.92rem;
  min-height: 1.2em;
}
.form-status.success { color: var(--accent); }
.form-status.error { color: #B3492E; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #C4C9D6;
  padding-top: 64px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .logo-text { color: var(--white); }
.footer-brand p { color: #9AA1B2; margin-top: 10px; max-width: 32ch; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.footer-col a,
.footer-col p {
  display: block;
  color: #9AA1B2;
  margin-bottom: 10px;
  font-size: 0.94rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
}
.footer-bottom p {
  margin: 0;
  color: #7B8296;
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner,
  .about-grid,
  .why-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .why-visual { order: -1; max-width: 320px; margin: 0 auto; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line-soft);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-toggle { display: flex; }
  .header-actions .btn-small { display: none; }
  .service-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; gap: 28px; }
  .contact-form { padding: 26px; }
}

@media (max-width: 480px) {
  .hero { padding: 52px 0 64px; }
  .about, .services, .why { padding: 64px 0; }
  .contact { padding: 64px 0 72px; }
  .hero-stats { gap: 24px; }
}
