/* Digital Isles - site styles
   Mobile-first. Brand colours are fixed; see :root.
   Accessibility note: teal (#0891B2) and slate (#797777) fall below 4.5:1 on
   white, so they are only ever used for large-scale text (>= 24px regular or
   >= 18.66px bold, which needs 3:1) and for non-text accents. */

:root {
  --charcoal: #201E1D;
  --teal: #0891B2;
  --slate: #797777;
  --white: #FFFFFF;
  --light-grey: #F2F2F2;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1100px;
  --gutter: 1.25rem;
  --section-space: 4rem;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Base */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
}

/* The recurring accent: a short teal rule beneath section headings */
h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin-top: 1rem;
  background: var(--teal);
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}

a {
  color: var(--charcoal);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 150ms ease, background-color 150ms ease, text-decoration-color 150ms ease;
}

a:focus-visible {
  outline: 3px solid var(--charcoal);
  outline-offset: 4px;
  border-radius: 2px;
}

.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;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--charcoal);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.skip-link:focus-visible {
  outline-color: var(--teal);
}

/* Layout */
.container {
  width: 100%;
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
}

.section--alt {
  background: var(--light-grey);
}

.section h2 {
  margin-bottom: 2rem;
}

.prose {
  max-width: 40rem;
}

.prose p + p {
  margin-top: 1rem;
}

/* Header */
.site-header {
  padding-block: 1.5rem;
  background: var(--charcoal);
}

.brand {
  display: inline-block;
}

/* Charcoal focus ring would vanish on the dark header */
.site-header a:focus-visible {
  outline-color: var(--white);
}

.brand img {
  width: auto;
  height: 2.25rem;
}

/* Intro */
.intro {
  padding-block: 3.5rem var(--section-space);
}

.intro h1 {
  margin-bottom: 1.75rem;
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
}

/* Services */
.service-list {
  display: grid;
  gap: 2.5rem;
}

.service-number {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--slate);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.service h3 {
  margin-bottom: 0.5rem;
}

.service p {
  max-width: 32rem;
}

/* Dendash */
.actions {
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: 4px;
  background: var(--teal);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.button:hover {
  background: var(--charcoal);
}

.button:focus-visible {
  outline-offset: 3px;
}

/* Contact */
.contact-email {
  margin-top: 1.25rem;
}

.contact-email a {
  color: var(--teal);
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}

.contact-email a:hover {
  color: var(--charcoal);
}

/* Footer */
.site-footer {
  padding-block: 3rem;
  background: var(--charcoal);
  color: var(--white);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-logo {
  width: auto;
  height: 1.75rem;
  margin-bottom: 1.5rem;
}

.legal {
  max-width: 40rem;
}

.copyright {
  margin-top: 0.75rem;
  color: var(--light-grey);
}

/* 404 */
.not-found {
  padding-block: 4rem 6rem;
}

.not-found .error-code {
  margin-bottom: 0.75rem;
  color: var(--slate);
  font-size: 1.25rem;
  font-weight: 700;
}

.not-found h1 {
  margin-bottom: 1.5rem;
}

/* Wider screens */
@media (min-width: 640px) {
  :root {
    --gutter: 2rem;
    --section-space: 5.5rem;
  }

  .brand img {
    height: 2.75rem;
  }

  .service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem 4rem;
  }
}

@media (min-width: 960px) {
  :root {
    --section-space: 7rem;
  }

  .site-header {
    padding-block: 2rem;
  }

  .intro {
    padding-top: 5rem;
  }

  .intro h1 {
    margin-bottom: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
