/* ALMO Consulting - shared stylesheet for the home and privacy pages.
   Archivo (SIL OFL 1.1, see /fonts/OFL.txt), variable: weight 100-900, width 62-125%.
   Self-hosted so visitors make no third-party font requests. Same system as
   almo-invest.com.pl, plus one blue accent and a dark theme (theme.js). */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --ink: #000;
  --paper: #fff;
  --muted: #4a4a4a;
  --line: #000;
  --soft-line: #d6d6d6;
  --accent: #1a6fbd;
  --on-accent: #fff;
  --gutter: clamp(16px, 2vw, 24px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f2f2;
  --paper: #0e0e0e;
  --muted: #a8a8a8;
  --line: #f2f2f2;
  --soft-line: #3a3a3a;
  --accent: #4a9fe8;
  --on-accent: #0e0e0e;
}

* {
  box-sizing: border-box;
}

/* Keep anchored sections and focused elements clear of the sticky top bar. */
html {
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: "Archivo", Helvetica, Arial, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  top: -999px;
  left: var(--gutter);
  z-index: 10;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Top bar: logo, section links, theme toggle, contact button. */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.logo {
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.logo span {
  color: var(--accent);
}

.top nav {
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-size: 0.95rem;
}

.top nav a {
  text-decoration: none;
}

.top nav a:hover {
  text-decoration: underline;
}

.tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.box {
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 9px 12px;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.box:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Buttons: square-ish, never pills. */

.btn {
  display: inline-block;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-accent:hover {
  background: var(--paper);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.tag {
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Home: hero */

.hero {
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}

.hero h1 {
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 7.2vw, 6.4rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero .strap {
  margin: clamp(20px, 2.6vw, 36px) 0 0;
  max-width: 52ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.4;
}

.actions {
  margin-top: clamp(20px, 2.6vw, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Home: sections opened by a rule, a tag and a heading */

.block {
  border-top: 1px solid var(--line);
}

.block-head {
  padding: clamp(20px, 2.4vw, 32px) var(--gutter) 0;
}

.block-head h2 {
  margin: 14px 0 0;
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}

.block-sub {
  margin: 14px 0 0;
  max-width: 70ch;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--muted);
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
}

/* Services: ruled rows (name | description | tags) */

.rows {
  margin-top: clamp(24px, 3vw, 40px);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: 24px;
  padding: 22px var(--gutter);
  border-top: 1px solid var(--soft-line);
}

.row h3 {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.row p {
  margin: 0;
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.55;
}

/* Projects: three columns split by rules */

.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--soft-line);
}

.cols > article {
  padding: 22px var(--gutter) clamp(32px, 4vw, 56px);
}

.cols > article + article {
  border-left: 1px solid var(--soft-line);
}

.cols h3 {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.cols p {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.55;
}

/* About: text and key figures */

.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(24px, 3vw, 40px) var(--gutter) clamp(40px, 4.4vw, 64px);
}

.about p {
  margin: 0 0 14px;
  max-width: 68ch;
  font-size: 1.05rem;
  font-weight: 450;
  line-height: 1.6;
}

.about .exp {
  margin-top: 22px;
  font-weight: 600;
}

.about .exp span {
  color: var(--muted);
  font-weight: 500;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  align-self: start;
  border-top: 1px solid var(--line);
}

.stats > div {
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--soft-line);
}

.stats > div:nth-child(odd) {
  padding-right: 16px;
  border-right: 1px solid var(--soft-line);
}

.stats > div:nth-child(even) {
  padding-left: 16px;
}

.stats dt {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 800;
  font-stretch: 105%;
  letter-spacing: -0.045em;
  line-height: 1;
}

.stats dt.accent {
  color: var(--accent);
}

.stats dd {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Footer */

.site-footer {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 20px;
  padding: 22px var(--gutter) 10px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.site-footer .logo {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  align-self: start;
}

.site-footer p {
  margin: 0;
  line-height: 1.5;
}

.a11y {
  grid-column: 1 / -1;
  margin: 0;
  padding: 4px 0 18px;
  max-width: 110ch;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.a11y strong {
  color: var(--ink);
}

/* Privacy statement: same frame, long-form sections. The section heading sits in the
   left column (sticky on wide screens); every other child flows down the right column. */

.page-header {
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(32px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.page-eyebrow {
  display: inline-block;
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.page-title {
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.page-lang {
  margin: 18px 0 0;
  font-weight: 600;
}

.page-intro {
  margin: clamp(20px, 2.6vw, 32px) 0 0;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 600;
  line-height: 1.4;
}

.page-updated {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.prose-section {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: 24px;
  padding: 36px var(--gutter);
  border-bottom: 1px solid var(--line);
}

.prose-section:last-child {
  border-bottom: 0;
}

.prose-section > * {
  grid-column: 2;
  margin: 14px 0 0;
}

.prose-section > h2 {
  grid-column: 1;
  grid-row: 1 / span 40;
  align-self: start;
  position: sticky;
  top: 90px;
  margin: 0;
  font-size: clamp(1.2rem, 1.9vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.prose-section > h2 + * {
  margin-top: 0;
}

.prose-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.prose-section p,
.prose-section ul,
.prose-section ol {
  max-width: 72ch;
  font-size: 1.02rem;
  font-weight: 450;
  line-height: 1.6;
}

.prose-section strong {
  font-weight: 700;
}

.prose-section ul,
.prose-section ol {
  padding-left: 1.2rem;
}

.prose-section li + li {
  margin-top: 4px;
}

.controller-card {
  max-width: 72ch;
  padding: 16px 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 450;
  line-height: 1.6;
}

.controller-card strong {
  display: block;
  font-weight: 800;
}

/* The summary table needs the full width: heading above it, not beside it. */
.prose-section:has(.table-wrap) {
  grid-template-columns: minmax(0, 1fr);
}

.prose-section:has(.table-wrap) > * {
  grid-column: 1;
  grid-row: auto;
  position: static;
}

.prose-section:has(.table-wrap) > h2 + * {
  margin-top: 20px;
}

.table-wrap {
  overflow-x: auto;
}

.prose-section table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.92rem;
  font-weight: 450;
  line-height: 1.5;
}

.prose-section th,
.prose-section td {
  padding: 10px 12px 10px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--soft-line);
}

.prose-section thead th {
  font-weight: 700;
  border-bottom: 1px solid var(--ink);
}

.prose-section tbody th {
  font-weight: 700;
}

@media (max-width: 760px) {
  .top nav {
    display: none;
  }

  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .cols,
  .about,
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .cols > article + article {
    border-left: 0;
    border-top: 1px solid var(--soft-line);
  }

  .prose-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .prose-section > *,
  .prose-section > h2 {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }

  .prose-section > h2 + * {
    margin-top: 10px;
  }
}

@media (max-width: 420px) {
  .tools .btn {
    display: none;
  }
}
