/*
  ETECHTICS SOFTWARE SOLUTIONS — Global Layout Foundation
  ---------------------------------------------------------
  Minimal reset + base typography + shared layout primitives.
  No CSS framework, no utility-class explosion — just what every
  page will need. Depends on css/tokens.css being loaded first.
*/

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-body-text);
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-2);
  color: var(--color-navy);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

p {
  margin: 0 0 var(--space-2);
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  /* color-blue-600, not the base color-blue: at normal text sizes,
     color-blue on white measures ~4.29:1, just under the 4.5:1 WCAG AA
     minimum. color-blue-600 measures ~5.63:1 and is already an
     approved token (the hover/active tint), so no new color is
     introduced. color-blue itself is kept for non-text UI (e.g. the
     focus outline below), where the 3:1 UI-component minimum applies
     and it already passes. */
  color: var(--color-blue-600);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

ul, ol {
  margin: 0;
  padding: 0;
}

/* ---------------------------------------------------------------
   Focus states — never remove outline without a visible replacement
--------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------
   Layout primitives
--------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

/* ---------------------------------------------------------------
   Accessibility utilities
--------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -3rem;
  z-index: 1000;
  background: var(--color-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--space-2);
}

/* ---------------------------------------------------------------
   Buttons
--------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast);
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-orange);
  /* Navy text, not white: white-on-orange measures ~2.2:1, well under the
     4.5:1 WCAG AA minimum for text. Navy-on-orange measures ~5.8:1. */
  color: var(--color-navy);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-orange-600);
}

.btn-secondary {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-navy);
  color: #ffffff;
}

/* ---------------------------------------------------------------
   Responsive gutter guarantee — never let anything create
   horizontal scroll on the body
--------------------------------------------------------------- */
body {
  overflow-x: hidden;
}

/* ---------------------------------------------------------------
   Section-intro heading pattern (Phase 11 design-consistency pass)
   ------------------------------------------------------------
   Centered heading + a short fade-to-solid-to-fade divider bar,
   matching the reference site's section-heading treatment. Applies
   wherever a page uses the shared "section head" wrapper classes —
   .section-head (home.css) and .service-block__head (services.css)
   — so every page built on either shared system picks this up with
   no markup changes.
--------------------------------------------------------------- */
.section-head,
.service-block__head {
  text-align: center;
  margin-inline: auto;
}
.section-head h2,
.service-block__head h2 {
  position: relative;
  padding-bottom: var(--space-3);
}
.section-head h2::after,
.service-block__head h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 90px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border) 30%,
    var(--color-navy) 50%,
    var(--color-border) 70%,
    transparent
  );
}
.section-head p,
.service-block__head p {
  margin-inline: auto;
}

/* ---------------------------------------------------------------
   Dashed-border CTA callout — a light, reusable echo of the
   reference site's "Have any question about us?" inline prompt.
   Opt-in via an extra class on an existing element; no page is
   required to use it.
--------------------------------------------------------------- */
.dashed-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.dashed-cta--on-light {
  border-color: var(--color-border);
}

/* ---------------------------------------------------------------
   Decorative dot-grid corner texture for content cards — a CSS-only
   stand-in for the reference site's dot/network card decoration.
   Applied via .card-decorative on a positioned card; purely
   decorative (aria-hidden by nature, generated content only).
--------------------------------------------------------------- */
.card-decorative {
  position: relative;
  overflow: hidden;
}
.card-decorative::before {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 96px;
  height: 96px;
  background-image: radial-gradient(circle, rgba(16, 24, 40, 0.10) 1.4px, transparent 1.4px);
  background-size: 12px 12px;
  pointer-events: none;
}
.card-decorative--accent-1 { border-top: 4px solid var(--accent-1); }
.card-decorative--accent-2 { border-top: 4px solid var(--accent-2); }
.card-decorative--accent-3 { border-top: 4px solid var(--accent-3); }
.card-decorative--accent-4 { border-top: 4px solid var(--accent-4); }
.card-decorative--accent-5 { border-top: 4px solid var(--accent-5); }
