/* =============================================================================
   T2S Group - t2s-ui.css
   Layout standard (brief F): type scale, page hero (text / photo), buttons,
   chips, radii, reading width. Loaded after style.css.
   Everything here is opt-in through t2s-* classes, except section 1
   (form controls inherit the page font).
   Spacing comes from the rhythm tokens in variables.css.
   ============================================================================= */

:root {
  /* Type scale: the value at <= 768 px grows to the desktop value at >= 1280 px */
  --fs-display: clamp(34px, calc(7px + 3.516vw), 52px);
  --fs-h1:      clamp(30px, calc(9px + 2.734vw), 44px);
  --fs-h2:      clamp(28px, calc(16px + 1.5625vw), 36px);
  --fs-h3:      clamp(20px, calc(14px + 0.781vw), 24px);
  --fs-card:    clamp(17px, calc(15.5px + 0.195vw), 18px);
  --fs-lead:    clamp(16px, calc(13px + 0.391vw), 18px);
  --fs-body:    16px;
  --fs-small:   14px;
  --fs-eyebrow: 13px;

  --lh-h1:   1.1;
  --lh-h2:   1.15;
  --lh-h3:   1.25;
  --lh-card: 1.3;
  --lh-lead: 1.6;

  /* Radii: cards in grids use the existing --radius-lg (16px) */
  --radius-btn:   6px;
  --radius-panel: 24px;

  /* Reading width for posts, RODO, report */
  --measure: 720px;
}

/* -- 1. Form controls use the page font (no more 13.33px system font) -------- */
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
}

/* -- 2. Headings by role ---------------------------------------------------- */
.t2s-display, .t2s-h1, .t2s-h2 {
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
.t2s-display { font-size: var(--fs-display); line-height: var(--lh-display); text-transform: uppercase; letter-spacing: 0.01em; }
.t2s-h1      { font-size: var(--fs-h1); line-height: var(--lh-h1); }
.t2s-h2      { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.t2s-h3, .t2s-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
}
.t2s-h3         { font-size: var(--fs-h3);   line-height: var(--lh-h3); }
.t2s-card-title { font-size: var(--fs-card); line-height: var(--lh-card); }
.t2s-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.t2s-lead {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--color-navy);
  max-width: var(--measure);
}

/* -- 3. Page hero ----------------------------------------------------------- */
/* Breadcrumbs strip printed by header.php on pages without a hero (was an inline style). */
.breadcrumbs-wrap { padding-top: 16px; padding-bottom: 8px; font-size: 14px; }

/* Breadcrumbs sit inside the hero, 24 px under the sticky header, on both types. */
.t2s-page-hero { position: relative; }
.t2s-page-hero__crumbs {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  line-height: 20px;
  padding-top: 24px;
  margin-bottom: max(24px, calc(var(--section-py) - 44px));
}
.t2s-page-hero__crumbs p { margin: 0; }
.t2s-page-hero__crumbs a { color: inherit; text-decoration: none; }
.t2s-page-hero__crumbs a:hover { text-decoration: underline; }
.t2s-page-hero__title { margin: 0; max-width: 30ch; }
.t2s-page-hero__crumbs .last {
  display: inline-block;
  max-width: min(48ch, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.t2s-page-hero__eyebrow { margin-bottom: 12px; }
.t2s-page-hero__lead { margin-top: 16px; }
.t2s-page-hero__meta {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--color-mid);
}

/* 3a. Text hero: information pages, posts */
.t2s-page-hero--text {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--section-header-gap);
}
.t2s-page-hero--text .t2s-page-hero__crumbs { color: var(--color-mid); }
.t2s-page-hero--text .t2s-page-hero__crumbs .last { color: var(--color-ink); }
/* The section under a hero starts closer: hero bottom + this = one --section-py */
main .t2s-page-hero + section.t2s-section { padding-top: var(--section-header-gap); }

