/* Annata redesign: shared components (design system v1.0, sections 6 and 7).
   Buttons, text links, badges, the vertical accent bar, cards and the card grid.
   Uses design tokens only (tokens.css). Breakpoints match tokens.css: 600px and 1024px.

   Specificity: the Elementor kit styles every button, link and heading site-wide
   (".elementor-kit-5 button", ".elementor-kit-5 a", ".elementor-kit-5 h3"), which beats a single class.
   Component rules that compete with those start with ":root" so the design system wins wherever a
   component is placed. Added 26 Nov 2026 (roadmap step 0, Foundation). */

/* ---------- Chevron (spec 6.3): the hinge pointing right ---------- */
.an-chev {
  display: inline-block;
  flex: none;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.15em;
  border-right: 0.16em solid var(--accent);
  border-bottom: 0.16em solid var(--accent);
  transform: rotate(-45deg);
}
.an-chev--grey { border-color: var(--a-grey-60); }

/* ---------- Buttons (spec 7.2) ---------- */
:root .an-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-width: var(--btn-min-w);
  height: var(--btn-h-md);   /* medium: header, cards, forms */
  margin: 0;
  padding: 0 var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-full);
  background: var(--surface-muted);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;   /* labels never wrap */
  cursor: pointer;
  box-shadow: none;
  transition: background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
:root .an-btn:focus { outline: none; }
:root .an-btn:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
:root .an-btn--lg { height: var(--btn-h-lg); padding: 0 var(--sp-6); } /* hero and CTA band */

/* Primary: the main next step, one per section */
:root .an-btn--primary { background: var(--action); color: var(--action-on); font-size: var(--fs-button); font-weight: var(--fw-bold); }
:root .an-btn--primary:hover { background: var(--action-hover); color: var(--action-on); }
:root .an-btn--primary:active { background: var(--action-press); transform: scale(0.98); }

/* Secondary: beside a primary when a second option is needed */
:root .an-btn--secondary { background: var(--surface-muted); border-color: var(--border); color: var(--text); }
:root .an-btn--secondary:hover { background: var(--a-white); color: var(--text); }

/* Ghost: dark sections and over images only */
:root .an-btn--ghost { background: transparent; border: 1.5px solid var(--a-white); color: var(--a-white); } /* 1.5px, spec 7.2 */
:root .an-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--a-white); }

/* On accent: the red CTA band and accent panels */
:root .an-btn--on-accent { background: var(--a-white); color: var(--a-black); }
:root .an-btn--on-accent:hover { background: var(--a-grey-05); color: var(--a-black); }

:root .an-btn:disabled,
:root .an-btn[aria-disabled="true"] {
  background: var(--a-grey-05);
  border-color: transparent;
  color: var(--a-grey-60);
  cursor: not-allowed;
  transform: none;
}

/* ---------- Text links (spec 7.2) ---------- */
/* Inline link: inside running text, always underlined */
:root .an-inline-link {
  color: var(--text-link);
  font-family: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
:root .an-inline-link:hover { text-decoration-thickness: 2px; }
:root .an-inline-link:focus { outline: none; }
:root .an-inline-link:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); border-radius: var(--sp-1); }

/* Action link: semibold text and a chevron that moves right on hover; one per card */
:root .an-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-small);
  text-decoration: none;
}
:root a.an-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; }
.an-link .an-chev { transition: transform var(--dur-1) var(--ease); }
a.an-link:hover .an-chev,
.an-card:hover .an-link .an-chev { transform: translateX(var(--sp-1)) rotate(-45deg); }
:root a.an-link:focus { outline: none; }
:root a.an-link:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); border-radius: var(--sp-1); }

/* ---------- Badges (spec 7.2): never clickable, at most two per card ---------- */
.an-badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.an-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  background: var(--a-grey-18);
  color: var(--a-black);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-small);
}
.an-badge--automotive { background: var(--a-marine); color: var(--a-white); }
.an-badge--equipment  { background: var(--a-yellow); color: var(--a-black); }
.an-badge--trucks     { background: var(--a-olive);  color: var(--a-white); }
.an-badge--new        { background: var(--a-red-700); color: var(--a-white); }

