/* Shared across index.html and the case study pages.
   Self-contained: owns the site header, the social icon list, and the design
   tokens both stylesheets consume. Link this BEFORE the page stylesheet. */

/* Tokens */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #37BDF9;
    --rule-color: #353F4F;
    --page-bg: #1A2132;
    --surface: #1D293B;
    --text: #E2E8F0;
    --text-muted: #b9c9de;
    --gate-error: #FF8A8A;
    --button-bg: #37BDF9;
    --button-fg: #1A2132;
    --offer-rule: #8FEC94;
    --section-label-color: #8FA3BD;
  }
}
@media (prefers-color-scheme: light) {
  :root {
    --accent: #1967d2;
    --rule-color: #C9D6FE;
    --page-bg: #FFFFFF;
    --surface: #F2F5FF;
    --text: #1C1C57;
    --text-muted: #333333;
    --gate-error: #B3261E;
    --button-bg: #1967d2;
    --button-fg: #FFFFFF;
    --offer-rule: #2F8F3E;
    --section-label-color: #5B6673;
  }
}

/* Header */
.siteHeader {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.masthead {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  align-self: stretch;
  gap: 20px;
  padding-bottom: 20px;
}
.mastheadIdentity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.masthead h1 {
  font-family: "Inter", "Inter Fallback", sans-serif;
  font-size: 32px;
  line-height: 40px;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin: 0;
  padding-bottom: 0;
  color: var(--text);
}
.masthead h1 a {
  color: inherit;
  text-decoration: none;
}
.masthead h1 a:hover {
  text-decoration: underline;
}
.mastheadTitle {
  text-wrap: balance;
  font-family: "Inter", "Inter Fallback", sans-serif;
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  margin: 0;
  color: var(--text-muted);
}
.rule-below {
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: var(--rule-color);
}

/* Social icons */
.list-reset {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.list-reset li {
  list-style: none;
  margin-bottom: 0;
}
.socialLinks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
}
.socialLinks svg {
  width: 22px;
  height: 22px;
}
.socialLinks li {
  display: flex;
  padding-left: 0;
}
.socialLinks a {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
  color: var(--accent);
}
.socialLinks a:hover {
  opacity: 0.7;
  text-decoration: none;
}
.masthead .mastheadSocial {
  margin-top: 0;
}

@media (max-width: 1000px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .masthead h1 {
    font-size: 26px;
    line-height: 32px;
  }
  .mastheadTitle {
    line-height: 26px;
  }
}

/* Section label */
.sectionLabel {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--section-label-color);
}

/* Footer */
.siteFooter .footerAbout {
  padding: 0;
  background: transparent;
}
.footerAbout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  width: 100%;
}
.footerGrid {
  border-top: 1px solid var(--rule-color);
  padding-top: var(--space-6);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-9);
  width: 100%;
  align-items: start;
}
/* Variant: no section label above the footer, so no rule either. */
.siteFooter--bare .footerGrid {
  border-top: 0;
  padding-top: 0;
}

.footerId {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.footerId .avatar {
  flex: 0 0 auto;
  margin-bottom: var(--space-4);
}
.footerId .footerName {
  margin-bottom: var(--space-1);
}
address.footerContact {
  font-style: normal;
}

.footerContact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.footerLocation {
  font-size: 14px;
  line-height: 22px;
  color: var(--section-label-color);
  margin: 0;
}
.footerName {
  font-size: 22px;
  line-height: 32px;
  background: none;
  -webkit-text-fill-color: currentColor;
  margin: 0;
}
.footerText {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}
.footerText .footerClose {
  margin-top: var(--space-4);
}
.footerId .footerSocial {
  margin-top: 0;
}
.footerAbout p {
  margin: 0;
}
.avatar {
  width: 84px;
}
.footerText a:not(.button) {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.footerText a:not(.button):hover {
  text-decoration: underline;
}

@media (max-width: 1000px) {
  .sectionLabel {
    font-size: 13px;
    letter-spacing: 1px;
  }
  .footerName {
    font-size: 19px;
    line-height: 25px;
  }
  .footerGrid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* Offer section */
.offer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}
.offerGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
}
.offerCard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0 0;
  text-indent: 0;
  border-top-width: 2px;
  border-top-style: solid;
  border-top-color: var(--offer-rule);
}
.offerCard h3 {
  font-size: 19px;
  line-height: 26px;
}
.offerCard p {
  margin: 0;
}
.offerCard h3 {
  color: var(--text);
  margin: 0;
}
.offerCard p {
  color: var(--text-muted);
}

/* Button — shared by the homepage hero CTA and the case study footers */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: "Inter", "Inter Fallback", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: var(--button-bg);
  color: var(--button-fg);
}
.button:hover {
  opacity: 0.9;
  text-decoration: none;
}
/* The case study sheet paints `a svg path` in the accent colour, which would
   make the arrow disappear into the button fill. Class beats those elements. */
.button svg path {
  fill: currentColor;
}

/* Footer CTA — mirrors .heroCta / .heroCtaNote on the homepage */
.footerCta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.footerCtaNote {
  text-wrap: balance;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-muted);
  margin: 0;
}
