/* ==========================================================================
   DRESQ Sp. z o.o. — stylesheet
   ========================================================================== */

:root {
  /* Color tokens */
  --ink: #16233D;
  --ink-2: #45536B;
  --ink-soft: #7C879B;
  --paper: #F6F4EE;
  --paper-2: #EDE8DA;
  --card: #FFFFFF;
  --accent: #2E7D6B;
  --accent-dark: #1F5C50;
  --accent-tint: #E4EEEA;
  --line: #DDD6C4;
  --white: #FFFFFF;

  /* Type */
  --font-head: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --wrap: 1160px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(22, 35, 61, 0.04), 0 8px 24px rgba(22, 35, 61, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}

* { 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; }
}

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

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

h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 600; font-family: var(--font-body); }

p { margin: 0 0 1em; color: var(--ink-2); }

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

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

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--paper-2);
}
.btn-small { padding: 9px 18px; font-size: 0.88rem; }
.btn-full { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent-dark); display: inline-flex; }
.brand-text {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-suffix { font-weight: 400; color: var(--ink-soft); font-size: 0.85em; }

.main-nav ul {
  display: flex;
  gap: 30px;
}
.main-nav a {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.main-nav a:hover {
  color: var(--ink);
  border-color: var(--accent);
  text-decoration: none;
}

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a {
  display: block;
  padding: 10px 4px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:hover { text-decoration: none; color: var(--accent-dark); }
.mobile-nav.is-open { display: flex; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 84px 0 96px;
  overflow: hidden;
}

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

.eyebrow {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin-bottom: 0.45em;
  opacity: 0;
  animation: rise 0.7s ease-out 0.05s forwards;
}
.hero-lede {
  font-size: 1.08rem;
  max-width: 46ch;
  opacity: 0;
  animation: rise 0.7s ease-out 0.18s forwards;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 44px;
  opacity: 0;
  animation: rise 0.7s ease-out 0.3s forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  margin: 0;
  opacity: 0;
  animation: rise 0.7s ease-out 0.4s forwards;
}
.hero-facts dt {
  font-size: 0.78rem;
  text-transform: none;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 6px;
}
.hero-facts dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.4;
}

.hero-visual {
  position: relative;
  opacity: 0;
  animation: rise 0.8s ease-out 0.25s forwards;
}

.report-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 16px;
}
.report-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.report-tag {
  background: var(--accent-tint);
  color: var(--accent-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.78rem;
}
.report-chart { width: 100%; height: auto; display: block; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.chart-line-ghost { stroke: var(--ink-soft); stroke-width: 2; opacity: 0.35; }
.chart-line { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: var(--accent); }

.report-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}
.report-legend { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 3px; }
.dot-a { background: var(--ink-soft); opacity: 0.5; }
.dot-b { background: var(--accent); margin-left: 10px; }

.report-card-small {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  font-size: 0.85rem;
}
.report-card-small-label { color: var(--ink-soft); }
.report-card-small-value { color: var(--accent-dark); font-weight: 600; }

/* ==========================================================================
   About
   ========================================================================== */
.about { padding: 88px 0; background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

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

.about-text h2 { max-width: 16ch; }
.about-text p { max-width: 58ch; }

.about-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.about-panel h3 {
  margin-bottom: 18px;
  font-size: 1rem;
}
.about-details div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.about-details div:first-child { border-top: none; padding-top: 0; }
.about-details dt {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 4px;
}
.about-details dd { margin: 0; color: var(--ink); font-size: 0.94rem; }

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding: 92px 0; }

.section-head {
  max-width: 56ch;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head p { font-size: 1.02rem; }
.section-head-left { text-align: left; margin: 0 0 44px; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.service-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-dark);
  margin-bottom: 18px;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { margin: 0; font-size: 0.95rem; }

/* ==========================================================================
   Why choose us
   ========================================================================== */
.why { padding: 92px 0; background: var(--ink); color: var(--paper); }
.why h2, .why h3 { color: var(--white); }
.why .section-head p { color: rgba(246, 244, 238, 0.68); }

.why-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
}

.why-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 32px;
}
.why-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.why-item p { color: rgba(246, 244, 238, 0.7); font-size: 0.94rem; margin: 0; }
.why-item {
  padding-top: 18px;
  border-top: 1px solid rgba(246, 244, 238, 0.18);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding: 96px 0; }

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

.contact-info h2 { max-width: 18ch; }
.contact-info > p { max-width: 46ch; }

.contact-details { margin-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.contact-details li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.contact-details li:first-child { border-top: none; padding-top: 0; }
.contact-label { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); }
.contact-details a, .contact-details span:not(.contact-label) { color: var(--ink); font-size: 0.98rem; }

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.contact-form h3 { margin-bottom: 20px; }

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

.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.form-row textarea { resize: vertical; min-height: 90px; }

.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea {
  border-color: #B3413A;
}
.field-error {
  display: none;
  color: #B3413A;
  font-size: 0.82rem;
  margin-top: 6px;
}
.form-row.has-error .field-error { display: block; }

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

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p { margin-top: 10px; font-size: 0.9rem; max-width: 30ch; }
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.footer-nav h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--ink-2); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--accent-dark); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 24px 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.footer-bottom p { margin: 0; color: inherit; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, border-color 0.2s ease;
  z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; }
  .about-inner { grid-template-columns: 1fr; }
  .why-inner { grid-template-columns: 1fr; gap: 32px; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 52px 0 64px; }
  .hero-facts { grid-template-columns: 1fr; gap: 16px; }
  .why-list { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 560px) {
  .service-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .about-panel { padding: 22px; }
}
