/* ==========================================================================
   Alpha Group – single-page static site
   Mobile-first. Breakpoints: 768px (4-column brand grid) and 1025px (desktop header).
   Every colour, font, size and spacing value lives in :root below.
   ========================================================================== */

/* ---------- 1. Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/merriweather-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/montserrat-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Questrial";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/questrial-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 2. Design tokens ---------- */
:root {
  /* colour */
  --color-ink: #1b211a;          /* headings, nav, button, drawer links */
  --color-text: #464646;         /* body text */
  --color-muted: #646464;        /* card label */
  --color-grey: #9c9c9c;         /* eyebrow, header icons, nav hover/current, button hover */
  --color-soft: #f5f6f8;         /* card border, header + drawer dividers */
  --color-white: #ffffff;
  --color-cream: #fbf9f6;        /* header, hero and brands background */
  --color-gold: #b89456;         /* founding year */
  --color-mail-bg: #f0f0f0;
  --color-mail-ink: #444444;
  --color-linkedin: #0d66c2;
  --color-brands-border: rgba(156, 156, 156, 0.23);
  --color-overlay: rgba(0, 0, 0, 0.4);

  /* font families */
  --font-body: "Inter", sans-serif;
  --font-heading: "Merriweather", serif;
  --font-ui: "Montserrat", sans-serif;
  --font-drawer: "Questrial", sans-serif;

  /* font weights */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* type scale */
  --fs-body: 1.25rem;                                        /* 20px */
  --fs-xl: clamp(2.25rem, 1.728rem + 1.63vw, 3rem);          /* h1, and h2 below 768px */
  --fs-lg: clamp(1.75rem, 1.576rem + 0.543vw, 2rem);         /* card year */
  --fs-sm: clamp(0.8rem, 0.73rem + 0.217vw, 0.9rem);         /* card label */
  --fs-h2: var(--fs-xl);                                     /* 40px at 768, 50px at 1025 (see media queries) */
  --fs-ui: 0.875rem;                                         /* nav, button: 14px */
  --fs-footer: 0.9375rem;                                    /* 15px */
  --fs-drawer-link: 1.3125rem;                               /* 21px */
  --fs-social-header: 1.125rem;                              /* 18px */
  --fs-social-contact: 2.25rem;                              /* 36px */
  --fs-menu-icon: 1.875rem;                                  /* 30px */
  --lh-body: 1.6;
  --lh-heading: 1.3;                                         /* h1 */
  --lh-subheading: 1.2;                                      /* h2 + card year below 768px (1.3 from 768px) */
  --lh-drawer-link: 1.1;                                     /* 23.1px at 21px */
  --ls-ui: 1px;

  /* layout */
  --container: 1290px;
  --gutter: 24px;
  --header-height: 133px;        /* + 1px bottom border = 134px */
  --logo-size: 123px;
  --heading-width: 550px;
  --heading-pad: 25px 0 40px;
  --hero-pad: 60px 30px 20px;
  --hero-col-margin: 0;
  --section-pad: 60px 30px;
  --grid-row-pad: 24px;
  --grid-gap: 32px;
  --footer-row-pad: 15px var(--gutter) 65px;   /* 15px = space above/below the text line */

  /* components */
  --card-pad: 16px;
  --card-border: 2px;
  --card-radius: 10px;
  --card-shadow: 0 0 3px 2px rgba(27, 33, 26, 0.09);
  --card-shadow-hover: 0 0 14px 0 rgba(0, 0, 0, 0.2);
  --btn-pad: 19px 45px;
  --social-size: 54px;
  --social-gap: 18px;
  --drawer-shadow: 0 0 2rem 0 rgba(0, 0, 0, 0.1);

  /* motion */
  --ease-card: cubic-bezier(0.17, 0.67, 0.35, 0.95);
  --ease-drawer: cubic-bezier(0.77, 0.2, 0.05, 1);
  --t-ui: 0.2s ease-in-out;
}

