/* ==========================================================================
   CSS Reset (minimal)
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  line-height: 1.5;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}


/* ==========================================================================
   CSS Variables (:root)
   ========================================================================== */

:root {
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Layout */
  --container-max: 1200px;
  --container-padding: var(--space-md);

  /* Breakpoints (for reference; use in media queries) */
  /* Base: 0px+ | Tablet: 1024px+ | Desktop: 1470px+ | XL: 1920px+ */
}


/* ==========================================================================
   Typography system
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: #FAFAFA;
}

p {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
  font-size: 16px;
  line-height: 1.4;
}

.site-nav ul,
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 16px;
}

@media (max-width: 559px) {
  .site-nav ul,
  .footer-nav ul {
    gap: 8px;
  }
}

.site-nav li,
.footer-nav li {
  line-height: 0;
}

.nav-icon {
  display: block;
  width: 16px;
  height: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  border-radius: 3px;
  overflow: hidden;
}

.card__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0;
}

.work-grid.work-media-loaded .card--overdraft .card__media {
  background-image: url("../assets/images/overdraft_thumb2.png");
}

.work-grid.work-media-loaded .card--ai .card__media {
  background-image: url("../assets/images/ai_thumb2.png");
}

.work-grid.work-media-loaded .card--horizon .card__media {
  background-image: url("../assets/images/horizon_thumb.png");
}

.work-grid.work-media-loaded .card--lsg .card__media {
  background-image: url("../assets/images/lsg_thumb.png");
}

.site-nav a,
.footer-nav a,
.card-link {
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
  text-decoration: none;
  font-size: 16px;
}

.footer-privacy-link {
  text-decoration: underline;
}

.site-nav a,
.footer-nav a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s;
}

.site-nav a:hover,
.footer-nav a:hover {
  border-color: #FAFAFA;
}

h1, h2, h3, h4, h5, h6,
.site-logo {
  font-family: "Roboto Mono", monospace;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: -2.2%;
}

.site-logo {
  text-decoration: none;
  font-size: 32px;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--line-height-tight);
}

h1 { font-size: 24px; }
h2 { font-size: 32px; margin-bottom: 24px; }
h3 { font-size: 24px; }


/* ==========================================================================
   Base / Mobile Spacing
   ========================================================================== */

.card h3 {
  margin-bottom: 24px;
}

.card + .card {
  margin-top: 24px;
}

p + p {
  margin-top: 16px;
}


/* ==========================================================================
   Work cards – Base / Mobile
   ========================================================================== */

#work .card {
  background-color: #FAFAFA;
  border-radius: 3px;
}

#work .card__content {
  padding: 16px;
}

#work .card h3 {
  color: #1E1E1E;
}

#work .card p {
  color: #1E1E1E;
}

#work .card .card-link {
  background-color: #1E1E1E;
  color: #FAFAFA;
  padding: 16px;
  display: inline-block;
  margin-top: 24px;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s;
}

#work .card .card-link:hover {
  border-color: #1E1E1E;
  color: #1E1E1E;
  background-color: #FAFAFA;
}

/* Adjust paragraph spacing inside work cards to use bottom margin */
#work .card p {
  margin-bottom: 16px;
}

#work .card p:last-of-type {
  margin-bottom: 0;
}

#work .card p + p {
  margin-top: 0;
}


/* ==========================================================================
   Modal – Base / Mobile
   ========================================================================== */

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background-color: #000000;
  opacity: 0.6;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  background-color: #FAFAFA;
  color: #1E1E1E;
  padding: 24px;
  width: calc(100% - 32px);
  max-width: 480px;
}

.modal__content > * + * {
  margin-top: 16px;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

.modal__close img {
  display: block;
  width: 16px;
  height: 16px;
}


/* ==========================================================================
   Container system
   ========================================================================== */

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


/* ==========================================================================
   Base layout & sections
   ========================================================================== */

.site-header {
  padding-top: 48px;
  padding-bottom: 0;
  background-color: #BA0C2F;
  color: #FAFAFA;
}

.site-nav {
  margin-top: 16px;
}

.hero {
  padding-top: 40px;
  padding-bottom: var(--space-2xl);
  background-color: #BA0C2F;
  color: #FAFAFA;
}

.hero__headline {
  font-family: "Roboto Mono", monospace;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: -2.2%;
  line-height: var(--line-height-tight);
  font-size: 28px;
  margin-top: 0;
}

.hero__intro,
.hero-heading {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  margin-top: 16px;
  max-width: 500px;
}

.hero__intro {
  font-size: 16px;
}

.hero-heading {
  font-size: 20px;
}

.section {
  padding-block: var(--space-2xl);
}

#work {
  background-color: #191919;
  color: #FAFAFA;
}

#about {
  position: relative;
  background-color: #000000;
  color: #FAFAFA;
}

#about .container {
  position: relative;
  z-index: 1;
}

#about.about-bg-loaded::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../assets/images/workshop.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

#capabilities {
  background-color: #FAFAFA;
}

#capabilities h2 {
  color: #1E1E1E;
}

#capabilities .capability-tile {
  background-color: #1E1E1E;
  border-radius: 3px;
}

#capabilities .capability-tile h3 {
  color: #FAFAFA;
}

#capabilities .capability-tile p {
  color: #FAFAFA;
}

/* ==========================================================================
   Nav links – Base / Phablet (below 1024px)
   ========================================================================== */

@media (max-width: 1023px) {
  .site-nav a,
  .footer-nav a {
    padding: 0;
    margin-right: 16px;
  }
}

@media (max-width: 767px) {
  .site-nav a:hover,
  .footer-nav a:hover {
    border-color: transparent;
  }
}