/* ---------- Vertical accent bar (spec 6.4) ---------- */
.an-vbar { position: relative; padding-left: calc(var(--accent-bar-w) + var(--sp-5) - var(--sp-1)); } /* bar + 20px */
.an-vbar::before {
  content: "";
  position: absolute;
  top: 0.2em;
  bottom: 0.2em;
  left: 0;
  width: var(--accent-bar-w);
  border-radius: var(--r-full);
  background: var(--accent);
}
.an-vbar--structural::before { background: var(--a-bar-structural); }

/* ---------- Cards (spec 7.3) ---------- */
/* One link per card: the title link is stretched over the whole card, so the card has one tab stop. */
.an-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
  padding: var(--sp-5);
  border: 1px solid var(--hairline);
  border-radius: var(--r-20);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur-2) var(--ease);
}
.an-card:hover { box-shadow: var(--shadow-2); }
.an-card:focus-within { box-shadow: var(--shadow-2); }
.an-card > * { margin: 0; }
.an-card picture { display: contents; }

:root .an-card__eyebrow {
  color: var(--eyebrow);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
:root .an-card__title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h4);
  letter-spacing: normal;
  text-transform: none;
}
:root .an-card__title a { color: inherit; font-family: inherit; text-decoration: none; }
:root .an-card__title a:focus { outline: none; }
.an-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-20); }
.an-card__title a:focus-visible::after { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.an-card__text {
  color: var(--text-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  /* Never cut off: during the content freeze today's words show in full. "Up to 3 lines" (spec 7.3) is a
     writing guide for when content is rewritten, not something to enforce by hiding text. */
}
.an-card__foot { margin-top: auto !important; padding-top: var(--sp-2); }
.an-card__icon { width: var(--sp-5); height: var(--sp-5); color: var(--accent); }

/* Image (industry card) and cover (resource card): bleeds to 12px inside the card edge */
.an-card .an-card__img,
.an-card .an-card__img img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: var(--r-16);
  background: var(--surface-muted);
}
.an-card__media { margin: calc(var(--sp-3) - var(--sp-5)) calc(var(--sp-3) - var(--sp-5)) var(--sp-2) !important; }

/* Case study: customer logo */
.an-card .an-card__logo,
.an-card .an-card__logo img { display: block; width: auto; max-width: calc(var(--sp-10) + var(--sp-7)); height: var(--sp-6); object-fit: contain; object-position: left center; } /* up to 176 × 32px */

/* Featured: one highlight per section at most */
.an-card--featured {
  --surface: var(--a-black);
  --text: var(--a-white);
  --text-muted: rgba(255, 255, 255, 0.78);
  --eyebrow: var(--a-white);
  --hairline: rgba(255, 255, 255, 0.12);
  --focus-ring: var(--a-white);
  box-shadow: none;
}
.an-card--featured:hover { box-shadow: var(--shadow-2); }

/* ---------- Card grid (spec 7.3): 3 across desktop, 2 tablet, 1 mobile; 4 only for short module cards ---------- */
.an-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.an-grid > li { margin: 0; display: flex; }
.an-grid > li > .an-card { flex: 1; }

@media (min-width: 600px) {
  .an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .an-card--content { padding: var(--sp-6); } /* 32px on desktop for content cards */
  .an-card--content .an-card__media { margin: calc(var(--sp-3) - var(--sp-6)) calc(var(--sp-3) - var(--sp-6)) var(--sp-2) !important; }
  .an-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .an-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Breadcrumbs (spec 7.1): under the header on every page except Home ---------- */
.an-crumbs { font-family: var(--font-sans); }
.an-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.an-crumbs li { display: inline-flex; align-items: center; gap: var(--sp-2); margin: 0; }
:root .an-crumbs a { color: var(--text-muted); font-family: inherit; text-decoration: none; }
:root .an-crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; }
:root .an-crumbs a:focus { outline: none; }
:root .an-crumbs a:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); border-radius: var(--sp-1); }
.an-crumbs [aria-current] { color: var(--text); }
.an-crumbs .an-chev { width: 0.45em; height: 0.45em; margin: 0; border-width: 0 0.12em 0.12em 0; }

