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

body,
h1,
h2,
h3,
p,
figure {
  margin: 0;
}

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

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

/* Fonts */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}

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

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700.woff2") format("woff2");
}

/* Colour scheme
   Brand colours: #0D2B36 (deep teal), #00B4A6 (brand teal), #AADF2E (lime), #F7F9F9 (off-white).
   #00B4A6 as text on #F7F9F9 measures 2.46:1 (fails WCAG AA); --colour-link-text is a
   darkened shade of the same hue used only where teal is *text*, so links stay legible
   in light mode. Lime measures under 1.5:1 as text on either light-mode background, so it
   is never used as a text/link colour there - background/decoration only, paired with
   --colour-teal-deep text on top (9.4:1). The hero/CTA bands below are a fixed-dark brand
   treatment (same in light and dark OS mode); glow blob opacities were chosen so off-white
   text over them never drops below 5.6:1 even at full overlap - see contrast notes inline. */
:root {
  --colour-teal-deep: #0d2b36;
  --colour-teal-brand: #00b4a6;
  --colour-teal-brand-text: #007067;
  --colour-lime: #aadf2e;
  --colour-off-white: #f7f9f9;

  --colour-background: var(--colour-off-white);
  --colour-text: var(--colour-teal-deep);
  --colour-link: var(--colour-teal-brand-text);
  --colour-accent: var(--colour-teal-brand);
  --colour-on-accent: var(--colour-teal-deep);
}

@media (prefers-color-scheme: dark) {
  :root {
    --colour-background: var(--colour-teal-deep);
    --colour-text: var(--colour-off-white);
    --colour-link: var(--colour-teal-brand);
    --colour-accent: var(--colour-teal-brand);
    --colour-on-accent: var(--colour-teal-deep);
  }
}

/* Base */
html {
  color-scheme: light dark;
}

body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  background-color: var(--colour-background);
  color: var(--colour-text);
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a {
  color: var(--colour-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--colour-lime);
  text-decoration-thickness: 0.15em;
}

:focus-visible {
  outline: 2px solid var(--colour-link);
  outline-offset: 2px;
}

/* Skip link: hidden until focused, lets keyboard users bypass the repeated nav */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--colour-lime);
  color: var(--colour-teal-deep);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 700;
  transition: top 0.15s ease;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

/* Layout */
.container {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

main {
  padding-block: 3rem;
}

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--colour-link);
  font-size: 0.875rem;
}

/* Hero band: fixed-dark brand treatment, same in light and dark OS mode.
   Text sits on a deep-teal base; glow blobs are capped at opacities that keep
   off-white text well above 4.5:1 everywhere (see colour-scheme comment above). */
.hero-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--colour-teal-deep);
  color: var(--colour-off-white);
}

.hero-band::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -1;
  background-repeat: no-repeat;
  /* Each layer's tile is set well below 100% so background-position has real
     room to move it - with no background-size the tile fills the element
     exactly and background-position becomes a no-op (nothing to slide within). */
  background-size: 55% 55%, 48% 48%, 50% 50%;
  background-image: radial-gradient(circle, rgba(0, 180, 166, 0.45), transparent 60%),
    radial-gradient(circle, rgba(170, 223, 46, 0.25), transparent 55%),
    radial-gradient(circle, rgba(0, 180, 166, 0.4), transparent 60%);
  background-position: 5% 10%, 95% 5%, 75% 95%;
  filter: blur(15px);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-band::before {
    animation: hero-drift 16s ease-in-out infinite alternate;
  }
}

/* Each blob (background-position pair) drifts along its own independent path,
   so the glow reads as three separate blobs rather than one layer sliding
   as a block. */
