/* =====================================================================
   CyberESQ Sp. z o.o. — stylesheet
   1. Tokens          5. Hero
   2. Reset & base    6. Sections (services, about, approach)
   3. Layout          7. Contact & form
   4. Header & nav    8. Footer
                      9. Responsive
   ===================================================================== */

/* ── 1. Tokens ─────────────────────────────────────────────────────── */
:root {
  --ink:        #101a2e;   /* headings, dark surfaces */
  --ink-soft:   #1b2740;
  --slate:      #4a5770;   /* body text */
  --slate-mute: #6b7891;
  --paper:      #ffffff;
  --paper-tint: #f4f6f9;
  --hairline:   #dde2ea;
  --accent:     #0f6e64;   /* deep teal — links, marks, primary button */
  --accent-dk:  #0b544c;
  --accent-tint:#e6f1ef;
  --amber:      #a96b12;   /* "in progress" signal only */
  --amber-tint: #fbf1e0;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --shell: 1160px;
  --gutter: 24px;
  --radius: 8px;
  --radius-sm: 5px;

  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.35rem, 1.1rem + 0.9vw, 1.6rem);
  --step-3: clamp(1.7rem, 1.3rem + 1.7vw, 2.35rem);
  --step-4: clamp(2.2rem, 1.5rem + 3.2vw, 3.6rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* clears the sticky header on anchor jumps */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: var(--step-4); letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-dk); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

img, svg { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
}

/* ── 3. Layout ─────────────────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 8vw, 104px); }
.section-tint { background: var(--paper-tint); border-block: 1px solid var(--hairline); }
.section-dark { background: var(--ink); color: #c7cfdd; }

.section-head { margin-bottom: clamp(36px, 5vw, 56px); max-width: 62ch; }
.section-head p { color: var(--slate); }
.section-head-dark h2 { color: #fff; }
.section-head-dark p { color: #a9b4c7; }

/* Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 500 var(--step-0)/1 var(--font-ui);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); color: #fff; }

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

/* ── 4. Header & navigation ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.7; }
.brand-mark-tick { stroke: var(--accent); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 600 1.16rem/1.1 var(--font-display); letter-spacing: -0.01em; }
.brand-form { font-size: .72rem; color: var(--slate-mute); letter-spacing: .02em; }

.primary-nav { display: flex; align-items: center; gap: 32px; }
.primary-nav ul { display: flex; gap: 28px; }

.primary-nav a {
  position: relative;
  color: var(--slate);
  text-decoration: none;
  font-weight: 500;
  padding-block: 6px;
  transition: color .16s var(--ease);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s var(--ease);
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a:hover::after,
.primary-nav a.is-current::after { transform: scaleX(1); }
.primary-nav a.is-current { color: var(--ink); }

.nav-cta { padding: 10px 18px; }
.nav-cta::after { display: none; }
.nav-cta:hover { color: #fff; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  color: var(--ink);
  font: 500 .92rem/1 var(--font-ui);
  cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 4px; width: 17px; }
.nav-toggle-bars span {
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

/* ── 5. Hero ───────────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(56px, 7vw, 96px);
  background:
    linear-gradient(180deg, #f7f9fb 0%, #ffffff 100%);
  border-bottom: 1px solid var(--hairline);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.hero-kicker {
  color: var(--accent-dk);
  font-weight: 500;
  font-size: .95rem;
  margin-bottom: 18px;
}

.hero-copy h1 { max-width: 15ch; margin-bottom: 22px; }

.hero-lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 54ch;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}
.hero-facts dt { font-size: .82rem; color: var(--slate-mute); margin-bottom: 4px; }
.hero-facts dd { margin: 0; color: var(--ink); font-weight: 500; font-size: .95rem; line-height: 1.4; }

/* Readiness panel */
.panel {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(16, 26, 46, .04);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.panel-title { font: 600 1.02rem/1 var(--font-display); color: var(--ink); }
.panel-meta { font-size: .76rem; color: var(--slate-mute); }

.panel-rows { margin: 4px 0 16px; }
.panel-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #eef1f5;
  font-size: .95rem;
}
.panel-rows li:last-child { border-bottom: 0; }
.row-name { color: var(--ink-soft); }

.chip {
  flex: none;
  font-size: .76rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.chip-ok { background: var(--accent-tint); color: var(--accent-dk); }
.chip-work { background: var(--amber-tint); color: var(--amber); }

.panel-foot {
  font-size: .87rem;
  color: var(--slate-mute);
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

/* The single orchestrated motion moment on the page: rows settling in. */
@media (prefers-reduced-motion: no-preference) {
  .js .panel-rows li[data-row] {
    opacity: 0;
    transform: translateY(6px);
    animation: row-in .5s var(--ease) forwards;
    animation-delay: calc(240ms + var(--i) * 90ms);
  }
}
@keyframes row-in {
  to { opacity: 1; transform: none; }
}

/* ── 6. Services ───────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.card {
  background: #fff;
  padding: 34px 30px 36px;
  transition: background-color .2s var(--ease);
}
.card:hover { background: #fbfcfd; }

.card-icon {
  width: 30px; height: 30px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
  transition: stroke .2s var(--ease);
}
.card:hover .card-icon { stroke: var(--ink); }

.card h3 { font-size: 1.22rem; margin-bottom: .5em; }
.card p { font-size: .96rem; margin: 0; }

/* ── 6b. About ─────────────────────────────────────────────────────── */
.about-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.about-copy .lede { margin-bottom: 1.2em; }

.about-points { margin-top: 26px; display: grid; gap: 12px; }
.about-points li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  font-size: .97rem;
}
.about-points li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 9px; height: 9px;
  border: 1.6px solid var(--accent);
  border-radius: 2px;
}