@media (min-width: 768px) {
  :root {
    --fs-h2: 2.5rem;                              /* 40px */
    --lh-subheading: 1.3;
    --hero-pad: 80px 30px 60px;
    --hero-col-margin: 0 30px;
    --section-pad: 60px 100px;
    --footer-row-pad: 25px var(--gutter) 115px;
  }
}

@media (min-width: 1025px) {
  :root {
    --fs-h2: 3.125rem;                            /* 50px */
    --hero-pad: 100px 20px 80px;
    --hero-col-margin: 0 30px 0 0;
    --section-pad: 120px 20px;
  }
}

/* ---------- 3. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: var(--lh-body);
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.drawer-open {
  overflow: hidden;
}

h1,
h2,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

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

svg {
  fill: currentColor;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

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

.section-wrap {
  max-width: var(--container);
  margin-inline: auto;
}

.visually-hidden,
.skip-link {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal !important;
}

.skip-link:focus {
  top: 5px;
  left: 5px;
  z-index: 100000;
  display: block;
  width: auto;
  height: auto;
  padding: 15px 23px 14px;
  clip: auto !important;
  border-radius: 3px;
  background-color: #f1f1f1;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  color: #21759b;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: normal;
  text-decoration: none;
}

/* ---------- 4. Header ---------- */
.header-row {
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  padding-top: 10px;
  text-decoration: none;
  transition: 0.1s linear;
}

.brand-logo {
  width: var(--logo-size);
  height: var(--logo-size);
}

.header-end {
  display: flex;
  align-items: center;
}

/* desktop-only pieces are hidden on mobile */
.primary-nav,
.header-social {
  display: none;
}

.menu-toggle {
  display: flex;
  align-items: center;
  padding: 0.4em 0.6em;
  border: 0;
  background: none;
  color: var(--color-ink);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: 0.2s;
}

.menu-toggle-icon {
  display: flex;
  width: var(--fs-menu-icon);
  height: var(--fs-menu-icon);
  font-size: var(--fs-menu-icon);
}

.menu-toggle-icon svg {
  width: 1em;
  height: 1em;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-nav a {
  display: block;
  padding: 0.3em 1.5em;
  color: var(--color-ink);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-ui);
  line-height: var(--lh-body);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--t-ui);
  transform: translate3d(0, 0, 0);   /* same as the original: renders the nav text with greyscale anti-aliasing */
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"],
.primary-nav a.is-current {
  color: var(--color-grey);
}

.header-social {
  gap: 0.3em;
  margin-left: 30px;
  font-size: var(--fs-social-header);
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2em;
  height: 2em;
  border-radius: 3px;
  color: var(--color-grey);
  transition: color var(--t-ui);
}

.header-social a:hover {
  color: var(--color-ink);
}

.header-social svg {
  width: 1em;
  height: 1em;
}

@media (min-width: 1025px) {
  .primary-nav {
    display: block;
  }

  .header-social {
    display: flex;
  }

  .menu-toggle,
  .drawer {
    display: none;
  }
}

/* ---------- 5. Mobile drawer ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  visibility: hidden;
  transition: visibility 0s linear 0.3s;
}

.drawer.is-open {
  visibility: visible;
  transition-delay: 0s;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.drawer.is-open .drawer-overlay {
  opacity: 1;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 90%;
  overflow: auto;
  background: var(--color-white);
  box-shadow: var(--drawer-shadow);
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease-drawer), opacity 0.25s var(--ease-drawer);
}

.drawer.is-open .drawer-panel {
  opacity: 1;
  transform: none;
}

.drawer-header {
  display: flex;
  justify-content: flex-end;
  padding: 0 30px;
}

.drawer-close {
  position: relative;
  width: 24px;
  box-sizing: content-box;
  height: 24px;
  padding: 14.4px 3.6px;
  border: 0;
  background: none;
  color: var(--color-ink);
  cursor: pointer;
  transition: 0.2s;
}

.drawer-close-bar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  margin: -1px 0 0 -9px;
  background: currentColor;
  transform: rotate(45deg);
}

.drawer-close-bar + .drawer-close-bar {
  transform: rotate(-45deg);
}

.drawer-nav {
  padding: 0 30px 30px;
}

.drawer-nav a {
  display: block;
  padding: 21px 10.5px;
  border-bottom: 1px solid var(--color-soft);
  color: var(--color-ink);
  font-family: var(--font-drawer);
  font-size: var(--fs-drawer-link);
  font-weight: var(--fw-regular);
  line-height: var(--lh-drawer-link);
  text-decoration: none;
  transition: 0.1s linear;
}

/* ---------- 6. Shared pieces ---------- */
.section-heading {
  max-width: var(--heading-width);
  margin-inline: auto;
  padding: var(--heading-pad);
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 0.5em;
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  line-height: var(--lh-subheading);
}

.btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-pad);
  background: var(--color-ink);
  color: var(--color-white);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-ui);
  line-height: var(--lh-body);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: 0.2s;
}

.btn:hover {
  background: var(--color-grey);
}

/* ---------- 7. Hero ---------- */
.hero {
  background: var(--color-cream);
}

.hero-wrap {
  padding: var(--hero-pad);
}

.hero-col {
  margin: var(--hero-col-margin);
  text-align: center;
}

.eyebrow {
  color: var(--color-grey);
  text-align: left;
}

.hero h1 {
  margin: calc(1.5em + 20px) 0 0.5em;   /* 1.5em above, plus 20px of space under the eyebrow */
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-ui);
  line-height: var(--lh-heading);
}

.hero-intro {
  margin-bottom: 32px;
}

@media (min-width: 1025px) {
  .eyebrow {
    text-align: center;
  }
}

/* ---------- 8. Brands ---------- */
.brands {
  background: var(--color-cream);
  border: 1px solid var(--color-brands-border);
}

.brands-wrap {
  padding: var(--section-pad);
}

.brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--grid-gap);
  padding: var(--grid-row-pad);
}

/* The last row has two cards in the middle; these empty cells keep them centred. */
.brand-row--last::before,
.brand-row--last::after {
  content: "";
}

.brand-card {
  display: block;
  padding: var(--card-pad);
  border: var(--card-border) solid var(--color-soft);
  border-radius: var(--card-radius);
  background: var(--color-white);
  box-shadow: var(--card-shadow);
  color: var(--color-ink);
  text-align: center;
  text-decoration: none;
  transition: box-shadow 0.3s var(--ease-card);
}

.brand-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.brand-media-wrap {
  margin: 0 15px 10px;
}

.brand-media {
  display: inline-block;
  max-width: 100%;
  background: var(--color-soft);
}

.brand-ratio {
  position: relative;
  width: 768px;
  max-width: 100%;
  height: 0;
  padding-bottom: 39.0625%;   /* 300 / 768 */
}

.brand-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.brand-year {
  margin: 5px 0 10px;
  color: var(--color-gold);
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-subheading);
}

.brand-label {
  color: var(--color-muted);
  font-size: var(--fs-sm);
}

@media (min-width: 768px) {
  .brand-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- 9. Contact ---------- */
.contact {
  background: var(--color-white);
}

.contact-wrap {
  padding: var(--section-pad);
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--social-gap);
  font-size: var(--fs-social-contact);
}

.social-link {
  border-radius: 9999px;
  background: var(--color-mail-bg);
  color: var(--color-mail-ink);
  transition: transform 0.1s;
}

.social-link--linkedin {
  background: var(--color-linkedin);
  color: var(--color-white);
}

.social-link:hover {
  transform: scale(1.1);
}

.social-link a {
  display: flex;
  align-items: center;
  padding: 9px;
  text-decoration: none;
  transition: 0.1s linear;
}

.social-link svg {
  width: 1em;
  height: 1em;
}

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--color-white);
}

.footer-container {
  padding: var(--footer-row-pad);
}

.footer-text {
  font-family: var(--font-ui);
  font-size: var(--fs-footer);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  text-align: center;
}

.footer-text a {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 0.1em;
  transition: 0.1s linear;
}

.footer-text a:hover {
  text-underline-offset: 0.25em;
}

/* ---------- 11. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
