/* Anthill Group Limited site styles.
   White canvas, dark ink text, hairline borders, one blue accent kept for
   links and buttons. Poppins is self hosted from /assets/fonts. Every
   transition and animation sits inside a prefers-reduced-motion check. */

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #ffffff;
  --surface: #f4f5f6;
  --ink: #16202a;
  --ink-2: #47515c;
  --line: #dde1e5;
  --line-strong: #b9c0c7;
  --accent: #1d4e89;
  --accent-deep: #133a68;

  --font: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing scale: every margin and padding below uses one of these. */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;

  --measure: 38rem;
  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 6px;
}

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

html {
  background: var(--canvas);
  color-scheme: light;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  font-variant-numeric: lining-nums;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-deep);
  text-decoration-thickness: 2px;
}

/* Keep a phone number on one line. */
a[href^="tel:"] {
  white-space: nowrap;
}

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

::selection {
  background: #d6e2f1;
  color: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 0.94em;
  letter-spacing: 0.02em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: var(--s3);
  left: var(--s3);
  z-index: 10;
  padding: var(--s2) var(--s4);
  background: var(--ink);
  color: var(--canvas);
  font-weight: 500;
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--canvas);
}

/* Typography. Scale steps of 1.25 from a 17px body. */

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  letter-spacing: -0.02em;
  max-width: 20ch;
}

h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.66rem);
}

h3 {
  font-size: 1.0625rem;
}

p {
  margin: 0 0 var(--s4);
  max-width: var(--measure);
}

.lead {
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 34rem;
}

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* Buttons: flat, sized to their text. */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  width: fit-content;
  min-height: 2.75rem;
  padding: var(--s2) var(--s5);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--canvas);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--canvas);
}

.btn--quiet {
  background: var(--canvas);
  color: var(--accent);
  border-color: var(--line-strong);
}

.btn--quiet:hover {
  background: var(--canvas);
  color: var(--accent-deep);
  border-color: var(--accent);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav call";
  align-items: center;
  gap: var(--s4) var(--s6);
  padding-block: var(--s4);
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--ink);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.primary {
  grid-area: nav;
  justify-self: end;
}

.primary ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary a {
  display: inline-block;
  padding: var(--s2) 0;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.97rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.primary a:hover {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.primary a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.header-row .btn {
  grid-area: call;
  min-height: 2.5rem;
  padding-inline: var(--s4);
  font-size: 0.94rem;
}

/* Page layout */

main {
  padding-block: var(--s7) var(--s8);
}

/* The skip link moves focus here. Main is not a control, so no ring. */
main:focus {
  outline: none;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s2);
  margin: 0 0 var(--s5);
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.crumbs li + li::before {
  content: "/";
  margin-right: var(--s2);
  color: var(--line-strong);
}

.crumbs a {
  color: var(--ink-2);
}

.crumbs a:hover {
  color: var(--accent-deep);
}

.page-head {
  margin-bottom: var(--s7);
  max-width: 44rem;
}

.page-head h1 {
  margin-bottom: var(--s4);
}

.page-head .lead {
  margin-bottom: 0;
}

.section {
  padding-top: var(--s7);
  margin-top: var(--s7);
  border-top: 1px solid var(--line);
}

.section > h2 {
  margin-bottom: var(--s3);
}

.section-intro {
  color: var(--ink-2);
  margin-bottom: var(--s6);
}

/* Home hero: text on the left, contour drawing of a mound on the right. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s7);
}

.hero h1 {
  font-size: clamp(2.3rem, 1.5rem + 3.4vw, 3.9rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--s5);
}

.hero .lead {
  margin-bottom: var(--s6);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-bottom: var(--s7);
}

.hero__art {
  width: 100%;
  max-width: 32rem;
  justify-self: end;
}

/* Key facts, used in the hero and on the About page. */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: start;
  gap: var(--s4) var(--s6);
  margin: 0;
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}

.facts div {
  min-width: 0;
}

.facts dt {
  margin-bottom: var(--s1);
}

.facts dd {
  margin: 0;
  font-weight: 500;
}

/* Activity list on the home page: each row links to its section. */

.activities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s7);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.activities li:nth-last-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.row-link {
  display: block;
  padding: var(--s4) 0;
  color: var(--ink);
  text-decoration: none;
}

.row-link__title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.row-link__desc {
  display: block;
  margin-top: var(--s1);
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.55;
}

.row-link:hover {
  color: var(--ink);
}