.about-figure { margin: 0; }
.about-figure svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #fff;
}
.about-figure figcaption {
  margin-top: 12px;
  font-size: .85rem;
  color: var(--slate-mute);
}

/* ── 6c. Approach (dark band) ──────────────────────────────────────── */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 34px 40px;
  padding-bottom: clamp(48px, 6vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, .13);
}

.benefit h3 {
  color: #fff;
  font-size: 1.18rem;
  padding-top: 18px;
  border-top: 2px solid var(--accent);
  margin-bottom: .55em;
}
.benefit p { color: #a9b4c7; font-size: .96rem; margin: 0; }

.process { padding-top: clamp(44px, 5vw, 64px); }
.process-title { color: #fff; font-size: 1.3rem; margin-bottom: 30px; }

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 28px 26px;
  counter-reset: step;
}
.process-steps li { position: relative; padding-top: 4px; }

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  font-size: .85rem;
  color: #fff;
  margin-bottom: 14px;
}
.process-steps h4 { color: #fff; margin-bottom: .45em; font-size: 1.04rem; }
.process-steps p { color: #a9b4c7; font-size: .92rem; margin: 0; }

/* ── 7. Contact ────────────────────────────────────────────────────── */
.contact-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-form-wrap .lede { margin-bottom: 32px; max-width: 52ch; }

.form { display: grid; gap: 20px; max-width: 620px; }

.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field label { font-size: .92rem; font-weight: 500; color: var(--ink); }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: #fff;
  font: 400 .97rem/1.5 var(--font-ui);
  color: var(--ink);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 110, 100, .13);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #b3261e;
  background: #fffafa;
}

.field-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}
.field-check input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--accent); }
.field-check label { font-weight: 400; color: var(--slate); font-size: .9rem; line-height: 1.5; }
.field-check .error { grid-column: 1 / -1; }

.error { margin: 0; font-size: .84rem; color: #b3261e; }

.btn-submit { justify-self: start; padding-inline: 32px; }

.form-note { font-size: .84rem; color: var(--slate-mute); margin: 0; }

.form-status {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: .93rem;
  background: var(--accent-tint);
  color: var(--accent-dk);
  border: 1px solid rgba(15, 110, 100, .2);
}
.form-status.is-error {
  background: #fdf0ef;
  color: #8c1d18;
  border-color: rgba(179, 38, 30, .22);
}

/* Company details panel */
.contact-details {
  background: var(--paper-tint);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.contact-details h3 { font-size: 1.15rem; margin-bottom: 20px; }
.contact-details dl { margin: 0; display: grid; gap: 16px; }
.contact-details dt { font-size: .8rem; color: var(--slate-mute); margin-bottom: 2px; }
.contact-details dd { margin: 0; color: var(--ink); font-size: .97rem; line-height: 1.55; }

.contact-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: .88rem;
  color: var(--slate);
}

/* ── 8. Footer ─────────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: #97a3b8;
  padding-top: clamp(48px, 6vw, 72px);
  font-size: .93rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: 44px;
}

.footer-brand .brand-name { color: #fff; font-size: 1.15rem; display: block; margin-bottom: 12px; }
.footer-brand p { color: #8d99ae; max-width: 40ch; font-size: .92rem; }

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
}
.footer-nav h4 { color: #fff; font-size: .98rem; margin-bottom: 14px; }
.footer-nav ul { display: grid; gap: 9px; }
.footer-nav a { color: #97a3b8; text-decoration: none; transition: color .16s var(--ease); }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-address li { color: #8d99ae; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, .11);
  font-size: .85rem;
  color: #7f8ba1;
}
.footer-legal p { margin: 0; color: #7f8ba1; }
.footer-legal a { color: #a9b4c7; }
.footer-legal a:hover { color: #fff; }

/* ── 9. Responsive ─────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-inner,
  .about-inner,
  .contact-inner,
  .footer-inner { grid-template-columns: 1fr; }

  .hero-copy h1 { max-width: 20ch; }
  .about-figure { order: -1; }
  .footer-brand p { max-width: none; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }

  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: fixed;
    inset: 64px 0 auto;
    display: grid;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--hairline);
    padding: 8px var(--gutter) 22px;
    box-shadow: 0 18px 32px rgba(16, 26, 46, .09);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .primary-nav ul { display: grid; gap: 0; }
  .primary-nav li { border-bottom: 1px solid var(--hairline); }
  .primary-nav ul a { display: block; padding: 15px 2px; font-size: 1.02rem; }
  .primary-nav a::after { display: none; }
  .nav-cta { margin-top: 18px; justify-content: center; }

  .hero-facts { grid-template-columns: 1fr; gap: 14px; }
  .field-row { grid-template-columns: 1fr; }
  .btn-submit { justify-self: stretch; }
  .hero-actions .btn { flex: 1 1 auto; }
}

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

@media print {
  .site-header, .nav-toggle, .hero-actions, .form { display: none; }
  body { color: #000; }
}