/* ==========================================================================
   Capabilities – Base / Phablet / Small Tablet (below 1024px)
   ========================================================================== */

@media (max-width: 1023px) {
  #capabilities {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  #capabilities h2 {
    margin-bottom: 24px;
  }

  #capabilities .capability-tile {
    padding: 16px;
  }

  #capabilities .capability-tile + .capability-tile {
    margin-top: 24px;
  }

  #capabilities .capability-tile h3 {
    margin-bottom: 24px;
  }

  #capabilities .capability-tile p {
    margin-bottom: 16px;
  }

  #capabilities .capability-tile p:last-of-type {
    margin-bottom: 0;
  }
}

.site-footer {
  padding-block: var(--space-xl);
  background-color: #BA0C2F;
  color: #FAFAFA;
}

.site-footer p {
  margin-bottom: 16px;
}

.site-header a,
.hero a,
#work a,
#about a,
.site-footer a {
  color: #FAFAFA;
}


/* ==========================================================================
   Skip link (accessibility)
   ========================================================================== */

.skip-link {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: #000;
  color: #fff;
  text-decoration: none;
  z-index: 100;
  transform: translateY(-200%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translateY(0);
}


/* ==========================================================================
   Utility classes – Spacing
   ========================================================================== */

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.pt-md { padding-top: var(--space-md); }
.pb-md { padding-bottom: var(--space-md); }


/* ==========================================================================
   Utility classes – Layout helpers
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stack > * + * {
  margin-top: var(--space-md);
}

.stack-sm > * + * {
  margin-top: var(--space-sm);
}

.stack-lg > * + * {
  margin-top: var(--space-lg);
}


/* ==========================================================================
   Breakpoint: Phablet (560px–1023px)
   ========================================================================== */

@media (min-width: 560px) and (max-width: 1023px) {
  .hero__headline {
    font-size: 40px;
  }

  .hero__headline .hero__headline-br {
    display: block;
  }

  .hero-heading {
    font-size: 24px;
  }
}

/* ==========================================================================
   Breakpoint: Small Tablet (768px–1023px)
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1023px) {
  .hero__headline {
    font-size: 48px;
  }

  .site-nav a,
  .footer-nav a {
    padding: 8px;
    margin-right: 0;
  }

  .site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .site-nav {
    margin-top: 0;
  }
}

/* ==========================================================================
   Breakpoint: Tablet (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
  /* Layout */
  .container {
    max-width: 976px;
    margin-inline: auto;
  }

  .site-header {
    padding-top: 64px;
  }

  .site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .site-nav {
    margin-top: 0;
  }

  .site-nav a,
  .footer-nav a {
    padding: 8px;
    margin-right: 0;
  }

  .site-nav a:hover,
  .footer-nav a:hover {
    border-color: #FAFAFA;
  }

  h1, h2, .site-logo,
  .hero__headline {
    letter-spacing: 3%;
  }

  .hero {
    padding-top: 0;
    padding-bottom: 94px;
  }

  .hero .container {
    padding-top: 80px;
  }

  /* Hero typography */
  .hero__headline {
    font-size: 64px;
  }

  .hero__headline .hero__headline-br {
    display: block;
  }

  .hero__intro,
  .hero-heading {
    font-size: 24px;
    max-width: 730px;
    margin-top: 24px;
  }

  /* Work & About sections */
  #work.section,
  #about.section {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  #work h2,
  #about h2,
  #capabilities h2 {
    font-size: 56px;
    margin-bottom: 48px;
  }

  .work-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
  }

  #work .card {
    display: flex;
    flex-direction: row;
  }

  #work .card__content,
  #work .card__media {
    width: 50%;
  }

  #work .card__content {
    display: flex;
    flex-direction: column;
    padding: 48px;
  }

  #work .card .card-link {
    margin-top: auto;
    align-self: flex-start;
  }

  #work .card__content p:last-of-type {
    margin-bottom: 24px;
  }

  #work .card h3 {
    font-size: 24px;
  }

  #work .card p {
    font-size: 16px;
  }

  #about p {
    font-size: 24px;
    max-width: 730px;
  }

  /* Capabilities section */
  #capabilities {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  #capabilities .capabilities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  #capabilities .capability-tile {
    padding: 48px;
  }

  #capabilities .capability-tile h3 {
    font-size: 24px;
    margin-bottom: 32px;
  }

  #capabilities .capability-tile p {
    margin-bottom: 16px;
  }

  #capabilities .capability-tile p:last-of-type {
    margin-bottom: 0;
  }

  /* Footer */
  .site-footer {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .site-footer p {
    margin-bottom: 0;
    font-size: 16px;
  }
}


/* ==========================================================================
   Desktop (1440px+)
   ========================================================================== */

@media (min-width: 1440px) {
  .container {
    max-width: 1128px;
    margin-inline: auto;
  }

  h3,
  #work .card h3,
  #capabilities .capability-tile h3 {
    font-size: 32px;
  }

  .hero__intro,
  .hero-heading {
    font-size: 32px;
    max-width: 1024px;
  }

  #about p {
    max-width: 800px;
  }
}


/* ==========================================================================
   Breakpoint: Desktop (1470px+)
   ========================================================================== */

@media (min-width: 1470px) {
  :root {
    --container-padding: var(--space-xl);
  }
}


/* ==========================================================================
   Breakpoint: XL (1920px+)
   ========================================================================== */

@media (min-width: 1920px) {
  :root {
    --container-max: 1400px;
    --container-padding: var(--space-2xl);
  }
}


.footer-privacy-link {
  text-decoration: underline;
}