.row-link:hover .row-link__title {
  color: var(--accent-deep);
}

/* Contact panel */

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-panel > div {
  padding: var(--s5);
}

.contact-panel > div + div {
  border-left: 1px solid var(--line);
}

.contact-panel .label {
  margin-bottom: var(--s2);
}

.contact-panel p {
  margin-bottom: 0;
}

.phone-big {
  display: inline-block;
  margin-bottom: var(--s4);
  color: var(--ink);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.phone-big:hover {
  color: var(--accent-deep);
}

.contact-panel .address-link {
  color: var(--ink);
}

.contact-panel .address-link:hover {
  color: var(--accent-deep);
}

.small-link {
  display: inline-block;
  margin-top: var(--s2);
  font-size: 0.94rem;
}

/* Services page: one section per registered activity. */

.activity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--s2) var(--s7);
  padding-block: var(--s5);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--s4);
}

.activity:last-of-type {
  border-bottom: 1px solid var(--line);
}

.activity h2 {
  font-size: 1.25rem;
  line-height: 1.35;
}

.activity p {
  margin: 0;
  color: var(--ink-2);
}

/* About page fact plate */

.plate {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  max-width: 50rem;
}

.plate div {
  padding: var(--s4) var(--s5) var(--s4) 0;
  border-bottom: 1px solid var(--line);
}

.plate .wide {
  grid-column: 1 / -1;
}

.plate dt {
  margin-bottom: var(--s1);
}

.plate dd {
  margin: 0;
  font-weight: 500;
}

/* Policy pages */

.summary {
  max-width: var(--measure);
  margin: 0 0 var(--s7);
  padding: var(--s5);
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.summary h2 {
  font-size: 1.0625rem;
  margin-bottom: var(--s3);
}

.summary ul {
  margin: 0;
  padding-left: var(--s5);
}

.summary li + li {
  margin-top: var(--s2);
}

.clause {
  max-width: var(--measure);
  padding-top: var(--s5);
  margin-top: var(--s5);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--s4);
}

.clause:first-of-type {
  margin-top: 0;
}

.clause h2 {
  font-size: 1.25rem;
  margin-bottom: var(--s3);
}

.clause p:last-child {
  margin-bottom: 0;
}

/* Policy page layout: clauses on the left, a clause index on the right. */

.policy {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 15rem);
  grid-template-areas: "body toc";
  justify-content: space-between;
  gap: var(--s7);
  align-items: start;
}

.policy__body {
  grid-area: body;
  min-width: 0;
}

.toc {
  grid-area: toc;
  position: sticky;
  top: var(--s5);
  padding-left: var(--s5);
  border-left: 1px solid var(--line);
}

.toc h2 {
  margin-bottom: var(--s3);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.94rem;
}

.toc a {
  display: inline-block;
  padding: var(--s1) 0;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.45;
}

.toc a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

/* Policies hub list */

.link-list {
  max-width: 44rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  border-top: 1px solid var(--line);
}

.link-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.link-list .row-link {
  padding-block: var(--s5);
}

.link-list .row-link__title {
  font-size: 1.25rem;
  color: var(--accent);
}

/* Related pages block at the end of each page. */

.related {
  margin-top: var(--s8);
  padding-top: var(--s6);
  border-top: 1px solid var(--line);
}

.related h2 {
  font-size: 1.0625rem;
  margin-bottom: var(--s4);
}

.related ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.related a {
  display: block;
  height: 100%;
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.related a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.related .row-link__title {
  color: var(--accent);
}

.related a:hover .row-link__title {
  color: var(--accent-deep);
}

/* Footer: company details plus a full list of pages. */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--s6);
  padding-block: var(--s7) var(--s6);
}

.footer-name {
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: var(--s2);
}

.footer-org p {
  color: var(--ink-2);
  margin-bottom: var(--s3);
}

.footer-org a {
  color: var(--ink);
}

.footer-org a:hover {
  color: var(--accent-deep);
}

.footer-h {
  font-size: 0.94rem;
  font-weight: 600;
  margin-bottom: var(--s3);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  display: inline-block;
  padding: var(--s1) 0;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.45;
}

.footer-col a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.footer-col a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

.footer-base {
  padding-bottom: var(--s6);
  color: var(--ink-2);
  font-size: 0.875rem;
}

.footer-base p {
  margin: 0;
  max-width: none;
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}

/* 404 page */

