/* ============================================================
   Occurrens — main stylesheet
   Version 1.0
   
   Anchored in the Brand Kit (Occurrens-Brand-Kit.md v1.1)
   - §3 Colour: foundations, brand, support
   - §4 Typography: Source Serif 4 (body), Inter (UI/headings)
   - §5 Voice: no em-dashes, generous space, considered
   ============================================================ */

/* --- Fonts ---------------------------------------------------- */
/* Inter and Source Serif 4 served from Google Fonts. 
   For full sovereignty later, self-host on Hetzner. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');


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

html {
  scroll-behavior: smooth;
}

body {
  background: #f7f7f7;
  color: #1d1d1d;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


/* --- Colour variables ---------------------------------------- */
:root {
  /* Foundations */
  --bg: #f7f7f7;
  --surface: #ffffff;
  --subtle: #fafafa;
  --ink: #1d1d1d;
  /* Brand */
  --coral: #e35c5e;
  /* Emphasis (rare) */
  --coral-strong: #ef4136;
  /* Support */
  --warm-secondary: #efab9f;
  --quiet-accent: #fed5d1;
  --cream: #efe7db;
  /* Type */
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  /* Spacing */
  --measure: 38rem;       /* ~600-680px reading width */
  --measure-wide: 56rem;  /* wider sections */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}


/* --- Typography ---------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

h3 {
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

h4 {
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: 0;
}

p {
  margin-bottom: 1.25rem;
  max-width: var(--measure);
}

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

a {
  color: var(--coral);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms ease;
}

a:hover, a:focus {
  color: var(--coral-strong);
}

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

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

small {
  font-size: 0.875rem;
}

/* Lists */
ul, ol {
  max-width: var(--measure);
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}


/* --- Layout primitives --------------------------------------- */

/* The page wrap centres content and applies side gutters */
.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.wrap-narrow {
  max-width: 44rem;
}


/* --- Header -------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid rgba(29, 29, 29, 0.06);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
  color: var(--ink);
}

.site-header__logo:hover {
  color: var(--ink); /* logo link should not change colour on hover */
}

.site-header__logo img {
  width: 40px;
  height: 40px;
  display: block;
}

.site-header__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.site-header__name-tagline {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0;
  line-height: 1;
  color: var(--ink);
  opacity: 0.7;
  display: block;
  margin-top: 4px;
}

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

.site-nav li {
  margin: 0;
}

.site-nav a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
}

.site-nav a:hover, .site-nav a[aria-current="page"] {
  border-bottom-color: var(--coral);
  color: var(--ink);
}

/* Hamburger button — hidden on desktop */
.site-nav__toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink);
}


/* --- Hero (home page) --------------------------------------- */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
  text-align: center;
}

.hero__logo {
  width: clamp(140px, 18vw, 220px);
  height: auto;
  display: block;
  margin: 0 auto 2rem;
}

.hero__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.hero__tagline {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 auto 1.5rem;
  max-width: none;
}

.hero__supporting {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.4;
  color: var(--ink);
  opacity: 0.75;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}


/* --- Section ------------------------------------------------- */
.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section + .section {
  border-top: 1px solid rgba(29, 29, 29, 0.06);
}

.section--cream {
  background: var(--cream);
}

.section__lead {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: var(--measure);
  margin-bottom: 1.5rem;
}


/* --- Page header (interior pages) ---------------------------- */
.page-header {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}

.page-header__eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  margin-bottom: 0.5rem;
  display: block;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header__lead {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.5;
  max-width: var(--measure);
  color: var(--ink);
  opacity: 0.85;
}


/* --- Pillars / Services layout ------------------------------- */
.pillar {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.pillar + .pillar {
  border-top: 1px solid rgba(29, 29, 29, 0.08);
}

.pillar__number {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  margin-bottom: 0.5rem;
  display: block;
}

.pillar__title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}


/* --- Footer -------------------------------------------------- */
.site-footer {
  background: var(--cream);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  margin-top: clamp(3rem, 8vw, 6rem);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.site-footer__identity {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.site-footer__logo {
  width: 36px;
  height: 36px;
  display: block;
}

.site-footer__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.site-footer__name-tagline {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.75rem;
  display: block;
  margin-top: 2px;
  opacity: 0.7;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(29, 29, 29, 0.08);
}

.site-footer h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.6;
  margin-bottom: 0.875rem;
}

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

.site-footer li {
  margin-bottom: 0.5rem;
}

.site-footer a {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  border-bottom-color: var(--coral);
  color: var(--ink);
}

.site-footer__base {
  font-family: var(--sans);
  font-size: 0.8125rem;
  opacity: 0.6;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(29, 29, 29, 0.08);
}


/* --- Utility -------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--surface);
  padding: 0.75rem 1.25rem;
  font-family: var(--sans);
  font-weight: 500;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  color: var(--surface);
}


/* --- Responsive ---------------------------------------------- */
@media (max-width: 768px) {
  body {
    font-size: 17px;
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--surface);
    padding: 5rem var(--gutter) 2rem;
    z-index: 99;
  }

  .site-nav.is-open ul {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .site-nav.is-open a {
    font-size: 1.5rem;
    font-weight: 500;
  }

  .site-nav__toggle {
    display: block;
  }

  .site-header__name-tagline {
    display: none; /* small tagline below name hidden on small screens */
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .site-footer__cols {
    gap: 1.5rem;
  }
}


/* --- Reduce motion -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