/* ---------- Corner hinge (spec 6.2): hero bands, the CTA band and accent panels only ---------- */
/* A square L in the bottom-right corner; the box it sits in keeps square corners. */
.has-hinge { position: relative; border-radius: var(--r-0); }
.has-hinge::after {
  content: "";
  position: absolute;
  right: var(--hinge-inset);
  bottom: var(--hinge-inset);
  width: var(--hinge-size);
  height: var(--hinge-size);
  background: var(--hinge-colour, var(--accent));
  clip-path: polygon(65% 0, 100% 0, 100% 100%, 0 100%, 0 65%, 65% 65%);
  pointer-events: none;
}

/* ---------- CTA band (spec 7.1): full-width red band directly above the footer ---------- */
.an-cta {
  --text: var(--a-white);
  --focus-ring: var(--a-white);
  --hinge-colour: var(--a-white);
  padding: var(--sp-9) 0;
  background: var(--a-red);
  color: var(--a-white);
  font-family: var(--font-sans);
}
.an-cta__in {
  display: grid;
  justify-items: start;
  gap: var(--sp-5);
  max-width: calc(var(--container) + 2 * var(--side));
  margin: 0 auto;
  padding: 0 var(--side);
}
:root .an-cta__title {
  margin: 0;
  color: var(--a-white);
  font-family: var(--font-sans);
  font-size: var(--fs-h2);      /* 36px on desktop, bold */
  font-weight: var(--fw-bold);
  line-height: var(--lh-h2);
  letter-spacing: -0.01em;
  text-transform: none;
}
:root .an-cta__text {
  max-width: 34ch;
  margin: 0;
  color: var(--a-white);
  font-size: var(--fs-band);    /* 24px regular: nothing smaller on the band */
  font-weight: var(--fw-regular);
  line-height: var(--lh-lead);
}
.an-cta .an-btn { margin-top: var(--sp-2); }

/* ---------- FAQ accordion (spec 7.3): native details and summary, works without script ---------- */
/* One readable column: each question and its answer share the same edges, about 70 characters a line
   (spec 7.3), with the chevron in its own column on the right. */
.an-faq { max-width: calc(var(--measure) + var(--sp-6)); border-top: 1px solid var(--hairline); font-family: var(--font-sans); font-size: var(--fs-body); }
.an-faq__item { border-bottom: 1px solid var(--hairline); }
:root .an-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--sp-7);   /* 48px touch target */
  padding: var(--sp-5) 0;
  color: var(--text);
  font-size: var(--fs-h4);   /* question: 20px semibold */
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h4);
  list-style: none;
  cursor: pointer;
}
.an-faq__item[open] > .an-faq__q { padding-bottom: var(--sp-3); }
.an-faq__q::-webkit-details-marker { display: none; }
.an-faq__q::marker { content: ""; }
:root .an-faq__q:focus { outline: none; }
:root .an-faq__q:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); border-radius: var(--sp-1); }
:root .an-faq__q,
:root .an-faq__q:hover { text-decoration: none; } /* no underline on questions */
/* Toggle chevron: down when closed, up when open (spec 6.3, the one exception to "always right") */
.an-faq .an-chev--toggle { width: 0.45em; height: 0.45em; margin: 0 var(--sp-1) 0 0; transform: translateY(-25%) rotate(45deg); transition: transform var(--dur-2) var(--ease); }
.an-faq__item[open] .an-chev--toggle { transform: translateY(25%) rotate(-135deg); }
.an-faq__a {
  padding: 0 var(--sp-6) var(--sp-5) 0;  /* right: the chevron column, so the answer lines up with the question */
  color: var(--text-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.an-faq__a > * { margin: 0 0 var(--sp-3); }
.an-faq__a > *:last-child { margin-bottom: 0; }
.an-faq__a ul, .an-faq__a ol { padding-left: var(--sp-5); }
:root .an-faq__a a { color: var(--text-link); font-family: inherit; text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- FAQ section layout: heading and intro beside the questions on desktop ---------- */
.an-faq-layout { display: grid; gap: var(--sp-6); font-family: var(--font-sans); }
.an-faq-layout__head { display: grid; align-content: start; gap: var(--sp-3); }
:root .an-faq-layout__title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h2);
  letter-spacing: -0.01em;
  text-transform: none;
}
.an-faq-layout__intro { color: var(--text-muted); font-size: var(--fs-lead); line-height: var(--lh-lead); }
.an-faq-layout__intro > * { margin: 0; }
@media (min-width: 1024px) {
  .an-faq-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-8); }
  .an-faq-layout .an-faq { max-width: none; }
}