.notfound .actions {
  margin-top: var(--s6);
}

/* Motion. Only when the visitor has not asked for less of it. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a,
  .btn,
  .primary a,
  .row-link__title,
  .related a {
    transition: color 0.18s ease, background-color 0.18s ease,
      border-color 0.18s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .row-link__title,
  .row-link__desc,
  .footer-col a,
  .toc a {
    transition: color 0.18s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .row-link:hover .row-link__title,
  .row-link:hover .row-link__desc,
  .footer-col a:hover,
  .toc a:hover {
    transform: translateX(4px);
  }

  .btn:active {
    transform: scale(0.98);
  }

  .rise {
    animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .rise-2 {
    animation-delay: 0.06s;
  }

  .rise-3 {
    animation-delay: 0.12s;
  }

  .rise-4 {
    animation-delay: 0.18s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Tablet */

@media (max-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s6);
  }

  .hero__art {
    display: none;
  }

  .policy {
    display: block;
  }

  .toc {
    display: none;
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-org {
    grid-column: 1 / -1;
  }

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

  .contact-panel > div:first-child {
    grid-column: 1 / -1;
  }

  .contact-panel > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .contact-panel > div:last-child {
    border-left: 1px solid var(--line);
  }
}

/* Phone */

@media (max-width: 45rem) {
  body {
    font-size: 1rem;
  }

  .header-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand call"
      "nav nav";
    gap: var(--s3);
    padding-block: var(--s3) 0;
  }

  .brand {
    font-size: 1rem;
  }

  .brand img {
    width: 1.75rem;
    height: 1.75rem;
  }

  .primary {
    justify-self: stretch;
    border-top: 1px solid var(--line);
  }

  .primary ul {
    justify-content: space-between;
    gap: 0 var(--s4);
  }

  .primary a {
    padding-block: var(--s3);
  }

  .header-row .btn .btn__num {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  main {
    padding-block: var(--s6) var(--s7);
  }

  .page-head {
    margin-bottom: var(--s6);
  }

  .section {
    padding-top: var(--s6);
    margin-top: var(--s6);
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }

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

  .activities li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .activities li:last-child {
    border-bottom: 1px solid var(--line);
  }

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

  .contact-panel > div:last-child {
    border-left: 0;
  }

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

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

  .related ul {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s5);
  }

  .footer-col--wide {
    grid-column: 1 / -1;
  }
}

/* Print: black on white, no navigation, link targets written out. */

@media print {
  @page {
    margin: 18mm 16mm;
  }

  html,
  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .skip-link,
  .primary,
  .header-row .btn,
  .crumbs,
  .related,
  .footer-col,
  .hero__art,
  .toc,
  .actions,
  .small-link {
    display: none;
  }

  .site-header {
    border-bottom: 1px solid #000000;
  }

  .header-row {
    display: block;
    padding-block: 0 6pt;
  }

  .brand {
    color: #000000;
  }

  main {
    padding-block: 12pt;
  }

  h1,
  h2,
  h3,
  p,
  li,
  dd,
  dt,
  .lead,
  .label,
  .row-link__desc,
  .activity p {
    color: #000000;
  }

  h1 {
    font-size: 20pt;
    max-width: none;
  }

  h2,
  .clause h2,
  .activity h2 {
    font-size: 13pt;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  .clause,
  .activity,
  .contact-panel > div,
  .plate div,
  .site-footer {
    break-inside: avoid;
  }

  a {
    color: #000000;
    text-decoration: none;
  }

  main a[href^="/"]::after {
    content: " (anthillgroupltd.com" attr(href) ")";
    font-size: 9pt;
  }

  main a[href^="https://www.google"]::after {
    content: "";
  }

  .page-head,
  .summary,
  .clause,
  p {
    max-width: none;
  }

  .summary {
    background: none;
    border: 1px solid #000000;
  }

  .contact-panel,
  .contact-panel > div,
  .contact-panel > div + div,
  .contact-panel > div:last-child {
    display: block;
    border: 0;
    padding: 0 0 10pt;
  }

  .phone-big {
    color: #000000;
    font-size: 16pt;
  }

  .site-footer {
    background: none;
    border-top: 1px solid #000000;
  }

  .footer-grid {
    display: block;
    padding-block: 6pt 0;
  }

  .footer-org p,
  .footer-org a,
  .footer-base {
    color: #000000;
  }

  .footer-base {
    border: 0;
    padding-block: 0;
  }
}
