/* ============================================================
   Tillex — Layout & component styles
   Translated from the Tillex design system prototype into
   reusable classes so template text stays editable while the
   layout stays locked in CSS.
   ============================================================ */

/* ---- Base element defaults ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body-family);
  font-weight: var(--body-weight);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 {
  font-family: var(--heading-family);
  font-weight: var(--heading-weight);
  color: var(--text-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--link); text-decoration: none; transition: color var(--dur-fast) var(--ease-standard); }
a:hover { color: var(--link-hover); }
img { max-width: 100%; display: block; }
::selection { background: var(--tillex-yellow); color: #000; }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }

/* ---- Layout helpers ---- */
.tlx-container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.tlx-section { padding-block: var(--section-y); }
.tlx-section--subtle { background: var(--bg-subtle); border-top: 1px solid var(--border-default); }
.tlx-eyebrow {
  font-weight: var(--fw-bold); font-size: 13px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cc-orange); margin-bottom: 12px;
}
.tlx-section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(32px, 4vw, 48px); }
.tlx-section-head p { font-size: clamp(15px, 2vw, 18px); font-weight: 300; color: var(--ink-600); line-height: 1.55; }

/* ---- Buttons ---- */
.tlx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h-md); padding: 0 22px; border: none; border-radius: var(--radius-md);
  font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer; transition: background var(--dur-fast) var(--ease-standard);
}
.tlx-btn--primary { background: var(--tillex-yellow); color: #000; }
.tlx-btn--primary:hover { background: var(--accent-hover); color: #000; }
.tlx-btn--orange { background: var(--cc-orange); color: #fff; }
.tlx-btn--outline { background: #fff; color: #000; border: 1px solid var(--border-strong); }
.tlx-btn--ghost { background: transparent; color: #000; border: 1px solid var(--border-default); }
.tlx-btn--sm { height: var(--control-h-sm); padding: 0 14px; }

/* ============================================================
   HEADER
   ============================================================ */
.tlx-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--border-default); }
.tlx-header__inner {
  max-width: var(--container-max); margin: 0 auto; min-height: 60px;
  padding: 8px var(--gutter); display: flex; align-items: center;
  gap: clamp(12px, 3vw, 32px); flex-wrap: wrap;
}
.tlx-brand { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.tlx-brand img { height: 40px; width: auto; }
.tlx-brand__rule { width: 1px; height: 28px; background: var(--border-strong); }
.tlx-brand__tag { font-size: 11px; line-height: 1.2; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.tlx-nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; max-width: 100%; }
.tlx-nav a { padding: 8px 14px; font-size: 14px; white-space: nowrap; font-weight: 400; color: var(--ink-700); border-bottom: 2px solid transparent; }
.tlx-nav a:hover, .tlx-nav .current-menu-item > a { color: #000; border-bottom-color: var(--tillex-yellow); }
.tlx-header__tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tlx-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  background: #fff; border: 1px solid var(--border-default); border-radius: 4px; cursor: pointer; color: var(--ink-700);
}

/* ============================================================
   HERO
   ============================================================ */
.tlx-hero { position: relative; min-height: min(78vh, 660px); overflow: hidden; background: #565B5E; }
.tlx-hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.tlx-hero__slide.is-active { opacity: 1; }
.tlx-hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.tlx-hero__slide--contain img { object-fit: contain; padding: clamp(16px, 4vw, 56px); }
.tlx-hero__scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(52,56,58,.62) 0%, rgba(52,56,58,.30) 42%, rgba(52,56,58,.92) 100%); }
.tlx-hero__body { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.tlx-hero__inner { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: clamp(40px,7vw,76px) var(--gutter); color: #fff; }
.tlx-hero__col { max-width: 760px; }
.tlx-kicker { display: inline-flex; align-items: center; gap: 12px; }
.tlx-kicker__bar { width: 4px; height: 22px; background: var(--tillex-yellow); }
.tlx-kicker__text { font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.tlx-hero h1 { font-size: clamp(34px,5.6vw,60px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 16px; color: #fff; max-width: 16ch; }
.tlx-hero p { font-size: clamp(15px,2vw,18px); font-weight: 300; color: #eef0f0; max-width: 52ch; margin: 0 0 26px; line-height: 1.55; }
.tlx-hero__dots { display: flex; gap: 9px; }
.tlx-hero__dots button { width: 30px; height: 5px; border-radius: 3px; border: none; cursor: pointer; padding: 0; background: rgba(255,255,255,.4); transition: background .2s; }
.tlx-hero__dots button.is-active { background: var(--tillex-yellow); }
.tlx-pills { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-left: 16px; }
.tlx-pills span { font-size: 14px; color: #eef0f0; display: inline-flex; align-items: center; gap: 7px; }
.tlx-pills span::before { content: ""; width: 5px; height: 5px; background: var(--tillex-yellow); border-radius: 50%; }

/* ---- Credentials strip ---- */
.tlx-creds { border-bottom: 1px solid var(--border-default); background: var(--bg-subtle); }
.tlx-creds__inner { max-width: var(--container-max); margin: 0 auto; padding: 16px var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; }
.tlx-creds__item { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-700); }

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.tlx-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(18px, 2.5vw, 28px); }
.tlx-cat-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-default); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-xs); }
.tlx-cat-card:hover { box-shadow: var(--shadow-md); }
.tlx-cat-card__media { aspect-ratio: 4/3; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.tlx-cat-card__media img { width: 100%; height: 100%; object-fit: contain; padding: clamp(10px, 2vw, 20px); }
.tlx-cat-card__body { padding: clamp(22px, 2.6vw, 30px); border-top: 4px solid var(--tillex-yellow); flex: 1; display: flex; flex-direction: column; }
.tlx-cat-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.tlx-cat-card__title { font-size: clamp(22px, 2.8vw, 30px); font-weight: 700; color: #000; letter-spacing: -0.01em; }
.tlx-cat-card__count { font-size: 13px; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.tlx-cat-card p { margin: 0 0 20px; font-size: 15px; font-weight: 300; line-height: 1.55; color: var(--ink-600); flex: 1; }
.tlx-cat-card__cta { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cc-orange); }
.tlx-badge-abs { position: absolute; top: 16px; left: 16px; background: var(--cc-orange); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 6px 11px; border-radius: 2px; }

/* ============================================================
   COLOUR CODE FEATURE
   ============================================================ */
.tlx-split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.tlx-split__col { flex: 1 1 340px; min-width: 280px; }
.tlx-media-frame { position: relative; width: 100%; aspect-ratio: 16/7; min-height: 180px; border: 1px solid var(--border-default); border-radius: 8px; overflow: hidden; background: var(--bg-subtle); }
.tlx-media-frame img { width: 100%; height: 100%; object-fit: contain; }

/* ============================================================
   PRODUCT CARDS  (featured / catalogue)
   ============================================================ */
.tlx-prod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.tlx-prod-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xs); }
.tlx-prod-card:hover { box-shadow: var(--shadow-md); }
.tlx-prod-card__media { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; padding: 18px; }
.tlx-prod-card__media img { width: 100%; height: 100%; object-fit: contain; }
.tlx-prod-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border-default); }
.tlx-prod-card__cat { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.tlx-prod-card__name { font-size: 17px; font-weight: 700; color: #000; letter-spacing: -0.01em; }
.tlx-prod-card__spec { font-size: 13px; font-weight: 300; color: var(--ink-600); }

/* ============================================================
   FOOTER
   ============================================================ */
.tlx-footer { background: #B8C2C3; color: #1a1a1a; }
.tlx-footer__inner { max-width: var(--container-max); margin: 0 auto; padding: clamp(44px,6vw,64px) var(--gutter) 32px; }
.tlx-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 36px; }
.tlx-footer img { height: 84px; margin-bottom: 18px; }
.tlx-footer__coltitle { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #000; margin-bottom: 14px; }
.tlx-footer__links { display: flex; flex-direction: column; gap: 9px; }
.tlx-footer__links a { font-size: 14px; color: #2a2e2f; }
.tlx-footer__links a:hover { color: #000; }
.tlx-footer__bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,.15); font-size: 13px; color: #3a3f40; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .tlx-nav { order: 3; width: 100%; margin-left: 0; }
  .tlx-hero__body { align-items: flex-end; }
}

/* ============================================================
   COVER-BASED HERO (editable core/cover variant)
   ============================================================ */
.tlx-hero-cover { min-height: min(78vh, 660px); }
.tlx-hero-cover .wp-block-cover__inner-container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.tlx-hero-cover h1 { font-size: clamp(34px,5.6vw,60px); line-height: 1.02; letter-spacing: -0.02em; color: #fff; max-width: 16ch; margin: 0 0 16px; }
.tlx-hero-cover p { font-size: clamp(15px,2vw,18px); font-weight: 300; color: #eef0f0; max-width: 52ch; margin: 0; line-height: 1.55; }
.tlx-hero-cover .tlx-hero-kicker { font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: #fff; border-left: 4px solid var(--tillex-yellow); padding-left: 12px; margin: 0 0 16px; }

/* ============================================================
   BLOCK-BASED CATEGORY CARDS (core/columns variant)
   ============================================================ */
.tlx-cat-card .wp-block-image { margin: 0; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tlx-cat-card .wp-block-image img { width: 100%; height: 100%; object-fit: contain; padding: clamp(10px,2vw,20px); }
.tlx-cat-card > .tlx-cat-card__body { border-top: 4px solid var(--tillex-yellow); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.tlx-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: stretch; }
.tlx-value-card { background: #fff; border: 1px solid var(--border-default); border-top: 3px solid var(--tillex-yellow); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-xs); }
.tlx-value-card h4 { margin: 0 0 6px; font-size: 18px; }
.tlx-value-card p { margin: 0; color: var(--text-muted); font-size: 15px; font-weight: 300; line-height: 1.55; }
.tlx-milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; align-items: stretch; }

/* WordPress adds a flow-layout top-margin to every child after the first
   (.is-layout-flow > * + *). Inside our CSS grids that breaks alignment and
   stretching — neutralise it so grid items align and stretch as intended. */
.tlx-cards-grid > *,
.tlx-milestones > *,
.tlx-docs-grid > *,
.tlx-split > *,
.tlx-contact > *,
.tlx-contact-list > *,
.tlx-header__inner > *,
.tlx-nav > *,
.tlx-footer__cols > *,
.tlx-footer__links > *,
.tlx-footer__bottom > * { margin-block: 0 !important; }

/* ---- Editable (block-based) header nav ---- */
.tlx-nav p { margin: 0; }
.tlx-nav p a { display: block; padding: 8px 14px; font-size: 14px; white-space: nowrap; font-weight: 400; color: var(--ink-700); border-bottom: 2px solid transparent; }
.tlx-nav p a:hover { color: #000; border-bottom-color: var(--tillex-yellow); }

/* ---- Editable (block-based) footer ---- */
.tlx-footer__col { display: flex; flex-direction: column; }
.tlx-footer__links p { margin: 0; font-size: 14px; color: #2a2e2f; line-height: 1.5; }
.tlx-footer__links p a { color: #2a2e2f; }
.tlx-footer__links p a:hover { color: #000; }
.tlx-footer__tagline { font-size: 14px; color: #3a3f40; padding-left: 16px; margin: 8px 0 0; }
.tlx-milestone { border-top: 3px solid var(--tillex-yellow); padding-top: 14px; }
.tlx-milestone .tlx-milestone__year { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.tlx-milestone p { color: var(--text-muted); font-size: 14px; margin: 4px 0 0; }

/* ============================================================
   DOCUMENTS PAGE
   ============================================================ */
.tlx-docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tlx-doc-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-md); }
.tlx-doc-card:hover { box-shadow: var(--shadow-sm); }
.tlx-doc-card__icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 4px; background: var(--tillex-yellow); display: flex; align-items: center; justify-content: center; }
.tlx-doc-card__title { font-weight: 400; font-size: 15px; color: #000; margin: 0; display: block; }
.tlx-doc-card__meta { font-size: 13px; color: var(--text-muted); margin: 0; display: block; text-transform: uppercase; letter-spacing: .04em; }
a.tlx-doc-card { color: inherit; text-decoration: none; }
a.tlx-doc-card:hover { border-color: var(--border-strong); }
.tlx-docs-group-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin: 32px 0 14px; }
.tlx-docs-group-title:first-child { margin-top: 0; }
.tlx-docs-empty { color: var(--text-muted); padding: 24px 0; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.tlx-contact { display: flex; flex-wrap: wrap; gap: clamp(32px,5vw,56px); align-items: flex-start; }
.tlx-contact__col { flex: 1 1 320px; min-width: 280px; }
.tlx-contact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; }
.tlx-contact-item { display: flex; gap: 14px; align-items: center; }
.tlx-contact-item__icon { width: 40px; height: 40px; border-radius: 4px; background: var(--bg-inset); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tlx-contact-item__label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); font-weight: 700; }
.tlx-contact-item__value { font-size: 15px; }
.tlx-form-card { flex: 1 1 340px; min-width: 280px; background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: clamp(24px,4vw,32px); }
.tlx-form { display: flex; flex-direction: column; gap: 16px; }
.tlx-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tlx-form label { font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: 6px; }
.tlx-form input, .tlx-form textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: 4px; font-size: 16px; outline: none; font-family: inherit; }
.tlx-form input:focus, .tlx-form textarea:focus { border-color: var(--tillex-silver); box-shadow: var(--shadow-focus); }
.tlx-form textarea { resize: vertical; min-height: 110px; }
.tlx-form button { height: 48px; background: var(--tillex-yellow); color: #000; border: none; border-radius: 4px; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; width: 100%; }
@media (max-width: 480px) { .tlx-form__row { grid-template-columns: 1fr; } }