/* 3b. Photo hero: services and sales pages (dark photo, display H1, CTA, chips/stats) */
.t2s-page-hero--photo {
  background: var(--color-ink) center / cover no-repeat;
  color: var(--color-white);
  padding-bottom: var(--section-py);
  overflow: hidden;
}
.t2s-page-hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22, 25, 43, 0.88) 0%, rgba(22, 25, 43, 0.6) 55%, rgba(22, 25, 43, 0.35) 100%);
  pointer-events: none;
}
.t2s-page-hero--photo > .container { position: relative; z-index: 1; }
.t2s-page-hero--photo .t2s-page-hero__crumbs { color: rgba(255, 255, 255, 0.7); }
.t2s-page-hero--photo .t2s-page-hero__crumbs .last { color: var(--color-white); }
.t2s-page-hero--photo .t2s-display,
.t2s-page-hero--photo .t2s-h1 { color: var(--color-white); }
.t2s-page-hero--photo .t2s-lead { color: rgba(255, 255, 255, 0.85); }
.t2s-page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.t2s-page-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.85);
}

/* -- 4. Buttons ------------------------------------------------------------- */
.t2s-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.t2s-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.t2s-btn[disabled], .t2s-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.t2s-btn--md { padding: 12px 24px; }
.t2s-btn--lg { padding: 14px 28px; }

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

.t2s-btn--secondary { background: transparent; border-color: var(--color-navy); color: var(--color-navy); }
.t2s-btn--secondary:hover { background: var(--color-navy); color: var(--color-white); }

.t2s-btn--ghost {
  background: transparent;
  color: var(--color-navy);
  padding-left: 0;
  padding-right: 0;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.t2s-btn--ghost:hover { color: var(--color-accent); }

/* On a dark background (photo hero, navy panels) */
.t2s-on-dark .t2s-btn--secondary,
.t2s-page-hero--photo .t2s-btn--secondary { border-color: rgba(255, 255, 255, 0.8); color: var(--color-white); }
.t2s-on-dark .t2s-btn--secondary:hover,
.t2s-page-hero--photo .t2s-btn--secondary:hover { background: var(--color-white); color: var(--color-navy); }
.t2s-on-dark .t2s-btn--ghost,
.t2s-page-hero--photo .t2s-btn--ghost { color: var(--color-white); }

/* -- 5. Chips: blog filters and pagination, not buttons --------------------- */
.t2s-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-navy);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), color var(--transition);
}
.t2s-chip:hover { border-color: var(--color-navy); }
.t2s-chip.is-active, .t2s-chip[aria-current], .t2s-chip[aria-pressed="true"] {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}

/* -- 6. Surfaces ------------------------------------------------------------ */
/* Card in a grid: 16. Single large panel (form, text block, map): 24. */
.t2s-surface--white { background: var(--color-white); }
.t2s-card  { background: var(--color-white); border-radius: var(--radius-lg); }
.t2s-panel {
  background: var(--color-white);
  border-radius: var(--radius-panel);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
  padding: 48px;
}
@media (max-width: 768px) { .t2s-panel { padding: 28px 24px; } }
.t2s-panel__title { margin: 0 0 32px; }
@media (max-width: 768px) { .t2s-panel__title { margin-bottom: 24px; } }
.t2s-radius-card  { border-radius: var(--radius-lg) !important; }
.t2s-radius-panel { border-radius: var(--radius-panel) !important; }

/* -- 7. Long text: posts, RODO, report ------------------------------------- */
.t2s-prose {
  max-width: var(--measure);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-navy);
}
.t2s-prose > * + * { margin-top: 1em; }
.t2s-prose h2 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-h3); color: var(--color-ink); margin-top: 1.8em; }
.t2s-prose h3 { font-family: var(--font-display); font-size: var(--fs-card); font-weight: 600; line-height: var(--lh-card); color: var(--color-ink); margin-top: 1.5em; }
.t2s-prose a { color: var(--color-accent); }
.t2s-prose ul, .t2s-prose ol { padding-left: 1.4em; }
.t2s-prose li + li { margin-top: 0.4em; }
.t2s-prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); }
.t2s-prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.t2s-prose td, .t2s-prose th { padding: 8px 12px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.t2s-prose blockquote { border-left: 3px solid var(--color-accent); padding-left: 16px; color: var(--color-ink); }