@keyframes hero-drift {
  0% {
    background-position: 5% 10%, 95% 5%, 75% 95%;
  }

  50% {
    background-position: 35% 45%, 60% 35%, 40% 65%;
  }

  100% {
    background-position: 15% 55%, 85% 40%, 55% 100%;
  }
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.site-brand {
  display: inline-flex;
}

.site-brand img {
  height: 2rem;
  width: auto;
}

/* Logo artwork is teal/lime on transparent; invert to a solid off-white mark
   when it sits on the dark hero band (offline.html/404.html keep the original). */
.hero-band .site-brand img {
  filter: brightness(0) invert(1);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  position: relative;
  color: var(--colour-off-white);
  text-decoration: none;
  font-weight: 500;
  padding-block: 0.25rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 0.15em;
  width: 100%;
  background-color: var(--colour-lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.hero-content {
  padding-block: 3rem 4rem;
}

.hero-content--page {
  padding-block: 2rem 3rem;
}

.hero-content h1 {
  font-size: clamp(2.25rem, 5vw + 1rem, 4rem);
  max-width: 20ch;
}

.hero-content p {
  margin-top: 1.25rem;
  max-width: 38rem;
  font-size: 1.25rem;
  color: var(--colour-off-white);
}

.hero-content--page p {
  font-size: 1.125rem;
  opacity: 0.92;
}

/* Content sections */
.lede {
  font-size: 1.125rem;
  max-width: 40rem;
}

section + section {
  margin-top: 3rem;
}

.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  border: 1px solid var(--colour-link);
  border-radius: 0.75rem;
  padding: 1.5rem 1.25rem 1.25rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.3rem;
  background: linear-gradient(90deg, var(--colour-teal-brand), var(--colour-lime));
}

.card:hover,
.card:focus-within {
  transform: translateY(-0.25rem);
  box-shadow: 0 0.75rem 1.5rem -0.75rem rgb(13 43 54 / 35%);
}

.card h3 {
  margin-bottom: 0.5rem;
}

/* Founder photo: an organic blob shape (mismatched border-radius values),
   not a square or circle crop, echoing the hero's glow blobs. An offset
   gradient shape peeks out behind it for a collaged, hand-placed feel. */
.about-intro {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 40rem) {
  .about-intro {
    grid-template-columns: minmax(16rem, 23rem) 1fr;
  }
}

.founder-photo {
  position: relative;
  isolation: isolate;
  max-width: 23rem;
  margin-inline: auto;
}

@media (min-width: 40rem) {
  .founder-photo {
    margin-inline: 0;
  }
}

.founder-photo::before {
  content: "";
  position: absolute;
  inset: 1.5rem -1.5rem -1.5rem 1.5rem;
  background: linear-gradient(135deg, var(--colour-lime), var(--colour-teal-brand));
  border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  z-index: -1;
}

.founder-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 63% 37% 42% 58% / 55% 38% 62% 45%;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--colour-lime);
  color: var(--colour-teal-deep);
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 0.35rem;
  margin-top: 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover,
.button:focus-visible {
  text-decoration: none;
  transform: translateY(-0.15rem);
  box-shadow: 0 0.5rem 1rem -0.5rem rgb(13 43 54 / 45%);
}

.button--outline {
  background-color: transparent;
  color: var(--colour-off-white);
  border: 2px solid var(--colour-off-white);
}

.button--outline:hover,
.button--outline:focus-visible {
  background-color: var(--colour-off-white);
  color: var(--colour-teal-deep);
}

.notice {
  background-color: var(--colour-lime);
  color: var(--colour-teal-deep);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  display: inline-block;
}

/* CTA band: fixed-dark brand treatment matching the hero */
.cta-band {
  background-color: var(--colour-teal-deep);
  color: var(--colour-off-white);
  margin-top: 4rem;
  padding-block: 3rem;
}

.cta-band h2 {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
}

.cta-band p {
  margin-top: 0.75rem;
  max-width: 34rem;
  font-size: 1.125rem;
  opacity: 0.92;
}

/* Fade-in on load: pure CSS animation, no JS dependency. animation-fill-mode: both
   means the "from" state applies immediately without a flash of unstyled content,
   and the element is guaranteed to end at opacity: 1 - there is no failure mode
   where content stays hidden (unlike a JS/IntersectionObserver-driven reveal). */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal-in 0.6s ease both;
  }
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
